mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
Fix css bugs with label target 2.1.0
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
3445608e62
commit
71852f6200
@ -16,11 +16,10 @@ export class Robot {
|
||||
|
||||
constructor () {
|
||||
this.access = <any>{};
|
||||
// this.access[0].action = true;
|
||||
this.access.isPullImage = false;
|
||||
this.access.isPushOrPullImage = true;
|
||||
this.access.isPushChart = false;
|
||||
this.access.isPullChart = false;
|
||||
this.access.isPushChart = true;
|
||||
this.access.isPullChart = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1164,7 +1164,7 @@
|
||||
"DAY_AGO": " day(s) ago",
|
||||
"HOUR_AGO": " hour(s) ago",
|
||||
"MINUTE_AGO": " minute(s) ago",
|
||||
"SECOND_AGO": "less 1 minute",
|
||||
"SECOND_AGO": "less than 1 minute",
|
||||
"EVENT_LOG": "EVENT LOG"
|
||||
},
|
||||
"UNKNOWN_ERROR": "Unknown errors have occurred. Please try again later.",
|
||||
|
@ -1158,7 +1158,7 @@
|
||||
"DAY_AGO": " day(s) ago",
|
||||
"HOUR_AGO": " hour(s) ago",
|
||||
"MINUTE_AGO": " minute(s) ago",
|
||||
"SECOND_AGO": "less 1 minute",
|
||||
"SECOND_AGO": "less than 1 minute",
|
||||
"EVENT_LOG": "EVENT LOG"
|
||||
},
|
||||
"UNKNOWN_ERROR": "Ha ocurrido un error desconocido. Por favor, inténtelo de nuevo más tarde.",
|
||||
|
@ -1129,7 +1129,7 @@
|
||||
"DAY_AGO": " day(s) ago",
|
||||
"HOUR_AGO": " hour(s) ago",
|
||||
"MINUTE_AGO": " minute(s) ago",
|
||||
"SECOND_AGO": "less 1 minute",
|
||||
"SECOND_AGO": "less than 1 minute",
|
||||
"EVENT_LOG": "EVENT LOG"
|
||||
},
|
||||
"UNKNOWN_ERROR": "Des erreurs inconnues sont survenues. Veuillez réessayer plus tard.",
|
||||
|
@ -35,8 +35,12 @@
|
||||
</div>
|
||||
<div class="state-container" [style.width]="totalWidth+'px'">
|
||||
<div class="clr-row m-0" *ngFor="let item of scanningMetrics?.metrics | keyvalue">
|
||||
<div class="state">{{getI18nKey(item?.key)|translate}}</div>
|
||||
<div class="value">{{item?.value}}</div>
|
||||
<div class="state">
|
||||
<span class="badge" [ngClass]="{ error: isError(item?.key),
|
||||
finished: isFinished(item?.key),
|
||||
'in-progress': isInProgress(item?.key)}">{{item?.value}}</span>
|
||||
</div>
|
||||
<div class="value">{{getI18nKey(item?.key)|translate}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -80,18 +80,9 @@
|
||||
height: 18px;
|
||||
display: flex;
|
||||
background-color:#eee;
|
||||
.error {
|
||||
background-color: #e62700;
|
||||
}
|
||||
.finished {
|
||||
background-color: #62a420;
|
||||
}
|
||||
.in-progress {
|
||||
background-color: #0079b8;
|
||||
}
|
||||
}
|
||||
.state {
|
||||
flex: 2;
|
||||
flex: 1;
|
||||
padding-left: 3px;
|
||||
}
|
||||
.value {
|
||||
@ -102,4 +93,16 @@
|
||||
}
|
||||
.display-flex {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.error {
|
||||
background-color: #e62700;
|
||||
}
|
||||
.finished {
|
||||
background-color: #62a420;
|
||||
}
|
||||
.in-progress {
|
||||
background-color: #0079b8;
|
||||
}
|
||||
.badge {
|
||||
min-width: 30px;
|
||||
}
|
||||
|
@ -332,4 +332,13 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
}
|
||||
}
|
||||
isError(status: string): boolean {
|
||||
return status === VULNERABILITY_SCAN_STATUS.ERROR;
|
||||
}
|
||||
isFinished(status: string): boolean {
|
||||
return status === VULNERABILITY_SCAN_STATUS.SUCCESS;
|
||||
}
|
||||
isInProgress(status: string): boolean {
|
||||
return status === VULNERABILITY_SCAN_STATUS.RUNNING;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ export class OperateInfo {
|
||||
this.state = '';
|
||||
this.data = {id: -1, name: '', errorInf: ''};
|
||||
this.timeStamp = new Date().getTime();
|
||||
this.timeDiff = 'less 1 minute';
|
||||
this.timeDiff = 'OPERATION.SECOND_AGO';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
.infoArea{ margin-left: 10px; width: 270px;}
|
||||
.eventName{display: block; margin-bottom: -5px;font-size: 16px; }
|
||||
.eventErrorInf {display:block; font-size: 12px;color:red;line-height: .6rem;}
|
||||
.eventTarget{display: inline-flex; width: 172px; font-size: 12px; flex-shrink:1; overflow: hidden; text-overflow: ellipsis;white-space: nowrap;}
|
||||
.eventTarget{display: inline-flex; width: 160px; font-size: 12px; flex-shrink:1; overflow: hidden; text-overflow: ellipsis;white-space: nowrap;}
|
||||
.eventTime{ float: right; font-size: 12px;}
|
||||
:host >>> .nav{padding-left: 38px;}
|
||||
|
||||
@ -75,4 +75,4 @@
|
||||
}
|
||||
.margin-left-5 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
@ -130,6 +130,8 @@ export class OperationComponent implements OnInit, OnDestroy {
|
||||
this.animationState = this.animationState === 'out' ? 'in' : 'out';
|
||||
if (this.animationState === 'in') {
|
||||
this.resetNewMessageCount();
|
||||
// refresh when open
|
||||
this.TabEvent();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,6 @@ describe('OperationService', () => {
|
||||
operateInfo = res;
|
||||
});
|
||||
operationService.publishInfo(new OperateInfo());
|
||||
expect(operateInfo.timeDiff).toEqual("less 1 minute");
|
||||
expect(operateInfo.timeDiff).toEqual("OPERATION.SECOND_AGO");
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user