diff --git a/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.html b/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.html index 4dc0cdf1b..284801775 100644 --- a/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.html +++ b/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.html @@ -138,10 +138,10 @@ - - + + - +
{{'HELM_CHART.LABELS' | translate }}{{labels?.length}}{{'HELM_CHART.LABELS' | translate }}{{labels?.length}}
diff --git a/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.ts b/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.ts index e282dd16c..020d71340 100644 --- a/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.ts +++ b/src/portal/lib/src/helm-chart/chart-detail/chart-detail-summary.component.ts @@ -37,10 +37,10 @@ export class ChartDetailSummaryComponent implements OnInit { ) {} ngOnInit(): void { - this.addCMD = "helm repo add --ca-file --cert-file --key-file \ - --username --password ${this.repoURL}/chartrepo/${this.projectName}"; - this.installCMD = "helm install --ca-file --cert-file --key-file \ - --username= --password= --version ${this.chartVersion} /${this.chartName}"; + this.addCMD = `helm repo add --ca-file --cert-file --key-file \ + --username --password ${this.repoURL}/chartrepo/${this.projectName}`; + this.installCMD = `helm install --ca-file --cert-file --key-file \ + --username= --password= --version ${this.chartVersion} /${this.chartName}`; this.verifyCMD = `helm verify --keyring ${this.chartName}-${this.chartVersion}.tgz`; } diff --git a/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.html b/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.html index 519ed6027..8e5c132e4 100644 --- a/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.html +++ b/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.html @@ -58,6 +58,7 @@ [projectName]="projectName" [resource]="selectedRows[0]" [resourceType]="resourceType" + [addLabelHeaders]="addLabelHeaders" (changeEvt)="onLabelChange(selectedRows[0])"> diff --git a/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.ts b/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.ts index 48b618721..67e1eb37f 100644 --- a/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.ts +++ b/src/portal/lib/src/helm-chart/versions/helm-chart-version.component.ts @@ -81,6 +81,8 @@ export class ChartVersionComponent implements OnInit { chartFile: File; provFile: File; + addLabelHeaders = 'HELM_CHART.ADD_LABEL_TO_CHART_VERSION'; + @ViewChild("confirmationDialog") confirmationDialog: ConfirmationDialogComponent; diff --git a/src/portal/lib/src/label/label-marker/label-marker.component.html b/src/portal/lib/src/label/label-marker/label-marker.component.html index 64ac987a5..6bdf9f40b 100644 --- a/src/portal/lib/src/label/label-marker/label-marker.component.html +++ b/src/portal/lib/src/label/label-marker/label-marker.component.html @@ -1,5 +1,5 @@
- +
diff --git a/src/portal/lib/src/label/label-marker/label-marker.component.ts b/src/portal/lib/src/label/label-marker/label-marker.component.ts index 4914b9d8c..bfb931da0 100644 --- a/src/portal/lib/src/label/label-marker/label-marker.component.ts +++ b/src/portal/lib/src/label/label-marker/label-marker.component.ts @@ -20,6 +20,7 @@ export class LabelMarkerComponent implements OnInit { @Input() projectName: string; @Input() resource: RepositoryItem | HelmChartVersion; @Input() resourceType: ResourceType; + @Input() addLabelHeaders: string; @Output() changeEvt = new EventEmitter(); labelFilter = ''; diff --git a/src/portal/lib/src/tag/tag.component.html b/src/portal/lib/src/tag/tag.component.html index afa2e1a68..1366bd686 100644 --- a/src/portal/lib/src/tag/tag.component.html +++ b/src/portal/lib/src/tag/tag.component.html @@ -63,7 +63,7 @@
- +
{{'LABEL.NO_LABELS' | translate }}
diff --git a/src/portal/src/app/base/global-search/search-result.component.html b/src/portal/src/app/base/global-search/search-result.component.html index dcd6bb624..7b102a5f0 100644 --- a/src/portal/src/app/base/global-search/search-result.component.html +++ b/src/portal/src/app/base/global-search/search-result.component.html @@ -6,11 +6,17 @@
{{'SEARCH.IN_PROGRESS' | translate}}
-

{{'PROJECT.PROJECTS' | translate}}

- -

{{'PROJECT_DETAIL.REPOSITORIES' | translate}}

- -

{{'HELM_CHART.HELMCHARTS' | translate}}

- +
+

{{'PROJECT.PROJECTS' | translate}}

+ +
+
+

{{'PROJECT_DETAIL.REPOSITORIES' | translate}}

+ +
+
+

{{'HELM_CHART.HELMCHARTS' | translate}}

+ +
\ No newline at end of file diff --git a/src/portal/src/app/base/global-search/search-result.component.ts b/src/portal/src/app/base/global-search/search-result.component.ts index fa85a9feb..3a73e8e73 100644 --- a/src/portal/src/app/base/global-search/search-result.component.ts +++ b/src/portal/src/app/base/global-search/search-result.component.ts @@ -18,6 +18,7 @@ import { GlobalSearchService } from './global-search.service'; import { SearchResults } from './search-results'; import { SearchTriggerService } from './search-trigger.service'; +import { AppConfigService } from './../../app-config.service'; import { MessageHandlerService } from '../../shared/message-handler/message-handler.service'; @Component({ @@ -49,7 +50,8 @@ export class SearchResultComponent implements OnInit, OnDestroy { constructor( private search: GlobalSearchService, private msgHandler: MessageHandlerService, - private searchTrigger: SearchTriggerService) { } + private searchTrigger: SearchTriggerService, + private appConfigService: AppConfigService) { } ngOnInit() { this.searchSub = this.searchTrigger.searchTriggerChan$.subscribe(term => { @@ -143,4 +145,7 @@ export class SearchResultComponent implements OnInit, OnDestroy { this.msgHandler.handleError(error); }); } + get withHelmChart(): boolean { + return this.appConfigService.getConfig().with_chartmuseum; + } } diff --git a/src/portal/src/app/base/global-search/search.component.scss b/src/portal/src/app/base/global-search/search.component.scss index fdcc82818..a4efecfb8 100644 --- a/src/portal/src/app/base/global-search/search.component.scss +++ b/src/portal/src/app/base/global-search/search.component.scss @@ -68,5 +68,5 @@ #results { overflow-y: auto; - max-height: 99%; + max-height: 85%; } \ No newline at end of file diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index 81044dc58..c38cbd735 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -472,7 +472,7 @@ "NO_INFO": "No description for this repo. You can add it to this repository.", "IMAGE": "Images", "LABELS": "Labels", - "ADD_TO_IMAGE": "Add labels to this image", + "ADD_LABEL_TO_IMAGE": "Add labels to this image", "FILTER_BY_LABEL": "Filter images by label", "ADD_LABELS": "Add labels", "RETAG": "Retag", @@ -536,7 +536,8 @@ "PROV_FILE": "Prov File", "READY": "Ready", "NOT_READY": "Not Ready", - "LABELS": "labels", + "LABELS": "Labels", + "ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version", "STATUS": "Status" }, "ALERT": { diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json index 73e7613a6..8cee9e38c 100644 --- a/src/portal/src/i18n/lang/es-es-lang.json +++ b/src/portal/src/i18n/lang/es-es-lang.json @@ -470,7 +470,7 @@ "NO_INFO": "Sin información de descripción para este repositorio", "IMAGE": "Imágenes", "LABELS": "Labels", - "ADD_TO_IMAGE": "Add labels to this image", + "ADD_LABEL_TO_IMAGE": "Add labels to this image", "FILTER_BY_LABEL": "Filter images by label", "ADD_LABELS": "Add labels", "RETAG": "Retag", @@ -534,7 +534,8 @@ "PROV_FILE": "Prov File", "READY": "Ready", "NOT_READY": "Not Ready", - "LABELS": "labels", + "LABELS": "Labels", + "ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version", "STATUS": "Status" }, "ALERT": { diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json index 1ece5b5dc..fba434a57 100644 --- a/src/portal/src/i18n/lang/fr-fr-lang.json +++ b/src/portal/src/i18n/lang/fr-fr-lang.json @@ -448,7 +448,7 @@ "NO_INFO": "No description for this repo. You can add it to this repository.", "IMAGE": "Images", "LABELS": "Labels", - "ADD_TO_IMAGE": "Add labels to this image", + "ADD_LABEL_TO_IMAGE": "Add labels to this image", "FILTER_BY_LABEL": "Filter images by label", "ADD_LABELS": "Add labels", "RETAG": "Retag", @@ -511,7 +511,8 @@ "PROV_FILE": "Prov File", "READY": "Ready", "NOT_READY": "Not Ready", - "LABELS": "labels", + "LABELS": "Labels", + "ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version", "STATUS": "Status" }, "ALERT": { diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index bdb6d8111..0851ce5a9 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -469,7 +469,7 @@ "NO_INFO": "Nenhuma descrição de informação para esse repositório", "IMAGE": "Imagens", "LABELS": "Labels", - "ADD_TO_IMAGE": "Adicionar labels a essa imagem", + "ADD_LABEL_TO_IMAGE": "Adicionar labels a essa imagem", "FILTER_BY_LABEL": "Filtrar imagens por label", "ADD_LABELS": "Adicionar labels", "ACTION": "AÇÃO", @@ -530,6 +530,7 @@ "PROV_FILE": "Arquivo Prov", "READY": "Pronto", "NOT_READY": "Não Pronto", + "ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version", "STATUS": "Status" }, "ALERT": { diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index cb99b4efb..5f7be68fb 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -470,7 +470,7 @@ "NO_INFO": "此镜像仓库没有描述信息", "IMAGE": "镜像", "LABELS": "标签", - "ADD_TO_IMAGE": "添加标签到此镜像", + "ADD_LABEL_TO_IMAGE": "添加标签到此镜像", "ADD_LABELS": "添加标签", "RETAG": "复制镜像", "FILTER_BY_LABEL": "过滤标签", @@ -535,6 +535,7 @@ "READY": "就绪", "NOT_READY": "未就绪", "LABELS": "标签", + "ADD_LABEL_TO_CHART_VERSION": "添加标签到此 Chart Version", "STATUS": "状态" }, "ALERT": { diff --git a/tests/resources/Harbor-Pages/Project-Helmcharts.robot b/tests/resources/Harbor-Pages/Project-Helmcharts.robot index 522cd35ce..ec7732658 100644 --- a/tests/resources/Harbor-Pages/Project-Helmcharts.robot +++ b/tests/resources/Harbor-Pages/Project-Helmcharts.robot @@ -19,7 +19,7 @@ Upload Chart files ${prometheus_file_path} Set Variable ${current_dir}/${prometheus_chart_filename} Choose File xpath=${chart_file_browse} ${prometheus_file_path} Click Element xpath=${upload_action_button} - Sleep 2 + Wait Until Element Does Not Contain xpath=${upload_action_button} Click Element xpath=${upload_chart_button} ${harbor_file_path} Set Variable ${current_dir}/${harbor_chart_filename}