Commit db986320 by Torkel Ödegaard

feat(plugins): progress on plugins page

parent f80c2406
......@@ -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';
}
}
......
......@@ -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
// -------------------------
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment