Skip to content

Commit

Permalink
Merge pull request #2989 from emqx/dev/1.10.1
Browse files Browse the repository at this point in the history
Sync code from refs/heads/dev/1.10.1 to enterprise
  • Loading branch information
Kinplemelon authored Sep 29, 2024
2 parents 068ed3b + f7f4ea6 commit f8f9893
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/OverflowTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const detectContentOverflow = (ele: HTMLElement) => {
if (
isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) ||
isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) ||
isGreaterThan(ele.scrollWidth, cellChildWidth)
isGreaterThan(ele.scrollWidth, cellChildWidth, 1)
) {
return true
}
Expand Down
1 change: 1 addition & 0 deletions src/hooks/Rule/rule/useRuleForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default (): {
sql: transSQLFormDataToSQL(DEFAULT_SELECT, [from]),
actions: [],
description: '',
enable: true
})

const getRuleDataForUpdate = ({
Expand Down
2 changes: 1 addition & 1 deletion src/types/rule.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export interface BasicRule {
sql: string
actions: Array<OutputItem>
description: string
enable: boolean
}

export interface RuleForm extends BasicRule {
created_at: string
enable: boolean
from: FromData
}

Expand Down
11 changes: 10 additions & 1 deletion src/views/RuleEngine/Connector/ConnectorDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<template #content>
<div class="vertical-align-center">
<img :src="getBridgeIcon(connectorData.type)" />
<p class="block-title">{{ connectorName }}</p>
<div class="block-title">
<CommonOverflowTooltip :content="connectorName" />
</div>
<TargetItemStatus type="connector" :target="connectorData" is-tag />
<el-tag type="info" class="section-status">
{{ getTypeStr(connectorData.type) }}
Expand Down Expand Up @@ -123,6 +125,7 @@

<script setup lang="ts">
import { customValidate } from '@/common/tools'
import CommonOverflowTooltip from '@/components/CommonOverflowTooltip.vue'
import DetailHeader from '@/components/DetailHeader.vue'
import useBridgeTypeValue, {
useBridgeTypeIcon,
Expand Down Expand Up @@ -289,5 +292,11 @@ const submit = async () => {
.form-container {
width: 75%;
}
.block-title {
max-width: 200px;
}
.el-page-header__content {
max-width: 700px;
}
}
</style>
1 change: 1 addition & 0 deletions src/views/RuleEngine/components/RuleForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ const ruleValueDefault = {
sql: transSQLFormDataToSQL(DEFAULT_SELECT, [DEFAULT_FROM]),
actions: [],
description: '',
enable: true,
}
let modelValueCache = ''
Expand Down

0 comments on commit f8f9893

Please sign in to comment.