Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task launch versions #2000

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,10 @@ export class BuilderComponent implements OnInit, OnDestroy {
* @param app
*/
openApp(builder: any, app: any): void {
const version = builder.formGroup.get('appsVersion').get(app.name).value || app.version;
const version =
builder.formGroup.get('appsVersion').get(app.name).value ||
builder.builderAppsProperties[app.name]?.version ||
app.version;
const options = builder.builderAppsProperties[app.name] ? builder.builderAppsProperties[app.name] : app.options;
const appPropertiesSource = new AppPropertiesSource(
Object.assign(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
<div class="cell">
<clr-select-container style="margin-top: 0">
<select tabindex="{{ 300 }}" [formControlName]="app.name" clrSelect>
<option value="">{{ getLabelAppVersion(builder.taskLaunchConfig, app) }}</option>
<option value="">{{ getLabelAppVersion(builder.taskLaunchConfig, app, app.version) }}</option>
<option *ngFor="let version of app.versions" [value]="version.version">
{{ version.version }}
</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,10 @@ export class BuilderComponent implements OnInit, OnDestroy {
}
}

getLabelAppVersion(taskLaunchConfig, app) {
const lastVersion = get(taskLaunchConfig?.lastExecution?.deploymentProperties, `version.${app.name}`);
getLabelAppVersion(taskLaunchConfig, app, latestLaunchedVersion) {
const lastVersion = taskLaunchConfig
? get(taskLaunchConfig?.lastExecution?.deploymentProperties, `version.${app.name}`)
: latestLaunchedVersion;
if (lastVersion && app.version !== lastVersion) {
return this.translate.instant('tasks.launch.builder.lastVersionLabel', {version: lastVersion});
}
Expand Down
Loading