Skip to content

Commit f6bad02

Browse files
committed
better handling of from state processing
1 parent 845518d commit f6bad02

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

OpenFlow/src/public/Controllers.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3323,10 +3323,13 @@ export class FormCtrl extends entityCtrl<WorkflowInstance> {
33233323
}
33243324
async hideFormElements() {
33253325
console.debug("hideFormElements");
3326+
3327+
$('input[ref="component"]').prop("disabled", true);
33263328
$('#workflowform :input').prop("disabled", true);
33273329
$('#workflowform :button').prop("disabled", true);
33283330
$('#workflowform :input').addClass("disabled");
33293331
$('#workflowform :button').addClass("disabled");
3332+
$('#workflowform choices__list').hide();
33303333
$('#workflowform .form-group').addClass("is-disabled");
33313334
$('#workflowform .form-group').prop("isDisabled", true);
33323335

@@ -3368,8 +3371,8 @@ export class FormCtrl extends entityCtrl<WorkflowInstance> {
33683371
}
33693372

33703373

3371-
if (this.model.form === "none" || this.model.form === "" || this.model.state == "processing") {
3372-
if (this.model.state != "failed" && this.model.state != "processing") {
3374+
if (this.model.form === "none" || this.model.form === "") {
3375+
if (this.model.state != "failed") {
33733376
this.$location.path("/main");
33743377
} else {
33753378
this.hideFormElements();
@@ -3752,6 +3755,11 @@ export class FormCtrl extends entityCtrl<WorkflowInstance> {
37523755
console.error(this.errormessage);
37533756
});
37543757
}
3758+
if (this.model.state == "processing") {
3759+
this.hideFormElements();
3760+
this.message = "Processing . . .";
3761+
if (!this.$scope.$$phase) { this.$scope.$apply(); }
3762+
}
37553763
if (this.model.state == "completed" || this.model.state == "failed") {
37563764
this.hideFormElements();
37573765
if (this.model.state == "failed") {

0 commit comments

Comments
 (0)