Skip to content

Commit

Permalink
fix: 批量同步执行方案——确认定时任务弹框异常 TencentBlueKing#3004
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed May 29, 2024
1 parent 40de78e commit 933b6e2
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 69 deletions.
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@vue/composition-api": "1.7.2",
"ace-builds": "1.32.9",
"axios": "1.6.8",
"bk-magic-vue": "2.5.8-beta.6",
"bk-magic-vue": "2.5.8",
"core-js": "3.36.1",
"cron-parser-custom": "2.13.0",
"diff": "5.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/css/bk-patch.css
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
vertical-align: middle;

&.bk-dialog-fullscreen {
inset: 0;
inset: 0 !important;
}

&.bk-info-box {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<script>
import TaskManageService from '@service/task-manage';
import ConfirmCron from '../../common/plan/confirm-cron';
import ConfirmCron from './render-corn/index.vue';
export default {
name: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,72 +27,73 @@

<template>
<permission-section>
<smart-action offset-target="variable-value">
<div
v-bkloading="{ isLoading }"
class="cron-job-detail"
:class="{
'is-loading': isLoading,
}">
<bk-alert :title="$t('template.同步执行方案需要重新确认定时任务的全局变量,不使用的定时任务可以直接停用。')" />
<div class="title">
<span>「{{ info.name }}」{{ $t('template.的全局变量') }}</span>
<span
v-if="!data.enable"
class="disable">{{ $t('template.已停用') }}</span>
<span
v-else-if="data.hasConfirm"
class="confirm">{{ $t('template.已确认') }}</span>
<span
v-else
class="waiting">{{ $t('template.待确认') }}</span>
</div>
<div>
<global-variable-layout v-if="!isLoading">
<global-variable
v-for="variable in info.variableValue"
:key="variable.id"
ref="variable"
:data="variable"
:readonly="readonly"
:type="variable.type" />
</global-variable-layout>
<empty v-if="isEmpty">
<p>{{ $t('template.无关联的全局变量') }}</p>
<p style="margin-top: 8px;">
{{ $t('template.已直接确认') }}
</p>
</empty>
</div>
</div>
<template
v-if="!isLoading && !isEmpty"
#action>
<bk-button
v-if="isEditing"
class="mr10"
:disabled="!data.enable"
theme="primary"
@click="handleSubmit">
{{ $t('template.确认') }}
</bk-button>
<bk-button
v-if="isEditing"
class="mr10"
:disabled="!data.enable"
@click="handleReset">
{{ $t('template.重置') }}
</bk-button>
<bk-button
<div
v-bkloading="{ isLoading }"
class="cron-job-detail"
:class="{
'is-loading': isLoading,
}">
<bk-alert :title="$t('template.同步执行方案需要重新确认定时任务的全局变量,不使用的定时任务可以直接停用。')" />
<div class="title">
<span>「{{ info.name }}」{{ $t('template.的全局变量') }}</span>
<span
v-if="!data.enable"
class="disable">{{ $t('template.已停用') }}</span>
<span
v-else-if="data.hasConfirm"
class="confirm">{{ $t('template.已确认') }}</span>
<span
v-else
class="mr10"
:disabled="!data.enable"
theme="primary"
@click="handleToggleEdit">
{{ $t('template.编辑') }}
</bk-button>
</template>
</smart-action>
class="waiting">{{ $t('template.待确认') }}</span>
</div>
<div>
<global-variable-layout v-if="!isLoading">
<global-variable
v-for="variable in info.variableValue"
:key="variable.id"
ref="variable"
:data="variable"
:readonly="readonly"
:type="variable.type" />
<div class="global-variable-edit-box">
<div class="variable-name">
<span />
</div>
<div v-if="!isLoading && !isEmpty">
<bk-button
v-if="isEditing"
class="mr10"
:disabled="!data.enable"
theme="primary"
@click="handleSubmit">
{{ $t('template.确认') }}
</bk-button>
<bk-button
v-if="isEditing"
class="mr10"
:disabled="!data.enable"
@click="handleReset">
{{ $t('template.重置') }}
</bk-button>
<bk-button
v-else
class="mr10"
:disabled="!data.enable"
theme="primary"
@click="handleToggleEdit">
{{ $t('template.编辑') }}
</bk-button>
</div>
</div>
</global-variable-layout>
<empty v-if="isEmpty">
<p>{{ $t('template.无关联的全局变量') }}</p>
<p style="margin-top: 8px;">
{{ $t('template.已直接确认') }}
</p>
</empty>
</div>
</div>
</permission-section>
</template>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
import I18n from '@/i18n';
import ConfirmCron from './components/confirm-cron';
import ConfirmCron from './components/confirm-cron/index.vue';
const runStepByStep = (data, callback, finishCallback = () => {}) => {
let startIndex = 0;
Expand Down

0 comments on commit 933b6e2

Please sign in to comment.