mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
perf: Job execution detail content add text-overflow class
This commit is contained in:
@@ -1,66 +1,72 @@
|
||||
<template>
|
||||
<TwoCol>
|
||||
<template>
|
||||
<AutoDetailCard
|
||||
:excludes="excludes"
|
||||
:fields="detailFields"
|
||||
:object="object"
|
||||
:url="url"
|
||||
/>
|
||||
<AutoDetailCard :excludes="excludes" :fields="detailFields" :object="object" :url="url" />
|
||||
</template>
|
||||
<template v-if="hasSummary" #right class="detail-right-quick-actions">
|
||||
<IBox
|
||||
v-if="object.summary.ok"
|
||||
:title="`${$tc('SuccessAsset')} (${object.summary.ok.length})` "
|
||||
:title="`${$tc('SuccessAsset')} (${object.summary.ok.length})`"
|
||||
type="success"
|
||||
>
|
||||
<el-collapse>
|
||||
<el-collapse-item
|
||||
v-for="(item,index) in object.summary.ok"
|
||||
v-for="(item, index) in object.summary.ok"
|
||||
:key="index"
|
||||
:name="index"
|
||||
:title="item"
|
||||
disabled
|
||||
/>
|
||||
>
|
||||
<template #title>
|
||||
<el-tooltip :content="item" placement="top" class="text-overflow">
|
||||
<span>{{ item }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</IBox>
|
||||
<IBox
|
||||
v-if="object.summary.excludes"
|
||||
:title="`${$tc('ExcludeAsset')} (${Object.keys(object.summary.excludes).length})` "
|
||||
:title="`${$tc('ExcludeAsset')} (${Object.keys(object.summary.excludes).length})`"
|
||||
type="warning"
|
||||
>
|
||||
<el-collapse>
|
||||
<el-collapse-item
|
||||
v-for="(val,key,index) in object.summary.excludes"
|
||||
v-for="(val, key, index) in object.summary.excludes"
|
||||
:key="index"
|
||||
:name="index"
|
||||
:title="key"
|
||||
>
|
||||
<template #title>
|
||||
<el-tooltip :content="key" placement="top" class="text-overflow">
|
||||
<span>{{ key }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<div>{{ $tc('Reason') }}: {{ val }}</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</IBox>
|
||||
<IBox
|
||||
v-if="object.summary.failures"
|
||||
:title="`${$tc('FailedAsset')} (${Object.keys(Object.assign(object.summary.failures,object.summary.dark)).length})` "
|
||||
:title="`${$tc('FailedAsset')} (${Object.keys(Object.assign(object.summary.failures, object.summary.dark)).length})`"
|
||||
type="danger"
|
||||
>
|
||||
<el-collapse>
|
||||
<el-collapse-item
|
||||
v-for="(val,key,index) in Object.assign(object.summary.failures,object.summary.dark)"
|
||||
v-for="(val, key, index) in Object.assign(object.summary.failures, object.summary.dark)"
|
||||
:key="index"
|
||||
:name="index"
|
||||
:title="key"
|
||||
>
|
||||
<template #title>
|
||||
<el-tooltip :content="key" placement="top" class="text-overflow">
|
||||
<span>{{ key }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<div>{{ $tc('Reason') }}: {{ val }}</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</IBox>
|
||||
<IBox
|
||||
v-if="object.summary.error"
|
||||
:title="$tc('SystemError') "
|
||||
type="danger"
|
||||
>
|
||||
<IBox v-if="object.summary.error" :title="$tc('SystemError')" type="danger">
|
||||
{{ object.summary.error }}
|
||||
</IBox>
|
||||
</template>
|
||||
@@ -86,11 +92,10 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
excludes: [
|
||||
'job', 'parameters', 'summary', 'task_id', 'timedelta'
|
||||
],
|
||||
excludes: ['job', 'parameters', 'summary', 'task_id', 'timedelta'],
|
||||
detailFields: [
|
||||
'task_id', 'time_cost',
|
||||
'task_id',
|
||||
'time_cost',
|
||||
{
|
||||
key: this.$t('IsFinished'),
|
||||
value: this.object.is_finished ? this.$t('Yes') : this.$t('No')
|
||||
@@ -99,8 +104,12 @@ export default {
|
||||
key: this.$t('IsSuccess'),
|
||||
value: this.object.is_success ? this.$t('Yes') : this.$t('No')
|
||||
},
|
||||
'job_type', 'material', 'org_name',
|
||||
'date_start', 'date_finished', 'date_created'
|
||||
'job_type',
|
||||
'material',
|
||||
'org_name',
|
||||
'date_start',
|
||||
'date_finished',
|
||||
'date_created'
|
||||
],
|
||||
url: `/api/v1/ops/job-executions/${this.object.id}/`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user