aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops
diff options
context:
space:
mode:
Diffstat (limited to 'ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops')
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/dbcl_view.html6
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs-view-controller.js271
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs_view.html131
3 files changed, 0 insertions, 408 deletions
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/dbcl_view.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/dbcl_view.html
deleted file mode 100644
index da9fb74..0000000
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/dbcl_view.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div id="page-content" ng-controller="tabsController">
- <h1> DMaap Bus Controller</h1>
- <iframe scrolling="yes" frameborder="0" style="width:100%; height: 800px;"
- ng-src="{{opsMenu[5].url}}">
- </iframe>
-</div> \ No newline at end of file
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs-view-controller.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs-view-controller.js
deleted file mode 100644
index f37a4f0..0000000
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs-view-controller.js
+++ /dev/null
@@ -1,271 +0,0 @@
-appDS2.controller('tabsController', function ($rootScope, $scope, $interval, b2bDOMHelper, $timeout, $route) {
- 'use strict';
- $scope.ecdapp = {};
- $scope.ecdapp.opsItem = $route.current.$$route.item;
- $scope.ecdapp.activeTabsId = $scope.ecdapp.opsItem ;
- $scope.ecdapp.activeTabUrl = '';
- $scope.ecdapp.isInit = false;
- $scope.ecdapp.cfy = {};
- $scope.ecdapp.cfy.url = ''; //$rootScope.opsMenu[0].url;
- $scope.ecdapp.cfy.site = '';
- $scope.ecdapp.cnsl = {};
- $scope.ecdapp.cnsl.url = ''; //$rootScope.opsMenu[2].url;
- $scope.ecdapp.k8 = {};
- $scope.ecdapp.k8.site = '';
- $scope.ecdapp.k8.url = ''; //$rootScope.opsMenu[3].url;
- $scope.ecdapp.k8.tenant = '';
- $scope.ecdapp.prom = {};
- $scope.ecdapp.prom.tenant = '';
- $scope.ecdapp.prom.site = '';
- $scope.ecdapp.prom.url = ''; //$rootScope.opsMenu[4].url;
- $scope.ecdapp.grf = {};
- $scope.ecdapp.grf.site = '';
- $scope.ecdapp.grf.tenant = '';
- $scope.ecdapp.grf.url = ''; //$rootScope.opsMenu[1].url;
- $scope.ecdapp.isFrameLoaded = true;
- $scope.ecdapp.cfySite = '';
- $scope.ecdapp.cnslSite = '';
- $scope.ecdapp.appCluster = '';
- $scope.ecdapp.k8.cluster = '';
- $scope.ecdapp.grf.cluster = '';
- $scope.ecdapp.prom.cluster = '';
-
- var key = $scope.ecdapp.opsItem;
-
- // if it's not already part of our keys array
- if($rootScope.menuKeys.indexOf(key) === -1) {
- // add it to our keys array
- $rootScope.menuKeys.push(key);
- for (var itemTab = 0; itemTab < $rootScope.opsMenu.length; itemTab++) {
- if ($rootScope.opsMenu[itemTab].id === key) {
- $rootScope.gTabs.push($rootScope.opsMenu[itemTab]);
- //$scope.ecdapp.activeTabUrl = $rootScope.opsMenu[itemTab].url;
- break;
- }
- }
- }
- $scope.ecdapp.gTabs = $rootScope.gTabs;
- /*
- angular.forEach($rootScope.opsMenu, function(item) {
- if
- // we check to see whether our object exists
- var key = $scope.ecdapp.opsItem;
- // if it's not already part of our keys array
- if($rootScope.menuKeys.indexOf(key) === -1) {
- // add it to our keys array
- $rootScope.menuKeys.push(key);
- // push this item to our final output array
- $rootScope.gTabs.push(item);
- $scope.ecdapp.activeTabUrl = item.url;
- } else {
- if (item.id === key) {
- $scope.ecdapp.activeTabUrl = item.url;
- }
- }
- });
-
-
- for (var menuTab = 0; menuTab < $scope.ecdapp.gTabs.length; menuTab++) {
- if ($scope.ecdapp.gTabs[menuTab].id === key) {
- $scope.ecdapp.activeTabUrl = $scope.ecdapp.gTabs[menuTab].url;
- break;
- }
- }
- */
- $scope.ecdapp.isInit = true;
- $rootScope.activeTabsId = $scope.ecdapp.opsItem;
-
- $rootScope.$watch('activeTabsId', function (newVal, oldVal) {
- if(newVal !== oldVal) {
- var selectedTab;
- for (selectedTab = 0; selectedTab < $rootScope.opsMenu.length; selectedTab++) {
- if ($rootScope.opsMenu[selectedTab].id === newVal) {
- //$scope.ecdapp.activeTabUrl = $rootScope.opsMenu[selectedTab].url;
- break;
- }
- }
- var selectedTabPanelElement = document.getElementById($rootScope.opsMenu[selectedTab].tabPanelId);
-
- var elem = null;
- if (selectedTabPanelElement) {
- elem = b2bDOMHelper.firstTabableElement(selectedTabPanelElement);
- }
-
- if (elem) {
- $timeout(function () {
- elem.focus();
- }, 100);
- }
- }
- });
-
-
- $scope.ecdapp.selectAppTenant = function(site) {
- if(site != "Select Site") {
- for (var indx = 0; indx < $rootScope.site_tenant_map.length; indx++) {
- if ($rootScope.site_tenant_map[indx].site === site) {
- $scope.ecdapp.appTenants = $rootScope.site_tenant_map[indx].tenant;
- break;
- }
- }
- }
- }
-
- $scope.ecdapp.selectCluster = function(tenant) {
- if(tenant != "Select Tenant") {
- for (var indx = 0; indx < $rootScope.tenant_cluster_map.length; indx++) {
- if ($rootScope.tenant_cluster_map[indx].tenant === tenant) {
- $scope.ecdapp.appCluster = $rootScope.tenant_cluster_map[indx].cluster;
- }
- }
- }
- }
-
- var stopPolling;
- //var doIframePolling;
- $scope.ecdapp.appFrameReload = function(cluster, app) {
- if(cluster != "Select K8s cluster") {
- $scope.ecdapp.isFrameLoaded = false;
- for (var indx = 0; indx < $rootScope.tenant_cluster_apps_map.length; indx++) {
- if ($rootScope.tenant_cluster_apps_map[indx].cluster === cluster) {
- if (app === 'prom') {
- $scope.ecdapp.prom.url = $rootScope.tenant_cluster_apps_map[indx].prom;
- } else if (app === 'grf') {
- $scope.ecdapp.grf.url = $rootScope.tenant_cluster_apps_map[indx].grf;
- } else {
- $scope.ecdapp.k8.url = $rootScope.tenant_cluster_apps_map[indx].k8;
- }
- break;
- }
- }
- stopPolling = $timeout(function () {
- $timeout.cancel(stopPolling);
- stopPolling = undefined;
- $scope.ecdapp.isFrameLoaded = true;
- },30000);
- }
- }
-
- $scope.ecdapp.cfyCnslFrameReload = function(site, app) {
- if(site != "Select Site") {
- $scope.ecdapp.isFrameLoaded = false;
- for (var indx = 0; indx < $rootScope.site_cfy_cnsl_map.length; indx++) {
- if ($rootScope.site_cfy_cnsl_map[indx].site === site) {
- if (app === 'cfy') {
- $scope.ecdapp.cfy.url = $rootScope.site_cfy_cnsl_map[indx].cfy;
- } else {
- $scope.ecdapp.cnsl.url = $rootScope.site_cfy_cnsl_map[indx].cnsl;
- }
- break;
- }
- }
- stopPolling = $timeout(function () {
- $timeout.cancel(stopPolling);
- stopPolling = undefined;
- $scope.ecdapp.isFrameLoaded = true;
- },30000);
- }
- }
- document.querySelector("iframe").addEventListener("load", function() {
- $scope.ecdapp.isFrameLoaded = true;
- $scope.$apply();
- });
- $scope.$on("$destroy",function() {
- $timeout.cancel(stopPolling);
- //$interval.cancel(doIframePolling);
- });
-
- /*
- * $scope.ecdapp.selectK8Tenant = function(site) {
- if(site != "Select Site") {
- for (var indx = 0; indx < $rootScope.site_tenant_map.length; indx++) {
- if ($rootScope.site_tenant_map[indx].site === site) {
- $scope.ecdapp.k8Tenants = $rootScope.site_tenant_map[indx].tenant;
- break;
- }
- }
- }
- }
-
- $scope.ecdapp.selectK8App = function(t) {
- if(t != "Select Tenant for K8s components") {
- for (var indx = 0; indx < $rootScope.tenant_cluster_map.length; indx++) {
- if ($rootScope.tenant_cluster_map[indx].tenant === t) {
- $scope.ecdapp.k8.url = $rootScope.tenant_cluster_map[indx].k8s;
- break;
- }
- }
- }
- }
-
- $scope.ecdapp.selectGrfTenant = function(site) {
- if(site != "Select Site") {
- for (var indx = 0; indx < $rootScope.site_tenant_map.length; indx++) {
- if ($rootScope.site_tenant_map[indx].site === site) {
- $scope.ecdapp.grfTenants = $rootScope.site_tenant_map[indx].tenant;
- break;
- }
- }
- }
- }
-
- $scope.ecdapp.selectGrfApp = function(t) {
- if(t != "Select Tenant for Grafana") {
- for (var indx = 0; indx < $rootScope.tenant_cluster_map.length; indx++) {
- if ($rootScope.tenant_cluster_map[indx].tenant === t) {
- $scope.ecdapp.grf.url = $rootScope.tenant_cluster_map[indx].grf;
- break;
- }
- }
- }
- }
-
- $scope.ecdapp.selectPromTenant = function(site) {
- if(site != "Select Site") {
- for (var indx = 0; indx < $rootScope.site_tenant_map.length; indx++) {
- if ($rootScope.site_tenant_map[indx].site === site) {
- $scope.ecdapp.promTenants = $rootScope.site_tenant_map[indx].tenant;
- break;
- }
- }
- }
- }
-
- $scope.ecdapp.selectPromApp = function(t) {
- if(t != "Select Tenant for Prometheus") {
- for (var indx = 0; indx < $rootScope.tenant_cluster_map.length; indx++) {
- if ($rootScope.tenant_cluster_map[indx].tenant === t) {
- $scope.ecdapp.prom.url = $rootScope.tenant_cluster_map[indx].prom;
- break;
- }
- }
- }
- }
-
- doIframePolling = $interval(function () {
- if(document.querySelector("iframe") &&
- document.querySelector("iframe").contentDocument.head &&
- document.querySelector("iframe").contentDocument.head.innerHTML != '')
- {
- $interval.cancel(doIframePolling);
- doIframePolling = undefined;
- $timeout.cancel(stopPolling);
- stopPolling = undefined;
- $scope.ecdapp.isCfyLoadDone = true;
- }
- },400);
-
- stopPolling = $timeout(function () {
- //$interval.cancel(doIframePolling);
- //doIframePolling = undefined;
- $timeout.cancel(stopPolling);
- stopPolling = undefined;
- $scope.ecdapp.isCfyLoadDone = true;
- },30000);
- }
- }
-
- */
-
-
-}); \ No newline at end of file
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs_view.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs_view.html
deleted file mode 100644
index aa5b1f8..0000000
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/ops/tabs_view.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<div id="page-content" ng-controller="tabsController">
- <div ng-show="ecdapp.isInit">
- <b2b-tabset tab-id-selected="activeTabsId">
- <b2b-tab ng-repeat="tab in ecdapp.gTabs" tab-item="tab"
- id="{{tab.uniqueId}}" aria-controls="{{tab.tabPanelId}}"
- ng-disabled="tab.disabled">
- {{tab.title}}
- </b2b-tab>
- </b2b-tabset>
- </div>
-
- <div class="tab-content">
- <div id="threetab1x" role="tabpanel" aria-labelledby="uniqueTab1x" aria-hidden="{{'cfy'===activeTabsId}}" class="tab-pane" ng-class="{'active': 'cfy'===activeTabsId}">
- <div class="row-nowrap" style="margin-top:-20px; margin-bottom: 5px;">
- <div class="span3 form-row">
- <label for="cfy-site-url">Site</label>
- <select id="cfy-site-url" name="cfy-site-url" b2b-dropdown placeholder-text="Select Site" data-ng-model="ecdapp.cfySite" ng-change="ecdapp.cfyCnslFrameReload(ecdapp.cfySite, 'cfy')" required>
- <option b2b-dropdown-list option-repeat="d in site_cfy_cnsl_map" value="{{d.site}}">{{d.site}}</option>
- </select>
- </div>
- </div>
- <div ng-hide="ecdapp.isFrameLoaded" class="span">
- <i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
- Please wait while the content loads.
- </div>
- <iframe id="cfy_frame" ng-show="ecdapp.isFrameLoaded" aria-expanded="true" scrolling="yes" frameborder="0" style="width:100%; height: 800px;" ng-src="{{ecdapp.cfy.url}}">
- </iframe>
- </div>
- <div id="threetab2x" role="tabpanel" aria-labelledby="uniqueTab2x" aria-hidden="{{'grf'===activeTabsId}}" class="tab-pane" ng-class="{'active': 'grf'===activeTabsId}">
- <div class="row-nowrap" style="margin-top:-20px; margin-bottom: 5px;">
- <div class="span3 form-row">
- <label for="grf-site-url">Site</label>
- <select id="grf-site-url" name="grf-site-url" b2b-dropdown placeholder-text="Select Site" data-ng-model="ecdapp.grf.site" ng-change="ecdapp.selectAppTenant(ecdapp.grf.site)" required>
- <option b2b-dropdown-list option-repeat="d in site_cfy_cnsl_map" value="{{d.site}}">{{d.site}}</option>
- </select>
- </div>
- <div class="span4 form-row">
- <label for="grf-ten-url">Tenant</label>
- <select id="grf-ten-url" name="grf-ten-url" b2b-dropdown placeholder-text="Select Tenant" data-ng-model="ecdapp.grf.tenant" ng-change="ecdapp.selectCluster(ecdapp.grf.tenant)" required>
- <option b2b-dropdown-list option-repeat="t in ecdapp.appTenants" value="{{t}}">{{t}}</option>
- </select>
- </div>
- <div class="span3 form-row">
- <label for="grf-cluster-url">Cluster</label>
- <select id="grf-cluster-url" name="grf-cluster-url" b2b-dropdown placeholder-text="Select K8s cluster" data-ng-model="ecdapp.grf.cluster" ng-change="ecdapp.appFrameReload(ecdapp.grf.cluster, 'grf')" required>
- <option b2b-dropdown-list option-repeat="c in ecdapp.appCluster" value="{{c}}">{{c}}</option>
- </select>
- </div>
- </div>
- <div ng-hide="ecdapp.isFrameLoaded" class="span">
- <i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
- Please wait while the content loads.
- </div>
- <iframe ng-show="ecdapp.isFrameLoaded" scrolling="yes" frameborder="0" style="width:100%; height: 800px;" ng-src="{{ecdapp.grf.url}}">
- </iframe>
- </div>
- <div id="threetab3x" role="tabpanel" aria-labelledby="uniqueTab3x" aria-hidden="{{'cnsl'===activeTabsId}}" class="tab-pane" ng-class="{'active': 'cnsl'===activeTabsId}">
- <div class="row-nowrap" style="margin-top:-20px; margin-bottom: 5px;">
- <div class="span3 form-row">
- <label for="cnsl-site-url">Site</label>
- <select id="cnsl-site-url" name="cnsl-site-url" b2b-dropdown placeholder-text="Select Site" data-ng-model="ecdapp.cnslSite" ng-change="ecdapp.cfyCnslFrameReload(ecdapp.cnslSite, 'cnsl')" required>
- <option b2b-dropdown-list option-repeat="d in site_cfy_cnsl_map" value="{{d.site}}">{{d.site}}</option>
- </select>
- </div>
- </div>
- <div ng-hide="ecdapp.isFrameLoaded" class="span">
- <i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
- Please wait while the content loads.
- </div>
- <iframe ng-show="ecdapp.isFrameLoaded" scrolling="yes" frameborder="0" style="width:100%; height: 800px;" ng-src="{{ecdapp.cnsl.url}}">
- </iframe>
- </div>
- <div id="threetab4x" role="tabpanel" aria-labelledby="uniqueTab4x" aria-hidden="{{'k8s'===activeTabsId}}" class="tab-pane" ng-class="{'active': 'k8s'===activeTabsId}">
- <div class="row-nowrap" style="margin-top:-20px; margin-bottom: 5px;">
- <div class="span3 form-row">
- <label for="k8s-site-url">Site</label>
- <select id="k8s-site-url" name="k8s-site-url" b2b-dropdown placeholder-text="Select Site" data-ng-model="ecdapp.k8.site" ng-change="ecdapp.selectAppTenant(ecdapp.k8.site)" required>
- <option b2b-dropdown-list option-repeat="d in site_cfy_cnsl_map" value="{{d.site}}">{{d.site}}</option>
- </select>
- </div>
- <div class="span6 form-row">
- <label for="k8s-ten-url">Tenant</label>
- <select id="k8s-ten-url" name="k8s-ten-url" b2b-dropdown placeholder-text="Select Tenant" data-ng-model="ecdapp.k8.tenant" ng-change="ecdapp.selectCluster(ecdapp.k8.tenant)" required>
- <option b2b-dropdown-list option-repeat="t in ecdapp.appTenants" value="{{t}}">{{t}}</option>
- </select>
- </div>
- <div class="span3 form-row">
- <label for="k8s-cluster-url">Cluster</label>
- <select id="k8s-cluster-url" name="k8s-cluster-url" b2b-dropdown placeholder-text="Select K8s cluster" data-ng-model="ecdapp.k8.cluster" ng-change="ecdapp.appFrameReload(ecdapp.k8.cluster, 'k8')" required>
- <option b2b-dropdown-list option-repeat="c in ecdapp.appCluster" value="{{c}}">{{c}}</option>
- </select>
- </div>
- </div>
- <div ng-hide="ecdapp.isFrameLoaded" class="span">
- <i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
- Please wait while the content loads.
- </div>
- <iframe ng-show="ecdapp.isFrameLoaded" scrolling="yes" frameborder="0" style="width:100%; height: 800px;" ng-src="{{ecdapp.k8.url}}">
- </iframe>
- </div>
- <div id="threetab5x" role="tabpanel" aria-labelledby="uniqueTab5x" aria-hidden="{{'prom'===activeTabsId}}" class="tab-pane" ng-class="{'active': 'prom'===activeTabsId}">
- <div class="row-nowrap" style="margin-top:-20px; margin-bottom: 5px;">
- <div class="span3 form-row">
- <label for="prom-site-url">Site</label>
- <select id="prom-site-url" name="prom-site-url" b2b-dropdown placeholder-text="Select Site" data-ng-model="ecdapp.prom.site" ng-change="ecdapp.selectAppTenant(ecdapp.prom.site)" required>
- <option b2b-dropdown-list option-repeat="d in site_cfy_cnsl_map" value="{{d.site}}">{{d.site}}</option>
- </select>
- </div>
- <div class="span6 form-row">
- <label for="prom-ten-url">Tenant</label>
- <select id="prom-ten-url" name="prom-ten-url" b2b-dropdown placeholder-text="Select Tenant" data-ng-model="ecdapp.prom.tenant" ng-change="ecdapp.selectCluster(ecdapp.prom.tenant)" required>
- <option b2b-dropdown-list option-repeat="t in ecdapp.appTenants" value="{{t}}">{{t}}</option>
- </select>
- </div>
- <div class="span3 form-row">
- <label for="prom-cluster-url">Cluster</label>
- <select id="prom-cluster-url" name="prom-cluster-url" b2b-dropdown placeholder-text="Select K8s cluster" data-ng-model="ecdapp.prom.cluster" ng-change="ecdapp.appFrameReload(ecdapp.prom.cluster, 'prom')" required>
- <option b2b-dropdown-list option-repeat="c in ecdapp.appCluster" value="{{c}}">{{c}}</option>
- </select>
- </div>
- </div>
- <div ng-hide="ecdapp.isFrameLoaded" class="span">
- <i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
- Please wait while the content loads.
- </div>
- <iframe ng-show="ecdapp.isFrameLoaded" scrolling="yes" frameborder="0" style="width:100%; height: 800px;" ng-src="{{ecdapp.prom.url}}">
- </iframe>
- </div>
- </div>
-
-</div> \ No newline at end of file