diff --git a/public/app/features/plugins/partials/plugin_edit.html b/public/app/features/plugins/partials/plugin_edit.html index d5f69df2366..46971bd35e7 100644 --- a/public/app/features/plugins/partials/plugin_edit.html +++ b/public/app/features/plugins/partials/plugin_edit.html @@ -55,6 +55,11 @@

Version

{{ctrl.model.info.version}} +
+ + Update Available! + +
Includes
diff --git a/public/app/plugins/panel/pluginlist/module.html b/public/app/plugins/panel/pluginlist/module.html index 9ee9e2167cf..05869911d73 100644 --- a/public/app/plugins/panel/pluginlist/module.html +++ b/public/app/plugins/panel/pluginlist/module.html @@ -1,9 +1,8 @@
-
- +
{{category.header}} -
+
@@ -12,7 +11,7 @@ Update available! - + Enable now diff --git a/public/app/plugins/panel/pluginlist/module.ts b/public/app/plugins/panel/pluginlist/module.ts index 015bd2ab340..9a9c544a7ec 100644 --- a/public/app/plugins/panel/pluginlist/module.ts +++ b/public/app/plugins/panel/pluginlist/module.ts @@ -26,6 +26,7 @@ class DashListCtrl extends PanelCtrl { {header: "Installed Panels", list: [], type: 'panel'}, {header: "Installed Datasources", list: [], type: 'datasource'}, ]; + this.update(); } @@ -42,30 +43,10 @@ class DashListCtrl extends PanelCtrl { this.viewModel[2].list = _.filter(plugins, {type: 'datasource'}); for (let plugin of this.pluginList) { - if (!plugin.enabled) { - plugin.state = 'not-enabled'; - } - } - - }).then(this.checkForUpdates.bind(this)); - } - - checkForUpdates() { - return this.backendSrv.get('api/gnet/plugins/repo').then(data => { - var gNetPlugins = _.reduce(data.plugins, (memo, val) => { - memo[val.id] = val; - return memo; - }, {}); - - for (let plugin of this.pluginList) { - var source = gNetPlugins[plugin.id]; - if (!source) { - continue; - } - - if (plugin.info.version !== source.versions[0].version) { - plugin.hasUpdate = true; + if (plugin.hasUpdate) { plugin.state = 'has-update'; + } else if (!plugin.enabled) { + plugin.state = 'not-enabled'; } } }); diff --git a/public/sass/components/_panel_pluginlist.scss b/public/sass/components/_panel_pluginlist.scss index 711565a9480..0d02196e975 100644 --- a/public/sass/components/_panel_pluginlist.scss +++ b/public/sass/components/_panel_pluginlist.scss @@ -29,7 +29,7 @@ } .pluginlist-title { - margin-right: $spacer / 3; + margin-right: $spacer / 3; } .pluginlist-version {