You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ActionRunStatus.vue 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!-- This vue should be kept the same as templates/repo/actions/status.tmpl
  2. Please also update the template file above if this vue is modified.
  3. action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
  4. -->
  5. <script>
  6. import {SvgIcon} from '../svg.js';
  7. export default {
  8. components: {SvgIcon},
  9. props: {
  10. status: {
  11. type: String,
  12. required: true,
  13. },
  14. size: {
  15. type: Number,
  16. default: 16,
  17. },
  18. className: {
  19. type: String,
  20. default: '',
  21. },
  22. localeStatus: {
  23. type: String,
  24. default: '',
  25. },
  26. },
  27. };
  28. </script>
  29. <template>
  30. <span class="tw-flex tw-content-center" :data-tooltip-content="localeStatus" v-if="status">
  31. <SvgIcon name="octicon-check-circle-fill" class="text green" :size="size" :class-name="className" v-if="status === 'success'"/>
  32. <SvgIcon name="octicon-skip" class="text grey" :size="size" :class-name="className" v-else-if="status === 'skipped'"/>
  33. <SvgIcon name="octicon-clock" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'waiting'"/>
  34. <SvgIcon name="octicon-blocked" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'blocked'"/>
  35. <SvgIcon name="octicon-meter" class="text yellow" :size="size" :class-name="'job-status-rotate ' + className" v-else-if="status === 'running'"/>
  36. <SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else-if="['failure', 'cancelled', 'unknown'].includes(status)"/>
  37. </span>
  38. </template>