Skip to content

Commit

Permalink
Merge pull request #2636 from hLinx/hotfix_master
Browse files Browse the repository at this point in the history
Hotfix master
  • Loading branch information
hLinx authored Nov 24, 2023
2 parents db8e5af + fb5b611 commit f7030bf
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/domain/model/script/script-related.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class ScriptRelated extends BaseModel {
get statusHtml() {
let styles = 'display: inline-block; padding: 0 8px; line-height: 18px; font-size: 12px; border-radius: 2px;';

switch (this.status) {
switch (this.scriptStatus) {
case ScriptRelated.STATUS_INVALID:
styles += 'background: #F4E3C7; color: #FF9C01';
break;
Expand All @@ -57,7 +57,7 @@ export default class ScriptRelated extends BaseModel {
styles += 'background: #F0F1F5; color: #979BA5';
}
return [
`<span style="${styles}" data-script-status="${this.status}">`,
`<span style="${styles}" data-script-status="${this.scriptStatus}">`,
ScriptRelated.STATUS_TEXT_MAP[this.scriptStatus],
'</span>',
].join('');
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/utils/assist/script-error-confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const sacnDialog = (resolve, reject) => {
title: I18n.t('脚本中出现高危语句'),
showFooter: false,
width: 450,
maskClose: false,
subHeader: (h => (
<div>
<div style="font-size: 14px; line-height: 22px; color: #63656E; text-align: center">
Expand Down Expand Up @@ -93,6 +94,7 @@ const preventDialog = (resolve, reject) => {
confirmInfo = vm.$bkInfo({
title: I18n.t('脚本中出现高危语句'),
showFooter: false,
maskClose: false,
width: 450,
subHeader: (h => (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,6 @@
position: relative;
height: 100%;
overflow: hidden;
overflow: auto;
background: #fff;
border: 1px solid #dcdee5;
border-bottom-left-radius: 2px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
align-items: center;
&.active {
color: ##313238;
color: #313238;
background: #fff;
border-color: #dcdee5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<template>
<div>
<jb-search-select
ref="searchSelect"
:data="searchSelect"
:placeholder="$t('script.搜索名称,版本号')"
:popover-zindex="99999"
Expand Down Expand Up @@ -61,6 +62,25 @@
<span v-html="row.statusHtml" />
</template>
</bk-table-column>
<empty
v-if="isSearching"
slot="empty"
type="search">
<div>
<div style="font-size: 14px; color: #63656e;">
{{ $t('搜索结果为空') }}
</div>
<div style="margin-top: 8px; font-size: 12px; line-height: 16px; color: #979ba5;">
<span>{{ $t('可以尝试调整关键词') }}</span>
<span>{{ $t('') }}</span>
<bk-button
text
@click="handleClearSearch">
{{ $t('清空搜索条件') }}
</bk-button>
</div>
</div>
</empty>
</bk-table>
</div>
</div>
Expand All @@ -74,6 +94,7 @@
encodeRegexp,
} from '@utils/assist';
import Empty from '@components/empty';
import JbSearchSelect from '@components/jb-search-select';
import I18n from '@/i18n';
Expand All @@ -92,6 +113,7 @@
data() {
return {
isLoading: false,
isSearching: false,
wholeList: [],
renderList: [],
};
Expand Down Expand Up @@ -144,8 +166,13 @@
}
list = list.filter(item => reg.test(item[realKey]));
});
this.isSearching = Object.keys(payload).length > 0;
this.renderList = Object.freeze(list);
},
handleClearSearch() {
this.$refs.searchSelect.reset();
this.handleSearch({});
},
/**
* @desc 查看引用脚本的执行方案详情
* @param {Object} payload 应用字段数据
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<template>
<div>
<jb-search-select
ref="searchSelect"
:data="searchSelect"
:placeholder="$t('script.搜索名称,版本号')"
:popover-zindex="99999"
Expand Down Expand Up @@ -61,6 +62,25 @@
<span v-html="row.statusHtml" />
</template>
</bk-table-column>
<empty
v-if="isSearching"
slot="empty"
type="search">
<div>
<div style="font-size: 14px; color: #63656e;">
{{ $t('搜索结果为空') }}
</div>
<div style="margin-top: 8px; font-size: 12px; line-height: 16px; color: #979ba5;">
<span>{{ $t('可以尝试调整关键词') }}</span>
<span>{{ $t('') }}</span>
<bk-button
text
@click="handleClearSearch">
{{ $t('清空搜索条件') }}
</bk-button>
</div>
</div>
</empty>
</bk-table>
</div>
</div>
Expand All @@ -74,6 +94,7 @@
encodeRegexp,
} from '@utils/assist';
import Empty from '@components/empty';
import JbSearchSelect from '@components/jb-search-select';
import I18n from '@/i18n';
Expand All @@ -92,6 +113,7 @@
data() {
return {
isLoading: false,
isSearching: false,
wholeList: [],
renderList: [],
};
Expand Down Expand Up @@ -143,8 +165,13 @@
}
list = list.filter(item => reg.test(item[realKey]));
});
this.isSearching = Object.keys(payload).length > 0;
this.renderList = Object.freeze(list);
},
handleClearSearch() {
this.$refs.searchSelect.reset();
this.handleSearch({});
},
/**
* @desc 查看引用脚本的作业模板详情
* @param {Object} payload 应用字段数据
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/script-manage/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@
<template slot-scope="{ row }">
<bk-button
v-bk-tooltips.right.allowHtml="`
<div>${$t('script.作业模板引用')}: ${row.relatedTaskTemplateNum}</div>
<div>${$t('script.执行方案引用')}: ${row.relatedTaskPlanNum}</div>`"
<div>${$t('script.作业模板引用')}: ${row.relatedTaskTemplateNum}</div>
<div>${$t('script.执行方案引用')}: ${row.relatedTaskPlanNum}</div>`"
class="mr20"
text
@click="handleShowRelated(row)">
Expand Down

0 comments on commit f7030bf

Please sign in to comment.