diff --git a/.gitignore b/.gitignore index d950a8eba..d85ad3d6f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,11 +24,11 @@ src/ui/static/styles.css src/ui/static/i18n src/ui/static/shapes -src/ui_ng/coverage/ -src/ui_ng/dist/ -src/ui_ng/html-report/ -src/ui_ng/node_modules/ -src/ui_ng/typings/ +src/portal/coverage/ +src/portal/dist/ +src/portal/html-report/ +src/portal/node_modules/ +src/portal/typings/ **/*npm-debug.log.* **/*yarn-error.log.* .idea/ @@ -39,8 +39,8 @@ src/ui_ng/typings/ **/ssl/ **/proxy.config.json -src/ui_ng/src/**/*.js -src/ui_ng/src/**/*.js.map +src/portal/src/**/*.js +src/portal/src/**/*.js.map **/npm*.log 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 cc16894ec..04acc8bd9 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 fef835923..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 @@ -183,6 +183,7 @@ DOCKERFILE_CLARITY=$(MAKEPATH)/dev/nodeclarity/Dockerfile # docker image name DOCKERIMAGENAME_ADMINSERVER=goharbor/harbor-adminserver +DOCKERIMAGENAME_PORTAL=goharbor/harbor-portal DOCKERIMAGENAME_UI=goharbor/harbor-ui DOCKERIMAGENAME_JOBSERVICE=goharbor/harbor-jobservice DOCKERIMAGENAME_LOG=goharbor/harbor-log @@ -218,6 +219,7 @@ REGISTRYPASSWORD=default # cmds DOCKERSAVE_PARA=$(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ + $(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG) \ $(DOCKERIMAGENAME_UI):$(VERSIONTAG) \ $(DOCKERIMAGENAME_LOG):$(VERSIONTAG) \ $(DOCKERIMAGENAME_DB):$(VERSIONTAG) \ @@ -304,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..." @@ -444,6 +446,11 @@ pushimage: $(REGISTRYUSER) $(REGISTRYPASSWORD) $(REGISTRYSERVER) @$(DOCKERRMIMAGE) $(REGISTRYSERVER)$(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) + @$(DOCKERTAG) $(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG) $(REGISTRYSERVER)$(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG) + @$(PUSHSCRIPTPATH)/$(PUSHSCRIPTNAME) $(REGISTRYSERVER)$(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG) \ + $(REGISTRYUSER) $(REGISTRYPASSWORD) $(REGISTRYSERVER) + @$(DOCKERRMIMAGE) $(REGISTRYSERVER)$(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG) + @$(DOCKERTAG) $(DOCKERIMAGENAME_UI):$(VERSIONTAG) $(REGISTRYSERVER)$(DOCKERIMAGENAME_UI):$(VERSIONTAG) @$(PUSHSCRIPTPATH)/$(PUSHSCRIPTNAME) $(REGISTRYSERVER)$(DOCKERIMAGENAME_UI):$(VERSIONTAG) \ $(REGISTRYUSER) $(REGISTRYPASSWORD) $(REGISTRYSERVER) 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: ```