Skip to content

Commit

Permalink
fix(automate): support success object result level (#3537)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdriesler authored Nov 25, 2024
1 parent 33f2323 commit 853fb5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div :class="`overflow-hidden`">
<div class="overflow-hidden">
<button
:class="`block transition text-left hover:bg-primary-muted hover:shadow-md rounded-md p-1 cursor-pointer border-l-2 ${
:class="`block w-full transition text-left hover:bg-primary-muted hover:shadow-md rounded-md p-1 cursor-pointer border-l-2 ${
isIsolated || metadataGradientIsSet
? 'border-primary bg-primary-muted shadow-md'
: 'border-transparent'
Expand Down Expand Up @@ -30,6 +30,7 @@
</template>
<script setup lang="ts">
import {
CheckIcon,
XMarkIcon,
InformationCircleIcon,
ExclamationTriangleIcon
Expand Down Expand Up @@ -154,6 +155,11 @@ const setOrUnsetGradient = () => {
const iconAndColor = computed(() => {
switch (props.result.level) {
case 'SUCCESS':
return {
icon: CheckIcon,
color: 'text-success font-medium'
}
case 'ERROR':
return {
icon: XMarkIcon,
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/automate/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type TriggerDefinitionsSchema = {
definitions: Array<VersionCreatedTriggerDefinition>
}

export type ObjectResultLevel = 'INFO' | 'WARNING' | 'ERROR'
export type ObjectResultLevel = 'SUCCESS' | 'INFO' | 'WARNING' | 'ERROR'

export type ResultsSchema = {
version: number
Expand Down

0 comments on commit 853fb5e

Please sign in to comment.