Commit d55dc925 by Torkel Ödegaard

feat(plugins): restored config view functionality to plugin page

parent c148d890
......@@ -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%);
......
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