diff --git a/public/app/features/plugins/edit_ctrl.ts b/public/app/features/plugins/edit_ctrl.ts index d9ba932f53e..2c060c230de 100644 --- a/public/app/features/plugins/edit_ctrl.ts +++ b/public/app/features/plugins/edit_ctrl.ts @@ -7,7 +7,7 @@ export class PluginEditCtrl { model: any; pluginIcon: string; pluginId: any; - includedPanels: any; + includes: any; readmeHtml: any; includedDatasources: any; tabIndex: number; @@ -24,14 +24,17 @@ export class PluginEditCtrl { init() { return this.backendSrv.get(`/api/org/plugins/${this.pluginId}/settings`).then(result => { this.model = result; - this.includedPanels = _.where(result.includes, {type: 'panel'}); - this.includedDatasources = _.where(result.includes, {type: 'datasource'}); this.pluginIcon = this.getPluginIcon(this.model.type); this.model.dependencies.plugins.forEach(plug => { plug.icon = this.getPluginIcon(plug.type); }); + this.includes = _.map(result.includes, plug => { + plug.icon = this.getPluginIcon(plug.type); + return plug; + }); + return this.initReadme(); }); } @@ -50,6 +53,7 @@ export class PluginEditCtrl { case 'datasource': return 'icon-gf icon-gf-datasources'; case 'panel': return 'icon-gf icon-gf-panel'; case 'app': return 'icon-gf icon-gf-apps'; + case 'page': return 'icon-gf icon-gf-share'; } } diff --git a/public/app/features/plugins/partials/edit.html b/public/app/features/plugins/partials/edit.html index 265ec673a40..14e75cea15f 100644 --- a/public/app/features/plugins/partials/edit.html +++ b/public/app/features/plugins/partials/edit.html @@ -1,208 +1,100 @@ - - {{ctrl.model.name}} - + + {{ctrl.model.name}} +
-
- -
-

{{ctrl.model.name}}

-
By {{ctrl.model.info.author.name}}
-
- - {{ctrl.model.type}} - -
-
-
+ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/sass/_variables.scss b/public/sass/_variables.scss index a4f14fd27b5..4f1002bdc67 100644 --- a/public/sass/_variables.scss +++ b/public/sass/_variables.scss @@ -143,8 +143,8 @@ $caret-width-lg: $caret-width !default; // Page -$page-sidebar-width: 10rem; -$page-sidebar-margin: 5rem; +$page-sidebar-width: 11rem; +$page-sidebar-margin: 4rem; // Links // ------------------------- diff --git a/public/sass/pages/_plugins.scss b/public/sass/pages/_plugins.scss index 283d20ac962..1464c2ecf56 100644 --- a/public/sass/pages/_plugins.scss +++ b/public/sass/pages/_plugins.scss @@ -15,7 +15,7 @@ } .plugin-header-info-block { - padding-top: $spacer; + float: left; } .plugin-header-author { @@ -26,10 +26,23 @@ text-transform: uppercase; } -.plugin-dependency-icon { +.plugin-info-list-item { img { width: 16px; } + white-space: nowrap; + max-width: $page-sidebar-width; + text-overflow: ellipsis; + overflow: hidden; +} + +.plugin-markdown-readme { + img { + max-width: 100%; + } + ul { + padding-left: $spacer*1.5; + } } // .app-edit-logo-box {