mirror of
https://github.com/hanzo-io/press.git
synced 2026-10-30 18:56:50 +00:00
* refactor: group analytics, jobs, logs and reports * fix: double import and remove unused code * fix: tab highlight on navigating using browser controls * refactor: move inner sidebar to right with fw like design * fix: option to view job from backup * fix: navigation buttons * fix: highlight inner sidebar item for children as well * refactor: add bottom border for inner sidebar items * fix: wrong params while routing * refactor: add padding per page * fix: add childroute for reports * fix: switch type of error from String to Error * fix(SiteActivity): show relevant job on click * fix(SiteActivity): add filters * fix(SiteActivity): filter width * fix(SiteTags): show tags in overview * refactor: separate advanced and basic charts * fix(SiteInsights): mobile view * fix: fetch advanced analytics only once * fix: add schedule backup action * fix: use proper route for site job list * fix: don't allow duplicate tags * fix: remove slow query variable * fix: revert complexity reduction change * fix(Charts): loading state for charts without card * refactor: add tag dialog * refactor: group logs - better heading for charts - link some charts to logs * chore: remove unused code * fix: typo
98 lines
1.9 KiB
Vue
98 lines
1.9 KiB
Vue
<template>
|
|
<ObjectList class="p-5" :options="logsOptions" />
|
|
</template>
|
|
|
|
<script>
|
|
import { isMobile } from '../../utils/device';
|
|
import { duration } from '../../utils/format';
|
|
import ObjectList from '../ObjectList.vue';
|
|
|
|
export default {
|
|
name: 'SiteJobs',
|
|
props: ['name'],
|
|
components: {
|
|
ObjectList
|
|
},
|
|
computed: {
|
|
logsOptions() {
|
|
const doctype = 'Site';
|
|
return {
|
|
doctype: 'Agent Job',
|
|
filters: {
|
|
site: this.name
|
|
},
|
|
route(row) {
|
|
return {
|
|
name: 'Site Job',
|
|
params: { id: row.name }
|
|
};
|
|
},
|
|
orderBy: 'creation desc',
|
|
searchField: 'job_type',
|
|
fields: ['end', 'job_id'],
|
|
filterControls() {
|
|
return [
|
|
{
|
|
type: 'select',
|
|
label: 'Status',
|
|
fieldname: 'status',
|
|
class: !isMobile() ? 'w-24' : '',
|
|
options: ['', 'Pending', 'Running', 'Success', 'Failure']
|
|
},
|
|
{
|
|
type: 'link',
|
|
label: 'Type',
|
|
fieldname: 'job_type',
|
|
options: {
|
|
doctype: 'Agent Job Type',
|
|
orderBy: 'name asc',
|
|
pageLength: 100
|
|
}
|
|
}
|
|
];
|
|
},
|
|
columns: [
|
|
{
|
|
label: 'Job Type',
|
|
fieldname: 'job_type',
|
|
class: 'font-medium'
|
|
},
|
|
{
|
|
label: 'Status',
|
|
fieldname: 'status',
|
|
type: 'Badge',
|
|
width: 0.5
|
|
},
|
|
{
|
|
label: 'Site',
|
|
fieldname: 'site',
|
|
width: 1.2,
|
|
condition: () => doctype !== 'Site'
|
|
},
|
|
{
|
|
label: 'Duration',
|
|
fieldname: 'duration',
|
|
width: 0.35,
|
|
format(value, row) {
|
|
if (row.job_id === 0 || !row.end) return;
|
|
return duration(value);
|
|
}
|
|
},
|
|
{
|
|
label: 'Created By',
|
|
fieldname: 'owner'
|
|
},
|
|
{
|
|
label: '',
|
|
fieldname: 'creation',
|
|
type: 'Timestamp',
|
|
width: 0.5,
|
|
align: 'right'
|
|
}
|
|
].filter(c => (c.condition ? c.condition() : true))
|
|
};
|
|
}
|
|
}
|
|
};
|
|
</script>
|