diff --git a/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.html b/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.html index 68613ba9c..e370ee5fd 100644 --- a/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.html +++ b/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.html @@ -161,7 +161,7 @@
+ [src]="artifact.showImage" />     @@ -178,9 +178,6 @@ {{'REPOSITORY.ARTIFACT_TOOTIP' | translate}} - - -
diff --git a/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts b/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts index 9b90fc58e..14a505208 100644 --- a/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts +++ b/src/portal/src/app/project/repository/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts @@ -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'; + } + } + } } diff --git a/src/portal/src/app/project/repository/artifact/artifact.ts b/src/portal/src/app/project/repository/artifact/artifact.ts index d2bf966ad..cb3a59449 100644 --- a/src/portal/src/app/project/repository/artifact/artifact.ts +++ b/src/portal/src/app/project/repository/artifact/artifact.ts @@ -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' + ]; diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index f35b0692d..f7b902105 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -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": "过滤资源的类型。", diff --git a/src/portal/src/images/artifact-openpolicyagent.svg b/src/portal/src/images/artifact-openpolicyagent.svg new file mode 100644 index 000000000..80eac5eb7 --- /dev/null +++ b/src/portal/src/images/artifact-openpolicyagent.svg @@ -0,0 +1,72 @@ + + + + diff --git a/src/portal/src/lib/components/config/system/system-settings.component.html b/src/portal/src/lib/components/config/system/system-settings.component.html index 8143012de..9ca14e966 100644 --- a/src/portal/src/lib/components/config/system/system-settings.component.html +++ b/src/portal/src/lib/components/config/system/system-settings.component.html @@ -97,7 +97,7 @@ -
+
diff --git a/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.html b/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.html index 3096bb423..e9384aa47 100644 --- a/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.html +++ b/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.html @@ -1,53 +1,53 @@ - -
- + + - + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +
+ {{ 'REPLICATION.CRON-TITLE' | translate }}
{{ 'REPLICATION.FIELD_NAME' | translate }}{{ 'REPLICATION.MANDATORY' | translate }}{{ 'REPLICATION.ALLOWED_VALUES' | translate }}{{ 'REPLICATION.ALLOWED_CHARACTERS' | translate }}{{ 'REPLICATION.FIELD_NAME' | translate }}{{ 'REPLICATION.MANDATORY' | translate }}{{ 'REPLICATION.ALLOWED_VALUES' | translate }}{{ 'REPLICATION.ALLOWED_CHARACTERS' | translate }}
{{'REPLICATION.SECONDS' | translate}}{{'REPLICATION.YES' | translate}}0-59* / , -
{{'REPLICATION.SECONDS' | translate}}{{'REPLICATION.YES' | translate}}0-59* / , -
{{'REPLICATION.MINUTES' | translate}}{{'REPLICATION.YES' | translate}}0-59* / , -
{{'REPLICATION.MINUTES' | translate}}{{'REPLICATION.YES' | translate}}0-59* / , -
{{'REPLICATION.HOURS' | translate}}{{'REPLICATION.YES' | translate}}0-23* / , -
{{'REPLICATION.HOURS' | translate}}{{'REPLICATION.YES' | translate}}0-23* / , -
{{'REPLICATION.DAY_MONTH' | translate}}{{'REPLICATION.YES' | translate}}1-31* / , - ?
{{'REPLICATION.DAY_MONTH' | translate}}{{'REPLICATION.YES' | translate}}1-31* / , - ?
{{'REPLICATION.MONTH' | translate}}{{'REPLICATION.YES' | translate}}1-12 or JAN-DEC* / , -
{{'REPLICATION.MONTH' | translate}}{{'REPLICATION.YES' | translate}}1-12 or JAN-DEC* / , -
{{'REPLICATION.DAY_WEEK' | translate}}{{'REPLICATION.YES' | translate}}0-6 or SUN-SAT* / , - ?
{{'REPLICATION.DAY_WEEK' | translate}}{{'REPLICATION.YES' | translate}}0-6 or SUN-SAT* / , - ?
\ No newline at end of file diff --git a/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.scss b/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.scss index d12e3390f..d6f620de4 100644 --- a/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.scss +++ b/src/portal/src/lib/components/cron-schedule/cron-tooltip/cron-tooltip.component.scss @@ -6,7 +6,6 @@ .table-title { border-top-left-radius: 0.125rem; border-top-right-radius: 0.125rem; - background: #000; span { font-size: 16px; }