Skip to content

Commit

Permalink
feat(listener): add back the zone config to custom configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream authored and Kinplemelon committed May 10, 2024
1 parent 812fbfe commit e104e53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export const SEARCH_FORM_RES_PROPS = { sm: 12, md: 12, lg: 6 }
export const EMQX_VERSION = process.env.VUE_APP_EMQX_VERSION

const defaultUnexposedConfig = {
zone: 'default',
access_rules: ['allow all'],
enable_authn: true,
}
Expand Down
6 changes: 6 additions & 0 deletions src/hooks/Config/useListenerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ export default (gatewayName?: string | undefined): ListenerUtils => {
const transPort = (port: string) =>
portNeedsToTransReg.test(port) ? port.replace(':', '') : port

/**
* Extracts the differences between the default configuration object and the provided data object.
* @param type - The type of the configuration object.
* @param data - The data object to compare with the default configuration.
* @returns An object containing the differences between the default configuration and the provided data.
*/
function extractDifferences(type: keyof typeof unexposedConfigs, data: any) {
const defaultConfig = unexposedConfigs[type]
const diff: Record<string, any> = {}
Expand Down

0 comments on commit e104e53

Please sign in to comment.