This commit is contained in:
parent
cb08aee137
commit
cdb3381d3e
|
@ -3,6 +3,7 @@ import { Component, Inject, OnInit, SecurityContext } from '@angular/core';
|
||||||
import { FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';
|
||||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
import { MatSelectChange } from '@angular/material/select';
|
import { MatSelectChange } from '@angular/material/select';
|
||||||
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { KeyValue, SimpleResource, WfConf, WfParam, WfSection } from '../common/is.model';
|
import { KeyValue, SimpleResource, WfConf, WfParam, WfSection } from '../common/is.model';
|
||||||
import { ISService } from '../common/is.service';
|
import { ISService } from '../common/is.service';
|
||||||
|
@ -18,7 +19,7 @@ export class WfConfsComponent implements OnInit {
|
||||||
confs: KeyValue[] = [];
|
confs: KeyValue[] = [];
|
||||||
conf?: WfConf;
|
conf?: WfConf;
|
||||||
|
|
||||||
constructor(public service: ISService, public route: ActivatedRoute, public router: Router, public dialog: MatDialog) {
|
constructor(public service: ISService, public route: ActivatedRoute, public router: Router, public dialog: MatDialog, public snackBar: MatSnackBar) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -75,7 +76,12 @@ export class WfConfsComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
launchWf() {
|
launchWf() {
|
||||||
throw new Error('Method not implemented.');
|
if (this.conf?.workflow)
|
||||||
|
this._launchWf(this.conf.workflow);
|
||||||
|
}
|
||||||
|
|
||||||
|
_launchWf(wfId: string) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
editConf() {
|
editConf() {
|
||||||
|
@ -86,7 +92,15 @@ export class WfConfsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteConf() {
|
deleteConf() {
|
||||||
throw new Error('Method not implemented.');
|
if (this.conf?.destroyWf) {
|
||||||
|
this._launchWf(this.conf.destroyWf);
|
||||||
|
this.snackBar.open('Destroy Workflow launched, PLEASE WAIT !!!', 'INFO', { duration: 5000 });
|
||||||
|
} else if (this.conf?.id) {
|
||||||
|
this.service.deleteWfConfiguration(this.conf?.id, (data: void) => {
|
||||||
|
this.snackBar.open('Configuration deleted !!!', 'INFO', { duration: 5000 });
|
||||||
|
this.conf = undefined;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue