diff options
author | 2020-02-03 13:43:25 -0500 | |
---|---|---|
committer | 2020-02-06 13:18:40 -0500 | |
commit | c73866cf44cad2be9a91ea1e2a3a77fcc29d9c2a (patch) | |
tree | 69955f0a068c89c2ae05fb05e6d9afa6641f3688 /ccsdk-app-overlay/src/main/webapp/app | |
parent | 2ac46fd53461288d5d99a9c0ebb8a3a5216db2a7 (diff) |
DCAE dashboard security fixes
Portal SDK ver 2.6.0, non-root user for docker container
Change label on Dashboard Home page, API changes, Container optimization
Change-Id: Ie2c8efd76d34fddc2b182d5ed494761522695914
Issue-ID: DCAEGEN2-1638
Issue-ID: CCSDK-1485
Issue-ID: DCAEGEN2-1921
Issue-ID: DCAEGEN2-1915
Issue-ID: DCAEGEN2-1856
Issue-ID: DCAEGEN2-1556
Issue-ID: DCAEGEN2-1592
Signed-off-by: Kotagiri, Ramprasad (rp5662) <rp5662@att.com>
Diffstat (limited to 'ccsdk-app-overlay/src/main/webapp/app')
11 files changed, 214 insertions, 50 deletions
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/api-docs-controller.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/api-docs-controller.js new file mode 100644 index 0000000..6ac9839 --- /dev/null +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/api-docs-controller.js @@ -0,0 +1,42 @@ +/******************************************************************************* + * =============LICENSE_START========================================================= + * + * ================================================================================= + * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + *******************************************************************************/ + +appDS2.controller('apiDocsController',function( + $scope, ControllerService){ + + 'use strict'; + + // this object holds all app data and functions + $scope.ecdapp = {}; + $scope.ecdapp.apiSpec = ''; + + var getApiSpecs = function(){ + ControllerService.getApiSwaggerSpec().then(function(jsonObj) { + $scope.ecdapp.apiSpec = JSON.stringify(jsonObj, undefined, 4); + }, function(error) { + alert('Failed to get REST API spec file'); + }); + } + + // Populate the page on load + getApiSpecs(); + +}); diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/api_doc.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/api_doc.html new file mode 100644 index 0000000..342406c --- /dev/null +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/api_doc.html @@ -0,0 +1,26 @@ +<!-- + ============LICENSE_START========================================== + =================================================================== + Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the "License"); + you may not use this software except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + --> +<div id="page-content"> + <iframe scrolling="yes" frameborder="0" style="width:100%; height: 800px;" + ng-src="api-specs.html"> + </iframe> +</div>
\ No newline at end of file diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/appDS2.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/appDS2.js index c8f7071..ebb35cd 100644 --- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/appDS2.js +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/appDS2.js @@ -1,3 +1,24 @@ +/******************************************************************************* + * =============LICENSE_START========================================================= + * + * ================================================================================= + * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + *******************************************************************************/ + /* Angular application for the EC Dashboard web UI */ var appDS2 = angular.module("abs", [ @@ -6,6 +27,4 @@ var appDS2 = angular.module("abs", 'b2b.att', 'modalServices' ] - ).config(function($sceDelegateProvider) { - $sceDelegateProvider.resourceUrlWhitelist(['**']); - }); + ); diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/controller-service.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/controller-service.js index 389a44c..65495f1 100644 --- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/controller-service.js +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/controller-service.js @@ -1,3 +1,24 @@ +/******************************************************************************* + * =============LICENSE_START========================================================= + * + * ================================================================================= + * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + *******************************************************************************/ + appDS2.factory('ControllerService', function ($http, $q, $log) { return { /** @@ -18,6 +39,20 @@ appDS2.factory('ControllerService', function ($http, $q, $log) { return $q.reject(error.statusText); }); }, + getApiSwaggerSpec: function() { + return $http({ + method: 'GET', + url: 'nb-api/api-docs', + cache: true, + responseType: 'json' + }).then(function(response) { + return response.data; + }, + function(error) { + $log.error('ControllerService.getApiSwaggerSpec failed: ' + JSON.stringify(error)); + return $q.reject(error.statusText); + }); + }, /** * Gets the cloudify tenant names. * diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions_view.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions_view.html index f8acb8b..5623b1c 100644 --- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions_view.html +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions_view.html @@ -1,5 +1,5 @@ <div id="page-content"> - <h4 class="heading-page" id="controllers">ONAP Operations Manager {{ecdapp.appLabel}}</h4> + <h4 class="heading-page" id="controllers">DCAE Dashboard</h4> </div> diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom-router.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom-router.js index 7ec5537..592ab15 100644 --- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom-router.js +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom-router.js @@ -2,7 +2,7 @@ * =============LICENSE_START========================================================= * * ================================================================================= - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,16 @@ * limitations under the License. * ============LICENSE_END========================================================= * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. *******************************************************************************/ appDS2.config(function($routeProvider) { $routeProvider - .when('/orgchart', { - /* horizontal layout */ - templateUrl: 'app/ccsdk/home/tree_view.html', - controller : 'treeViewController' + .when('/api', { + templateUrl: 'app/ccsdk/home/api_doc.html', + controller : '' + }) + .when('/api-spec', { + templateUrl: 'app/ccsdk/home/rest-api-spec.html', + controller : 'apiDocsController' }) .when('/ibp', { templateUrl: 'app/ccsdk/inventory/inventory_blueprint_table.html', @@ -82,34 +84,6 @@ appDS2.config(function($routeProvider) { templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/usage.html', controller: 'usageListControllerDS2' }) - .when('/cfy', { - templateUrl: 'app/ccsdk/ops/tabs_view.html', - controller: 'tabsController', - item: 'cfy' - }) - .when('/cnsl', { - templateUrl: 'app/ccsdk/ops/tabs_view.html', - controller: 'tabsController', - item: 'cnsl' - }) - .when('/grf', { - templateUrl: 'app/ccsdk/ops/tabs_view.html', - controller: 'tabsController', - item: 'grf' - }) - .when('/k8s', { - templateUrl: 'app/ccsdk/ops/tabs_view.html', - controller: 'tabsController', - item: 'k8s' - }) - .when('/prom', { - templateUrl: 'app/ecdapp/ops/tabs_view.html', - controller: 'tabsController', - item: 'prom' - }) - .when('/dbcl', { - templateUrl: 'app/ecdapp/ops/dbcl_view.html' - }) .otherwise({ templateUrl: 'app/ccsdk/home/executions_view.html', controller : 'executionsViewController' diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom_spa.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom_spa.html index 74651a9..fabb450 100644 --- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom_spa.html +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/oom_spa.html @@ -1,20 +1,42 @@ +<!-- + ============LICENSE_START========================================== + =================================================================== + Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the "License"); + you may not use this software except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + --> + <!DOCTYPE html> -<!-- ONAP Operations Manager Dashboard single-page application using B2B/DS2. --> +<!-- DCAE Dashboard single-page application using B2B/DS2. --> <html> <head> <meta charset="UTF-8"> - <title>OOM Dashboard</title> + <title>DCAE Dashboard</title> <link rel="icon" type="image/ico" href="app/ccsdk/images/onap_32x32.ico" /> <!-- Third-party scripts from EPSDK overlay --> - <script src="app/fusion/external/angular-1.4.8/angular.js"></script> - <script src="app/fusion/external/angular-1.4.8/angular-cookies.js"></script> - <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script> - <script src="app/fusion/external/angular-1.4.8/angular-route.js"></script> - <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script> - <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-cookies.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-messages.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-route.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-sanitize.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-touch.js"></script> <script src="app/fusion/external/jquery/dist/jquery.min.js"></script> - <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script> + <!--<script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>--> <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> <!-- Third-party scripts from app --> @@ -48,12 +70,15 @@ <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script> <!-- OOM home --> + <script src="app/ccsdk/home/controller-service.js"></script> + <script src="app/ccsdk/home/executions-view-controller.js"></script> + <script src="app/ccsdk/home/api-docs-controller.js"></script> + <!-- <script src="app/ccsdk/home/tree-view-controller.js"></script> <script src="app/ccsdk/home/tree-view-directive.js"></script> - <script src="app/ccsdk/home/controller-service.js"></script> <script src="app/ccsdk/home/oom-instances-controller.js"></script> - <script src="app/ccsdk/home/executions-view-controller.js"></script> <script src="app/ccsdk/home/http-interceptor.js"></script> + --> <link rel="stylesheet" href="app/ccsdk/home/tree-view-style.css"/> <link rel="stylesheet" href="app/ccsdk/home/oom-style.css"/> diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/rest-api-spec.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/rest-api-spec.html new file mode 100644 index 0000000..56ee149 --- /dev/null +++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/rest-api-spec.html @@ -0,0 +1,27 @@ +<!-- + ============LICENSE_START========================================== + =================================================================== + Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the "License"); + you may not use this software except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + --> +<div id="page-content" ng-controller="apiDocsController"> + <h2 class="heading-page" id="controllers">REST API Specifications</h2> + <pre> +{{ecdapp.apiSpec}} +</pre> +</div>
\ No newline at end of file diff --git a/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/footer.html b/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/footer.html new file mode 100644 index 0000000..65ac372 --- /dev/null +++ b/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/footer.html @@ -0,0 +1,13 @@ +<div style="width: 100%"> + <footer class="b2b-footer-wrapper" role="contentinfo" aria-label="footer"> + <div class="b2b-footer-container" > + <div class="divider-bottom-footer"> + <div class="span12 footerLogo"> + <p class="copyright-text"> + © 2020 ONAP. The Linux Foundation. <span class="build_number">Build Number: {{build_number}}</span> + </p> + </div> + </div> + </div> + </footer> +</div>
\ No newline at end of file diff --git a/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/header-logo.html b/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/header-logo.html new file mode 100644 index 0000000..942af9b --- /dev/null +++ b/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/header-logo.html @@ -0,0 +1,3 @@ +<div style="margin-right: 40px;"> <img src="app/ccsdk/images/onap_16x16.ico"> + <span style="font-size: 16px;margin-left: 10px;">DCAE Dashboard</span> +</div>
\ No newline at end of file diff --git a/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html b/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html index 66c38e0..1c90f97 100644 --- a/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html +++ b/ccsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html @@ -10,7 +10,7 @@ </head> <body> <p> - Redirecting to the <a href="ecd#">ONAP Operations Manager Dashboard</a>.. + Redirecting to the <a href="ecd#">DCAE Dashboard</a>.. </p> </body> </html> |