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

Hotfix 3.6.x #1770

Merged
merged 5 commits into from
Feb 24, 2023
Merged
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
5 changes: 3 additions & 2 deletions src/frontend/src/components/jb-edit/textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<div
class="render-text-box"
ref="valueTextBox"
v-bk-overflow-tips="renderText"
@copy="handleCopy"
:style="boxStyles">
<slot v-bind:value="newVal">{{ renderText }}</slot>
Expand Down Expand Up @@ -206,15 +207,15 @@
$el.style.wordBreak = 'keep-all';
$el.style.whiteSpace = 'pre';
}

this.$refs.valueTextBox.appendChild($el);

const lineHeight = 24;
const maxLine = 3;
const maxHeight = lineHeight * maxLine;
let realHeight = 0;
let realLength = 1;

const calcLength = () => {
const text = this.newVal.slice(0, realLength);
$el.innerText = `${text} 展开展开`;
Expand Down
10 changes: 7 additions & 3 deletions src/frontend/src/views/executive-history/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@
name: I18n.t('history.等待确认'),
id: 7,
},
{
name: I18n.t('history.状态异常'),
id: 9,
},
{
name: I18n.t('history.强制终止中'),
id: 10,
Expand Down Expand Up @@ -496,15 +500,15 @@
startTime: '',
endTime: '',
};

const currentTime = new Date().getTime();

if (Object.prototype.hasOwnProperty.call(this.$route.query, 'startTime')) {
defaultDateTime[0] = this.$route.query.startTime;
} else {
defaultDateTime[0] = prettyDateTimeFormat(currentTime - 86400000);
}

searchParams.startTime = defaultDateTime[0]; // eslint-disable-line prefer-destructuring

if (Object.prototype.hasOwnProperty.call(this.$route.query, 'endTime')) {
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/views/executive-history/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default {
执行成功: 'Successful',
执行失败: 'Failed',
等待确认: 'Waiting',
状态异常: 'Abnormal',
强制终止中: 'Terminating',
强制终止成功: 'Terminated',
强制终止失败: 'Terminate failed',
Expand Down
30 changes: 30 additions & 0 deletions src/frontend/src/views/script-manage/version/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</bk-button>
<template #right>
<jb-search-select
ref="searchSelect"
@on-change="handleSearch"
:data="searchSelect"
:placeholder="$t('script.选择匹配的字段并输入关键字进行搜索')"
Expand Down Expand Up @@ -258,6 +259,25 @@
:size="tableSize"
@setting-change="handleSettingChange" />
</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>
<template slot="flod">
<component
Expand Down Expand Up @@ -341,6 +361,7 @@
import PublicScriptService from '@service/public-script-manage';
import NotifyService from '@service/notify';
import ScriptModel from '@model/script/script';
import Empty from '@components/empty';
import JbSearchSelect from '@components/jb-search-select';
import ListActionLayout from '@components/list-action-layout';
import JbPopoverConfirm from '@components/jb-popover-confirm';
Expand All @@ -367,6 +388,7 @@
export default {
name: 'ScriptVersion',
components: {
Empty,
ListActionLayout,
JbPopoverConfirm,
JbSearchSelect,
Expand All @@ -384,6 +406,7 @@
isLoading: false,
isListFlod: false,
isShowNewVersion: false,
isSearching: false,
showDiff: false,
dataMemo: [],
data: [],
Expand Down Expand Up @@ -700,8 +723,15 @@
});
});
this.data = Object.freeze(scriptVersionList);
this.isSearching = Object.keys(payload).length > 0;
this.handleLayoutFlod();
},
/**
* @desc 清空搜索
*/
handleClearSearch () {
this.$refs.searchSelect.reset();
},
/**
* @desc 列表排序
* @param {Object} payload 排序字段
Expand Down
17 changes: 11 additions & 6 deletions src/frontend/src/views/ticket-manage/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
width="300"
prop="id"
key="id"
align="left">
align="left"
show-overflow-tooltip>
<template slot-scope="{ row }">
<span>{{ row.id }}</span>
</template>
Expand Down Expand Up @@ -91,7 +92,8 @@
prop="description"
key="description"
min-width="150"
align="left">
align="left"
show-overflow-tooltip>
<template slot-scope="{ row }">
<span>{{ row.description || '--' }}</span>
</template>
Expand Down Expand Up @@ -128,7 +130,8 @@
width="120"
prop="creator"
key="creator"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.createTime"
:label="$t('ticket.创建时间')"
Expand All @@ -142,14 +145,16 @@
prop="lastModifyUser"
key="lastModifyUser"
width="120"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.lastModifyTime"
:label="$t('ticket.更新时间')"
prop="lastModifyTime"
key="lastModifyTime"
width="180"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
:label="$t('ticket.操作')"
:resizable="false"
Expand Down Expand Up @@ -261,7 +266,7 @@
return {
title: I18n.t('ticket.新建凭证'),
okText: I18n.t('ticket.提交'),

};
}
return {
Expand Down
18 changes: 12 additions & 6 deletions src/frontend/src/views/white-ip/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,37 +75,43 @@
:label="$t('whiteIP.生效范围.colHead')"
prop="scopeText"
key="scopeText"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.appText"
:label="$t('whiteIP.目标业务.colHead')"
prop="appText"
key="appText"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.creator"
:label="$t('whiteIP.创建人')"
prop="creator"
key="creator"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.createTime"
:label="$t('whiteIP.创建时间')"
prop="createTime"
key="createTime"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.lastModifier"
:label="$t('whiteIP.更新人')"
prop="lastModifier"
key="lastModifier"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
v-if="allRenderColumnMap.lastModifyTime"
:label="$t('whiteIP.更新时间')"
prop="lastModifyTime"
key="lastModifyTime"
align="left" />
align="left"
show-overflow-tooltip />
<bk-table-column
:label="$t('whiteIP.操作')"
:resizable="false"
Expand Down