mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(plugins): restored config view functionality to plugin page
This commit is contained in:
@@ -160,13 +160,13 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
|
||||
}
|
||||
// AppConfigCtrl
|
||||
case 'app-config-ctrl': {
|
||||
let appModel = scope.ctrl.appModel;
|
||||
return System.import(appModel.module).then(function(appModule) {
|
||||
let model = scope.ctrl.model;
|
||||
return System.import(model.module).then(function(appModule) {
|
||||
return {
|
||||
baseUrl: appModel.baseUrl,
|
||||
name: 'app-config-' + appModel.appId,
|
||||
baseUrl: model.baseUrl,
|
||||
name: 'app-config-' + model.pluginId,
|
||||
bindings: {appModel: "=", appEditCtrl: "="},
|
||||
attrs: {"app-model": "ctrl.appModel", "app-edit-ctrl": "ctrl"},
|
||||
attrs: {"app-model": "ctrl.model", "app-edit-ctrl": "ctrl"},
|
||||
Component: appModule.ConfigCtrl,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -47,6 +47,13 @@
|
||||
<editor-checkbox text="Pinned" model="ctrl.model.pinned" change="ctrl.togglePinned()"></editor-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="ctrl.model.pluginId">
|
||||
<plugin-component type="app-config-ctrl"></plugin-component>
|
||||
<div class="clearfix"></div>
|
||||
<button type="submit" class="btn btn-success" ng-click="ctrl.update()">Save</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<aside class="page-sidebar">
|
||||
@@ -56,7 +63,18 @@
|
||||
</section>
|
||||
<section class="page-sidebar-section" ng-show="ctrl.model.type === 'app'">
|
||||
<h5>Includes</h4>
|
||||
<span>TODO</span>
|
||||
<ul class="ui-list">
|
||||
<li ng-show="!ctrl.includedPanels.length"><em>None</em></li>
|
||||
<li ng-repeat="panel in ctrl.includedPanels">
|
||||
{{panel.name}}
|
||||
</li>
|
||||
<li ng-repeat="ds in ctrl.includedDatasources">
|
||||
{{ds.name}}
|
||||
</li>
|
||||
<li ng-repeat="page in ctrl.model.pages">
|
||||
<a href="apps/{{ctrl.appId}}/page/{{page.slug}}" class="external-link">{{page.name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="page-sidebar-section">
|
||||
<h5>Dependencies</h4>
|
||||
|
||||
@@ -53,7 +53,7 @@ $page-bg: $dark-2;
|
||||
$body-color: $gray-4;
|
||||
$text-color: $gray-4;
|
||||
$text-color-strong: $white;
|
||||
$text-color-weak: $gray-1;
|
||||
$text-color-weak: $gray-2;
|
||||
|
||||
// gradients
|
||||
$brand-gradient: linear-gradient(to right, rgba(255,213,0,0.7) 0%, rgba(255,68,0,0.7) 99%, rgba(255,68,0,0.7) 100%);
|
||||
|
||||
Reference in New Issue
Block a user