Skip to content

Commit

Permalink
feat(ui, webserver): rename "Change status" to "Change state" and enh…
Browse files Browse the repository at this point in the history
…ance the infos
  • Loading branch information
loicmathieu committed Jan 27, 2025
1 parent 4f2d35f commit 4e3ed33
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 27 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/executions/ChangeStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@click="visible = !visible"
:disabled="!enabled"
>
<span v-if="component !== 'el-button'">{{ $t('change_status') }}</span>
<span v-if="component !== 'el-button'">{{ $t('change state') }}</span>

<el-dialog v-if="enabled && visible" v-model="visible" :id="uuid" destroy-on-close :append-to-body="true">
<template #header>
Expand All @@ -16,7 +16,7 @@
<p v-html="$t('change state confirm', {id: execution.id, task: taskRun.taskId})" />

<p>
Current status is : <status size="small" class="me-1" :status="taskRun.state.current" />
{{ $t('change state current state') }} <status size="small" class="me-1" :status="taskRun.state.current" />
</p>

<el-select
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Nebenläufigkeit",
"open sidebar": "Seitenleiste öffnen",
"close sidebar": "Seitenleiste schließen",
"change_status": "Status ändern",
"in-our-documentation": "in unserer Dokumentation.",
"read-more": "Mehr erfahren über",
"flow-dependencies": "Abhängigkeiten",
Expand Down
4 changes: 2 additions & 2 deletions ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
"current": "current",
"change state": "Change state",
"change state done": "Task state has been updated",
"change state confirm": "Are you sure you want to change the task run state for the <code>{task}</code> task in execution <code>{id}</code>?",
"change state confirm": "Are you sure you want to change the task run state for the <code>{task}</code> task in execution <code>{id}</code>?<br/>It will then restart the execution from the next task and restart the parent execution if any.",
"change state current state": "Current status is:",
"change state hint": {
"WARNING": [
"The flow will be marked as WARNING.",
Expand Down Expand Up @@ -975,7 +976,6 @@
},
"open sidebar": "open sidebar",
"close sidebar": "close sidebar",
"change_status": "Change status",
"files": "Files",
"optional": "Optional",
"no_data": "Looks like there's nothing here… yet!<br/>Adjust your filters, or give it another go!",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Concurrente",
"open sidebar": "abrir barra lateral",
"close sidebar": "cerrar barra lateral",
"change_status": "Cambiar estado",
"in-our-documentation": "en nuestra documentación.",
"read-more": "Leer más sobre",
"flow-dependencies": "dependencias",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Concurrence",
"open sidebar": "ouvrir la barre latérale",
"close sidebar": "fermer la barre latérale",
"change_status": "Changer le statut",
"in-our-documentation": "dans notre documentation.",
"read-more": "En savoir plus sur",
"flow-dependencies": "dépendances",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "समानांतरता",
"open sidebar": "साइडबार खोलें",
"close sidebar": "साइडबार बंद करें",
"change_status": "स्थिति बदलें",
"in-our-documentation": "हमारे दस्तावेज़ में।",
"read-more": "और अधिक पढ़ें",
"flow-dependencies": "निर्भरता",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Concurrency",
"open sidebar": "apri barra laterale",
"close sidebar": "chiudi barra laterale",
"change_status": "Cambia stato",
"in-our-documentation": "nella nostra documentazione.",
"read-more": "Leggi di più su",
"flow-dependencies": "dipendenze",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "並行性",
"open sidebar": "サイドバーを開く",
"close sidebar": "サイドバーを閉じる",
"change_status": "ステータスを変更",
"in-our-documentation": "ドキュメント内で。",
"read-more": "続きを読む",
"flow-dependencies": "依存関係",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "동시성",
"open sidebar": "사이드바 열기",
"close sidebar": "사이드바 닫기",
"change_status": "상태 변경",
"in-our-documentation": "우리의 문서에서.",
"read-more": "자세히 알아보기",
"flow-dependencies": "종속성",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Współbieżność",
"open sidebar": "otwórz pasek boczny",
"close sidebar": "zamknij pasek boczny",
"change_status": "Zmień status",
"in-our-documentation": "w naszej dokumentacji.",
"read-more": "Czytaj więcej o",
"flow-dependencies": "zależności",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Concorrência",
"open sidebar": "abrir barra lateral",
"close sidebar": "fechar barra lateral",
"change_status": "Alterar status",
"in-our-documentation": "na nossa documentação.",
"read-more": "Leia mais sobre",
"flow-dependencies": "dependências",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "Конкурентность",
"open sidebar": "открыть боковую панель",
"close sidebar": "закрыть боковую панель",
"change_status": "Изменить статус",
"in-our-documentation": "в нашей документации.",
"read-more": "Узнать больше о",
"flow-dependencies": "зависимости",
Expand Down
1 change: 0 additions & 1 deletion ui/src/translations/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@
"concurrency": "并发",
"open sidebar": "打开侧边栏",
"close sidebar": "关闭侧边栏",
"change_status": "更改状态",
"in-our-documentation": "在我们的文档中。",
"read-more": "了解更多关于",
"flow-dependencies": "依赖项",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,13 +965,13 @@ public static class StateRequest {

@ExecuteOn(TaskExecutors.IO)
@Post(uri = "/{executionId}/change-status")
@Operation(tags = {"Executions"}, summary = "Change the status of an execution")
@Operation(tags = {"Executions"}, summary = "Change the state of an execution")
public Execution changeStatus(
@Parameter(description = "The execution id") @PathVariable String executionId,
@Parameter(description = "The new status of the execution") @NotNull @QueryValue State.Type status
@Parameter(description = "The new state of the execution") @NotNull @QueryValue State.Type status
) throws QueueException {
if (!status.isTerminated()) {
throw new IllegalArgumentException("You can only change the status of an execution to a terminal state.");
throw new IllegalArgumentException("You can only change the state of an execution to a terminal state.");
}

Optional<Execution> execution = executionRepository.findById(tenantService.resolveTenant(), executionId);
Expand All @@ -980,7 +980,7 @@ public Execution changeStatus(
}

if (!execution.get().getState().isTerminated()) {
throw new IllegalArgumentException("You can only change the status of a terminated execution.");
throw new IllegalArgumentException("You can only change the state of a terminated execution.");
}

Execution updated = execution.get().withState(status);
Expand All @@ -993,15 +993,15 @@ public Execution changeStatus(

@ExecuteOn(TaskExecutors.IO)
@Post(uri = "/change-status/by-ids")
@Operation(tags = {"Executions"}, summary = "Change status of executions by id")
@Operation(tags = {"Executions"}, summary = "Change executions state by id")
@ApiResponse(responseCode = "200", description = "On success", content = {@Content(schema = @Schema(implementation = BulkResponse.class))})
@ApiResponse(responseCode = "422", description = "Changed status with errors", content = {@Content(schema = @Schema(implementation = BulkErrorResponse.class))})
@ApiResponse(responseCode = "422", description = "Changed state with errors", content = {@Content(schema = @Schema(implementation = BulkErrorResponse.class))})
public HttpResponse<?> changeStatusById(
@Parameter(description = "The execution id") @Body List<String> executionsId,
@Parameter(description = "The new status of the executions") @NotNull @QueryValue State.Type newStatus
@Parameter(description = "The new state of the executions") @NotNull @QueryValue State.Type newStatus
) throws QueueException {
if (!newStatus.isTerminated()) {
throw new IllegalArgumentException("You can only change the status of an execution to a terminal state.");
throw new IllegalArgumentException("You can only change the state of an execution to a terminal state.");
}

List<Execution> executions = new ArrayList<>();
Expand Down Expand Up @@ -1033,7 +1033,7 @@ public HttpResponse<?> changeStatusById(
if (!invalids.isEmpty()) {
return HttpResponse.badRequest(BulkErrorResponse
.builder()
.message("invalid bulk change execution status")
.message("invalid bulk change executions state")
.invalids(invalids)
.build()
);
Expand All @@ -1051,9 +1051,9 @@ public HttpResponse<?> changeStatusById(

@ExecuteOn(TaskExecutors.IO)
@Post(uri = "/change-status/by-query")
@Operation(tags = {"Executions"}, summary = "Change executions status by query parameters")
@Operation(tags = {"Executions"}, summary = "Change executions state by query parameters")
@ApiResponse(responseCode = "200", description = "On success", content = {@Content(schema = @Schema(implementation = BulkResponse.class))})
@ApiResponse(responseCode = "422", description = "Changed status with errors", content = {@Content(schema = @Schema(implementation = BulkErrorResponse.class))})
@ApiResponse(responseCode = "422", description = "Changed state with errors", content = {@Content(schema = @Schema(implementation = BulkErrorResponse.class))})
public HttpResponse<?> changeStatusByQuery(
@Parameter(description = "A string filter") @Nullable @QueryValue(value = "q") String query,
@Parameter(description = "The scope of the executions to include") @Nullable @QueryValue(value = "scope") List<FlowScope> scope,
Expand All @@ -1069,7 +1069,7 @@ public HttpResponse<?> changeStatusByQuery(
@Parameter(description = "A labels filter as a list of 'key:value'") @Nullable @QueryValue @Format("MULTI") List<String> labels,
@Parameter(description = "The trigger execution id") @Nullable @QueryValue String triggerExecutionId,
@Parameter(description = "A execution child filter") @Nullable @QueryValue ExecutionRepositoryInterface.ChildFilter childFilter,
@Parameter(description = "The new status of the executions") @NotNull @QueryValue State.Type newStatus
@Parameter(description = "The new state of the executions") @NotNull @QueryValue State.Type newStatus
) throws QueueException {
validateTimeline(startDate, endDate);

Expand Down

0 comments on commit 4e3ed33

Please sign in to comment.