Skip to content

Commit

Permalink
Merge branch 'dev/1.9.1' into enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon committed Jun 6, 2024
2 parents 0121436 + 7a5d49d commit 73fdba0
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 18 deletions.
10 changes: 7 additions & 3 deletions src/assets/iconfont/iconfont.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3836864 */
src: url('iconfont.woff2?t=1679307574272') format('woff2'),
url('iconfont.woff?t=1679307574272') format('woff'),
url('iconfont.ttf?t=1679307574272') format('truetype');
src: url('iconfont.woff2?t=1717490469048') format('woff2'),
url('iconfont.woff?t=1717490469048') format('woff'),
url('iconfont.ttf?t=1717490469048') format('truetype');
}

.iconfont {
Expand All @@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}

.icon-x:before {
content: "\e614";
}

.icon-twitter:before {
content: "\e736";
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/iconfont/iconfont.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/assets/iconfont/iconfont.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "40606647",
"name": "x",
"font_class": "x",
"unicode": "e614",
"unicode_decimal": 58900
},
{
"icon_id": "792496",
"name": "bird-小鸟",
Expand Down
Binary file modified src/assets/iconfont/iconfont.ttf
Binary file not shown.
Binary file modified src/assets/iconfont/iconfont.woff
Binary file not shown.
Binary file modified src/assets/iconfont/iconfont.woff2
Binary file not shown.
Binary file added src/assets/img/datadog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/common/docLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type DocKey =
| 'mqttV5'
| 'mqttClient'
| 'githubHome'
| 'twitterHome'
| 'xHome'
| 'youtubeHome'
| 'linkedInHome'
| 'emqxEnterprise'
Expand All @@ -32,6 +32,7 @@ type DocKey =
| 'learnConfig'
| 'restAPI'
| 'faq'
| 'datadogIntegration'
| 'applyLicense'
| 'influxDbBatchSettings'
| 'iotDbBatchSettings'
Expand Down Expand Up @@ -95,7 +96,7 @@ const createDocLinks = (lang: string): DocMap => {
mqttV5: `https://www.emqx.com/${lang}/blog/introduction-to-mqtt-5?${QUERY_FOR_HELP}`,
mqttClient: `https://www.emqx.com/${lang}/mqtt-client-sdk?${QUERY_FOR_HELP}`,
githubHome: 'https://github.com/emqx',
twitterHome: 'https://twitter.com/EMQTech',
xHome: 'https://x.com/EMQTech',
youtubeHome: 'https://www.youtube.com/channel/UC5FjR77ErAxvZENEWzQaO5Q',
linkedInHome: 'https://www.linkedin.com/company/emqtech',
emqxEnterprise: `https://www.emqx.com/${lang}/products/emqx?${QUERY_FOR_HELP}`,
Expand All @@ -104,6 +105,7 @@ const createDocLinks = (lang: string): DocMap => {
applyLicense: `https://www.emqx.com/${lang}/apply-licenses/emqx?${QUERY_FOR_LICENSE}`,
moreAboutMqtt: `https://www.emqx.com/${lang}/blog/category/mqtt?${QUERY_FOR_HELP}`,
contactUs: `https://www.emqx.com/${lang}/contact?${QUERY_FOR_HELP}`,
datadogIntegration: `https://docs.datadoghq.com/integrations/emqx/`,
feedback: lang === 'zh' ? 'https://askemq.com/c/emqx/5' : 'https://www.emqx.io/forum/c/emqx/5',
learnConfig: `https://docs.emqx.com/${lang}/enterprise/${EMQX_VERSION}/configuration/configuration.html?${QUERY_FOR_HELP}`,
restAPI: `https://docs.emqx.com/${lang}/enterprise/${EMQX_VERSION}/admin/api.html?${QUERY_FOR_HELP}`,
Expand Down
6 changes: 5 additions & 1 deletion src/components/SchemaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ const SchemaForm = defineComponent({
}
// Add new fields
Object.values(property.properties || {}).forEach((prop) => {
if (prop.path) {
if (!prop.path) {
return
}
const currentValue = _.get(configForm.value, prop.path)
if (_.isUndefined(currentValue)) {
_.set(configForm.value, prop.path, createInitValueByType(prop))
}
})
Expand Down
12 changes: 12 additions & 0 deletions src/i18n/MonitoringIntegration.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,16 @@ For example, <code> {'{'} Authorization = "some-authz-tokens"{'}'}</code>`,
zh: '日志级别',
en: 'Logs Level',
},
dataDogTip: {
zh: '无需配置额外参数,请参考{docUse}了解使用方法。更多详情请参阅 {docIntegration}。',
en: 'No extra configuration is required, please refer to {docUse} for usage. See {docIntegration} for more details.',
},
thisDoc: {
zh: '此文档',
en: 'this doc',
},
datadogIntegration: {
zh: 'Datadog - EMQX 集成',
en: 'Datadog - EMQX Integration',
},
}
1 change: 1 addition & 0 deletions src/types/schemas/authentication.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ export interface AuthnPostgresql {
query: string
enable?: boolean
server: string
disable_prepared_statements?: boolean
database: string
pool_size?: number
username: string
Expand Down
1 change: 1 addition & 0 deletions src/types/schemas/authorization.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ export interface AuthzPostgresql {
type: AuthzPostgresqlType
enable?: boolean
server: string
disable_prepared_statements?: boolean
database: string
pool_size?: number
username: string
Expand Down
1 change: 1 addition & 0 deletions src/types/schemas/gatewayAuthentication.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ export interface AuthnPostgresql {
query: string
enable?: boolean
server: string
disable_prepared_statements?: boolean
database: string
pool_size?: number
username: string
Expand Down
1 change: 1 addition & 0 deletions src/types/schemas/gatewayListeners.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,7 @@ export interface AuthnPostgresql {
query: string
enable?: boolean
server: string
disable_prepared_statements?: boolean
database: string
pool_size?: number
username: string
Expand Down
14 changes: 14 additions & 0 deletions src/views/Auth/components/DatabaseConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,20 @@
</el-form-item>
</el-col>
</template>
<template v-if="isPgSQL">
<el-col :span="12">
<el-form-item prop="disable_prepared_statements">
<template #label>
<FormItemLabel
:label="t('BridgeSchema.common.disable_prepared_statements.label')"
:desc="t('BridgeSchema.common.disable_prepared_statements.desc')"
/>
</template>
<el-switch v-model="databaseConfig.disable_prepared_statements" />
</el-form-item>
</el-col>
<el-col :span="12" />
</template>
<!-- MySQL & PgSQL -->
<el-col :span="24" v-if="isMySQL || isPgSQL">
<el-form-item required prop="query" class="label-whole-line">
Expand Down
37 changes: 34 additions & 3 deletions src/views/Config/Monitoring/MonitoringIntegration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:label-width="store.state.lang === 'zh' ? 176 : 190"
>
<el-row>
<el-col :xs="24" :sm="24" :md="24" :lg="14" :xl="12">
<el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="12">
<el-form-item class="radio-form-item">
<template #label>
<FormItemLabel
Expand All @@ -19,7 +19,12 @@
</template>
<el-radio-group class="platform-radio-group" v-model="selectedPlatform">
<el-row :gutter="28">
<el-col v-for="item in platformOpts" :key="item.label" :span="12">
<el-col
v-for="item in platformOpts"
:key="item.label"
:span="12"
class="col-radio"
>
<el-radio class="platform-radio" :label="item.label" border>
<img class="img-platform" height="52" :src="item.img" :alt="item.label" />
<span class="platform-name"> {{ item.label }} </span>
Expand Down Expand Up @@ -209,10 +214,23 @@
</template>
</el-row>
</template>
<!-- OpenTelemetry -->
<el-form-item v-if="selectedPlatform === DATADOG">
<i18n-t keypath="MonitoringIntegration.dataDogTip" tag="p" class="tip">
<template #docUse>
<a :href="docMap.documentation" target="_blank">{{ tl('thisDoc') }}</a>
</template>
<template #docIntegration>
<a :href="docMap.datadogIntegration" target="_blank">
{{ tl('datadogIntegration') }}
</a>
</template>
</i18n-t>
</el-form-item>
<el-col class="btn-col" :span="24">
<el-button
type="primary"
:disabled="!$hasPermission('put')"
:disabled="selectedPlatform === DATADOG || !$hasPermission('put')"
:loading="isSubmitting"
@click="submit"
>
Expand All @@ -233,6 +251,7 @@
import { getOpenTelemetry, getPrometheus, setOpenTelemetry, setPrometheus } from '@/api/common'
import opentelemetryImg from '@/assets/img/opentelemetry.png'
import promImg from '@/assets/img/prom.png'
import dataDogImg from '@/assets/img/datadog.png'
import { checkNOmitFromObj } from '@/common/tools'
import FormItemLabel from '@/components/FormItemLabel.vue'
import InfoTooltip from '@/components/InfoTooltip.vue'
Expand All @@ -249,14 +268,18 @@ import { useStore } from 'vuex'
import HelpDrawer from './components/HelpDrawer.vue'
import useSSL from '@/hooks/useSSL'
import CommonTLSConfig from '@/components/TLSConfig/CommonTLSConfig.vue'
import useDocLink from '@/hooks/useDocLink'
const PROMETHEUS = 'Prometheus'
const OPENTELEMETRY = 'OpenTelemetry'
const DATADOG = 'Datadog'
const { tl, t } = useI18nTl('MonitoringIntegration')
const store = useStore()
const { createSSLForm } = useSSL()
const { docMap } = useDocLink()
const platformOpts = [
{
label: PROMETHEUS,
Expand All @@ -268,6 +291,11 @@ const platformOpts = [
value: OPENTELEMETRY,
img: opentelemetryImg,
},
{
label: DATADOG,
value: DATADOG,
img: dataDogImg,
},
]
const selectedPlatform = ref(platformOpts[0].value)
Expand Down Expand Up @@ -415,6 +443,9 @@ const { addObserverToFooter } = useConfFooterStyle()
.platform-radio-group {
margin-top: 8px;
width: 100%;
.col-radio:nth-child(3) {
margin-top: 20px;
}
.el-row {
width: 100%;
}
Expand Down
6 changes: 1 addition & 5 deletions src/views/Settings/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const productList = [
const followUsList = [
{ link: docMap.githubHome, icon: 'icon-github' },
{ link: docMap.twitterHome, icon: 'icon-twitter' },
{ link: docMap.xHome, icon: 'icon-x' },
{ link: docMap.youtubeHome, icon: 'icon-youtube' },
{ link: docMap.linkedInHome, icon: 'icon-linkedin' },
]
Expand Down Expand Up @@ -245,10 +245,6 @@ const handleLinkGo = (key: 'feedback' | 'contactUs') => {
display: block;
.iconfont {
color: var(--color-text-secondary);
&.icon-twitter {
position: relative;
top: 2px;
}
&:hover {
color: var(--color-primary);
}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,9 @@
integrity sha512-okdrwiVeKBmW41Hkl0eMrXDjzJwhQMuKiBOu17rOszqM+LS/yBYpNQNV5Jvoh06Wc+89fMmb/uhzf8NZuDuUaQ==

"@emqx/shared-ui-i18n@~0.0.12":
version "0.0.19"
resolved "https://registry.yarnpkg.com/@emqx/shared-ui-i18n/-/shared-ui-i18n-0.0.19.tgz#41b41855975e148ac62671a461576f3ff11bab5c"
integrity sha512-giBjIa5e7snlAGpbktCpTFCj+juYFzRobNJ8Dl32oJm8gHCl9THW399VKRf7qBc6yrHNzWL612zyEajDiA4nIA==
version "0.0.20"
resolved "https://registry.yarnpkg.com/@emqx/shared-ui-i18n/-/shared-ui-i18n-0.0.20.tgz#5a7c1b4f65f5a2e7fe9345e47052da5b364ecc0a"
integrity sha512-ft3EE3034VBr27mlcjHVHHbdkTj4ewbk14UbmXDXeZqUQD6I7DbI1kyjIQgDvcyPq4L1ywOXiQKIbktkbNYvog==

"@emqx/shared-ui-utils@~0.0.11":
version "0.0.13"
Expand Down

0 comments on commit 73fdba0

Please sign in to comment.