Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/cat3/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ module.exports = function(grunt) {
{'catalyst/partials/sections/dashboard/workzone/orchestration/orchestration.css':'src/partials/sections/dashboard/workzone/orchestration/orchestration.scss'},
{'catalyst/partials/sections/dashboard/workzone/application/application.css':'src/partials/sections/dashboard/workzone/application/application.scss'},
{'catalyst/partials/sections/dashboard/analytics/analytics.css':'src/partials/sections/dashboard/analytics/analytics.scss'},
{'catalyst/partials/sections/dashboard/service/service.css':'src/partials/sections/dashboard/service/service.scss'},
{'catalyst/partials/sections/dashboard/setting/setting.css':'src/partials/sections/dashboard/setting/setting.scss'}
]
}
Expand Down
1 change: 1 addition & 0 deletions client/cat3/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<script src="src/partials/sections/dashboard/analytics/controller/costCtrl.js"></script>
<script src="src/partials/sections/dashboard/analytics/controller/capacityCtrl.js"></script>
<script src="src/partials/sections/dashboard/analytics/controller/usageCtrl.js"></script>
<script src="src/partials/sections/dashboard/service/service.js"></script>
<script src="src/partials/sections/dashboard/design/designCtrl.js"></script>
<script src="src/partials/sections/dashboard/help/helpCtrl.js"></script>
<script src="src/partials/sections/dashboard/setting/organization/organizationCtrl.js"></script>
Expand Down
17 changes: 17 additions & 0 deletions client/cat3/src/clientRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe

}]
}
}).state('dashboard.service', {
url: "/service/",
templateUrl: "src/partials/sections/dashboard/service/service.html",
controller: "serviceCtrl",
resolve: {
auth: ["$q", function ($q) {
var deferred = $q.defer();
// instead, go to a different page
if (modulePerms.serviceBool()) {
// everything is fine, proceed
deferred.resolve();
} else {
deferred.reject({redirectTo: 'dashboard'});
}
return deferred.promise;
}]
}
}).state('dashboard.settings', {
url: "/settings",
templateUrl: "src/partials/sections/dashboard/setting/setting.html",
Expand Down
5 changes: 5 additions & 0 deletions client/cat3/src/factory/appPermissionServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
//return uac.hasPermission('track','read','module');
return true;
};
this.serviceBool = function() {
//permission response not available in the api response.
//return uac.hasPermission('track','read','module');
return true;
};
}]);
})(angular);
6 changes: 4 additions & 2 deletions client/cat3/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ angularApp.controller('HeadNavigatorCtrl', ['$scope', '$rootScope', '$http', '$l
design: modulePerms.designAccess(),
settings: modulePerms.settingsAccess(),
track: modulePerms.trackAccess(),
analyticsBool: modulePerms.analyticsBool()
analyticsBool: modulePerms.analyticsBool(),
serviceBool: modulePerms.serviceBool()
};
$rootScope.workZoneBool = _permSet.workzone;
$rootScope.designBool = _permSet.design;
$rootScope.settingsBool = _permSet.settings;
$rootScope.trackBool = _permSet.track;
$rootScope.analyticsBool = _permSet.analyticsBool;
$rootScope.serviceBool = _permSet.serviceBool;
});
$rootScope.$emit('SET_HEADER', $rootScope.appDetails);
$scope.showLogoutConfirmationSection = false;
Expand All @@ -111,4 +113,4 @@ angularApp.controller('HeadNavigatorCtrl', ['$scope', '$rootScope', '$http', '$l
$rootScope.$on('USER_LOGOUT', function () {
$scope.doLogout();
});
}]);
}]);
5 changes: 5 additions & 0 deletions client/cat3/src/partials/globals/header/headerDashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
<i class="fa fa-area-chart white"></i> ANALYTICS
</div>
</li>
<li>
<div id="service" class="headNavigItem" ng-if="serviceBool" ui-sref='dashboard.service' ui-sref-active='activeSection'>
<i class="fa fa-area-chart white"></i> BOTS
</div>
</li>
<li class="header-right">
<div id="header-menu">
<div id="userInfo" class="headNavigItem" title="{{appDetails.roleId}}">
Expand Down
46 changes: 25 additions & 21 deletions client/cat3/src/partials/sections/dashboard/dashboardCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@
'dashboard.track',
'dashboard.settings',
'dashboard.design',
'dashboard.service',
'apis.workzone','dashboard.genericServices'])
.controller('dashboardCtrl', ['$rootScope', '$scope', '$http', 'uac', '$location', '$state', function ($rootScope, $scope, $http, uac, $location, $state) {
$rootScope.isBreadCrumbAvailable = true;
$rootScope.app.isDashboard = true;
if($state.current && $state.current.data && $state.current.data.menuName){
$rootScope.dashboardChild = $state.current.data.menuName;
} else {
$rootScope.dashboardChild ='';
}
$rootScope.showTreeMenu = true;
/*State will be dashboard if coming via login flow. So check permission and do default landing logic*/
/*Otherwise dont enable default landing logic. This is so that user can land on url directly*/
if ($state.current.name === 'dashboard') {
if ($rootScope.workZoneBool) {
$state.go('dashboard.workzone');
} else if ($rootScope.designBool) {
$state.go('dashboard.design');
} else if ($rootScope.trackBool) {
$state.go('dashboard.track');
} else if ($rootScope.settingsBool) {
$state.go('dashboard.settings');
$rootScope.isBreadCrumbAvailable = true;
$rootScope.app.isDashboard = true;
if($state.current && $state.current.data && $state.current.data.menuName){
$rootScope.dashboardChild = $state.current.data.menuName;
} else {
$rootScope.dashboardChild ='';
}
$rootScope.showTreeMenu = true;
/*State will be dashboard if coming via login flow. So check permission and do default landing logic*/
/*Otherwise dont enable default landing logic. This is so that user can land on url directly*/
if ($state.current.name === 'dashboard') {
if ($rootScope.workZoneBool) {
$state.go('dashboard.workzone');
} else if ($rootScope.designBool) {
$state.go('dashboard.design');
} else if ($rootScope.trackBool) {
$state.go('dashboard.track');
} else if ($rootScope.settingsBool) {
$state.go('dashboard.settings');
} else if ($rootScope.serviceBool) {
$state.go('dashboard.service');
}
}
}
}
}]);
]);
})(angular);
13 changes: 13 additions & 0 deletions client/cat3/src/partials/sections/dashboard/service/service.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<link rel='stylesheet' href='catalyst/partials/sections/dashboard/analytics/service.css'>

<div id="analyticsPage" class='fluid-container' ng-controller="serviceCtrl">
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 panelLeft no-padding'>
<div ng-include="'src/partials/sections/dashboard/service/view/serviceTreeMenu.html'"></div>
</div>

<div class="panelRight">
<div id='rightPanel' class='container-fluid'>
<!-- <div id="grid1" ui-grid="botLibraryGrid" class="grid"></div> -->
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(function (angular) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@divakarkonakalla
@udeshrl
Rename the file name .
"seviceDeliveryCtrl.js"

"use strict";
angular.module('dashboard.service', ['ngTouch', 'ui.grid'])
.controller('serviceCtrl',['$scope', '$rootScope', 'uiGridOptionsClient', 'uiGridConstants', 'workzoneServices', function ($scope, $rootScope, uiGridOptionsClient, uiGridConstants, workzoneServices) {

}]);
})(angular);
Loading