Skip to content

Commit e3e2d3a

Browse files
committed
change to vue
1 parent 44646a9 commit e3e2d3a

File tree

3 files changed

+30
-58
lines changed

3 files changed

+30
-58
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<template>
2+
<SvgIcon name="octicon-check-circle-fill" class="green" :size="size" v-if="status === 'success'"/>
3+
<SvgIcon name="octicon-skip" class="ui text grey" :size="size" v-else-if="status === 'skipped'"/>
4+
<SvgIcon name="octicon-clock" class="ui text yellow" :size="size" v-else-if="status === 'waiting'"/>
5+
<SvgIcon name="octicon-blocked" class="ui text yellow" :size="size" v-else-if="status === 'blocked'"/>
6+
<SvgIcon name="octicon-meter" class="ui text yellow" :size="size" class-name="job-status-rotate" v-else-if="job.status === 'running'"/>
7+
<SvgIcon name="octicon-x-circle-fill" class="red" :size="size" v-else/>
8+
</template>
9+
10+
<script>
11+
import {SvgIcon} from '../svg.js';
12+
13+
export default {
14+
components: {SvgIcon},
15+
props: {
16+
status: {
17+
type: String,
18+
required: true
19+
},
20+
size: {
21+
type: Number,
22+
default: 16
23+
}
24+
},
25+
};
26+
</script>

web_src/js/components/RepoActionView.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="job-brief-list">
1818
<div class="job-brief-item" v-for="(job, index) in run.jobs" :key="job.id">
1919
<a class="job-brief-link" :href="run.link+'/jobs/'+index">
20-
<RunStatus :status="job.status"/>
20+
<ActionsRunStatus :status="job.status" size="20"/>
2121
<span class="ui text">{{ job.name }}</span>
2222
</a>
2323
<button class="job-brief-rerun" @click="rerunJob(index)" v-if="job.canRerun">
@@ -43,7 +43,7 @@
4343
<SvgIcon name="octicon-chevron-down" class="gt-mr-3" v-show="currentJobStepsStates[i].expanded"/>
4444
<SvgIcon name="octicon-chevron-right" class="gt-mr-3" v-show="!currentJobStepsStates[i].expanded"/>
4545

46-
<RunStatus :status="jobStep.status" class="gt-mr-3"/>
46+
<ActionsRunStatus :status="jobStep.status" class="gt-mr-3"/>
4747

4848
<span class="step-summary-msg">{{ jobStep.summary }}</span>
4949
<span class="step-summary-dur">{{ jobStep.duration }}</span>
@@ -60,7 +60,7 @@
6060

6161
<script>
6262
import {SvgIcon} from '../svg.js';
63-
import {RunStatus} from '../runstatus.js';
63+
import ActionsRunStatus from './ActionsRunStatus.vue';
6464
import {createApp} from 'vue';
6565
import AnsiToHTML from 'ansi-to-html';
6666
@@ -70,7 +70,7 @@ const sfc = {
7070
name: 'RepoActionView',
7171
components: {
7272
SvgIcon,
73-
RunStatus,
73+
ActionsRunStatus,
7474
},
7575
props: {
7676
runIndex: String,

web_src/js/runstatus.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)