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.6.x #1352

Merged
merged 33 commits into from
Sep 22, 2022
Merged

3.6.x #1352

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ff5c0e2
Merge pull request #1276 from hLinx/3.5.x
hLinx Sep 9, 2022
6cbfedb
Merge 'hLinx/3.5.x' into 3.5.x
jsonwan Sep 13, 2022
a6be504
Merge pull request #1287 from hLinx/3.5.x
hLinx Sep 15, 2022
689ef08
Merge pull request #1289 from hLinx/3.5.x
hLinx Sep 15, 2022
005e199
perf: 标签的复制/粘贴icon,hover给出tooltips #1315
hLinx Sep 21, 2022
ab558ed
perf: 上一步按钮应该是个基础按钮 #1306
hLinx Sep 21, 2022
79b2bb7
bugfix: 标点符号纠正 #1296
hLinx Sep 21, 2022
b3b23f5
bugfix: 选用“业务脚本”或“公共脚本”时匹配中高危语句的交互,要和手工输入的保持一致 #1294
hLinx Sep 21, 2022
603a789
bugfix: job个性化--脚本模板bat编辑后切换tab回来会变为乱码 #1293
hLinx Sep 21, 2022
3118f2b
bugfix: 右上角导航的icon点击后会导致下拉菜单消失 #1295
hLinx Sep 21, 2022
0cab9ec
bugfix: 引导页的文案逻辑问题 #1297
hLinx Sep 21, 2022
3c4efc5
bugfix: 文档链接跳转错误 #1298
hLinx Sep 21, 2022
60f93c0
perf: 编辑执行方案的名称,空间太小了,改成和新建的一致 #1300
hLinx Sep 21, 2022
145ec29
bugfix: 标签复制粘贴会出现一模一样的标签 #1301
hLinx Sep 21, 2022
51ec3f9
perf: 把执行方案ID字段也作为定时任务列表的可选显示字段 #1302
hLinx Sep 21, 2022
7af7c0f
bugfix: 表格的统计没了 #1303
hLinx Sep 21, 2022
ad0ca76
perf: 消息通知编辑后没点保存,切走没有提醒 #1304
hLinx Sep 21, 2022
b64e7f4
bugfix: 执行方案的全局变量批量编辑移除icon没法点 #1305
hLinx Sep 21, 2022
d5d0f7b
bugfix: 已上线的脚本,为啥还提示未保存的内容 #1307
hLinx Sep 21, 2022
6667782
perf: 脚本删除后,左侧的标签计数也要跟着刷新 #1308
hLinx Sep 21, 2022
df6889f
bugfix: 公共脚本的标签是没法修改和新增的,对应的操作入口应该处理掉 #1309
hLinx Sep 21, 2022
4a467d9
bugfix: 公共脚本的同步按钮未隐藏 #1312
hLinx Sep 21, 2022
e86f17d
perf: 高危检测规则的操作列tooltips文案优化 #1319
hLinx Sep 22, 2022
e573b8b
bugfix: 在从脚本“去更新”的入口点版本对比时,没有弹出对比框 #1311
hLinx Sep 22, 2022
ff86745
perf: 不论是否被引用,即使新建的脚本,也提示这个,提示不正确 #1314
hLinx Sep 22, 2022
cb53961
bugfix: 支持多个关键字,但用多个关键字,没有搜索出来 #1313
hLinx Sep 22, 2022
1a10f3a
bugfix: 菜单的图标重复了 #1320
hLinx Sep 22, 2022
7900118
perf: 点击 去更新 跳转到编辑步骤的状态后,直接把脚本列表下拉展开 #1316
hLinx Sep 22, 2022
1b9f14d
perf: 脚本列表,脚本语言的排序需要按照语言名称的字典顺序 #1317
hLinx Sep 22, 2022
b6d1afa
perf: 脚本列表,脚本语言的排序需要按照语言名称的字典顺序 #1317
hLinx Sep 22, 2022
edf27c9
perf: 页面文字未对齐,偏移了大概3个像素1个空格位置 #1310
hLinx Sep 22, 2022
25c4ddc
perf: 快速执行的任务历史,不应该显示:步骤执行详情,应该显示:快速执行详情,现在会误以为是作业步骤 #1299
hLinx Sep 22, 2022
472b826
merge:3.5.x #1349
hLinx Sep 22, 2022
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
14 changes: 11 additions & 3 deletions src/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<bk-popover
theme="light site-header-dropdown"
style="margin-right: 8px;"
:arrow="false">
:arrow="false"
:tippy-options="{ hideOnClick: false }">
<div class="flag-box">
<Icon
id="siteLocal"
Expand All @@ -58,7 +59,11 @@
</div>
</div>
</bk-popover>
<bk-popover theme="light site-header-dropdown" style="margin-right: 14px;" :arrow="false">
<bk-popover
theme="light site-header-dropdown"
style="margin-right: 14px;"
:arrow="false"
:tippy-options="{ hideOnClick: false }">
<div class="flag-box">
<Icon id="siteHelp" type="help-document-fill" />
</div>
Expand All @@ -68,7 +73,10 @@
<div class="item" @click="handleLocationFeedback">{{ $t('问题反馈') }}</div>
</div>
</bk-popover>
<bk-popover theme="light site-header-dropdown" :arrow="false">
<bk-popover
theme="light site-header-dropdown"
:arrow="false"
:tippy-options="{ hideOnClick: false }">
<div class="user-flag">
<span style="margin-right: 5px;">{{ currentUser.username }}</span>
<i class="bk-icon icon-down-shape" />
Expand Down
37 changes: 24 additions & 13 deletions src/frontend/src/components/jb-edit/tag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@
class="tag-shortcurt-box"
@click.stop="">
<div class="shortcurt-action-btn">
<Icon type="copy" @click="handleCopy" />
<Icon type="paste" class="paste-btn" @click="handlePaste" />
<Icon
v-bk-tooltips="$t('复制')"
type="copy"
@click="handleCopy" />
<Icon
v-bk-tooltips="$t('粘贴')"
type="paste"
class="paste-btn"
@click="handlePaste" />
</div>
</div>
<div v-else class="tag-normal-box">
Expand Down Expand Up @@ -233,6 +240,7 @@
return;
}
copyMemo = _.cloneDeep(this.localValue);
console.log('form copyMemocopyMemo = ', copyMemo);
execCopy(this.text);
},
/**
Expand All @@ -246,12 +254,10 @@
});
return;
}
this.localValue = [
...new Set([
...this.localValue,
...copyMemo,
]),
];
this.localValue = _.uniqBy([
...this.localValue,
...copyMemo,
], _ => _.id);
this.triggerRemote();
},
},
Expand Down Expand Up @@ -285,11 +291,17 @@
cursor: pointer;
border-radius: 2px;

&.shortcurt:hover {
background: #e1e2e6;
&.shortcurt {
.render-value-box {
padding-left: 4px;
}

.shortcurt-action-btn {
display: flex;
&:hover {
background: #e1e2e6;

.shortcurt-action-btn {
display: flex;
}
}
}

Expand All @@ -305,7 +317,6 @@
.render-value-box {
display: flex;
height: 30px;
padding-left: 4px;
line-height: 30px;
align-items: center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
@input="handleInputChange"
@keydown="handleInputKeydown" />
</div>
<div
<!-- <div
v-if="focused"
v-once
style="margin-top: 4px; font-size: 12px; line-height: 22px; color: #c4c6cc;">
{{ inputTips }}
</div>
</div> -->
</div>
<div class="search-nextfix">
<i
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/components/render-list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
selectNums: 0,
params: {},
pagination: {
showTotalCount: true,
count: 0,
current: 1,
limit: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,31 @@
handler (newData) {
this.isReadonly = newData[this.scriptSourceField] !== TaskStepModel.scriptStep.TYPE_SOURCE_LOCAL;
this.lang = formatScriptTypeValue(newData[this.languageField]);
if (this.isReadonly) {
this.rules = [];
} else {
this.rules = [
{
required: true,
message: I18n.t('脚本内容必填'),
trigger: 'change',
},
{
validator: value => ScriptManageService.getScriptValidation({
content: value,
scriptType: newData[this.languageField],
}).then((data) => {
// 高危语句报错状态需要全局保存
const dangerousContent = _.find(data, _ => _.isDangerous);
this.$store.commit('setScriptCheckError', dangerousContent);
return true;
}),
message: I18n.t('脚本内容检测失败'),
trigger: 'blur',
},
];

const rules = [
{
validator: value => ScriptManageService.getScriptValidation({
content: value,
scriptType: newData[this.languageField],
}).then((data) => {
// 高危语句报错状态需要全局保存
const dangerousContent = _.find(data, _ => _.isDangerous);
this.$store.commit('setScriptCheckError', dangerousContent);
return true;
}),
message: I18n.t('脚本内容检测失败'),
trigger: 'blur',
},
];

if (!this.isReadonly) {
rules.unshift({
required: true,
message: I18n.t('脚本内容必填'),
trigger: 'change',
});
}
this.rules = rules;
},
deep: true,
immediate: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
</bk-option>
</bk-select>
<bk-select
ref="scriptSelect"
:placeholder="$t('选择引用脚本')"
style="width: 375px;"
:value="formData[scriptVersionIdField]"
Expand Down Expand Up @@ -250,13 +251,24 @@
this.$refs.scriptId.clearValidator();
}
},
// 需要同步的脚本默认展开脚本列表
scriptListDisplay () {
if (this.scriptListDisplay.length > 1 && !this.hasShowScriptSelect) {
setTimeout(() => {
this.hasShowScriptSelect = true;
this.$refs.scriptSelect.$el.querySelector('.bk-select-name').click();
}, 30);
}
},
},
created () {
this.scriptListMemo = [];
this.publicScriptListMemo = [];
this.initScriptContent();
this.fetchScriptList();
this.fetchPublicScriptList();

this.hasShowScriptSelect = false;
},
methods: {
/**
Expand Down
10 changes: 8 additions & 2 deletions src/frontend/src/i18n/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,11 @@ export default {
'作业平台的核心功能包括面向服务器操作系统的命令执行、文件分发,以及将多个操作组合成作业流程,并支持设置定时执行。': 'The core functions of the Job include command execution for server operating systems, file distribution, and combining multiple operations into job processes, and support for setting up timed execution.',
申请业务权限: 'Apply Business Permission',
'申请已有业务权限 / 创建新的业务': 'Apply for business permission or Create one',
'不同团队在作业平台上的资源以“业务”分隔,而“业务”是统一由配置平台进行创建和管理的,你可以选择 申请已有业务的权限,亦或是 新建 一个全新的业务。': 'The resources of different teams on the job platform are separated by "Business", which is created and managed by the CMDB platform, and you can choose to request the permission of an existing business or create a new one.',
'不同团队在作业平台上的资源以“业务”分隔,而“业务”是统一由配置平台进行创建和管理的,你可以选择': 'The resources of different teams on the job platform are separated by "Business", which is created and managed by the CMDB platform, and you can choose to ',
申请已有业务的权限: 'Apply Business Permission',
',亦或是': ' or ',
' 新建 ': 'create now.',
'一个全新的业务。': '',
开始使用作业平台: 'Getting Started with Job',
作业平台的目标服务器信息同样来自: 'The target host of the job platform also comes from the ',
配置平台: 'CMDB',
Expand Down Expand Up @@ -563,5 +567,7 @@ export default {
请确定是否要继续执行: 'Are you sure want to continue to run?',
继续执行: 'YES',
立即取消: 'CANCEL',

复制: 'Copy',
粘贴: 'Paste',
快速执行详情: 'Quick Launch Details',
};
4 changes: 2 additions & 2 deletions src/frontend/src/layout-new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@
<div slot="title">{{ $t('安全.menuGroup') }}</div>
<div slot="flod-title">{{ $t('安全.flodTitle') }}</div>
<jb-item index="dangerousRuleManage">
<Icon type="job-white-list" />
<Icon type="gaoweiyujujiance" />
{{ $t('高危语句规则') }}
</jb-item>
<jb-item index="detectRecords">
<Icon type="job-setting" />
<Icon type="lanjiejilu" />
{{ $t('检测记录') }}
</jb-item>
</jb-item-group>
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/src/views/account-manage/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
label="ID"
prop="id"
key="id"
sortable
sortable="custom"
width="80"
align="left" />
<bk-table-column
Expand All @@ -65,31 +65,31 @@
prop="alias"
key="alias"
min-width="180"
sortable
sortable="custom"
align="left" />
<bk-table-column
v-if="allRenderColumnMap.account"
:label="$t('account.账号名称.colHead')"
prop="account"
key="account"
min-width="180"
sortable
sortable="custom"
align="left" />
<bk-table-column
v-if="allRenderColumnMap.categoryName"
:label="$t('account.账号用途.colHead')"
prop="categoryName"
key="categoryName"
width="120"
sortable
sortable="custom"
align="left" />
<bk-table-column
v-if="allRenderColumnMap.typeName"
:label="$t('account.账号类型.colHead')"
prop="typeName"
key="typeName"
width="120"
sortable
sortable="custom"
align="left" />
<bk-table-column
v-if="allRenderColumnMap.creator"
Expand Down
16 changes: 14 additions & 2 deletions src/frontend/src/views/business-permission.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,19 @@
</div>
<div class="feature-box">
<div class="feature-title">{{ $t('申请已有业务权限 / 创建新的业务') }}</div>
<div>{{ $t('不同团队在作业平台上的资源以“业务”分隔,而“业务”是统一由配置平台进行创建和管理的,你可以选择 申请已有业务的权限,亦或是 新建 一个全新的业务。') }}</div>
<div>
{{ $t('不同团队在作业平台上的资源以“业务”分隔,而“业务”是统一由配置平台进行创建和管理的,你可以选择') }}
<a @click="handleGoApplyPermission">
{{ $t('申请已有业务的权限') }}
</a>
{{ $t(',亦或是') }}
<a
target="_blank"
:href="`${relatedSystemUrls.BK_CMDB_ROOT_URL}/#/resource/business`">
{{ $t('新建') }}
</a>
{{ $t('一个全新的业务。') }}
</div>
</div>
</div>
<div class="divide-line" />
Expand Down Expand Up @@ -103,7 +115,7 @@
<div style="margin-top: 10px;">
<span>{{ $t('了解更多关于作业平台产品的功能介绍,点击前往') }}</span>
<a
:href="`${relatedSystemUrls.BK_DOC_JOB_ROOT_URL}`"
:href="`${relatedSystemUrls.BK_DOC_JOB_ROOT_URL}/markdown/作业平台/产品白皮书/Introduction/What-is-Job.md`"
target="_blank">
<span>{{ $t('产品文档') }}</span>
<Icon type="link" />
Expand Down
Loading