Skip to content

Commit

Permalink
Remove plugin tab on device page when client is not Windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblenis committed Dec 2, 2019
1 parent 73057b6 commit 1d55777
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Known Issues]
- None. Please feel free to submit an issue via [GitHub](https://github.com/ryanblenis/MeshCentral-EventLog) if you find anything.

## [0.0.16] - 2019-12-02
### Added
- Better support for plugin tabs (tab now does not display for non-Windows devices)

## [0.0.15] - 2019-11-28
### Fixed
- Plugin was rewriting entire plugin-designated area. Made it more "plugin friendly".
Expand Down
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,7 1,7 @@
{
"name": "Event Log",
"shortName": "eventlog",
"version": "0.0.15",
"version": "0.0.16",
"author": "Ryan Blenis",
"description": "An event log plugin to view, capture, and store event logs for each endpoint",
"hasAdminPanel": true,
Expand All @@ -14,5 14,5 @@
"url": "https://github.com/ryanblenis/MeshCentral-EventLog.git"
},
"versionHistoryUrl": "https://api.github.com/repos/ryanblenis/MeshCentral-EventLog/tags",
"meshCentralCompat": ">=0.4.4-x"
"meshCentralCompat": ">=0.4.5-e"
}
5 changes: 3 additions & 2 deletions eventlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 60,8 @@ module.exports.eventlog = function (parent) {

// called to notify the web server that there is a new tab in town
obj.registerPluginTab = function() {
if (currentNode.osdesc.toLowerCase().indexOf('windows') === -1) return { tabId: null, tabTitle: null };

return {
tabTitle: "Event Log",
tabId: "pluginEventLog"
Expand Down Expand Up @@ -353,8 355,7 @@ module.exports.eventlog = function (parent) {
}

obj.onDeviceRefreshEnd = function(nodeid, panel, refresh, event) {
pluginHandler.registerPluginTab(pluginHandler.eventlog.registerPluginTab);
QA('p19pages', pluginHandler.eventlog.on_device_page());
pluginHandler.registerPluginTab(pluginHandler.eventlog.registerPluginTab());
if (typeof pluginHandler.eventlog.livelog == 'undefined') { pluginHandler.eventlog.livelog = null; }
if (pluginHandler.eventlog.livelog != null) { pluginHandler.eventlog.livelog.Stop(); pluginHandler.eventlog.livelog = null; }
QH('pluginEventLog', ''); pluginHandler.eventlog.livelog = null;
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 1,8 @@

# MeshCentral-EventLog

*Current Version: 0.0.15
Released: 2019-11-28*
*Current Version: 0.0.16
Released: 2019-12-02*

Initially conceived as a proof of concept plugin for the [MeshCentral2](https://github.com/Ylianst/MeshCentral) Project to introduce extensibility into the project without requiring the MeshCentral2 project to incorporate everyone's requested changes into the main project, yet allow it to be accomplished by others. In creating this plugin, we're introducing the appropriate hooks into MeshCentral2 to allow extensibility to anyone who can write a plugin, while trying to modify the core project as little as possible.

Expand Down

0 comments on commit 1d55777

Please sign in to comment.