Skip to content

Commit 8001092

Browse files
committed
fix(be): sql request
1 parent 12bf036 commit 8001092

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

db/sql/task.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func (d *SqlDb) CreateTaskStage(stage db.TaskStage) (res db.TaskStage, err error
1212
insertID, err := d.insert(
1313
"id",
1414
"insert into task__stage "+
15-
"(task_id, start, end, start_output_id, end_output_id, type) VALUES "+
15+
"(task_id, `start`, `end`, start_output_id, end_output_id, `type`) VALUES "+
1616
"(?, ?, ?, ?, ?, ?)",
1717
stage.TaskID,
1818
stage.Start,
@@ -32,7 +32,7 @@ func (d *SqlDb) CreateTaskStage(stage db.TaskStage) (res db.TaskStage, err error
3232

3333
func (d *SqlDb) EndTaskStage(taskID int, stageID int, end time.Time, endOutputID int) (err error) {
3434
_, err = d.exec(
35-
"update task__stage set end=?, end_output_id=? where task_id=? and id=?",
35+
"update task__stage set `end`=?, end_output_id=? where task_id=? and id=?",
3636
end,
3737
endOutputID,
3838
taskID,

web/src/components/AnsibleStageView.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@
4848
<tr>
4949
<th style="width: 150px;">Server</th>
5050
<th style="width: 200px;">Task</th>
51-
<th style="calc(100% - 350px);">Error</th>
51+
<th style="width: calc(100% - 350px);">Error</th>
5252
</tr>
5353
</thead>
5454
<tbody>
55-
<tr v-for="(task, index) in failedTasks" :key="index">
55+
<tr v-if="!failedTasks || failedTasks.length === 0">
56+
<td colspan="3" class="text-center">No failed tasks</td>
57+
</tr>
58+
<tr v-else v-for="(task, index) in failedTasks" :key="index">
5659
<td style="width: 150px;">{{ task.host }}</td>
5760
<td style="width: 200px;">{{ task.task }}</td>
5861
<td>
@@ -62,6 +65,7 @@
6265
</div>
6366
</td>
6467
</tr>
68+
6569
</tbody>
6670
</template>
6771
</v-simple-table>

0 commit comments

Comments
 (0)