mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 19:56:09 +01:00
Fix trivial issues about rename ui_ng to portal
Update ui_ng to portal Signed-off-by: Qian Deng <dengq@vmware.com>
This commit is contained in:
parent
870653a5fb
commit
d797c50438
@ -71,7 +71,7 @@ before_script:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- sudo make run_clarity_ut CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:${UI_BUILDER_VERSION}
|
- 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
|
- sudo docker-compose -f ./make/docker-compose.test.yml up -d
|
||||||
- make go_check
|
- make go_check
|
||||||
- ./tests/pushimage.sh
|
- ./tests/pushimage.sh
|
||||||
|
@ -93,7 +93,7 @@ The folder graph below shows the structure of the source code folder `harbor/src
|
|||||||
│ ├── static
|
│ ├── static
|
||||||
│ ├── utils
|
│ ├── utils
|
||||||
│ └── views
|
│ └── views
|
||||||
├── ui_ng # The code of harbor web UI
|
├── portal # The code of harbor web UI
|
||||||
│ ├── e2e
|
│ ├── e2e
|
||||||
│ ├── lib # Source code of harbor-ui npm library which includes the main UI components of web UI
|
│ ├── 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
|
│ └── 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.
|
**Npm Package Dependency:** Run the following commands to restore the package dependencies.
|
||||||
```
|
```
|
||||||
#For the web UI
|
#For the web UI
|
||||||
cd $REPO_DIR/src/ui_ng
|
cd $REPO_DIR/src/portal
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
#For the UI library
|
#For the UI library
|
||||||
cd $REPO_DIR/src/ui_ng/lib
|
cd $REPO_DIR/src/portal/lib
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ go test -v ./...
|
|||||||
|
|
||||||
Run UI library test cases:
|
Run UI library test cases:
|
||||||
```
|
```
|
||||||
#cd #working_dir/src/ui_ng/lib
|
#cd #working_dir/src/portal/lib
|
||||||
npm run test
|
npm run test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
6
Makefile
6
Makefile
@ -68,7 +68,7 @@ MAKEDEVPATH=$(MAKEPATH)/dev
|
|||||||
SRCPATH=./src
|
SRCPATH=./src
|
||||||
TOOLSPATH=$(BUILDPATH)/tools
|
TOOLSPATH=$(BUILDPATH)/tools
|
||||||
UIPATH=$(BUILDPATH)/src/ui
|
UIPATH=$(BUILDPATH)/src/ui
|
||||||
UINGPATH=$(BUILDPATH)/src/ui_ng
|
UINGPATH=$(BUILDPATH)/src/portal
|
||||||
GOBASEPATH=/go/src/github.com/goharbor
|
GOBASEPATH=/go/src/github.com/goharbor
|
||||||
CHECKENVCMD=checkenv.sh
|
CHECKENVCMD=checkenv.sh
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ CHARTMUSEUMVERSION=v0.7.1
|
|||||||
#clarity parameters
|
#clarity parameters
|
||||||
CLARITYIMAGE=goharbor/harbor-clarity-ui-builder[:tag]
|
CLARITYIMAGE=goharbor/harbor-clarity-ui-builder[:tag]
|
||||||
CLARITYSEEDPATH=/harbor_src
|
CLARITYSEEDPATH=/harbor_src
|
||||||
CLARITYUTPATH=${CLARITYSEEDPATH}/ui_ng/lib
|
CLARITYUTPATH=${CLARITYSEEDPATH}/portal/lib
|
||||||
CLARITYBUILDSCRIPT=/entrypoint.sh
|
CLARITYBUILDSCRIPT=/entrypoint.sh
|
||||||
|
|
||||||
# docker parameters
|
# docker parameters
|
||||||
@ -306,7 +306,7 @@ compile_registryctl:
|
|||||||
@$(DOCKERCMD) run --rm -v $(BUILDPATH):$(GOBUILDPATH) -w $(GOBUILDPATH_REGISTRYCTL) $(GOBUILDIMAGE) $(GOIMAGEBUILD) -o $(GOBUILDMAKEPATH_REGISTRYCTL)/$(REGISTRYCTLBINARYNAME)
|
@$(DOCKERCMD) run --rm -v $(BUILDPATH):$(GOBUILDPATH) -w $(GOBUILDPATH_REGISTRYCTL) $(GOBUILDIMAGE) $(GOIMAGEBUILD) -o $(GOBUILDMAKEPATH_REGISTRYCTL)/$(REGISTRYCTLBINARYNAME)
|
||||||
@echo "Done."
|
@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:
|
prepare:
|
||||||
@echo "preparing..."
|
@echo "preparing..."
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Customize the look & feel of Harbor
|
# 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
|
## Configure
|
||||||
Open the `setting.json` file, you'll see the default content as shown below:
|
Open the `setting.json` file, you'll see the default content as shown below:
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
### Steps to localize the UI in your language
|
### 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 `<language>-<locale>-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 `<language>-<locale>-lang.json` .
|
||||||
|
|
||||||
The file contains a JSON object including all the key-value pairs of UI strings:
|
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.
|
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 `<language>-<locale>` to the language supporting list:
|
Append `<language>-<locale>` to the language supporting list:
|
||||||
```
|
```
|
||||||
export const supportedLangs = ['en-us', 'zh-cn', '<language>-<locale>'];
|
export const supportedLangs = ['en-us', 'zh-cn', '<language>-<locale>'];
|
||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
3. Enable the new language in the view.
|
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:
|
||||||
```
|
```
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a href="javascript:void(0)" clrDropdownItem (click)='switchLanguage("en-us")' [class.lang-selected]='matchLang("en-us")'>English</a>
|
<a href="javascript:void(0)" clrDropdownItem (click)='switchLanguage("en-us")' [class.lang-selected]='matchLang("en-us")'>English</a>
|
||||||
|
@ -3,7 +3,7 @@ FROM node:10.7.0
|
|||||||
RUN mkdir -p /harbor_resources
|
RUN mkdir -p /harbor_resources
|
||||||
RUN mkdir -p /harbor_src
|
RUN mkdir -p /harbor_src
|
||||||
|
|
||||||
COPY src/ui_ng/package.json /harbor_resources
|
COPY src/portal/package.json /harbor_resources
|
||||||
COPY make/dev/nodeclarity/entrypoint.sh /
|
COPY make/dev/nodeclarity/entrypoint.sh /
|
||||||
|
|
||||||
# Install Chrome
|
# Install Chrome
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd /harbor_src/ui_ng
|
cd /harbor_src/portal
|
||||||
rm -rf dist/*
|
rm -rf dist/*
|
||||||
|
|
||||||
npm_proxy=
|
npm_proxy=
|
||||||
@ -27,12 +27,12 @@ cat ./package.json
|
|||||||
npm install
|
npm install
|
||||||
|
|
||||||
## Build harbor-ui and link it
|
## Build harbor-ui and link it
|
||||||
rm -rf /harbor_src/ui_ng/lib/dist
|
rm -rf /harbor_src/portal/lib/dist
|
||||||
npm run build:lib
|
npm run build:lib
|
||||||
chmod -R +xr /harbor_src/ui_ng/lib/dist
|
chmod -R +xr /harbor_src/portal/lib/dist
|
||||||
cd /harbor_src/ui_ng/lib/dist
|
cd /harbor_src/portal/lib/dist
|
||||||
npm link
|
npm link
|
||||||
cd /harbor_src/ui_ng
|
cd /harbor_src/portal
|
||||||
npm link harbor-ui
|
npm link harbor-ui
|
||||||
|
|
||||||
## Rollup
|
## Rollup
|
||||||
|
@ -29,17 +29,6 @@ import (
|
|||||||
|
|
||||||
func initRouters() {
|
func initRouters() {
|
||||||
|
|
||||||
// beego.SetStaticPath("/static", "./static")
|
|
||||||
// beego.SetStaticPath("/i18n", "./static/i18n")
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// Page Controllers:
|
|
||||||
beego.Router("/", &controllers.IndexController{})
|
|
||||||
=======
|
|
||||||
//Page Controllers:
|
|
||||||
// beego.Router("/", &controllers.IndexController{})
|
|
||||||
>>>>>>> Update nginx config to redirect traffic to specific backend
|
|
||||||
beego.Router("/harbor/*", &controllers.IndexController{})
|
|
||||||
beego.Router("/reset_password", &controllers.IndexController{})
|
beego.Router("/reset_password", &controllers.IndexController{})
|
||||||
|
|
||||||
// standalone
|
// standalone
|
||||||
|
Loading…
Reference in New Issue
Block a user