From 588bcf7d6c344f873fec1ef0c7a66d1c273aedd7 Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Wed, 17 May 2017 11:05:28 -0700 Subject: [PATCH 1/3] To fix intl not found issue in Safari --- src/ui_ng/package.json | 2 +- src/ui_ng/src/polyfills.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index 0433d9138..126283738 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -27,11 +27,11 @@ "@ngx-translate/http-loader": "0.0.3", "@types/jquery": "^2.0.41", "@webcomponents/custom-elements": "1.0.0-alpha.3", - "angular2-cookie": "^1.2.6", "clarity-angular": "^0.9.0", "clarity-icons": "^0.9.0", "clarity-ui": "^0.9.0", "core-js": "^2.4.1", + "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", "rxjs": "^5.0.1", diff --git a/src/ui_ng/src/polyfills.ts b/src/ui_ng/src/polyfills.ts index 75db19a93..a5db6b79a 100644 --- a/src/ui_ng/src/polyfills.ts +++ b/src/ui_ng/src/polyfills.ts @@ -30,6 +30,10 @@ import 'core-js/es6/reflect'; import 'core-js/es7/reflect'; +import 'intl'; +import 'intl/locale-data/jsonp/en'; +import 'intl/locale-data/jsonp/es'; +import 'intl/locale-data/jsonp/zh'; import 'zone.js/dist/zone'; From a311d3d825bb31c1b37f1476eca2f9a9ae03cc01 Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Thu, 18 May 2017 22:32:11 -0700 Subject: [PATCH 2/3] Change ui build image version to 1.1.2 --- .travis.yml | 4 ++-- docs/compile_guide.md | 4 ++-- tests/run-clarity-ut.sh | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9194064c..9070921e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,7 +79,7 @@ script: - sudo mkdir -p /harbor - sudo mv ./VERSION /harbor/VERSION - sudo service mysql stop - - sudo make run_clarity_ut CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.1 + - sudo make run_clarity_ut CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.2 - cat ./src/ui_ng/lib/npm-ut-test-results - sudo ./tests/testprepare.sh - sudo docker-compose -f ./make/docker-compose.test.yml up -d @@ -99,7 +99,7 @@ script: - docker-compose -f make/docker-compose.test.yml down - sudo rm -rf /data/config/* - ls /data/cert - - sudo make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.1 NOTARYFLAG=true + - sudo make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.2 NOTARYFLAG=true - docker ps - ./tests/notarytest.sh diff --git a/docs/compile_guide.md b/docs/compile_guide.md index ba3ca977b..34e3df554 100644 --- a/docs/compile_guide.md +++ b/docs/compile_guide.md @@ -50,13 +50,13 @@ You can compile the code by one of the three approaches: * Build, install and bring up Harbor without Notary: ```sh - $ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.1 + $ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.2 ``` * Build, install and bring up Harbor with Notary: ```sh - $ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.1 NOTARYFLAG=true + $ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.1.2 NOTARYFLAG=true ``` #### II. Compile code with your own Golang environment, then build Harbor diff --git a/tests/run-clarity-ut.sh b/tests/run-clarity-ut.sh index 878e9656c..ae3560e53 100644 --- a/tests/run-clarity-ut.sh +++ b/tests/run-clarity-ut.sh @@ -5,6 +5,7 @@ set -e cp -r /harbor_ui/lib/* /harbor_ui npm install +npm run build npm run test > lib/npm-ut-test-results From 87b68e9eb2ff7d9b9931f661cf00ed5c472241c5 Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Thu, 18 May 2017 22:51:55 -0700 Subject: [PATCH 3/3] disable npm run build script --- tests/run-clarity-ut.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/run-clarity-ut.sh b/tests/run-clarity-ut.sh index ae3560e53..878e9656c 100644 --- a/tests/run-clarity-ut.sh +++ b/tests/run-clarity-ut.sh @@ -5,7 +5,6 @@ set -e cp -r /harbor_ui/lib/* /harbor_ui npm install -npm run build npm run test > lib/npm-ut-test-results