[OCI] Add the icon of openpolicyagent artifact

1. add image
2. fix show ui clearly when dark
3. fix chinese words of replication name filter tooltip
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
Yogi_Wang 2020-03-12 15:44:26 +08:00
parent f49994d81d
commit b32a8db114
8 changed files with 130 additions and 47 deletions

View File

@ -161,7 +161,7 @@
<clr-dg-cell class="truncated flex-max-width">
<div class="cell white-normal">
<img class="artifact-icon" [title]="artifact.type"
[src]="artifact.type==='IMAGE'||artifact.type==='CHART'||artifact.type ==='CNAB'?'images/artifact-'+artifact.type.toLowerCase()+'.svg':'images/artifact-default.svg'" />
[src]="artifact.showImage" />
&nbsp; &nbsp;
<a href="javascript:void(0)" class="max-width-100" (click)="goIntoArtifactSummaryPage(artifact)"
title="{{artifact.digest}}">
@ -178,9 +178,6 @@
{{'REPOSITORY.ARTIFACT_TOOTIP' | translate}}
</clr-tooltip-content>
</clr-tooltip>
<span href="javascript:void(0)" *ngIf="!artifact.references">
<clr-icon class="icon-folder" shape="file"></clr-icon>
</span>
</div>
</clr-dg-cell>
<clr-dg-cell *ngIf="depth">

View File

@ -61,7 +61,7 @@ import {
} from "../../../../../../lib/entities/shared.const";
import { operateChanges, OperateInfo, OperationState } from "../../../../../../lib/components/operation/operate";
import { errorHandler } from "../../../../../../lib/utils/shared/shared.utils";
import { ArtifactFront as Artifact, mutipleFilter } from "../../../artifact/artifact";
import { ArtifactFront as Artifact, mutipleFilter, artifactImages, ArtifactFront } from "../../../artifact/artifact";
import { Project } from "../../../../project";
import { ArtifactService as NewArtifactService } from "../../../../../../../ng-swagger-gen/services/artifact.service";
import { ADDITIONS } from "../../../artifact/artifact-additions/models";
@ -385,6 +385,7 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
})).subscribe(artifacts => {
this.artifactList = artifacts;
this.getArtifactAnnotationsArray(this.artifactList);
this.getArtifactIcon(this.artifactList);
}, error => {
this.errorHandlerService.error(error);
});
@ -414,6 +415,7 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
}
this.artifactList = res.body;
this.getArtifactAnnotationsArray(this.artifactList);
this.getArtifactIcon(this.artifactList);
}, error => {
// error
this.errorHandlerService.error(error);
@ -952,4 +954,13 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
get isFilterReadonly() {
return this.filterByType === 'label.id' ? 'readonly' : null;
}
getArtifactIcon(artifacts: ArtifactFront[]) {
for (const artifact of artifacts) {
if (artifactImages.some(image => image === artifact.type)) {
artifact.showImage = 'images/artifact-' + artifact.type.toLowerCase() + '.svg';
} else {
artifact.showImage = 'images/artifact-default.svg';
}
}
}
}

View File

@ -2,6 +2,7 @@ import { Artifact } from "../../../../../ng-swagger-gen/models/artifact";
export interface ArtifactFront extends Artifact {
annotationsArray?: string[];
showImage?: string;
}
export const mutipleFilter = [
@ -47,3 +48,6 @@ export const mutipleFilter = [
listItem: []
},
];
export const artifactImages = [
'IMAGE', 'CHART', 'CNAB', 'OPENPOLICYAGENT'
];

View File

@ -64,7 +64,7 @@
"TIME_OUT": "网关超时"
},
"TOOLTIP": {
"NAME_FILTER": "过滤资源的名字。不填或者“”匹配所有资源“library/”只匹配“library”下的资源。更多的匹配模式请参考用户手册。",
"NAME_FILTER": "过滤资源的名字。不填或者填写**”匹配所有资源“library/**”只匹配“library”下的资源。更多的匹配模式请参考用户手册。",
"TAG_FILTER": "过滤资源的tag/version。不填或者“”匹配所有“1.0*”只匹配以“1.0”开头的tag/version。",
"LABEL_FILTER": "根据标签筛选资源。",
"RESOURCE_FILTER": "过滤资源的类型。",

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="92px" height="101px" viewBox="0 0 92 101" enable-background="new 0 0 92 101" xml:space="preserve"> <image id="image0" width="92" height="101" x="0" y="0"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABlCAYAAADAmoQ9AAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAN
R0lEQVR42u2de3RV1Z3Hv999780DCYiiCFKLrrEqtEUrBUpC0uu0trWdcdY4CohiUR7qAopdUzvU
ine0OtA1LRrKI4Fga7FQx1arTDuC9dyTgJAYiloMgrwNrwAB403zOI/f/EEuDSH3fe49uZrPH1m5
++z923t/cnLu2fucsw/gALquf0HTtIFOxOqJ6Lp+k1OxVKoBqqqqBojIU36//4S7WtKHiHxb07Sx
TsRKSbiIKMuyngewy20p6UQp9QaAF7ds2TIo5VipFNZ1/TER+RbJ19yWkk769OmjARjY0tLyWxHx
pBIraeGapn0TwKMkW2zbrnRbSjoZNWrU3wBsBFCi6/pTqcRKSriu658BsFpECKDK7/e3ui0l3Sil
NgCAiDys6/o/Jx0n0QK1tbU+EfktgIs7kl53W0YmILkh/LuI/FLTtGHJxElYeCgUelJEvhL+7PF4
3nBbRiYYP3782yQbAUBEBgBYq2maN9E4CQkPBoNfB/Dv4c8kTxUVFW1zW0YmIGkD0DsljVFKPZFo
nLiFb9q06VIAz3Uct8MEOxryqYDknzt/FpGHKysr/zGRGHEJFxEahvErEbmsy6ag2xIyicfjOae/
IqJs2/51ZWXlJfHGiEu4rutzReSbXdNJVrktIZMUFhbWhY/jYURksG3bq+KNEVO4pmnXAjjv3JNk
U3Fx8btuS8gkJAVnzsfPQUS+o+v6ffHEiCpcRDwknxORvG62bSZpuS0h04hIVYT0n2/atOmzscpH
FR4MBueJyJcjbN6ITyFKqTe7SxeRfoZhrOpyUnF++UgbqqqqRpKcH2m7x+N5y+3Ou4HP59tG0uxu
m4jcpOv6rGjlVYSCHsuyfikivkgFc3Nza93uvBuMGzeuRUTei5JlQbR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cbq8vLj7jdxzA9QjgAzHtw8qkcxW+DPO5EPBKGgrptdcVSR5bBc4oeIxwAHp09
fZ9H8C8gUp4oIvjA2pXLg273qSs9SjgABL43400KU1vnlVyydmVZymsxpoMeJxwAHv/ejF8rRn7F
DaO8IILEmxcqecjtPkSiRwoHAH7hcz8gkeBCxDzqU/i3TM2LJEOPFR7w+808+CaQjPedQZYiJ/Wk
M5Lu6LHCAeBHc+49LspzB4jYe6xioCd+SZ7XTLcbEIsnZt23GVAPR81Ebhh++eCn4gzpKj1eOAA8
MWf60yBeDn+Wzq9VIhs8yLvb6Uth6SIrhAOApyBnKsgDXZIF5JR0vPorXWSN8MDUqac94EQCf1/E
S+HpF1Ysf83ttiVC1ggHgMCc6VsAzgfEJFg7KC93ntttSpT/BzW/gk8BjTNEAAAARGVYSWZNTQAq
AAAACAABh2kABAAAAAEAAAAaAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAABcoAMABAAAAAEA
AABlAAAAAM05E+gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDMtMTJUMDY6MjA6MDArMDA6MDBX
RWhnAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAzLTEyVDA2OjIwOjAwKzAwOjAwJhjQ2wAAABF0
RVh0ZXhpZjpDb2xvclNwYWNlADEPmwJJAAAAEnRFWHRleGlmOkV4aWZPZmZzZXQAMjZTG6JlAAAA
F3RFWHRleGlmOlBpeGVsWERpbWVuc2lvbgA5MnJDj50AAAAYdEVYdGV4aWY6UGl4ZWxZRGltZW5z
aW9uADEwMaw6kY0AAAAASUVORK5CYII=" />
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -97,7 +97,7 @@
<button id="show-add-modal-button" (click)="showAddModal=!showAddModal"
class="btn btn-link">{{'CVE_WHITELIST.ADD'|translate}}</button>
</div>
<div class="add-modal" *ngIf="showAddModal">
<div class="add-modal add-modal-dark" *ngIf="showAddModal">
<clr-icon (click)="showAddModal=false" class="float-lg-right margin-top-4"
shape="window-close"></clr-icon>
<div>

View File

@ -1,53 +1,53 @@
<table class="table table-noborder table-style">
<caption class="table-title">
<span>
<table class="table table-noborder table-style table-tag">
<caption class="table-title tag-thead">
<span class="tag-header-color">
{{ 'REPLICATION.CRON-TITLE' | translate }}
</span>
</caption>
<thead>
<thead class="tag-thead">
<tr>
<th>{{ 'REPLICATION.FIELD_NAME' | translate }}</th>
<th>{{ 'REPLICATION.MANDATORY' | translate }}</th>
<th>{{ 'REPLICATION.ALLOWED_VALUES' | translate }}</th>
<th>{{ 'REPLICATION.ALLOWED_CHARACTERS' | translate }}</th>
<th class="tag-header-color">{{ 'REPLICATION.FIELD_NAME' | translate }}</th>
<th class="tag-header-color">{{ 'REPLICATION.MANDATORY' | translate }}</th>
<th class="tag-header-color">{{ 'REPLICATION.ALLOWED_VALUES' | translate }}</th>
<th class="tag-header-color">{{ 'REPLICATION.ALLOWED_CHARACTERS' | translate }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{'REPLICATION.SECONDS' | translate}}</td>
<td>{{'REPLICATION.YES' | translate}}</td>
<td>0-59</td>
<td>* / , -</td>
<tbody class="tag-tbody">
<tr class="tag-tr">
<td class="tag-body-color">{{'REPLICATION.SECONDS' | translate}}</td>
<td class="tag-body-color">{{'REPLICATION.YES' | translate}}</td>
<td class="tag-body-color">0-59</td>
<td class="tag-body-color">* / , -</td>
</tr>
<tr>
<td>{{'REPLICATION.MINUTES' | translate}}</td>
<td>{{'REPLICATION.YES' | translate}}</td>
<td>0-59</td>
<td>* / , -</td>
<tr class="tag-tr">
<td class="tag-body-color">{{'REPLICATION.MINUTES' | translate}}</td>
<td class="tag-body-color">{{'REPLICATION.YES' | translate}}</td>
<td class="tag-body-color">0-59</td>
<td class="tag-body-color">* / , -</td>
</tr>
<tr>
<td>{{'REPLICATION.HOURS' | translate}}</td>
<td>{{'REPLICATION.YES' | translate}}</td>
<td>0-23</td>
<td>* / , -</td>
<tr class="tag-tr">
<td class="tag-body-color">{{'REPLICATION.HOURS' | translate}}</td>
<td class="tag-body-color">{{'REPLICATION.YES' | translate}}</td>
<td class="tag-body-color">0-23</td>
<td class="tag-body-color">* / , -</td>
</tr>
<tr>
<td>{{'REPLICATION.DAY_MONTH' | translate}}</td>
<td>{{'REPLICATION.YES' | translate}}</td>
<td>1-31</td>
<td>* / , - ?</td>
<tr class="tag-tr">
<td class="tag-body-color">{{'REPLICATION.DAY_MONTH' | translate}}</td>
<td class="tag-body-color">{{'REPLICATION.YES' | translate}}</td>
<td class="tag-body-color">1-31</td>
<td class="tag-body-color">* / , - ?</td>
</tr>
<tr>
<td>{{'REPLICATION.MONTH' | translate}}</td>
<td>{{'REPLICATION.YES' | translate}}</td>
<td>1-12 or JAN-DEC</td>
<td>* / , -</td>
<tr class="tag-tr">
<td class="tag-body-color">{{'REPLICATION.MONTH' | translate}}</td>
<td class="tag-body-color">{{'REPLICATION.YES' | translate}}</td>
<td class="tag-body-color">1-12 or JAN-DEC</td>
<td class="tag-body-color">* / , -</td>
</tr>
<tr>
<td>{{'REPLICATION.DAY_WEEK' | translate}}</td>
<td>{{'REPLICATION.YES' | translate}}</td>
<td>0-6 or SUN-SAT</td>
<td>* / , - ?</td>
<tr class="tag-tr">
<td class="tag-body-color">{{'REPLICATION.DAY_WEEK' | translate}}</td>
<td class="tag-body-color">{{'REPLICATION.YES' | translate}}</td>
<td class="tag-body-color">0-6 or SUN-SAT</td>
<td class="tag-body-color">* / , - ?</td>
</tr>
</tbody>
</table>

View File

@ -6,7 +6,6 @@
.table-title {
border-top-left-radius: 0.125rem;
border-top-right-radius: 0.125rem;
background: #000;
span {
font-size: 16px;
}