ジョブステータスアクション
ジョブが送信、成功、失敗、終了したときにフォームに対して処理を行う
Start a GUI action, triggered by a job status. Such as clear, hide, show, …
次のフックを使用できます。
onSubmit: フォームが送信されたときに実行されますonSuccess: ジョブが正常に完了したときに実行されますonFailure: ジョブが失敗したときに実行されますonFinish: ステータスにかかわらず、ジョブが終了したときに実行されますonAbort: ジョブが中止されたときに実行されます
属性
ジョブステータスアクションの属性:
| 属性 | 説明 |
|---|---|
| clear number | Clear the form
This action clears the form after x seconds. |
| hide number | Hide the form
This action hides the form after x seconds. |
| show number | Show the form
This action shows the form after x seconds. |
| home number | Go to Home
This action navigates to the home page |
| reload number | Reload form
This action reloads the form (and cleans the job output) |
| load string | Load a form
This action allows you to load another form. new in v4.0.20: the previous jobid is sent as This is particularly interesting to grab information from the previous job (for example, load output, …) |
例
ジョブステータスアクションの YAML での例です。
1) Clear and hide on submit
YAML での定義です。
onSubmit:
- clear: 0 # clear form after submit
- hide: 2 # 2 seconds later, hide the form
2) Go home on submit
YAML での定義です。
onSubmit:
- home: 0
3) Load another form on success
YAML での定義です。
onSuccess:
- load: 2,Another form # load another form after success
4) Hide, Show and Home
YAML での定義です。
onSubmit:
- hide: 0 # hide on submit
onFailure:
- show: 0 # show if failed
onSuccess:
- home: 0 # go home if success