From eb633a50a1fda47e06f884be4857c850d6a05f02 Mon Sep 17 00:00:00 2001 From: Robert Hutzel Date: Fri, 28 Oct 2016 15:10:29 -0400 Subject: [PATCH 1/8] Changed package names from ozone-development to aml-development --- bower.json | 8 ++++---- package.json | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bower.json b/bower.json index 178446d..f47dd92 100644 --- a/bower.json +++ b/bower.json @@ -14,11 +14,11 @@ "angular-gridster": "~0.9.11", "jquery-ui": "~1.11.0", "console-polyfill": "latest", - "ozp-iwc": "ozone-development/ozp-iwc", - "ozp-classification": "ozone-development/ozp-classification", - "bootstrap": "https://github.com/ozone-development/ozp-bootstrap-sass.git#master", + "ozp-iwc": "aml-development/ozp-iwc", + "ozp-classification": "aml-development/ozp-classification", + "bootstrap": "https://github.com/aml-development/ozp-bootstrap-sass.git#master", "ubuntu-fontface": "~0.1.3", - "icons": "ozone-development/ozp-icons#master", + "icons": "aml-development/ozp-icons", "angular-spinner": "0.6.1", "angular-aria": "~1.4.1", "humps": "~1.0.0" diff --git a/package.json b/package.json index 8e6557d..6d7fb74 100644 --- a/package.json +++ b/package.json @@ -2,15 +2,15 @@ "author": "OZONE", "name": "ozpwebtop", "version": "1.1.6", - "homepage": "https://github.com/ozone-development/ozp-webtop", + "homepage": "https://github.com/aml-development/ozp-webtop", "licenses": { "type": "Apache-2.0", "url": "https://spdx.org/licenses/Apache-2.0" }, - "bugs": "https://github.com/ozone-development/ozp-webtop/issues", + "bugs": "https://github.com/aml-development/ozp-webtop/issues", "repository": { "type": "git", - "url": "git@github.com:ozone-development/ozp-webtop.git" + "url": "git@github.com:aml-development/ozp-webtop.git" }, "dependencies": { "es6-promise": "~1.0.0" From 142a7d5c754442972ff98f4a605e77a9a0f84446 Mon Sep 17 00:00:00 2001 From: Robert Hutzel Date: Mon, 31 Oct 2016 13:31:25 -0400 Subject: [PATCH 2/8] Unauthenticated calls to /api trigger a redirection to CAS login. --- src/app/app.js | 5 ++++- src/app/services/responseObserver.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/app/services/responseObserver.js diff --git a/src/app/app.js b/src/app/app.js index c4093ec..933c472 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -51,6 +51,7 @@ angular.module( 'ozpWebtop', [ 'ozpWebtop.constants', 'ozpWebtop.services.ozpInterface', 'ozpWebtop.models', + 'ozpWebtop.services.responseObserver', 'ozpWebtop.services.widgets', 'ozpWebtop.appToolbar', 'ozpWebtop.ozpToolbar', @@ -82,10 +83,12 @@ angular.module( 'ozpWebtop', [ ]) .config(function($stateProvider, $urlRouterProvider, - $logProvider, maxStickyBoards) { + $logProvider, maxStickyBoards, $httpProvider) { $logProvider.debugEnabled(true); + $httpProvider.interceptors.push('responseObserver'); + /* To avoid losing the internal state of widgets as users switch between dashboards, we leverage the 'sticky state' capabilities of ui-router-extras diff --git a/src/app/services/responseObserver.js b/src/app/services/responseObserver.js new file mode 100644 index 0000000..11a95bc --- /dev/null +++ b/src/app/services/responseObserver.js @@ -0,0 +1,14 @@ +'use strict'; + +angular.module('ozpWebtop.services.responseObserver', []) + .factory('responseObserver', function($q, $window) { + return { + 'responseError': function(error) { + if (error.status === 403 && error.config.url.indexOf('/api/') >= 0) { + $window.location = $window.OzoneConfig.API_URL + '/accounts/login/'; + } else { + return $q.reject(error); + } + } + }; + }); From cba09e62f6cf3bdd5b92907a72efbc06a5f78434 Mon Sep 17 00:00:00 2001 From: Robert Hutzel Date: Thu, 3 Nov 2016 08:50:37 -0400 Subject: [PATCH 3/8] Updated OzoneConfig URLs to support local development. --- src/OzoneConfig.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OzoneConfig.js b/src/OzoneConfig.js index 04fa617..5395605 100644 --- a/src/OzoneConfig.js +++ b/src/OzoneConfig.js @@ -1,8 +1,8 @@ window.OzoneConfig = { - 'API_URL': 'https://localhost:4440', + 'API_URL': 'http://localhost:4440', 'APPLICATION_NAME': 'AppsMall Webtop', 'HELP_URL': 'http://localhost:8888/#/', - 'CENTER_URL': 'https://ozone-development.github.io/ozp-center', + 'CENTER_URL': 'http://localhost:8000/', 'DEVELOPER_RESOURCES_URL': '#', 'FEEDBACK_ADDRESS': 'mailto:person@address.com', 'HELPDESK_ADDRESS': 'mailto:helpdesk@address.com', @@ -11,11 +11,11 @@ window.OzoneConfig = { 'SOCIAL_PIN_ADDRESS': '#', 'SOCIAL_CHAT_ADDRESS': '#', 'SOCIAL_BLOG_ADDRESS': '#', - 'HUD_URL': 'https://ozone-development.github.io/ozp-hud', + 'HUD_URL': 'http://localhost:8088/', 'IWC_URL': 'https://ozone-development.github.io/iwc', 'METRICS_URL': '/path/to/metrics', 'METRICS_WEBTOP_SITE_ID': 3, - 'WEBTOP_URL': 'https://localhost:4440/webtop', + 'WEBTOP_URL': 'http://localhost:9000', 'HELP_DOCS': { 'Help doc 1': '/path/to/document', 'Help doc 2': '/path/to/document', From 0d15c0ad25f236e3d4fe4faa4a7c9023923447d3 Mon Sep 17 00:00:00 2001 From: Robert Hutzel Date: Fri, 4 Nov 2016 15:11:18 -0400 Subject: [PATCH 4/8] $httpProvider forces X-Request-With: XMLHttpRequest header. --- src/app/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/app.js b/src/app/app.js index 933c472..d564328 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -88,6 +88,7 @@ angular.module( 'ozpWebtop', [ $logProvider.debugEnabled(true); $httpProvider.interceptors.push('responseObserver'); + $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /* To avoid losing the internal state of widgets as users switch between From 02352c18e8778dd1ae6efd57c75121c589a723ac Mon Sep 17 00:00:00 2001 From: Charles Labas Date: Mon, 14 Nov 2016 11:06:25 -0500 Subject: [PATCH 5/8] OZP-35: Added x-csrftoken header to HTTP calls --- src/app/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/app.js b/src/app/app.js index d564328..b57f7c4 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -90,6 +90,9 @@ angular.module( 'ozpWebtop', [ $httpProvider.interceptors.push('responseObserver'); $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; + $httpProvider.defaults.xsrfCookieName = 'csrftoken'; + $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken'; + /* To avoid losing the internal state of widgets as users switch between dashboards, we leverage the 'sticky state' capabilities of ui-router-extras From 7248446c19225acd94f91a48b53a81d106f08eb3 Mon Sep 17 00:00:00 2001 From: Charles Labas Date: Thu, 1 Dec 2016 16:27:46 -0500 Subject: [PATCH 6/8] OZP-69: Replaced aml-development/ozp-classification dependency with Gitlab ozp-classification --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index f47dd92..290df12 100644 --- a/bower.json +++ b/bower.json @@ -15,7 +15,7 @@ "jquery-ui": "~1.11.0", "console-polyfill": "latest", "ozp-iwc": "aml-development/ozp-iwc", - "ozp-classification": "aml-development/ozp-classification", + "ozp-classification": "git+http://dev1.vistronix.com:9080/ozp/ozp-classification", "bootstrap": "https://github.com/aml-development/ozp-bootstrap-sass.git#master", "ubuntu-fontface": "~0.1.3", "icons": "aml-development/ozp-icons", From d5c382e7e2c61a43d815acadbc333fd02cb3b96b Mon Sep 17 00:00:00 2001 From: Charles Labas Date: Fri, 2 Dec 2016 10:01:51 -0500 Subject: [PATCH 7/8] OZP-70: Made classification banners configurable via window.OzoneConfig --- src/OzoneConfig.js | 1 + src/app/app.js | 2 ++ src/app/constants.spec.js | 2 +- src/index.html | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OzoneConfig.js b/src/OzoneConfig.js index 5395605..f93f3e7 100644 --- a/src/OzoneConfig.js +++ b/src/OzoneConfig.js @@ -16,6 +16,7 @@ window.OzoneConfig = { 'METRICS_URL': '/path/to/metrics', 'METRICS_WEBTOP_SITE_ID': 3, 'WEBTOP_URL': 'http://localhost:9000', + 'SYSTEM_HIGH_CLASSIFICATION': 'U', 'HELP_DOCS': { 'Help doc 1': '/path/to/document', 'Help doc 2': '/path/to/document', diff --git a/src/app/app.js b/src/app/app.js index b57f7c4..0c0b5c2 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -159,6 +159,8 @@ angular.module( 'ozpWebtop', [ $rootScope.$state = $state; + $rootScope.systemHighClassification = $window.OzoneConfig.SYSTEM_HIGH_CLASSIFICATION; + // TODO: flag to optionally use IWC /* diff --git a/src/app/constants.spec.js b/src/app/constants.spec.js index 7747c6d..b41eb97 100644 --- a/src/app/constants.spec.js +++ b/src/app/constants.spec.js @@ -48,4 +48,4 @@ describe('constants', function () { it('should define highlightFrameOnGridLayoutEvent', function() { expect(highlightFrameOnGridLayoutEvent).toBe('highlightFrameOnGridLayout'); }); -}); \ No newline at end of file +}); diff --git a/src/index.html b/src/index.html index e678ee7..e9ef543 100644 --- a/src/index.html +++ b/src/index.html @@ -29,7 +29,7 @@ <% }); %> - +
From 7168dab9ad9d4fe76ba8f9e9e510ad5bba117b89 Mon Sep 17 00:00:00 2001 From: Charles Labas Date: Mon, 19 Dec 2016 11:24:21 -0500 Subject: [PATCH 8/8] Fixed git URLs --- bower.json | 8 ++++---- package.json | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bower.json b/bower.json index 290df12..c98c54d 100644 --- a/bower.json +++ b/bower.json @@ -14,11 +14,11 @@ "angular-gridster": "~0.9.11", "jquery-ui": "~1.11.0", "console-polyfill": "latest", - "ozp-iwc": "aml-development/ozp-iwc", - "ozp-classification": "git+http://dev1.vistronix.com:9080/ozp/ozp-classification", - "bootstrap": "https://github.com/aml-development/ozp-bootstrap-sass.git#master", + "ozp-iwc": "ozoneplatform/ozp-iwc", + "ozp-classification": "https://github.com/ozoneplatform/ozp-classification.git", + "bootstrap": "https://github.com/ozoneplatform/ozp-bootstrap-sass.git#master", "ubuntu-fontface": "~0.1.3", - "icons": "aml-development/ozp-icons", + "icons": "ozoneplatform/ozp-icons", "angular-spinner": "0.6.1", "angular-aria": "~1.4.1", "humps": "~1.0.0" diff --git a/package.json b/package.json index 6d7fb74..2cb80a6 100644 --- a/package.json +++ b/package.json @@ -2,15 +2,15 @@ "author": "OZONE", "name": "ozpwebtop", "version": "1.1.6", - "homepage": "https://github.com/aml-development/ozp-webtop", + "homepage": "https://github.com/ozoneplatform/ozp-webtop", "licenses": { "type": "Apache-2.0", "url": "https://spdx.org/licenses/Apache-2.0" }, - "bugs": "https://github.com/aml-development/ozp-webtop/issues", + "bugs": "https://github.com/ozoneplatform/ozp-webtop/issues", "repository": { "type": "git", - "url": "git@github.com:aml-development/ozp-webtop.git" + "url": "git@github.com:ozoneplatform/ozp-webtop.git" }, "dependencies": { "es6-promise": "~1.0.0"