Skip to content

Commit

Permalink
feat: improve schedule style and track opened rows by id
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanGriffe committed Oct 29, 2021
1 parent c64ce72 commit 22a18fc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
5 changes: 2 additions & 3 deletions src/messages/components/CMessageRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ export default {
name: 'CMessageRow',
props: {
message: Object,
isTopLevel: Boolean
isTopLevel: Boolean,
isOpened: Boolean
},
data() {
return {
canCancel: true,
isOpened: false,
response: null
};
},
Expand Down Expand Up @@ -145,7 +145,6 @@ export default {
});
},
onToggle() {
this.isOpened = !this.isOpened;
this.$emit('toggle', this.message.messageId);
},
searchActor() {
Expand Down
11 changes: 4 additions & 7 deletions src/messages/components/CTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
<c-message-row
:message="message"
:isTopLevel="name === 'main_table'"
@toggle="toggleRow(index)"
@toggle="toggleRow(message.messageId)"
:key="name + '_' + index + '_row'"
:name="name + '_' + index + '_row'"
/>
<tr
v-if="
openedRows.includes(index) ||
(message.compositionType && openedRows.includes(message.messages[0].messageId))
"
v-if="openedRows.includes(message.messageId)"
:is="contentType(message)"
:key="name + '_' + index + '_content'"
:colspan="columns.length"
Expand Down Expand Up @@ -88,8 +85,8 @@ export default {
};
},
methods: {
toggleRow(index) {
this.openedRows = utils.toggleItemFromList(index, this.openedRows);
toggleRow(id) {
this.openedRows = utils.toggleItemFromList(id, this.openedRows);
},
contentType: function (message) {
if (message.compositionType === 'pipeline') {
Expand Down
14 changes: 7 additions & 7 deletions src/schedule/components/CJobRow.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<tr class="border-b text-xs border-gray-200 hover:bg-blue-100">
<td class="border px-4 py-2">
<td class="border px-4">
{{ actorName }}
</td>
<td class="border px-4 py-2">
<td class="border px-4">
<div class="flex">
<input v-model="editableEnabled" type="checkbox" class="h-5 w-5 mr-2" />
{{ editableEnabled }}
</div>
</td>
<td class="border px-4 py-2">
<td class="border pl-4">
<div class="flex items-center space-x-2">
<div class="w-1/3">{{ interval | formatSeconds }}</div>
<input v-model.number="editableInterval" class="w2/3" type="number" />
Expand All @@ -23,7 +23,7 @@
v-model="editableDailyTime"
/>
</td>
<td class="border px-4 py-2">
<td class="border px-4">
{{ lastQueued | formatDistance }}
</td>
<td class="border w-28">
Expand All @@ -46,13 +46,13 @@
</option>
</select>
</td>
<td class="border px-4 py-2">
<td class="border">
<input v-model="editableArgs" :class="{ 'invalid-input': !isArgsValid }" />
</td>
<td class="border px-4 py-2">
<td class="border">
<input v-model="editableKwargs" :class="{ 'invalid-input': !isKwargsValid }" />
</td>
<td class="border px-4 py-2">
<td class="border">
<input v-model="editableTz" />
</td>
</tr>
Expand Down

0 comments on commit 22a18fc

Please sign in to comment.