diff --git a/public/app/features/plugins/partials/plugin_list.html b/public/app/features/plugins/partials/plugin_list.html index 04beee4e05b..5c3d38b3459 100644 --- a/public/app/features/plugins/partials/plugin_list.html +++ b/public/app/features/plugins/partials/plugin_list.html @@ -4,6 +4,26 @@
@@ -31,12 +51,12 @@ - - -
- - Edit - -
-
+ + Edit + + + + + + diff --git a/public/app/features/plugins/plugin_list_ctrl.ts b/public/app/features/plugins/plugin_list_ctrl.ts index 2693a4d8755..9e9b679c6c1 100644 --- a/public/app/features/plugins/plugin_list_ctrl.ts +++ b/public/app/features/plugins/plugin_list_ctrl.ts @@ -4,11 +4,28 @@ import angular from 'angular'; export class PluginListCtrl { plugins: any[]; + tabIndex: number; /** @ngInject */ - constructor(private backendSrv: any) { + constructor(private backendSrv: any, $location) { + this.tabIndex = 0; - this.backendSrv.get('api/plugins', {embedded: 0}).then(plugins => { + var pluginType = $location.search().type || 'panel'; + switch (pluginType) { + case "datasource": { + this.tabIndex = 1; + break; + } + case "app": { + this.tabIndex = 2; + break; + } + case "panel": + default: + this.tabIndex = 0; + } + + this.backendSrv.get('api/plugins', {embedded: 0, type: pluginType}).then(plugins => { this.plugins = plugins; }); }