Skip to content

Commit 77be425

Browse files
authored
Merge pull request #842 from RLOpenCatalyst/topic-sevice-delivery
Topic service delivery
2 parents fe31760 + da4868a commit 77be425

File tree

16 files changed

+677
-48
lines changed

16 files changed

+677
-48
lines changed

client/cat3/Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ module.exports = function(grunt) {
8989
{'catalyst/partials/sections/dashboard/workzone/orchestration/orchestration.css':'src/partials/sections/dashboard/workzone/orchestration/orchestration.scss'},
9090
{'catalyst/partials/sections/dashboard/workzone/application/application.css':'src/partials/sections/dashboard/workzone/application/application.scss'},
9191
{'catalyst/partials/sections/dashboard/analytics/analytics.css':'src/partials/sections/dashboard/analytics/analytics.scss'},
92+
{'catalyst/partials/sections/dashboard/bots/bots.css':'src/partials/sections/dashboard/bots/bots.scss'},
9293
{'catalyst/partials/sections/dashboard/setting/setting.css':'src/partials/sections/dashboard/setting/setting.scss'}
9394
]
9495
}

client/cat3/main.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
<script src="src/partials/sections/dashboard/analytics/controller/costCtrl.js"></script>
103103
<script src="src/partials/sections/dashboard/analytics/controller/capacityCtrl.js"></script>
104104
<script src="src/partials/sections/dashboard/analytics/controller/usageCtrl.js"></script>
105+
<script src="src/partials/sections/dashboard/bots/botsCtrl.js"></script>
106+
<script src="src/partials/sections/dashboard/bots/controller/libraryCtrl.js"></script>
105107
<script src="src/partials/sections/dashboard/design/designCtrl.js"></script>
106108
<script src="src/partials/sections/dashboard/help/helpCtrl.js"></script>
107109
<script src="src/partials/sections/dashboard/setting/organization/organizationCtrl.js"></script>

client/cat3/src/clientRoutes.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe
8888

8989
}]
9090
}
91+
}).state('dashboard.bots', {
92+
url: "/bots",
93+
templateUrl: "src/partials/sections/dashboard/bots/bots.html",
94+
controller: "botsCtrl as bts",
95+
resolve: {
96+
auth: ["$q", function ($q) {
97+
var deferred = $q.defer();
98+
// instead, go to a different page
99+
if (modulePerms.serviceBool()) {
100+
// everything is fine, proceed
101+
deferred.resolve();
102+
} else {
103+
deferred.reject({redirectTo: 'dashboard'});
104+
}
105+
return deferred.promise;
106+
}]
107+
}
91108
}).state('dashboard.settings', {
92109
url: "/settings",
93110
templateUrl: "src/partials/sections/dashboard/setting/setting.html",

client/cat3/src/factory/appPermissionServices.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@
2727
//return uac.hasPermission('track','read','module');
2828
return true;
2929
};
30+
this.serviceBool = function() {
31+
//permission response not available in the api response.
32+
//return uac.hasPermission('track','read','module');
33+
return true;
34+
};
3035
}]);
3136
})(angular);

client/cat3/src/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@ angularApp.controller('HeadNavigatorCtrl', ['$scope', '$rootScope', '$http', '$l
8484
design: modulePerms.designAccess(),
8585
settings: modulePerms.settingsAccess(),
8686
track: modulePerms.trackAccess(),
87-
analyticsBool: modulePerms.analyticsBool()
87+
analyticsBool: modulePerms.analyticsBool(),
88+
serviceBool: modulePerms.serviceBool()
8889
};
8990
$rootScope.workZoneBool = _permSet.workzone;
9091
$rootScope.designBool = _permSet.design;
9192
$rootScope.settingsBool = _permSet.settings;
9293
$rootScope.trackBool = _permSet.track;
9394
$rootScope.analyticsBool = _permSet.analyticsBool;
95+
$rootScope.serviceBool = _permSet.serviceBool;
9496
});
9597
$rootScope.$emit('SET_HEADER', $rootScope.appDetails);
9698
$scope.showLogoutConfirmationSection = false;
@@ -111,4 +113,4 @@ angularApp.controller('HeadNavigatorCtrl', ['$scope', '$rootScope', '$http', '$l
111113
$rootScope.$on('USER_LOGOUT', function () {
112114
$scope.doLogout();
113115
});
114-
}]);
116+
}]);

client/cat3/src/partials/global.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ $imagePath : "../../../../../../cat3/images";
112112
z-index: 10;
113113
transition: all .4s ease 0s;
114114
left: -254px;
115+
height: 100%;
115116

116117
&.show-left-tree {
117118
left: 0px;
@@ -121,6 +122,7 @@ $imagePath : "../../../../../../cat3/images";
121122
background: linear-gradient(to right, #2c3638 99%, #2c3638 100%);
122123
color: #fff;
123124
overflow-y: auto;
125+
height: 100%;
124126
}
125127

126128
div[data-angular-treeview] {
@@ -1161,4 +1163,10 @@ option.script {
11611163
}
11621164
.loading-body{
11631165
opacity: 0.4;
1166+
}
1167+
#bots .control-panel-button {
1168+
border-radius: 11px;
1169+
padding: 2px 5px;
1170+
width: 25px;
1171+
height: 25px;
11641172
}

client/cat3/src/partials/globals/header/headerDashboard.html

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@
4040
</div>
4141
</li>
4242
<li>
43-
<div id="settings" class="headNavigItem" ng-if='settingsBool' ui-sref-active='activeSection'>
44-
<a href="/private/index.html#ajax/Settings/Dashboard.html">
45-
<i class="fa fa-cog white"></i> SETTINGS
46-
</a>
43+
<div id="service" class="headNavigItem" ng-if="serviceBool" ui-sref='dashboard.bots' ui-sref-active='activeSection'>
44+
<i class="fa fa-area-chart white"></i> BOTS
4745
</div>
4846
</li>
4947
<li class="header-right">
@@ -53,26 +51,18 @@
5351
{{appDetails.cn | uppercase}}
5452
[{{appDetails.roleId}}]
5553
</div>
56-
<div class="btn-icons dropdown pull-right" title="Menu">
57-
<i class="fa fa-ellipsis-v white dropdown-toggle cursor" data-toggle="dropdown"></i>
58-
<ul class="dropdown-menu">
59-
<li class="cursor">
60-
<span>
61-
<div title="Help">
62-
<a href="https://catalyst.readthedocs.org" target="_blank">
63-
<i class="fa fa-question blue"></i> HELP
64-
</a>
65-
</div>
66-
</span>
67-
</li>
68-
<li class="cursor">
69-
<span>
70-
<div ng-click="logoutConfirmation();" title="Logout">
71-
<i class="fa fa-sign-out blue"></i> LOGOUT
72-
</div>
73-
</span>
74-
</li>
75-
</ul>
54+
<div id="settings" class="headNavigItem" ng-if='settingsBool' ui-sref-active='activeSection'>
55+
<a href="/private/index.html#ajax/Settings/Dashboard.html">
56+
<i class="fa fa-cog white"></i> SETTINGS
57+
</a>
58+
</div>
59+
<div id="help" class="headNavigItem">
60+
<a href="https://catalyst.readthedocs.org" target="_blank">
61+
<i class="fa fa-question white"></i> HELP
62+
</a>
63+
</div>
64+
<div id="logout" ng-click="logoutConfirmation();" class="headNavigItem" title="Logout">
65+
<i class="fa fa-sign-out white"></i>
7666
</div>
7767
</div>
7868
</li>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<link rel='stylesheet' href='catalyst/partials/sections/dashboard/analytics/analytics.css'>
2+
3+
<div id="analyticsPage" class='fluid-container'>
4+
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 panelLeft no-padding'>
5+
<div ng-include="'src/partials/sections/dashboard/bots/view/botsTreeMenu.html'"></div>
6+
</div>
7+
8+
9+
<div class="panelRight" id="bots">
10+
<div id='rightPanel' class='container-fluid'>
11+
<div ui-view></div>
12+
</div>
13+
</div>
14+
</div>

0 commit comments

Comments
 (0)