Fix tooltip cut issue

Change Dockerfile of UI builder
This commit is contained in:
Steven Zou 2017-06-23 16:23:28 +08:00
parent 7c0e79d10a
commit a12ec997cc
8 changed files with 36 additions and 37 deletions

View File

@ -1,20 +1,14 @@
FROM node:7.5.0
RUN mkdir -p /harbor_ui
RUN mkdir -p /harbor_resources
RUN mkdir -p /harbor_src
COPY src/ui_ng/package.json /harbor_ui
COPY src/ui_ng/tslint.json /harbor_ui
COPY src/ui_ng/typings.json /harbor_ui
COPY src/ui_ng/yarn.lock /harbor_ui
COPY make/dev/nodeclarity/angular-cli.json /harbor_ui
COPY src/ui_ng/package.json /harbor_resources
COPY make/dev/nodeclarity/entrypoint.sh /
COPY src/ui_ng/tsconfig-aot.json /harbor_ui
COPY src/ui_ng/rollup-config.js /harbor_ui
WORKDIR /harbor_ui
WORKDIR /harbor_resources
RUN npm __proxy__ install -g @angular/cli && \
npm __proxy__ install && \
chmod u+x /entrypoint.sh
VOLUME ["/harbor_ui", "/harbor_ui/dist"]
VOLUME ["/harbor_src"]

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
cd /harbor_ui
cd /harbor_src/ui_ng
rm -rf dist/*
npm_proxy=
@ -18,7 +18,8 @@ if [ ! -z "$npm_proxy" -a "$npm_proxy" != " " ]; then
npm config set proxy $npm_proxy
fi
mv ./src/package.json ./
mv /harbor_resources/node_modules ./
cat ./package.json
npm install
@ -26,12 +27,12 @@ npm install
sed -i 's/* as//g' src/app/shared/gauge/gauge.component.js
./node_modules/.bin/rollup -c rollup-config.js
cp -r ./src/i18n/ dist/
cp ./src/styles.css dist/
cp -r ./src/i18n/ ../ui/static/
cp ./src/styles.css ../ui/static/
cp ./node_modules/clarity-icons/clarity-icons.min.css dist/
cp ./node_modules/mutationobserver-shim/dist/mutationobserver.min.js dist/
cp ./node_modules/@webcomponents/custom-elements/custom-elements.min.js dist/
cp ./node_modules/clarity-icons/clarity-icons.min.js dist/
cp ./node_modules/clarity-ui/clarity-ui.min.css dist/
cp -r ./node_modules/clarity-icons/shapes/ dist/
cp ./node_modules/clarity-icons/clarity-icons.min.css ../ui/static/
cp ./node_modules/mutationobserver-shim/dist/mutationobserver.min.js ../ui/static/
cp ./node_modules/@webcomponents/custom-elements/custom-elements.min.js ../ui/static/
cp ./node_modules/clarity-icons/clarity-icons.min.js ../ui/static/
cp ./node_modules/clarity-ui/clarity-ui.min.css ../ui/static/
cp -r ./node_modules/clarity-icons/shapes/ ../ui/static/

View File

@ -12,9 +12,16 @@ export const REPOSITORY_STACKVIEW_STYLES: string = `
.refresh-btn:hover {
color: #007CBB;
}
:host >>> .datagrid .datagrid-body .datagrid-row {
:host >>> .datagrid .datagrid-body {
overflow-x: hidden;
overflow-y: hidden;
}
:host >>> .datagrid .datagrid-foot {
border-top: 1px solid #ccc;
}
:host >>> .datagrid .datagrid-body .datagrid-row {
background-color: #ccc;
}

View File

@ -13,6 +13,7 @@ export const TAG_STYLE = `
:host >>> .datagrid {
margin: 0;
border-bottom: none;
}
:host >>> .datagrid-placeholder {

View File

@ -17,8 +17,8 @@ export const TAG_TEMPLATE = `
<clr-datagrid [clrDgLoading]="loading" [class.embeded-datagrid]="isEmbedded">
<clr-dg-column style="width: 80px;" [clrDgField]="'name'">{{'REPOSITORY.TAG' | translate}}</clr-dg-column>
<clr-dg-column style="min-width: 180px;">{{'REPOSITORY.PULL_COMMAND' | translate}}</clr-dg-column>
<clr-dg-column style="width: 160px;" *ngIf="withClair">{{'VULNERABILITY.SINGULAR' | translate}}</clr-dg-column>
<clr-dg-column style="width: 80px;" *ngIf="withNotary">{{'REPOSITORY.SIGNED' | translate}}</clr-dg-column>
<clr-dg-column style="width: 150px;" *ngIf="withClair">{{'VULNERABILITY.SINGULAR' | translate}}</clr-dg-column>
<clr-dg-column style="width: 100px;">{{'REPOSITORY.AUTHOR' | translate}}</clr-dg-column>
<clr-dg-column style="width: 160px;"[clrDgSortBy]="createdComparator">{{'REPOSITORY.CREATED' | translate}}</clr-dg-column>
<clr-dg-column style="width: 80px;" [clrDgField]="'docker_version'" *ngIf="!withClair">{{'REPOSITORY.DOCKER_VERSION' | translate}}</clr-dg-column>
@ -35,6 +35,9 @@ export const TAG_TEMPLATE = `
<span *ngSwitchDefault>{{t.name}}</span>
</clr-dg-cell>
<clr-dg-cell style="min-width: 180px;" class="truncated" title="docker pull {{registryUrl}}/{{repoName}}:{{t.name}}">docker pull {{registryUrl}}/{{repoName}}:{{t.name}}</clr-dg-cell>
<clr-dg-cell style="width: 160px;" *ngIf="withClair">
<hbr-vulnerability-bar [tagId]="t.name" [summary]="t.scan_overview" (startScanning)="scanTag($event)"></hbr-vulnerability-bar>
</clr-dg-cell>
<clr-dg-cell style="width: 80px;" *ngIf="withNotary" [ngSwitch]="t.signature !== null">
<clr-icon shape="check" *ngSwitchCase="true" style="color: #1D5100;"></clr-icon>
<clr-icon shape="close" *ngSwitchCase="false" style="color: #C92100;"></clr-icon>
@ -43,9 +46,6 @@ export const TAG_TEMPLATE = `
<span class="tooltip-content">{{'REPOSITORY.NOTARY_IS_UNDETERMINED' | translate}}</span>
</a>
</clr-dg-cell>
<clr-dg-cell style="width: 150px;" *ngIf="withClair">
<hbr-vulnerability-bar [tagId]="t.name" [summary]="t.scan_overview" (startScanning)="scanTag($event)"></hbr-vulnerability-bar>
</clr-dg-cell>
<clr-dg-cell style="width: 100px;">{{t.author}}</clr-dg-cell>
<clr-dg-cell style="width: 160px;">{{t.created | date: 'short'}}</clr-dg-cell>
<clr-dg-cell style="width: 80px;" *ngIf="!withClair">{{t.docker_version}}</clr-dg-cell>

View File

@ -8,13 +8,12 @@ export const SCANNING_STYLES: string = `
}
.bar-state-chart {
position: relative;
top: 2px;
margin-top: 2px;
}
.bar-state-error {
position: relative;
top: -3px;
top: -4px;
}
.error-text {

View File

@ -31,7 +31,7 @@
"clarity-icons": "^0.9.8",
"clarity-ui": "^0.9.8",
"core-js": "^2.4.1",
"harbor-ui": "^0.2.20",
"harbor-ui": "^0.2.25",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",

View File

@ -211,12 +211,9 @@ export class UserComponent implements OnInit, OnDestroy {
//Remove it from current user list
//and then view refreshed
this.currentTerm = '';
this.originalUsers.then(users => {
this.users = users.filter(u => u.user_id != user.user_id);
this.msgHandler.showSuccess("USER.DELETE_SUCCESS");
let hnd = setInterval(() => this.ref.markForCheck(), 100);
setTimeout(() => clearInterval(hnd), 1000);
});
this.msgHandler.showSuccess("USER.DELETE_SUCCESS");
this.refresh();
})
.catch(error => {
this.msgHandler.handleError(error);