Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit891fd3e

Browse files
committed
overview view pipeline text is now unknown when pipeline has no last runs. Moved create pipeline output text to its own modal. Pipelines which are in build phase are now in the correct state.
1 parent61fe923 commit891fd3e

File tree

3 files changed

+67
-7
lines changed

3 files changed

+67
-7
lines changed

‎frontend/client/views/overview/index.vue‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@
2121
<spanstyle="color:#b1adad;">
2222
Duration:
2323
</span>
24-
<span>
24+
<spanv-if="pipeline.r.status === 'success' || pipeline.r.status === 'failed'">
2525
{{ calculateDuration(pipeline.r.startdate, pipeline.r.finishdate) }}
26+
</span>
27+
<spanv-else>
28+
unknown
2629
</span><br />
2730
<iclass="fa fa-calendar"></i>
2831
<spanstyle="color:#b1adad;">
2932
Started:
3033
</span>
31-
<span>
34+
<spanv-if="pipeline.r.status === 'success' || pipeline.r.status === 'failed'">
3235
{{ humanizedDate(pipeline.r.finishdate) }}
36+
</span>
37+
<spanv-else>
38+
unknown
3339
</span><br />
3440
<divclass="pipelinegrid-footer">
3541
<aclass="button is-primary"@click="startPipeline(pipeline.p.id)"style="width:250px;">

‎frontend/client/views/pipeline/create.vue‎

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@
104104
</td>
105105
<td>{{ props.row.pipeline.type }}</td>
106106
<td:title="props.row.created"v-tippy="{ arrow : true, animation : 'shift-away'}">{{ convertTime(props.row.created) }}</td>
107-
<td:title="props.row.errmsg"v-tippy="{ arrow : true, animation : 'shift-away'}">
108-
<spanclass="is-blue">Output</span>
107+
<td>
108+
<aclass="button is-green-button is-small"@click="showStatusOutputModal(props.row.errmsg)">
109+
<spanclass="icon">
110+
<iclass="fa fa-align-justify"></i>
111+
</span>
112+
<span>Show Output</span>
113+
</a>
109114
</td>
110115
</template>
111116
<divslot="emptystate"class="empty-table-text">
@@ -173,6 +178,20 @@
173178
</div>
174179
</div>
175180
</modal>
181+
182+
<!-- status output modal-->
183+
<modal:visible="statusOutputModal"class="modal-z-index"@close="closeStatusModal">
184+
<divclass="box statusModal">
185+
<div>
186+
<message:direction="'down'":message="statusOutputMsg":duration="0"></message>
187+
</div>
188+
<divclass="modal-footer">
189+
<divstyle="float:right;">
190+
<buttonclass="button is-danger"@click="closeStatusModal">Close</button>
191+
</div>
192+
</div>
193+
</div>
194+
</modal>
176195
</div>
177196
</template>
178197

@@ -184,6 +203,7 @@ import ProgressBar from 'vue-bulma-progress-bar'
184203
importVueTippyfrom'vue-tippy'
185204
importVueGoodTablefrom'vue-good-table'
186205
importmomentfrom'moment'
206+
importMessagefrom'vue-bulma-message-html'
187207
188208
Vue.use(VueGoodTable)
189209
Vue.use(VueTippy)
@@ -243,15 +263,18 @@ export default {
243263
field:'errmsg'
244264
}
245265
],
246-
historyRows: []
266+
historyRows: [],
267+
statusOutputModal:false,
268+
statusOutputMsg:''
247269
}
248270
},
249271
250272
components: {
251273
Modal,
252274
Collapse,
253275
CollapseItem,
254-
ProgressBar
276+
ProgressBar,
277+
Message
255278
},
256279
257280
mounted () {
@@ -398,6 +421,21 @@ export default {
398421
399422
showCredentialsModal () {
400423
this.gitCredentialsModal=true
424+
},
425+
426+
showStatusOutputModal (msg) {
427+
if (!msg) {
428+
msg='No output found.'
429+
}
430+
431+
this.statusOutputMsg= msg
432+
this.statusOutputModal=true
433+
},
434+
435+
closeStatusModal () {
436+
this.statusOutputModal=false
437+
this.statusOutputMsg=''
438+
this.$emit('close')
401439
}
402440
}
403441
}
@@ -488,4 +526,19 @@ export default {
488526
opacity:0.2;
489527
}
490528
}
529+
530+
.message-header {
531+
background-color:#4da2fc;
532+
}
533+
534+
.message-body {
535+
background-color:black;
536+
border:none;
537+
color:whitesmoke;
538+
}
539+
540+
.statusModal {
541+
width:100%;
542+
background-color:rgb(42,38,53);
543+
}
491544
</style>

‎handlers/pipeline.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ func CreatePipeline(c echo.Context) error {
4343
returnc.String(http.StatusBadRequest,err.Error())
4444
}
4545

46-
// Setthe creation date and unique id
46+
// Setinitial value
4747
p.Created=time.Now()
48+
p.StatusType=gaia.CreatePipelineRunning
4849
p.ID=uuid.Must(uuid.NewV4(),nil).String()
4950

5051
// Save this pipeline to our store

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp