Skip to content

Commit

Permalink
Merge pull request #587 from nanasikeai/feat_rule_audit
Browse files Browse the repository at this point in the history
fix: 设计走查问题 --bug=138240617
  • Loading branch information
viouse authored Feb 19, 2025
2 parents afd7f8d + 959be5a commit 31dbef3
Show file tree
Hide file tree
Showing 21 changed files with 147 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
trigger="click"
@after-hidden="handleAfterShow"
@after-show="handleAfterShow">
<div
class="join-type"
:class="[isShow ? 'is-show' : '']">
<div class="join-type">
<relation-ship
active
:join-type="joinType"
Expand Down Expand Up @@ -78,6 +76,7 @@
margin-bottom: 8px;
cursor: pointer;
background: #e1ecff;
border: 1px solid #9bc0ff;
border-radius: 4px;
align-items: center;
justify-content: center;
Expand All @@ -98,10 +97,6 @@
color: #3a84ff;
background-color: #e1ecff;
}

.is-show {
border: 1px solid #9bc0ff;
}
</style>
<style>
.link-data-join-type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@
</div>
<div class="icon-group">
<audit-icon
style="margin-right: 10px;"
style="margin-right: 10px; cursor: pointer;"
type="add-fill"
@click="handleAdd" />
<audit-icon
v-if="index !== 0"
v-if="linkFields.length > 1"
style="cursor: pointer;"
type="reduce-fill"
@click="() => handleDelete(index)" />
</div>
Expand Down Expand Up @@ -245,8 +246,8 @@
.icon-group {
width: 36px;
margin-bottom: 8px;
font-size: 14px;
color: #c4c6cc;
cursor: pointer;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@
:right-table-rt-id="link.right_table.rt_id" />
<!-- 删除关联关系 -->
<audit-icon
v-if="index !== 0"
v-if="links.length > 1"
class="delete-link"
style="font-size: 14px;"
type="delete"
@click="() => handleDelete(index)" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
to the current version of the project delivered to anyone in the future.
-->
<template>
<div class="detail-base-info">
<div
class="detail-base-info"
:style="borderStyle">
<div class="title">
{{ data.title }}
</div>
Expand Down Expand Up @@ -360,6 +362,9 @@
.find(item => item.id === props.data.rule_id && item.version === props.data.rule_version);
return item && item.name ? item.name : '';
});
const borderStyle = computed(() => ({
'border-top': `6px solid ${riskLevelMap[props.data.risk_level]?.color}`,
}));

// 获取标签列表
useRequest(RiskManageService.fetchRiskTags, {
Expand Down Expand Up @@ -388,7 +393,6 @@
position: relative;
padding: 10px 16px;
background: #fff;
border-top: 6px solid #ffb848;
border-radius: 2px;
box-shadow: 0 2px 4px 0 #1919290d;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
const props = defineProps<Props>();
const router = useRouter();
const { t, locale } = useI18n();
const labelWidth = computed(() => (locale.value === 'en-US' ? 120 : 80));
const labelWidth = computed(() => (locale.value === 'en-US' ? 160 : 120));
const linkEventList = ref<Array<EventModel>>([]); // 事件列表
const currentPage = ref(1); // 当前页数
const active = ref<number>(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
const props = defineProps<Props>();
const labelStyle = computed(() => ({
'min-width': `${props.labelWidth || 80}px`,
'max-width': `${props.labelWidth || 80}px`,
flex: '0 0 auto',
}));
</script>
Expand All @@ -61,6 +62,8 @@
color: #63656e;
text-align: right;
flex: 0 0 60px;
word-break: break-all;
word-wrap: break-word;
}

.info-value {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/rule-manage/create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,9 @@
position: relative;
height: 32px;

.consition-value {
/* .consition-value {
width: 560px;
}
} */
}

.condition-icon {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/storage-manage/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<template #footer>
<div
:class="{'footer-fixed':disabled}"
style="padding-left: 40px;">
style="padding-left: 16px;">
<bk-button
v-if="!disabled"
v-bk-tooltips="t('请先完成连通性测试')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
.collapse-panel {
.collapse-panel-title {
display: flex;
height: 32px;
height: 28px;
padding-left: 8px;
font-size: 14px;
font-weight: 700;
line-height: 32px;
line-height: 28px;
color: #63656e;
cursor: pointer;
background: #eaebf0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@

.bk-tab-content {
height: 100%;
padding: 24px;
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions src/frontend/src/views/strategy-manage/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,24 @@
<template #header>
<div
class="flex"
style="width: 100%;padding-right: 40px;justify-content: space-between;">
<div>
style="width: 100%; padding-right: 40px; justify-content: space-between;">
<div
class="flex"
style="align-items: center;">
{{ t('策略详情') }}
<bk-button
v-bk-tooltips="t('复制链接')"
text
theme="primary"
@click="handleCopyLink">
<audit-icon
style="font-size: 14px;"
style=" margin-left: 14px;font-size: 14px;"
type="link" />
</bk-button>
<div style="height: 14px; margin: 0 10px; border-left: 1px solid #979ba5;" />
<div style=" font-size: 14px;color: #979ba5;">
{{ strategyItem.strategy_name }}
</div>
</div>
<div style="margin-left: auto;">
<auth-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
to the current version of the project delivered to anyone in the future.
-->
<template>
<div class="detail-base-info">
<div
class="detail-base-info"
:style="borderStyle">
<div class="title">
{{ data.risk_title }}
</div>
Expand Down Expand Up @@ -291,7 +293,7 @@
name: string,
}>,
}
defineProps<Props>();
const props = defineProps<Props>();
const statusToMap: Record<string, {
theme: 'info' | 'warning' | 'success' | 'danger' | undefined,
icon: string,
Expand Down Expand Up @@ -343,9 +345,13 @@
const { t, locale } = useI18n();

const isShowMore = ref(false);
const labelWidth = computed(() => (locale.value === 'en-US' ? 120 : 80));
const strategyTagMap = ref<Record<string, string>>({});

const labelWidth = computed(() => (locale.value === 'en-US' ? 120 : 80));
const borderStyle = computed(() => ({
'border-top': `6px solid ${riskLevelMap[props.data.risk_level].color}`,
}));

// 获取标签列表
useRequest(RiskManageService.fetchRiskTags, {
defaultParams: {
Expand All @@ -363,6 +369,12 @@
</script>
<style lang="postcss" scoped>
.detail-base-info {
position: relative;
padding: 10px 16px;
background: #fff;
border-radius: 2px;
box-shadow: 0 2px 4px 0 #1919290d;

.title {
margin-bottom: 10px;
font-size: 14px;
Expand All @@ -371,13 +383,6 @@
color: #313238;
}

position: relative;
padding: 10px 16px;
background: #fff;
border-top: 6px solid #ffb848;
border-radius: 2px;
box-shadow: 0 2px 4px 0 #1919290d;

.render-info-item {
min-width: 50%;
align-items: flex-start;
Expand Down
Loading

0 comments on commit 31dbef3

Please sign in to comment.