This commit is contained in:
Michele Artini 2023-12-21 14:38:28 +01:00
parent a6500a04bd
commit 69544bcede
3 changed files with 22 additions and 3 deletions

View File

@ -177,6 +177,10 @@
<mat-icon fontIcon="edit"></mat-icon>
config
</button>
<button mat-stroked-button color="warn" (click)="destroyWfConf(wf.id)">
<mat-icon fontIcon="delete"></mat-icon>
delete
</button>
<button mat-stroked-button color="primary" (click)="startWfConf(wf.id)"
[disabled]="!wf.enabled || !wf.configured">
<mat-icon fontIcon="play_arrow"></mat-icon>

View File

@ -51,11 +51,11 @@ export class DsmClient extends ISClient {
}
dsmStartWfConf(wfConfId: string, onSuccess: Function) {
alert('TODO');
this.httpGet<WfRepoHi>('/proxy/byType/wf_manager/api/conf/' + encodeURIComponent(wfConfId) + '/start', onSuccess);
}
dsmRepoByeWf(wfId: string, onSuccess: Function) {
alert('TODO');
dsmDestroyWfConf(wfConfId: string, onSuccess: Function) {
this.httpGet<WfRepoHi>('/proxy/byType/wf_manager/api/conf/' + encodeURIComponent(wfConfId) + '/destroy', onSuccess);
}
dsmRecentWfsByDsId(dsId: string, onSuccess: Function) {

View File

@ -172,6 +172,21 @@ export class DsmApiComponent implements OnInit {
});
}
destroyWfConf(wfConfId: string): void {
if (confirm("Are you sure ?")) {
this.client.dsmDestroyWfConf(wfConfId, (data: WfHistoryEntry) => {
const wfDialogRef = this.dialog.open(WfHistoryDialog, {
data: {
'dsId': this.ds.id,
'apiId': this.api.id,
'processId': data.processId,
'confId': undefined
}
});
});
}
}
openJournalDialog(confId: string | undefined, processId: string | undefined) {
const wfDialogRef = this.dialog.open(WfHistoryDialog, {
data: {