Skip to content

Commit

Permalink
Allow showing processing timeline events (frontend)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaptperez committed Jan 6, 2025
1 parent 14d625e commit e5e1caf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ limitations under the License.
<template v-slot:activator="{ on: onTooltip, attrs }">
<span
class="timeline-name-ellipsis"
:class="{ disabled: !isSelected && slotProps.timelineStatus === 'ready' }"
:class="{ disabled: !isSelected && (slotProps.timelineStatus === 'processing' || slotProps.timelineStatus === 'ready') }"
v-bind="attrs"
v-on="onTooltip"
>{{ timeline.name }}</span
Expand Down Expand Up @@ -88,7 +88,7 @@ export default {
},
methods: {
timelineStyle(timelineStatus) {
const greyOut = timelineStatus === 'ready' && !this.isSelected
const greyOut = (timelineStatus === 'processing' || timelineStatus === 'ready') && !this.isSelected
return {
opacity: greyOut ? '50%' : '100%',
backgroundColor: this.$vuetify.theme.dark ? '#303030' : '#f5f5f5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
-->
<template>
<span>
<v-dialog v-if="timelineStatus === 'processing'" v-model="dialogStatus" width="600">
<v-dialog v-if="!timelineAvailable" v-model="dialogStatus" width="600">
<template v-slot:activator="{ on, attrs }">
<slot
name="processing"
Expand Down Expand Up @@ -155,7 +155,7 @@ limitations under the License.
</v-card>
</v-dialog>

<v-list-item v-if="timelineStatus === 'ready'" @click="$emit('toggle', timeline)">
<v-list-item v-if="timelineAvailable" @click="$emit('toggle', timeline)">
<v-list-item-action>
<v-icon v-if="isSelected">mdi-eye-off</v-icon>
<v-icon v-else>mdi-eye</v-icon>
Expand All @@ -164,7 +164,7 @@ limitations under the License.
<v-list-item-subtitle v-else>Re-enable</v-list-item-subtitle>
</v-list-item>

<v-list-item v-if="timelineStatus === 'ready'" @click="$emit('disableAllOtherTimelines', timeline)">
<v-list-item v-if="timelineAvailable" @click="$emit('disableAllOtherTimelines', timeline)">
<v-list-item-action>
<v-icon>mdi-checkbox-marked-circle-minus-outline</v-icon>
</v-list-item-action>
Expand Down Expand Up @@ -245,7 +245,7 @@ limitations under the License.
<v-list-item-subtitle>Run Analyzers</v-list-item-subtitle>
</v-list-item>

<v-list-item style="cursor: pointer" @click="deleteConfirmation = true">
<v-list-item v-if="timelineAvailable" style="cursor: pointer" @click="deleteConfirmation = true">
<v-list-item-action>
<v-icon>mdi-trash-can-outline</v-icon>
</v-list-item-action>
Expand Down Expand Up @@ -399,12 +399,18 @@ export default {
timelineFailed() {
return this.timelineStatus === 'fail'
},
timelineAvailable() {
return this.timelineStatus === 'ready' || (this.showProcessingTimelineEvents && this.timelineStatus === 'processing')
},
timelineChipColor() {
if (!this.timeline.color.startsWith('#')) {
return '#' + this.timeline.color
}
return this.timeline.color
},
showProcessingTimelineEvents() {
return this.$store.state.settings.showProcessingTimelineEvents
},
},
methods: {
openDialog() {
Expand Down

0 comments on commit e5e1caf

Please sign in to comment.