From d797c5043880195f347b14c89bcb460aa3c3ad30 Mon Sep 17 00:00:00 2001 From: Qian Deng Date: Thu, 6 Sep 2018 19:12:19 +0800 Subject: [PATCH] Fix trivial issues about rename ui_ng to portal Update ui_ng to portal Signed-off-by: Qian Deng --- .travis.yml | 2 +- CONTRIBUTING.md | 8 ++++---- Makefile | 6 +++--- docs/customize_look&feel_guide.md | 2 +- docs/developer_guide_i18n.md | 6 +++--- make/dev/nodeclarity/Dockerfile | 2 +- make/dev/nodeclarity/entrypoint.sh | 10 +++++----- src/ui/router.go | 11 ----------- 8 files changed, 18 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 877ad7fb6..6b11f5c4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ before_script: script: - sudo make run_clarity_ut CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:${UI_BUILDER_VERSION} - - cat ./src/ui_ng/npm-ut-test-results + - cat ./src/portal/npm-ut-test-results - sudo docker-compose -f ./make/docker-compose.test.yml up -d - make go_check - ./tests/pushimage.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67d5235f7..b6b294d33 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,7 +93,7 @@ The folder graph below shows the structure of the source code folder `harbor/src │   ├── static │   ├── utils │   └── views -├── ui_ng # The code of harbor web UI +├── portal # The code of harbor web UI │   ├── e2e │   ├── lib # Source code of harbor-ui npm library which includes the main UI components of web UI │   └── src # General web page UI code of Harbor @@ -134,11 +134,11 @@ Harbor web UI is built based on [Clarity](https://vmware.github.io/clarity/) and **Npm Package Dependency:** Run the following commands to restore the package dependencies. ``` #For the web UI -cd $REPO_DIR/src/ui_ng +cd $REPO_DIR/src/portal npm install #For the UI library -cd $REPO_DIR/src/ui_ng/lib +cd $REPO_DIR/src/portal/lib npm install ``` @@ -213,7 +213,7 @@ go test -v ./... Run UI library test cases: ``` -#cd #working_dir/src/ui_ng/lib +#cd #working_dir/src/portal/lib npm run test ``` diff --git a/Makefile b/Makefile index 179a134de..3bfa7d72c 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ MAKEDEVPATH=$(MAKEPATH)/dev SRCPATH=./src TOOLSPATH=$(BUILDPATH)/tools UIPATH=$(BUILDPATH)/src/ui -UINGPATH=$(BUILDPATH)/src/ui_ng +UINGPATH=$(BUILDPATH)/src/portal GOBASEPATH=/go/src/github.com/goharbor CHECKENVCMD=checkenv.sh @@ -110,7 +110,7 @@ CHARTMUSEUMVERSION=v0.7.1 #clarity parameters CLARITYIMAGE=goharbor/harbor-clarity-ui-builder[:tag] CLARITYSEEDPATH=/harbor_src -CLARITYUTPATH=${CLARITYSEEDPATH}/ui_ng/lib +CLARITYUTPATH=${CLARITYSEEDPATH}/portal/lib CLARITYBUILDSCRIPT=/entrypoint.sh # docker parameters @@ -306,7 +306,7 @@ compile_registryctl: @$(DOCKERCMD) run --rm -v $(BUILDPATH):$(GOBUILDPATH) -w $(GOBUILDPATH_REGISTRYCTL) $(GOBUILDIMAGE) $(GOIMAGEBUILD) -o $(GOBUILDMAKEPATH_REGISTRYCTL)/$(REGISTRYCTLBINARYNAME) @echo "Done." -compile:check_environment compile_clarity compile_adminserver compile_ui compile_jobservice compile_registryctl +compile:check_environment compile_adminserver compile_ui compile_jobservice compile_registryctl prepare: @echo "preparing..." diff --git a/docs/customize_look&feel_guide.md b/docs/customize_look&feel_guide.md index 914d64538..4c2db5dcd 100644 --- a/docs/customize_look&feel_guide.md +++ b/docs/customize_look&feel_guide.md @@ -1,6 +1,6 @@ # Customize the look & feel of Harbor -The primary look & feel of Harbor supports to be customized with several simple steps. All the relevant customization in configurations are saved in the `setting.json` file under `$HARBOR_DIR/src/ui_ng/src` folder with `json` format and will be loaded when Harbor is launched. +The primary look & feel of Harbor supports to be customized with several simple steps. All the relevant customization in configurations are saved in the `setting.json` file under `$HARBOR_DIR/src/portal/src` folder with `json` format and will be loaded when Harbor is launched. ## Configure Open the `setting.json` file, you'll see the default content as shown below: diff --git a/docs/developer_guide_i18n.md b/docs/developer_guide_i18n.md index 68f16f282..96fb8744c 100644 --- a/docs/developer_guide_i18n.md +++ b/docs/developer_guide_i18n.md @@ -4,7 +4,7 @@ ### Steps to localize the UI in your language -1. In the folder `src/ui_ng/src/i18n/lang`, copy json file `en-us-lang.json` to a new file and rename it to `--lang.json` . +1. In the folder `src/portal/src/i18n/lang`, copy json file `en-us-lang.json` to a new file and rename it to `--lang.json` . The file contains a JSON object including all the key-value pairs of UI strings: ``` @@ -21,7 +21,7 @@ 2. After creating your language file, you should add it to the language supporting list. - Locate the file `src/ui_ng/src/app/shared/shared.const.ts`. + Locate the file `src/portal/src/app/shared/shared.const.ts`. Append `-` to the language supporting list: ``` export const supportedLangs = ['en-us', 'zh-cn', '-']; @@ -39,7 +39,7 @@ 3. Enable the new language in the view. - Locate the file `src/ui_ng/src/app/base/navigator/navigator.component.html` and then find the following code piece: + Locate the file `src/portal/src/app/base/navigator/navigator.component.html` and then find the following code piece: ```