Skip to content

Commit

Permalink
Add Podman push command to the UI (goharbor#18810)
Browse files Browse the repository at this point in the history
1. Fixes goharbor#18781

Signed-off-by: AllForNothing <sshijun@vmware.com>
  • Loading branch information
AllForNothing committed Jun 13, 2023
1 parent 31a46a1 commit ca94a23
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ <h5 class="history-header mt-3 font-style" id="history-header">
'GC.DELETE_BLOB'
| translate
: {
blobs: getBlobs(job?.job_parameters),
manifest: getManifest(job?.job_parameters)
blob: getBlobs(job?.job_parameters),
}
}}</span
>
Expand All @@ -90,7 +89,6 @@ <h5 class="history-header mt-3 font-style" id="history-header">
'GC.DELETE_MANIFEST'
| translate
: {
blob: getBlobs(job?.job_parameters),
manifest: getManifest(job?.job_parameters)
}
}}</span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
}

.detail {
min-width: 12rem;
width: 12rem !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ <h5 class="mt-0">
}}"></hbr-copy-input>
</article>
</section>
<section>
<h5 class="mt-0">
{{ 'PUSH_IMAGE.PODMAN' | translate }}
{{ 'PUSH_IMAGE.TITLE' | translate }}
</h5>
<article class="commands-section">
<hbr-copy-input
(onCopyError)="onCpError($event)"
inputSize="65"
headerTitle="{{
'PUSH_IMAGE.PUSH_COMMAND' | translate
}}"
defaultValue="{{
podmanPushCommand
}}"></hbr-copy-input>
</article>
</section>
<section>
<h5>
{{ 'PUSH_IMAGE.HELM' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('PushImageButtonComponent (inline template)', () => {
await fixture.whenStable();
let copyInputs: HTMLInputElement[] =
fixture.nativeElement.querySelectorAll('.command-input');
expect(copyInputs.length).toEqual(5);
expect(copyInputs.length).toEqual(6);
expect(copyInputs[0].value.trim()).toEqual(
`docker tag SOURCE_IMAGE[:TAG] https://testing.harbor.com/testing/REPOSITORY[:TAG]`
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export class PushImageButtonComponent {
public get pushCommandImage(): string {
return `docker push ${this.registryUrl}/${this.projectName}/REPOSITORY[:TAG]`;
}

public get podmanPushCommand(): string {
return `podman push IMAGE_ID ${this.registryUrl}/${this.projectName}/REPOSITORY[:TAG]`;
}

public get tagCommandChart(): string {
return `helm package CHART_PATH`;
}
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/de-de-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@
"PUSH_IMAGE": {
"TITLE": "Push Befehl",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "Paketiere ein Chart für dieses Projekt:",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/en-us-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@
"PUSH_IMAGE": {
"TITLE": "Push Command",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "Package a chart for this project:",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/es-es-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@
"PUSH_IMAGE": {
"TITLE": "Push Command",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "Package a chart for this project:",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/fr-fr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@
"PUSH_IMAGE": {
"TITLE": "Commande de push",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "Taguer une chart pour ce projet :",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/pt-br-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@
"PUSH_IMAGE": {
"TITLE": "Comando Push",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "Package a chart for this project:",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/tr-tr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@
"PUSH_IMAGE": {
"TITLE": "Push Command",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "Package a chart for this project:",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/zh-cn-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@
"PUSH_IMAGE": {
"TITLE": "推送命令",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "在项目中打包 chart",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/zh-tw-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@
"PUSH_IMAGE": {
"TITLE": "推送映像檔的 Docker 命令",
"DOCKER": "Docker",
"PODMAN": "Podman",
"HELM": "Helm",
"CNAB": "CNAB",
"TAG_COMMAND_CHART": "為此專案打包 Chart",
Expand Down

0 comments on commit ca94a23

Please sign in to comment.