-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new client Podman to the pull command
1.Fixes #18832 Signed-off-by: AllForNothing <sshijun@vmware.com>
- Loading branch information
1 parent
1d6c02f
commit 8f58559
Showing
19 changed files
with
439 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
...tifact-list-page/artifact-list/artifact-list-tab/pull-command/pull-command.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<clr-dropdown [clrCloseMenuOnItemClick]="false" class="mr-1" *ngIf="!isTagMode"> | ||
<button | ||
[disabled]=" | ||
selectedRow?.length !== 1 || !hasPullCommand(selectedRow[0]) | ||
" | ||
class="btn btn-link copy-pull-command" | ||
clrDropdownTrigger> | ||
{{ 'PUSH_IMAGE.COPY_PULL_COMMAND' | translate }} | ||
<cds-icon shape="angle" direction="down"></cds-icon> | ||
</button> | ||
<clr-dropdown-menu clrPosition="bottom-right" *clrIfOpen> | ||
<ng-container *ngIf="isImage(selectedRow[0])"> | ||
<div | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForDocker(selectedRow[0])" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForDocker(selectedRow[0]) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.DOCKER' | translate }}</span> | ||
</div> | ||
<div | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForPadMan(selectedRow[0])" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForPadMan(selectedRow[0]) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.PODMAN' | translate }}</span> | ||
</div> | ||
</ng-container> | ||
<div | ||
*ngIf="isCNAB(selectedRow[0])" | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForCNAB(selectedRow[0])" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForCNAB(selectedRow[0]) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.CNAB' | translate }}</span> | ||
</div> | ||
<div | ||
*ngIf="isChart(selectedRow[0])" | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForChart(selectedRow[0])" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForChart(selectedRow[0]) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.HELM' | translate }}</span> | ||
</div> | ||
</clr-dropdown-menu> | ||
</clr-dropdown> | ||
|
||
<clr-dropdown [clrCloseMenuOnItemClick]="false" class="mr-1" *ngIf="isTagMode"> | ||
<button | ||
[disabled]=" | ||
selectedTags?.length !== 1 || !hasPullCommandForTag(artifact) | ||
" | ||
class="btn btn-link copy-pull-command" | ||
clrDropdownTrigger> | ||
{{ 'PUSH_IMAGE.COPY_PULL_COMMAND' | translate }} | ||
<cds-icon shape="angle" direction="down"></cds-icon> | ||
</button> | ||
<clr-dropdown-menu clrPosition="bottom-right" *clrIfOpen> | ||
<ng-container *ngIf="isImage(artifact)"> | ||
<div | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForDockerByTag(artifact)" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForDockerByTag(artifact) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.DOCKER' | translate }}</span> | ||
</div> | ||
<div | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForPadManByTag(artifact)" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForPadManByTag(artifact) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.PODMAN' | translate }}</span> | ||
</div> | ||
</ng-container> | ||
<div | ||
*ngIf="isCNAB(artifact)" | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForCNABByTag(artifact)" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForCNABByTag(artifact) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.CNAB' | translate }}</span> | ||
</div> | ||
<div | ||
*ngIf="isChart(artifact)" | ||
class="flex" | ||
aria-label="Dropdown header Action" | ||
clrDropdownItem> | ||
<hbr-copy-input | ||
[title]="getPullCommandForChartByTag(artifact)" | ||
[iconMode]="true" | ||
[defaultValue]=" | ||
getPullCommandForChartByTag(artifact) | ||
"></hbr-copy-input> | ||
<span>{{ 'PUSH_IMAGE.HELM' | translate }}</span> | ||
</div> | ||
</clr-dropdown-menu> | ||
</clr-dropdown> |
8 changes: 8 additions & 0 deletions
8
...tifact-list-page/artifact-list/artifact-list-tab/pull-command/pull-command.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.copy-pull-command { | ||
font-size: 14px; | ||
} | ||
|
||
.flex { | ||
display: flex; | ||
align-items: flex-end; | ||
} |
22 changes: 22 additions & 0 deletions
22
...act-list-page/artifact-list/artifact-list-tab/pull-command/pull-command.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { PullCommandComponent } from './pull-command.component'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { SharedTestingModule } from '../../../../../../../../shared/shared.module'; | ||
|
||
describe('PullCommandComponent', () => { | ||
let component: PullCommandComponent; | ||
let fixture: ComponentFixture<PullCommandComponent>; | ||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [PullCommandComponent], | ||
imports: [SharedTestingModule], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(PullCommandComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.