DashboardComponent.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <ActionButton
  3. v-if="component.type == 'link'"
  4. :key="component.action?.bindingId || component.title"
  5. :action-data="component.action"
  6. :css-class="component.cssClass"
  7. />
  8. <DashboardComponentDirectory
  9. v-else-if="component.type == 'directory'"
  10. :component="component"
  11. />
  12. <DashboardComponentDisplay
  13. v-else-if="component.type == 'display'"
  14. :component="component"
  15. />
  16. <DashboardComponentMostRecentExecution
  17. v-else-if="component.type == 'stdout-most-recent-execution'"
  18. :component="component"
  19. />
  20. <template v-else-if="component.type == 'fieldset'">
  21. <template
  22. v-for="subcomponent in component.contents"
  23. :key="subcomponent.title"
  24. >
  25. <DashboardComponent :component="subcomponent" />
  26. </template>
  27. </template>
  28. <div v-else>
  29. OTHER: {{ component.type }}
  30. {{ component }}
  31. </div>
  32. </template>
  33. <script setup>
  34. import ActionButton from '../ActionButton.vue'
  35. import DashboardComponentMostRecentExecution from './DashboardComponentMostRecentExecution.vue'
  36. import DashboardComponentDirectory from './DashboardComponentDirectory.vue'
  37. import DashboardComponentDisplay from './DashboardComponentDisplay.vue'
  38. defineProps({
  39. component: {
  40. type: Object,
  41. required: true
  42. }
  43. })
  44. </script>