Unverified Commit 6e319b46 authored by gaoyan's avatar gaoyan Committed by GitHub

Disable the monitoring configuration when the task stops (#2316)

* Disable the monitoring configuration when the task stops * formate code
parent 4dc9984e
......@@ -17,6 +17,7 @@
*
*/
import { JOB_STATUS } from '@/pages/DevOps/constants';
import { JobMetricsItem } from '@/pages/DevOps/JobDetail/data';
import MonitorConfigTab from '@/pages/DevOps/JobDetail/JobMetrics/MetricsFilter/MetricsConfigTab';
import { putMetricsLayout } from '@/pages/DevOps/JobDetail/JobMetrics/service';
......@@ -73,7 +74,11 @@ const MetricsConfigForm = (props: any) => {
width={1000}
layout={'horizontal'}
title={l('devops.jobinfo.metrics.configMetrics')}
trigger={<Button type='primary'>{l('devops.jobinfo.metrics.configMetrics')}</Button>}
trigger={
<Button type='primary' disabled={jobDetail.instance.status != JOB_STATUS.RUNNING}>
{l('devops.jobinfo.metrics.configMetrics')}
</Button>
}
onFinish={async () => await saveJobMetrics()}
>
<Tabs items={itemTabs} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment