Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.5.x #1270

Merged
merged 2 commits into from
Sep 9, 2022
Merged

3.5.x #1270

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<template slot-scope="{ row }">
<template v-if="row.detailEnable">
<span v-if="chekcIsCurrentUrl(row)">
{{ $t('history.当前正在显示的内容') }}
({{ $t('history.当前正在显示的内容') }})
</span>
<bk-button
v-else
Expand All @@ -69,7 +69,6 @@
</div>
</template>
<script>
import I18n from '@/i18n';
import TaskExecuteService from '@service/task-execute';
import Empty from '@components/empty';

Expand Down Expand Up @@ -111,7 +110,9 @@
});
},
chekcIsCurrentUrl (data) {
const { stepInstanceId, retryCount = 0 } = this.$route.query;
const urlSearch = new URLSearchParams(window.location.search);
const stepInstanceId = urlSearch.get('stepInstanceId');
const retryCount = urlSearch.get('retryCount');

return parseInt(stepInstanceId, 10) === data.stepInstanceId
&& parseInt(retryCount, 10) === data.retry;
Expand All @@ -128,13 +129,6 @@
from: this.from || this.$route.query.from,
},
};
// 跳转路由没变
const { stepInstanceId, retryCount = 0 } = this.$route.query;
if (parseInt(stepInstanceId, 10) === payload.stepInstanceId
&& parseInt(retryCount, 10) === payload.retry) {
this.messageWarn(I18n.t('history.正在查看'));
return;
}

this.$emit('on-change');
this.$router.push(routerInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<td>{{ data.description || '--' }}</td>
</tr>
<tr>
<td>{{ $t('template.必填:') }}</td>
<td>{{ $t('template.执行时必填:') }}</td>
<td>{{ data.requiredText }}</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
const defaultValue = (defaultField = I18n.t('template.初始值')) => ({ label: defaultField, filed: 'valueText' });
const description = () => ({ label: I18n.t('template.变量描述'), filed: 'description' });
const changeable = () => ({ label: I18n.t('template.赋值可变'), filed: 'changeableText' });
const required = () => ({ label: I18n.t('template.必填'), filed: 'requiredText' });
const required = () => ({ label: I18n.t('template.执行时必填'), filed: 'requiredText' });

const generateVariableDescribeMap = (defaultField = I18n.t('template.初始值')) => ({
[GlobalVariableModel.TYPE_STRING]: [type(), name(), defaultValue(defaultField), description(), changeable(), required()],
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/task-manage/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default {
'初始值:': 'Default: ',
'变量描述:': 'Description: ',
'赋值可变:': 'Value is changeable: ',
'必填:': 'Is Required: ',
'执行时必填:': 'Is Required: ',
'同步执行方案需要重新确认定时任务的全局变量,不使用的定时任务可以直接停用。': 'The synchronous operation needs to reconfirm the global variables of the related Crons.',
的全局变量: 'Variables confirm',
已停用: 'OFF',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<span class="value">{{ data.changeableText }}</span>
</div>
<div :class="diffValue.required">
<span class="label">{{ $t('template.必填:') }}</span>
<span class="label">{{ $t('template.执行时必填:') }}</span>
<span class="value">{{ data.requiredText }}</span>
</div>
</div>
Expand Down