Skip to content

Commit 133bfa1

Browse files
committed
Small adjustments
1 parent 5c5a536 commit 133bfa1

5 files changed

Lines changed: 8 additions & 168 deletions

File tree

ui/src/components/SchedulerRunItem.vue

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<p v-if="run.errorMessage" class="error-message"><strong>Error:</strong> {{ run.errorMessage }}</p>
1313
<p v-if="run.aiResponse" class="response"><strong>Response:</strong> {{ truncateResponse(run.aiResponse) }}</p>
1414
</div>
15-
<button v-if="run.id" @click="showDetails" class="details-button">View Details</button>
1615
</div>
1716
</template>
1817

@@ -41,11 +40,7 @@ export default {
4140
},
4241
truncateResponse(response) {
4342
if (!response) return 'N/A'
44-
const str = typeof response === 'string' ? response : JSON.stringify(response)
45-
return str.length > 100 ? str.substring(0, 100) + '...' : str
46-
},
47-
showDetails() {
48-
this.$emit('select', this.run.id)
43+
return typeof response === 'string' ? response : JSON.stringify(response)
4944
}
5045
}
5146
}
@@ -171,23 +166,4 @@ export default {
171166
overflow-x: auto;
172167
color: #b0b0b0;
173168
}
174-
175-
.details-button {
176-
background-color: #2196f3;
177-
color: white;
178-
border: none;
179-
padding: 8px 16px;
180-
border-radius: 4px;
181-
cursor: pointer;
182-
font-size: 14px;
183-
transition: background-color 0.3s ease;
184-
}
185-
186-
.details-button:hover {
187-
background-color: #1976d2;
188-
}
189-
190-
.details-button:active {
191-
background-color: #1565c0;
192-
}
193169
</style>

ui/src/components/SchedulerRunsPanel.vue

Lines changed: 1 addition & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
v-for="run in items"
1414
:key="run.id"
1515
:run="run"
16-
@select="showRunDetail"
1716
/>
1817
</template>
1918
</Section>
@@ -33,7 +32,6 @@
3332
v-for="run in items"
3433
:key="run.id"
3534
:run="run"
36-
@select="showRunDetail"
3735
/>
3836
</template>
3937
</Section>
@@ -55,7 +53,6 @@ export default {
5553
return {
5654
runs: [],
5755
failedRuns: [],
58-
selectedRun: null,
5956
loadingRuns: false,
6057
loadingFailedRuns: false
6158
}
@@ -80,24 +77,6 @@ export default {
8077
} finally {
8178
this.loadingFailedRuns = false
8279
}
83-
},
84-
async showRunDetail(runId) {
85-
try {
86-
this.selectedRun = await apiService.getSchedulerRun(runId)
87-
} catch (error) {
88-
console.error('Error loading run details:', error)
89-
}
90-
},
91-
closeRunDetail() {
92-
this.selectedRun = null
93-
},
94-
formatStatus(status) {
95-
return status.charAt(0).toUpperCase() + status.slice(1)
96-
},
97-
formatDateTime(dateTime) {
98-
if (!dateTime) return 'N/A'
99-
const date = new Date(dateTime)
100-
return date.toLocaleString()
10180
}
10281
},
10382
mounted() {
@@ -111,9 +90,7 @@ export default {
11190
.scheduler-runs-panel {
11291
width: 100%;
11392
}
114-
115-
.modal-overlay {
116-
position: fixed;
93+
</style>
11794
top: 0;
11895
left: 0;
11996
right: 0;
@@ -129,118 +106,3 @@ export default {
129106
background: #1e1e1e;
130107
border-radius: 8px;
131108
padding: 24px;
132-
max-width: 600px;
133-
max-height: 80vh;
134-
overflow-y: auto;
135-
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
136-
position: relative;
137-
border: 1px solid #3f3f3f;
138-
}
139-
140-
.close-button {
141-
position: absolute;
142-
top: 12px;
143-
right: 12px;
144-
background: none;
145-
border: none;
146-
font-size: 24px;
147-
cursor: pointer;
148-
color: #888;
149-
transition: color 0.3s ease;
150-
}
151-
152-
.close-button:hover {
153-
color: #e0e0e0;
154-
}
155-
156-
.modal h2 {
157-
margin-top: 0;
158-
margin-bottom: 20px;
159-
color: #e0e0e0;
160-
border-bottom: 2px solid #3f3f3f;
161-
padding-bottom: 12px;
162-
}
163-
164-
.run-details {
165-
display: flex;
166-
flex-direction: column;
167-
gap: 12px;
168-
}
169-
170-
.detail-row {
171-
display: flex;
172-
flex-direction: column;
173-
gap: 6px;
174-
}
175-
176-
.detail-row strong {
177-
color: #e0e0e0;
178-
font-weight: 600;
179-
font-size: 14px;
180-
}
181-
182-
.detail-row code {
183-
background-color: #2a2a2a;
184-
padding: 4px 8px;
185-
border-radius: 4px;
186-
font-family: monospace;
187-
font-size: 12px;
188-
word-break: break-all;
189-
color: #b0b0b0;
190-
}
191-
192-
.detail-row.error {
193-
background-color: #2a1f1f;
194-
padding: 12px;
195-
border-radius: 4px;
196-
border-left: 4px solid #f44336;
197-
}
198-
199-
.detail-row pre {
200-
margin: 0;
201-
background-color: #2a2a2a;
202-
padding: 10px;
203-
border-radius: 4px;
204-
font-size: 12px;
205-
overflow-x: auto;
206-
white-space: pre-wrap;
207-
word-wrap: break-word;
208-
color: #b0b0b0;
209-
}
210-
211-
.detail-row .response-text {
212-
background-color: #1f2a3a;
213-
max-height: 200px;
214-
}
215-
216-
.status-badge {
217-
display: inline-block;
218-
padding: 4px 12px;
219-
border-radius: 12px;
220-
font-size: 12px;
221-
font-weight: 600;
222-
text-transform: uppercase;
223-
letter-spacing: 0.5px;
224-
width: fit-content;
225-
}
226-
227-
.status-badge.completed {
228-
background-color: #1b5e20;
229-
color: #4caf50;
230-
}
231-
232-
.status-badge.failed {
233-
background-color: #b71c1c;
234-
color: #ff8a80;
235-
}
236-
237-
.status-badge.executing {
238-
background-color: #01579b;
239-
color: #64b5f6;
240-
}
241-
242-
.status-badge.scheduled {
243-
background-color: #e65100;
244-
color: #ffe0b2;
245-
}
246-
</style>

yume-spring/src/main/kotlin/eu/sendzik/yume/configuration/MongoConfiguration.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package eu.sendzik.yume.configuration
22

33
import eu.sendzik.yume.converter.SchedulerRunStatusReadConverter
4-
import eu.sendzik.yume.repository.scheduler.model.SchedulerRunStatus
54
import org.springframework.context.annotation.Bean
65
import org.springframework.context.annotation.Configuration
76
import org.springframework.data.mongodb.core.convert.MongoCustomConversions

yume-spring/src/main/kotlin/eu/sendzik/yume/converter/SchedulerRunStatusReadConverter.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import org.springframework.core.convert.converter.Converter
55
import org.springframework.data.convert.ReadingConverter
66

77
@ReadingConverter
8-
class SchedulerRunStatusReadConverter : Converter<String, SchedulerRunStatus?> {
9-
override fun convert(source: String): SchedulerRunStatus? {
10-
return SchedulerRunStatus.entries.firstOrNull { it.value == source }
8+
class SchedulerRunStatusReadConverter : Converter<String, SchedulerRunStatus> {
9+
override fun convert(source: String): SchedulerRunStatus {
10+
return SchedulerRunStatus.entries.firstOrNull { it.value.equals(source, ignoreCase = true) }
11+
?: SchedulerRunStatus.SCHEDULED
1112
}
1213
}

yume-spring/src/main/kotlin/eu/sendzik/yume/service/scheduler/SchedulerRunLogService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class SchedulerRunLogService(
3737
val run = schedulerRunRepository.findById(runId).orElse(null) ?: return null
3838
val updated = run.copy(
3939
status = SchedulerRunStatus.COMPLETED,
40+
actualExecutionTime = LocalDateTime.now(),
4041
aiResponse = aiResponse,
4142
executionDurationMs = executionDurationMs,
4243
updatedAt = LocalDateTime.now()
@@ -48,6 +49,7 @@ class SchedulerRunLogService(
4849
val run = schedulerRunRepository.findById(runId).orElse(null) ?: return null
4950
val updated = run.copy(
5051
status = SchedulerRunStatus.FAILED,
52+
actualExecutionTime = LocalDateTime.now(),
5153
errorMessage = errorMessage,
5254
executionDurationMs = executionDurationMs,
5355
updatedAt = LocalDateTime.now()

0 commit comments

Comments
 (0)