Skip to content

Commit

Permalink
update copy pull command in artifact tags page
Browse files Browse the repository at this point in the history
* This commit moves "Copy Pull Command" button inside the table
* and add a separate column for better usability

Signed-off-by: bupd <bupdprasanth@gmail.com>
  • Loading branch information
bupd committed Nov 15, 2024
1 parent 9345fe3 commit d1c4ff8
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@

<clr-dropdown [clrCloseMenuOnItemClick]="false" class="mr-1" *ngIf="isTagMode">
<button
[disabled]="
selectedTags?.length !== 1 || !hasPullCommandForTag(artifact)
"
[disabled]="!hasPullCommandForTag(artifact)"
class="btn btn-link copy-pull-command"
clrDropdownTrigger>
{{ 'PUSH_IMAGE.COPY_PULL_COMMAND' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
getPullCommandByTag,
hasPullCommand,
} from '../../../../artifact';
import { Tag } from '../../../../../../../../../../ng-swagger-gen/models/tag';

@Component({
selector: 'app-pull-command',
Expand All @@ -29,7 +28,7 @@ export class PullCommandComponent {

// for tagMode
@Input()
selectedTags: Tag[];
selectedTag: string;
@Input()
artifact: Artifact;
@Input()
Expand Down Expand Up @@ -113,7 +112,7 @@ export class PullCommandComponent {
`${this.registryUrl ? this.registryUrl : location.hostname}/${
this.projectName
}/${this.repoName}`,
this.selectedTags[0].name,
this.selectedTag,
Clients.DOCKER
);
}
Expand All @@ -124,7 +123,7 @@ export class PullCommandComponent {
`${this.registryUrl ? this.registryUrl : location.hostname}/${
this.projectName
}/${this.repoName}`,
this.selectedTags[0].name,
this.selectedTag,
Clients.PODMAN
);
}
Expand All @@ -135,7 +134,7 @@ export class PullCommandComponent {
`${this.registryUrl ? this.registryUrl : location.hostname}/${
this.projectName
}/${this.repoName}`,
this.selectedTags[0].name,
this.selectedTag,
Clients.CNAB
);
}
Expand All @@ -146,7 +145,7 @@ export class PullCommandComponent {
`${this.registryUrl ? this.registryUrl : location.hostname}/${
this.projectName
}/${this.repoName}`,
this.selectedTags[0].name,
this.selectedTag,
Clients.CHART
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ <h4>{{ 'REPOSITORY.TAGS' | translate }}</h4>
</button>
</div>
<div class="right-pos">
<app-pull-command
[isTagMode]="true"
[artifact]="artifactDetails"
[accessoryType]="accessoryType"
[registryUrl]="registryUrl"
[projectName]="projectName"
[repoName]="repositoryName"
[selectedTags]="selectedRow"
class="mr-1"></app-pull-command>
<span class="refresh-btn" (click)="refresh()">
<clr-icon shape="refresh"></clr-icon>
</span>
Expand Down Expand Up @@ -124,6 +115,9 @@ <h4>{{ 'REPOSITORY.TAGS' | translate }}</h4>
<clr-dg-column [clrDgSortBy]="'push_time'">{{
'TAG.PUSH_TIME' | translate
}}</clr-dg-column>
<clr-dg-column [clrDgField]="'pull command'">{{
'TAG.PULL_COMMAND' | translate
}}</clr-dg-column>
<clr-dg-placeholder>
<span>{{ 'TAG.PLACEHOLDER' | translate }}</span>
</clr-dg-placeholder>
Expand All @@ -149,6 +143,16 @@ <h4>{{ 'REPOSITORY.TAGS' | translate }}</h4>
<clr-dg-cell>{{
tag.push_time | harborDatetime : 'short'
}}</clr-dg-cell>
<clr-dg-cell>
<app-pull-command
[isTagMode]="true"
[artifact]="artifactDetails"
[accessoryType]="accessoryType"
[registryUrl]="registryUrl"
[projectName]="projectName"
[repoName]="repositoryName"
[selectedTag]="tag.name"></app-pull-command>
</clr-dg-cell>
</clr-dg-row>

<clr-dg-footer>
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 @@ -1192,6 +1192,7 @@
"NAME": "Name",
"PULL_TIME": "Pull am",
"PUSH_TIME": "Push am",
"PULL_COMMAND": "Pull Command",
"OF": "von",
"ITEMS": "Elementen",
"ADD_TAG": "TAG HINZUFÜGEN",
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 @@ -1195,6 +1195,7 @@
"NAME": "Name",
"PULL_TIME": "Pull Time",
"PUSH_TIME": "Push Time",
"PULL_COMMAND": "Pull Command",
"OF": "of",
"ITEMS": "items",
"ADD_TAG": "ADD TAG",
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 @@ -1192,6 +1192,7 @@
"NAME": "Name",
"PULL_TIME": "Pull Time",
"PUSH_TIME": "Push Time",
"PULL_COMMAND": "Pull Command",
"OF": "of",
"ADD_TAG": "ADD TAG",
"REMOVE_TAG": "REMOVE TAG",
Expand Down
17 changes: 9 additions & 8 deletions src/portal/src/i18n/lang/fr-fr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
"SWITCHED_SUCCESS": "Rôle du membre changé avec succès.",
"OF": "sur",
"SWITCH_TITLE": "Confirmez le changement de membres projet",
"SWITCH_SUMMARY": "Voulez-vous changer les membres projet {{param}}?",
"SWITCH_SUMMARY": "Voulez-vous changer les membres projet {{param}}?",
"SET_ROLE": "Définir Role",
"REMOVE": "Retirer",
"GROUP_NAME_REQUIRED": "Le nom du groupe est requis",
Expand Down Expand Up @@ -562,7 +562,7 @@
"OVERRIDE": "Surcharger",
"ENABLED_RULE": "Activer la règle",
"OVERRIDE_INFO": "Surcharger",
"OPERATION": "Opération",
"OPERATION": "Opération",
"CURRENT": "courant",
"FILTER_PLACEHOLDER": "Filtrer les tâches",
"STOP_TITLE": "Confirmer l'arrêt des exécutions",
Expand All @@ -587,7 +587,7 @@
"DELETION_TITLE": "Confirmer la suppression de la règle",
"DELETION_SUMMARY": "Voulez-vous supprimer la règle {{param}} ?",
"REPLICATION_TITLE": "Confirmer la règle de réplication",
"REPLICATION_SUMMARY": "Voulez-vous répliquer la règle {{param}}?",
"REPLICATION_SUMMARY": "Voulez-vous répliquer la règle {{param}}?",
"DELETION_TITLE_FAILURE": "la règle {{param}} n'a pas été supprimée",
"DELETION_SUMMARY_FAILURE": "{{param}} ont le statut en attente/en fonctionnement/en train de réessayer",
"REPLICATE_SUMMARY_FAILURE": "ont le statut pending/running",
Expand All @@ -602,7 +602,7 @@
"TESTING_CONNECTION": "En train de tester la connexion...",
"TEST_CONNECTION_SUCCESS": "Connexion testée avec succès.",
"TEST_CONNECTION_FAILURE": "Échec du ping de l'endpoint.",
"ID": "ID",
"ID": "ID",
"NAME": "Nom",
"NAME_IS_REQUIRED": "Le nom est obligatoire.",
"DESCRIPTION": "Description",
Expand All @@ -624,7 +624,7 @@
"ACTIVATION": "Activation",
"REPLICATION_EXECUTION": "Travaux de réplication",
"REPLICATION_EXECUTIONS": "Travaux de réplication",
"STOPJOB": "Stop",
"STOPJOB": "Stop",
"ALL": "Tous",
"PENDING": "En attente",
"RUNNING": "En fonctionnement",
Expand All @@ -639,7 +639,7 @@
"OPERATION": "Opération",
"CREATION_TIME": "Heure de départ",
"UPDATE_TIME": "Heure de mise à jour",
"END_TIME": "Fin",
"END_TIME": "Fin",
"LOGS": "Logs",
"OF": "sur",
"ITEMS": "entrées",
Expand Down Expand Up @@ -735,7 +735,7 @@
"TEST_CONNECTION": "Test de connexion",
"TITLE_EDIT": "Éditer l'endpoint",
"TITLE_ADD": "Nouveau endpoint de registre",
"EDIT": "Éditer",
"EDIT": "Éditer",
"DELETE": "Supprimer l'endpoint",
"TESTING_CONNECTION": "En train de tester la connexion...",
"TEST_CONNECTION_SUCCESS": "Connexion testée avec succès.",
Expand Down Expand Up @@ -805,7 +805,7 @@
"COPY": "Copier",
"NOTARY_IS_UNDETERMINED": "Ne peut pas déterminer la signature de ce tag.",
"PLACEHOLDER": "Nous n'avons trouvé aucun dépôt !",
"INFO": "Info",
"INFO": "Info",
"NO_INFO": "Pas de description pour ce dépôt. Vous pouvez l'ajouter à ce dépôt.",
"IMAGE": "Images",
"LABELS": "Labels",
Expand Down Expand Up @@ -1193,6 +1193,7 @@
"NAME": "Nom",
"PULL_TIME": "Date/Heure de pull",
"PUSH_TIME": "Date/Heure de push",
"PULL_COMMAND": "Pull Command",
"OF": "sur",
"ITEMS": "entrées",
"ADD_TAG": "AJOUTER TAG",
Expand Down
1 change: 1 addition & 0 deletions src/portal/src/i18n/lang/ko-kr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@
"NAME": "이름",
"PULL_TIME": "풀(Pull) 시간",
"PUSH_TIME": "푸시 시간",
"PULL_COMMAND": "Pull Command",
"OF": "of",
"ITEMS": "아이템",
"ADD_TAG": "태그 추가",
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 @@ -1186,6 +1186,7 @@
"NAME": "Nome",
"PULL_TIME": "Horário do pull",
"PUSH_TIME": "Horário do push",
"PULL_COMMAND": "Pull Command",
"OF": "of",
"ITEMS": "itens",
"ADD_TAG": "ADICIONAR TAG",
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 @@ -1192,6 +1192,7 @@
"NAME": "Name",
"PULL_TIME": "Pull Time",
"PUSH_TIME": "Push Time",
"PULL_COMMAND": "Pull Command",
"OF": "of",
"ITEMS": "items",
"ADD_TAG": "ADD TAG",
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 @@ -1193,6 +1193,7 @@
"NAME": "名称",
"PULL_TIME": "拉取时间",
"PUSH_TIME": "推送时间",
"PULL_COMMAND": "Pull Command",
"OF": "共计",
"ITEMS": "条记录",
"ADD_TAG": "添加 TAG",
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 @@ -1189,6 +1189,7 @@
"NAME": "名稱",
"PULL_TIME": "拉取時間",
"PUSH_TIME": "推送時間",
"PULL_COMMAND": "Pull Command",
"OF": "",
"ITEMS": "項目",
"ADD_TAG": "新增標籤",
Expand Down

0 comments on commit d1c4ff8

Please sign in to comment.