mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] display way more information on apps page
This commit is contained in:
parent
b8777013d4
commit
7786e50422
1 changed files with 20 additions and 2 deletions
|
@ -8,9 +8,19 @@
|
|||
<table class="table is-bordered is-hoverable is-striped is-fullwidth">
|
||||
<thead>
|
||||
<th>App</th>
|
||||
<th>Current job</th>
|
||||
<th>Created time</th>
|
||||
<th>Started time</th>
|
||||
<th>End time</th>
|
||||
<th>Commit</th>
|
||||
</thead>
|
||||
<tr v-for="(app, index) in apps" :id="app.id">
|
||||
<td>{{app.name}} <a target="_blank" v-bind:href="app.url">↪</a></td>
|
||||
<tr v-for="(app, index) in apps" :id="app.id" v-bind:class="[app.job_state + 'Job']">
|
||||
<td>{{app.name}} <small>{{app.app_list}}</small> <a target="_blank" v-bind:href="app.url">↪</a></td>
|
||||
<td><a v-bind:href="'<{ relative_path_to_root }>job/' + app.job_id">{{app.job_name}} <small>#{{app.job_id}}</small></a> <span class="tag">{{app.job_state}}</span></td>
|
||||
<td>{{timestampToDate(app.created_time)}}</td>
|
||||
<td>{{timestampToDate(app.started_time)}}</td>
|
||||
<td>{{timestampToDate(app.end_time)}}</td>
|
||||
<td><a target="_blank" v-bind:href="app.url + '/commit/' + app.revision">{{app.revision.slice(0, 7)}}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -25,6 +35,14 @@
|
|||
el: '#apps',
|
||||
data: {
|
||||
apps: []
|
||||
},
|
||||
methods: {
|
||||
timestampToDate: function (timestamp) {
|
||||
console.log(timestamp)
|
||||
if (timestamp === null) return "";
|
||||
|
||||
return new Date(timestamp * 1000).toLocaleString()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue