##// END OF EJS Templates
admin: enable navigation links from plugins
ergo -
Show More
@@ -3831,12 +3831,26 b' function kickstartAE(initialUserData) {'
3831 3831 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.list\"> Groups</a></li>\n" +
3832 3832 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.create\"> Create group</a></li>\n" +
3833 3833 " </ul>\n" +
3834 "\n" +
3835 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuUsersItems.length\">\n" +
3836 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuUsersItems\">\n" +
3837 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3838 " </li>\n" +
3839 " </ul>\n" +
3840 "\n" +
3834 3841 " </div>\n" +
3835 3842 " <div class=\"panel panel-default\">\n" +
3836 3843 " <div class=\"panel-heading\">Resources</div>\n" +
3837 3844 " <ul class=\"list-group\">\n" +
3838 3845 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.application.list\"> List applications</a></li>\n" +
3839 3846 " </ul>\n" +
3847 "\n" +
3848 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuResourcesItems.length\">\n" +
3849 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuResourcesItems\">\n" +
3850 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3851 " </li>\n" +
3852 " </ul>\n" +
3853 "\n" +
3840 3854 " </div>\n" +
3841 3855 "\n" +
3842 3856 " <div class=\"panel panel-default\">\n" +
@@ -3846,6 +3860,13 b' function kickstartAE(initialUserData) {'
3846 3860 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.system\"> System</a></li>\n" +
3847 3861 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.partitions\"> Partition Management</a></li>\n" +
3848 3862 " </ul>\n" +
3863 "\n" +
3864 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuSystemItems.length\">\n" +
3865 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuSystemItems\">\n" +
3866 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3867 " </li>\n" +
3868 " </ul>\n" +
3869 "\n" +
3849 3870 " </div>\n" +
3850 3871 " </div>\n" +
3851 3872 "\n" +
@@ -8025,10 +8046,11 b" angular.module('appenlight.components.adminView', [])"
8025 8046 controller: AdminViewController
8026 8047 });
8027 8048
8028 AdminViewController.$inject = ['$state'];
8049 AdminViewController.$inject = ['$state', 'AeConfig'];
8029 8050
8030 function AdminViewController($state) {
8051 function AdminViewController($state, AeConfig) {
8031 8052 this.$state = $state;
8053 this.AeConfig = AeConfig;
8032 8054 console.info('AdminViewController');
8033 8055 }
8034 8056
@@ -10965,7 +10987,11 b" aeconfig.factory('AeConfig', function () {"
10965 10987 menuUserSettingsItems: [],
10966 10988 menuNotificationsItems: []
10967 10989 };
10968 obj.adminNav = {};
10990 obj.adminNav = {
10991 menuUsersItems: [],
10992 menuResourcesItems: [],
10993 menuSystemItems: []
10994 };
10969 10995 obj.ws_url = window.AE.ws_url;
10970 10996 obj.urls = window.AE.urls;
10971 10997 // set keys on values because we wont be able to retrieve them everywhere
@@ -13140,14 +13166,7 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder',"
13140 13166 self.inclusions[name] = [];
13141 13167 }
13142 13168 self.inclusions[name].push(inclusion);
13143 },
13144 addnavigation: function (name, inclusion) {
13145 var self = this;
13146 if (self.inclusions.hasOwnProperty(name) === false) {
13147 self.inclusions[name] = [];
13148 13169 }
13149 self.inclusions[name].push(inclusion);
13150 },
13151 13170 };
13152 13171
13153 13172 var stateHolder = {
@@ -8,12 +8,26 b''
8 8 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.group.list"> Groups</a></li>
9 9 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.group.create"> Create group</a></li>
10 10 </ul>
11
12 <ul class="list-group" data-ng-if="$ctrl.AeConfig.adminNav.menuUsersItems.length">
13 <li class="list-group-item" ng-repeat="item in $ctrl.AeConfig.adminNav.menuUsersItems">
14 <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a>
15 </li>
16 </ul>
17
11 18 </div>
12 19 <div class="panel panel-default">
13 20 <div class="panel-heading">Resources</div>
14 21 <ul class="list-group">
15 22 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.application.list"> List applications</a></li>
16 23 </ul>
24
25 <ul class="list-group" data-ng-if="$ctrl.AeConfig.adminNav.menuResourcesItems.length">
26 <li class="list-group-item" ng-repeat="item in $ctrl.AeConfig.adminNav.menuResourcesItems">
27 <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a>
28 </li>
29 </ul>
30
17 31 </div>
18 32
19 33 <div class="panel panel-default">
@@ -23,6 +37,13 b''
23 37 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.system"> System</a></li>
24 38 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.partitions"> Partition Management</a></li>
25 39 </ul>
40
41 <ul class="list-group" data-ng-if="$ctrl.AeConfig.adminNav.menuSystemItems.length">
42 <li class="list-group-item" ng-repeat="item in $ctrl.AeConfig.adminNav.menuSystemItems">
43 <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a>
44 </li>
45 </ul>
46
26 47 </div>
27 48 </div>
28 49
@@ -23,9 +23,10 b" angular.module('appenlight.components.adminView', [])"
23 23 controller: AdminViewController
24 24 });
25 25
26 AdminViewController.$inject = ['$state'];
26 AdminViewController.$inject = ['$state', 'AeConfig'];
27 27
28 function AdminViewController($state) {
28 function AdminViewController($state, AeConfig) {
29 29 this.$state = $state;
30 this.AeConfig = AeConfig;
30 31 console.info('AdminViewController');
31 32 }
@@ -35,7 +35,11 b" aeconfig.factory('AeConfig', function () {"
35 35 menuUserSettingsItems: [],
36 36 menuNotificationsItems: []
37 37 };
38 obj.adminNav = {};
38 obj.adminNav = {
39 menuUsersItems: [],
40 menuResourcesItems: [],
41 menuSystemItems: []
42 };
39 43 obj.ws_url = window.AE.ws_url;
40 44 obj.urls = window.AE.urls;
41 45 // set keys on values because we wont be able to retrieve them everywhere
General Comments 0
You need to be logged in to leave comments. Login now