Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Commit e06fdfb

Browse files
author
Leonardo Chaia
committed
feat: select first tag when selecting an image
1 parent abf0986 commit e06fdfb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/daemon-tools/image-selector-card/image-selector-card.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class ImageSelectorCardComponent implements OnInit, OnDestroy, ControlVal
150150

151151
return repos.filter(r => r.repos.length);
152152
}),
153-
);
153+
);
154154
}
155155

156156
private loadImageTags() {
@@ -160,6 +160,9 @@ export class ImageSelectorCardComponent implements OnInit, OnDestroy, ControlVal
160160
.pipe(
161161
switchMap(settings => settings && settings.allowsCatalog ? this.registryService.getRepoTags(settings.url, repo) : of([])),
162162
map(tags => {
163+
if (tags && tags.length && !this.image.includes(':')) {
164+
this.image += `:${tags[0]}`;
165+
}
163166
return this.imageTags = tags;
164167
})
165168
);

0 commit comments

Comments
 (0)