| 1 | <template> |
| 2 | <CardEntity> |
| 3 | <template #headerMain> |
| 4 | Complete: |
| 5 | <strong class="font-mono" :class="{ 'text-success': `${command.Complete}` === 'true' }"> |
| 6 | {{ command.Complete }} |
| 7 | </strong> |
| 8 | </template> |
| 9 | <template #headerExtra> |
| 10 | Code: |
| 11 | <strong class="font-mono">{{ command.ReturnCode }}</strong> |
| 12 | </template> |
| 13 | |
| 14 | <template #mainExtra> |
| 15 | <div class="flex flex-col gap-4"> |
| 16 | <div v-if="command.Stdout" class="flex flex-col gap-2"> |
| 17 | <label>Stdout</label> |
| 18 | <n-input |
| 19 | :value="command.Stdout" |
| 20 | type="textarea" |
| 21 | readonly |
| 22 | placeholder="Empty" |
| 23 | size="large" |
| 24 | :autosize="{ |
| 25 | minRows: 3 |
| 26 | }" |
| 27 | /> |
| 28 | </div> |
| 29 | <div v-if="command.Stderr" class="flex flex-col gap-2"> |
| 30 | <label class="text-error flex items-center gap-2 leading-none"> |
| 31 | <Icon :name="DangerIcon" /> |
| 32 | <span>Stderr</span> |
| 33 | </label> |
| 34 | <n-input |
| 35 | :value="command.Stderr" |
| 36 | type="textarea" |
| 37 | readonly |
| 38 | placeholder="Empty" |
| 39 | size="large" |
| 40 | :autosize="{ |
| 41 | minRows: 3 |
| 42 | }" |
| 43 | /> |
| 44 | </div> |
| 45 | </div> |
| 46 | </template> |
| 47 | </CardEntity> |
| 48 | </template> |
| 49 | |
| 50 | <script setup lang="ts"> |
| 51 | import type { CommandResult } from "@/types/artifacts.d" |
| 52 | import { NInput } from "naive-ui" |
| 53 | import CardEntity from "@/components/common/cards/CardEntity.vue" |
| 54 | import Icon from "@/components/common/Icon.vue" |
| 55 | |
| 56 | const { command } = defineProps<{ command: CommandResult }>() |
| 57 | |
| 58 | const DangerIcon = "majesticons:exclamation-line" |
| 59 | </script> |