diff --git a/client/cat3/main.html b/client/cat3/main.html
index cbae61cdf..d806e62fc 100644
--- a/client/cat3/main.html
+++ b/client/cat3/main.html
@@ -107,7 +107,10 @@
+
+
+
diff --git a/client/cat3/src/clientRoutes.js b/client/cat3/src/clientRoutes.js
index 527ec017d..538102361 100644
--- a/client/cat3/src/clientRoutes.js
+++ b/client/cat3/src/clientRoutes.js
@@ -71,7 +71,7 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe
}]
}
}).state('dashboard.analytics', {
- url: "/analytics/",
+ url: "/CM/",
templateUrl: "src/partials/sections/dashboard/analytics/analytics.html",
controller: "analyticsCtrl as analytic",
resolve: {
diff --git a/client/cat3/src/partials/globals/header/headerDashboard.html b/client/cat3/src/partials/globals/header/headerDashboard.html
index 012caee01..4f4ae0775 100644
--- a/client/cat3/src/partials/globals/header/headerDashboard.html
+++ b/client/cat3/src/partials/globals/header/headerDashboard.html
@@ -35,7 +35,7 @@
- ANALYTICS
+ Cloud
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/analytics.html b/client/cat3/src/partials/sections/dashboard/analytics/analytics.html
index b90bab094..937d36807 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/analytics.html
+++ b/client/cat3/src/partials/sections/dashboard/analytics/analytics.html
@@ -97,7 +97,7 @@
-
+
@@ -107,20 +107,23 @@
-
+
-
-
-
-
+
+
+
+
+
+
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/analytics.js b/client/cat3/src/partials/sections/dashboard/analytics/analytics.js
index b4c37f53a..4d20d7d0d 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/analytics.js
+++ b/client/cat3/src/partials/sections/dashboard/analytics/analytics.js
@@ -4,7 +4,7 @@
.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', 'modulePermissionProvider', function($stateProvider, $urlRouterProvider, $httpProvider, modulePermissionProvider) {
var modulePerms = modulePermissionProvider.$get();
$stateProvider.state('dashboard.analytics.cost', {
- url: "cost/",
+ url: "analytics/cost/",
templateUrl: "src/partials/sections/dashboard/analytics/view/cost.html",
controller: "costCtrl as cost",
params:{filterView:{cost:true,viewBy:true,splitUpType:true,org:true}},
@@ -22,7 +22,7 @@
}]
}
}).state('dashboard.analytics.capacity', {
- url: "capacity/",
+ url: "analytics/capacity/",
templateUrl: "src/partials/sections/dashboard/analytics/view/capacity.html",
controller: "capacityCtrl as capaCtr",
params:{filterView:{period:true,cost:true,viewBy:true,splitUpType:true,org:true}},
@@ -40,7 +40,7 @@
}]
}
}).state('dashboard.analytics.usage', {
- url: "usage/",
+ url: "analytics/usage/",
templateUrl: "src/partials/sections/dashboard/analytics/view/usage.html",
controller: "usageCtrl as usage",
params:{filterView:{usage:true,org:true,provi:true,instanceType:true,resources:true}},
@@ -57,10 +57,47 @@
return deferred.promise;
}]
}
+ }).state('dashboard.analytics.tagMapping', {
+ url: "discovery/tagMapping/",
+ templateUrl: "src/partials/sections/dashboard/analytics/view/discoveryTagMapping.html",
+ controller: "discoveryTagMappingCtrl as disTgMap",
+ params:{filterView:{period:true,org:true,provi:true},dashboardHide:true,reportHide:true,otherTab:'Tag mapping',otherTabView:true},
+ resolve: {
+ auth: ["$q", function ($q) {
+ var deferred = $q.defer();
+ // instead, go to a different page
+ if (modulePerms.analyticsBool()) {
+ // everything is fine, proceed
+ deferred.resolve();
+ } else {
+ deferred.reject({redirectTo: 'dashboard'});
+ }
+ return deferred.promise;
+ }]
+ }
+ }).state('dashboard.analytics.resources', {
+ url: "discovery/resources/",
+ templateUrl: "src/partials/sections/dashboard/analytics/view/discoveryResources.html",
+ controller: "discoveryResourcesCtrl as disResrc",
+ params:{filterView:{period:true,org:true,provi:true},dashboardHide:true,otherTab:'Resources',otherTabView:true,reportHide:true},
+ resolve: {
+ auth: ["$q", function ($q) {
+ var deferred = $q.defer();
+ // instead, go to a different page
+ if (modulePerms.analyticsBool()) {
+ // everything is fine, proceed
+ deferred.resolve();
+ } else {
+ deferred.reject({redirectTo: 'dashboard'});
+ }
+ return deferred.promise;
+ }]
+ }
});
}])
.controller('analyticsCtrl',['$scope', '$rootScope','$state','genericServices','analyticsServices', 'workzoneServices', 'toastr', function ($scope, $rootScope, $state, genericServices,analyticsServices, workzoneServices, toastr) {
var analytic = this;
+ $scope.isTreeOpen = false;
//var splitUp=null;
analytic.tabShowChat=true;
analytic.tabShowReport=false;
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/analytics.scss b/client/cat3/src/partials/sections/dashboard/analytics/analytics.scss
index cf8c2d7cf..9953938f5 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/analytics.scss
+++ b/client/cat3/src/partials/sections/dashboard/analytics/analytics.scss
@@ -308,4 +308,17 @@
}
.marginbottom10{
margin-bottom: 10px !important;
-}
\ No newline at end of file
+}
+#tagMappting{
+ .saveBtn{
+ position: fixed;
+ bottom: 10px;
+ left: 40%;
+ }
+ .form-control{
+ height: 29px;
+ padding: 2px 10px;
+ font-size: 12px;
+ line-height: 1;
+ }
+}
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js b/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js
index bbc80f290..789d15ea9 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js
@@ -295,7 +295,7 @@
$timeout(function () {
$rootScope.applyFilter(true,'month');
capaCtr.trendsChart($rootScope.filterNewEnt);
- var treeNames = ['Analytics','capacity'];
+ var treeNames = ['Cloud Management','Analytics','capacity'];
$rootScope.$emit('treeNameUpdate', treeNames);
},500);
};
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/controller/costCtrl.js b/client/cat3/src/partials/sections/dashboard/analytics/controller/costCtrl.js
index ba53d284d..74a1b312a 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/controller/costCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/analytics/controller/costCtrl.js
@@ -290,7 +290,7 @@
$timeout(function () {
$rootScope.applyFilter(true,'month');
costObj.trendsChart($rootScope.filterNewEnt);
- var treeNames = ['Analytics','Cost'];
+ var treeNames = ['Cloud Management','Analytics','Cost'];
$rootScope.$emit('treeNameUpdate', treeNames);
},500);
};
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/controller/discoveryResourcesCtrl.js b/client/cat3/src/partials/sections/dashboard/analytics/controller/discoveryResourcesCtrl.js
new file mode 100644
index 000000000..bf5e6ff20
--- /dev/null
+++ b/client/cat3/src/partials/sections/dashboard/analytics/controller/discoveryResourcesCtrl.js
@@ -0,0 +1,12 @@
+(function (angular) {
+ "use strict";
+ angular.module('dashboard.analytics')
+ .controller('discoveryResourcesCtrl', ['$scope', '$rootScope', '$state','analyticsServices', 'genericServices','$timeout', function ($scope,$rootScope,$state,analyticsServices,genSevs,$timeout){
+ $rootScope.stateItems = $state.params;
+ $rootScope.organNewEnt.provider='0';
+ analyticsServices.applyFilter(true,null);
+ var treeNames = ['Cloud Management','Discovery','Resources'];
+ $rootScope.$emit('treeNameUpdate', treeNames);
+
+ }]);
+})(angular);
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/controller/discoveryTagMappingCtrl.js b/client/cat3/src/partials/sections/dashboard/analytics/controller/discoveryTagMappingCtrl.js
new file mode 100644
index 000000000..003ddbab3
--- /dev/null
+++ b/client/cat3/src/partials/sections/dashboard/analytics/controller/discoveryTagMappingCtrl.js
@@ -0,0 +1,39 @@
+(function (angular) {
+ "use strict";
+ angular.module('dashboard.analytics')
+ .controller('discoveryTagMappingCtrl', ['$scope', '$rootScope', '$state','analyticsServices', 'genericServices','$timeout', function ($scope,$rootScope,$state,analyticsServices,genSevs,$timeout){
+ var disTgMap=this;
+ $rootScope.stateItems = $state.params;
+ $rootScope.organNewEnt.provider='0';
+ analyticsServices.applyFilter(true,null);
+ var treeNames = ['Cloud Management','Discovery','Tag Mapping'];
+ $rootScope.$emit('treeNameUpdate', treeNames);
+ $scope.newEnt={};
+ var fltrObj=$rootScope.filterNewEnt;
+ disTgMap.tagOption=[];
+ disTgMap.getAllTags =function () {
+ $scope.newEnt={};
+ if(fltrObj && fltrObj.provider && fltrObj.provider.id) {
+ $scope.newEnt.providerId = fltrObj.provider.id;
+ $scope.isLoadingTag = true;
+ var param = {
+ inlineLoader: true,
+ url: '/providers/' + fltrObj.provider.id + '/tags'
+ };
+ genSevs.promiseGet(param).then(function (tagResult) {
+ $scope.isLoadingTag = false;
+ disTgMap.tagOption = tagResult;
+ });
+ }
+ };
+ disTgMap.save =function(){
+ console.log($scope.newEnt);
+ };
+ $rootScope.applyFilter =function(filterApp,period){
+ analyticsServices.applyFilter(true,null);
+ disTgMap.getAllTags();
+ };
+ disTgMap.getAllTags();
+
+ }]);
+})(angular);
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/controller/usageCtrl.js b/client/cat3/src/partials/sections/dashboard/analytics/controller/usageCtrl.js
index e06e454a6..fec01faf9 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/controller/usageCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/analytics/controller/usageCtrl.js
@@ -130,7 +130,7 @@
$rootScope.organNewEnt.provider='0';
$rootScope.$emit('INI_usage', 'Unassigned');
$timeout(function(){$rootScope.applyFilter(true,'month')},500);
- var treeNames = ['Analytics','Usage'];
+ var treeNames = ['Cloud Management','Analytics','Usage'];
$rootScope.$emit('treeNameUpdate', treeNames);
};
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/view/analyticsTreeMenu.html b/client/cat3/src/partials/sections/dashboard/analytics/view/analyticsTreeMenu.html
index 4e1c17730..45598da10 100644
--- a/client/cat3/src/partials/sections/dashboard/analytics/view/analyticsTreeMenu.html
+++ b/client/cat3/src/partials/sections/dashboard/analytics/view/analyticsTreeMenu.html
@@ -2,67 +2,120 @@
-
-
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/view/discoveryResources.html b/client/cat3/src/partials/sections/dashboard/analytics/view/discoveryResources.html
new file mode 100644
index 000000000..e69de29bb
diff --git a/client/cat3/src/partials/sections/dashboard/analytics/view/discoveryTagMapping.html b/client/cat3/src/partials/sections/dashboard/analytics/view/discoveryTagMapping.html
new file mode 100644
index 000000000..4f8feccd1
--- /dev/null
+++ b/client/cat3/src/partials/sections/dashboard/analytics/view/discoveryTagMapping.html
@@ -0,0 +1,125 @@
+