Skip to content
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"js-base64": "^3.7.2",
"json-to-avro": "^1.1.1",
"lodash": "^4.17.21",
"lucide-vue-next": "^0.553.0",
"marked": "^4.0.9",
"monaco-editor": "^0.30.0",
"mqtt": "^4.2.8",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/assets/img/aws_timestream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ declare global {
const BACKGROUND_CIRCLE_RADIUS: typeof import('./hooks/Overview/useNodesGraph')['BACKGROUND_CIRCLE_RADIUS']
const BANNED_NEVER_EXPIRE_VALUE: typeof import('./common/constants')['BANNED_NEVER_EXPIRE_VALUE']
const BATCH_UPLOAD_CSV_MAX_ROWS: typeof import('./common/constants')['BATCH_UPLOAD_CSV_MAX_ROWS']
const BRIDGE_TYPES_LIKE_INFLUXDB: typeof import('./common/constants')['BRIDGE_TYPES_LIKE_INFLUXDB']
const BRIDGE_TYPES_NOT_USE_SCHEMA: typeof import('./common/constants')['BRIDGE_TYPES_NOT_USE_SCHEMA']
const CER_FILE_ACCEPTS: typeof import('./common/constants')['CER_FILE_ACCEPTS']
const COMMON_ID_REG: typeof import('./common/constants')['COMMON_ID_REG']
Expand Down Expand Up @@ -610,6 +611,7 @@ declare module 'vue' {
readonly BACKGROUND_CIRCLE_RADIUS: UnwrapRef<typeof import('./hooks/Overview/useNodesGraph')['BACKGROUND_CIRCLE_RADIUS']>
readonly BANNED_NEVER_EXPIRE_VALUE: UnwrapRef<typeof import('./common/constants')['BANNED_NEVER_EXPIRE_VALUE']>
readonly BATCH_UPLOAD_CSV_MAX_ROWS: UnwrapRef<typeof import('./common/constants')['BATCH_UPLOAD_CSV_MAX_ROWS']>
readonly BRIDGE_TYPES_LIKE_INFLUXDB: UnwrapRef<typeof import('./common/constants')['BRIDGE_TYPES_LIKE_INFLUXDB']>
readonly BRIDGE_TYPES_NOT_USE_SCHEMA: UnwrapRef<typeof import('./common/constants')['BRIDGE_TYPES_NOT_USE_SCHEMA']>
readonly CER_FILE_ACCEPTS: UnwrapRef<typeof import('./common/constants')['CER_FILE_ACCEPTS']>
readonly COMMON_ID_REG: UnwrapRef<typeof import('./common/constants')['COMMON_ID_REG']>
Expand Down
7 changes: 6 additions & 1 deletion src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ export const ADMIN_USERNAMES = ['admin', 'root', 'administrator']
const { VITE_APP_VERSION } = import.meta.env
export const IS_ENTERPRISE = VITE_APP_VERSION === 'enterprise'

export const BRIDGE_TYPES_NOT_USE_SCHEMA = [BridgeType.InfluxDB, BridgeType.Datalayers]
export const BRIDGE_TYPES_LIKE_INFLUXDB = [
BridgeType.InfluxDB,
BridgeType.Datalayers,
BridgeType.AWSTimestream,
]
export const BRIDGE_TYPES_NOT_USE_SCHEMA = [...BRIDGE_TYPES_LIKE_INFLUXDB]

export const CONNECTOR_TYPES_WITH_TWO_DIRECTIONS = [BridgeType.MQTT, BridgeType.RabbitMQ]

Expand Down
4 changes: 3 additions & 1 deletion src/components/AdvancedSettingsBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
@click="toggle"
>
{{ buttonText ?? tl('advancedSettings') }}
<Icon icon="lucide:chevron-right" :class="{ 'is-rotate': modelValue }" class="icon-arrow" />
<ChevronRight :class="{ 'is-rotate': modelValue }" class="icon-arrow" />
</div>
</template>

<script setup lang="ts">
import { ChevronRight } from 'lucide-vue-next'

const props = defineProps({
modelValue: {
type: Boolean,
Expand Down
6 changes: 4 additions & 2 deletions src/components/Buttons/CreateButton.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<template>
<el-button type="primary" v-if="noText" :disabled="!$hasPermission('post')">
<Icon icon="lucide:plus" />
<Plus />
</el-button>
<el-button type="primary" v-else :disabled="!$hasPermission('post')">
<Icon icon="lucide:plus" class="mr-2" />
<Plus class="mr-2" />
<template v-if="!$slots.default">{{ t('Base.create') }}</template>
<slot />
</el-button>
</template>

<script setup lang="ts">
import { Plus } from 'lucide-vue-next'

defineProps<{
noText?: boolean
}>()
Expand Down
4 changes: 3 additions & 1 deletion src/components/Buttons/DeleteButton.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<template>
<el-tooltip :content="tooltipCon" placement="top" :hide-after="0">
<el-button class="icon-button delete-button" plain :disabled="disableButton" v-bind="$attrs">
<Icon icon="lucide:trash-2" />
<Trash2 />
</el-button>
</el-tooltip>
</template>

<script setup lang="ts">
import { Trash2 } from 'lucide-vue-next'

const props = defineProps<{
disabled?: boolean
tooltipContent?: string
Expand Down
8 changes: 4 additions & 4 deletions src/components/Buttons/RefreshButton.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<template>
<el-button v-if="noText" @click="handleClick">
<Icon
icon="lucide:refresh-cw"
<RefreshCw
:class="isSpinning ? 'animate-spin' : ''"
class="transition-transform duration-600"
/>
</el-button>
<el-button v-else @click="handleClick">
<Icon
icon="lucide:refresh-cw"
<RefreshCw
:class="isSpinning ? 'animate-spin' : ''"
class="mr-2 transition-transform duration-600"
/>
Expand All @@ -20,6 +18,8 @@
</template>

<script setup lang="ts">
import { RefreshCw } from 'lucide-vue-next'

defineProps<{
noText?: boolean
}>()
Expand Down
4 changes: 3 additions & 1 deletion src/components/Buttons/ResetButton.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<el-tooltip :content="t('Base.reset')" placement="top" :hide-after="0">
<el-button class="icon-button" plain v-bind="$attrs">
<Icon icon="lucide:rotate-ccw" />
<RotateCcw />
</el-button>
</el-tooltip>
</template>

<script lang="ts" setup>
import { RotateCcw } from 'lucide-vue-next'

const { t } = useI18n()
</script>
4 changes: 3 additions & 1 deletion src/components/Buttons/SearchButton.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<el-tooltip :content="tl('search')" placement="top" :hide-after="0">
<el-button class="icon-button" plain v-bind="$attrs">
<Icon icon="lucide:search" />
<Search />
</el-button>
</el-tooltip>
</template>

<script setup lang="ts">
import { Search } from 'lucide-vue-next'

const { tl } = useI18nTl('Base')
</script>
4 changes: 3 additions & 1 deletion src/components/Buttons/SettingsButton.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template>
<el-button :disabled="!$hasPermission('put')">
<Icon icon="lucide:settings" class="mr-2" />
<Settings class="mr-2" />
{{ tl('setting') }}
</el-button>
</template>

<script setup lang="ts">
import { Settings } from 'lucide-vue-next'

const { tl } = useI18nTl('Base')
</script>
5 changes: 3 additions & 2 deletions src/components/KeyAndValueEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
@input="atInputChange"
/>
<el-button class="btn-del" link @click="deleteItem(item)">
<el-icon :size="16"><Icon icon="lucide:trash-2" /></el-icon>
<el-icon :size="16"><Trash2 /></el-icon>
</el-button>
</li>
</ul>
<el-button link type="primary" @click="addColumn">
<Icon icon="lucide:plus" class="mr-2" />
<Plus class="mr-2" />
{{ t('Base.add') }}
</el-button>
</div>
Expand All @@ -102,6 +102,7 @@
</template>

<script lang="ts" setup>
import { Plus, Trash2 } from 'lucide-vue-next'
import InputWithPlaceholderSelect from './InputWithPlaceholderSelect.vue'

enum State {
Expand Down
9 changes: 6 additions & 3 deletions src/components/LicensePromotion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
{{ t('Base.promoOrTry') }}
<a :href="cloudServiceUrl" target="_blank" class="chip-link" rel="noopener noreferrer">
{{ t('Base.promoManagedServiceText') }}
</a> </span
><button class="chip-close" type="button" @click="dismiss" aria-label="Dismiss promotion">
<Icon icon="lucide:x" class="chip-close-icon" aria-hidden="true" />
</a>
</span>
<button class="chip-close" type="button" @click="dismiss" aria-label="Dismiss promotion">
<X class="chip-close-icon" aria-hidden="true" />
</button>
</div>
</template>

<script lang="ts" setup>
import { X } from 'lucide-vue-next'

const { t } = useI18n()
const store = useStore()
const { docMap } = useDocLink()
Expand Down
3 changes: 2 additions & 1 deletion src/components/Metrics/OverviewMetrics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:disabled="!$hasPermission('put')"
@click="resetStatistics"
>
<Icon icon="lucide:x" class="w-4 h-4" />
<X class="w-4 h-4" />
</el-button>
</el-tooltip>
</div>
Expand Down Expand Up @@ -181,6 +181,7 @@ import {
useRateChart,
} from '@/hooks/useMetrics'
import { Metrics, MetricsDataWithExtraData, SetItem } from '@/types/common'
import { X } from 'lucide-vue-next'
import TypeMetrics from './TypeMetrics.vue'

type MetricsData = MetricsDataWithExtraData<unknown>
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/Flow/useNodeForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default (): {
isUsingSchemaBridgeType: (type: string) => boolean
checkFormIsEmpty: (type: string, form: Record<string, any>) => boolean
} => {
const { createRawInfluxDBForm, createRawDataLayersForm } = useBridgeFormCreator()
const { createRawInfluxDBForm, createRawDataLayersForm, createRawAWSTimestreamForm } =
useBridgeFormCreator()
/**
* If you are using a schema bridge, create an empty object directly
*/
Expand All @@ -94,6 +95,7 @@ export default (): {
[SinkType.Console]: () => getCommonFormDataByType(SinkType.Console),
[SinkType.InfluxDB]: createRawInfluxDBForm,
[SinkType.Datalayers]: createRawDataLayersForm,
[SinkType.AWSTimestream]: createRawAWSTimestreamForm,
[SinkType.Pulsar]: emptyCreator,
}
const getFormDataByType = (type: string) => {
Expand Down
7 changes: 7 additions & 0 deletions src/hooks/Rule/bridge/useBridgeFormCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { OtherBridge } from '@/types/rule'
export default (): {
createRawInfluxDBForm: () => OtherBridge
createRawDataLayersForm: () => OtherBridge
createRawAWSTimestreamForm: () => OtherBridge
} => {
const { createDefaultResourceOptsForm } = useResourceOpt()

Expand All @@ -29,8 +30,14 @@ export default (): {
type: BridgeType.Datalayers,
})

const createRawAWSTimestreamForm = () => ({
...createRawInfluxDBForm(),
type: BridgeType.AWSTimestream,
})

return {
createRawInfluxDBForm,
createRawDataLayersForm,
createRawAWSTimestreamForm,
}
}
3 changes: 3 additions & 0 deletions src/hooks/Rule/bridge/useBridgeTypeValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const useBridgeTypeValue = (): {
{ value: BridgeType.AlloyDB, label: 'AlloyDB' },
{ value: BridgeType.CockroachDB, label: 'CockroachDB' },
{ value: BridgeType.Redshift, label: 'Redshift' },
{ value: BridgeType.AWSTimestream, label: 'Amazon Timestream' },
].sort((a, b) => (bridgeOrderIndex[a.value] ?? 99) - (bridgeOrderIndex[b.value] ?? 99))

/**
Expand Down Expand Up @@ -347,6 +348,7 @@ export const useConnectorSchema = (): {
[BridgeType.AlloyDB, getRef(BridgeType.AlloyDB, 'connector_')],
[BridgeType.CockroachDB, getRef(BridgeType.CockroachDB, 'connector_')],
[BridgeType.Redshift, getRef(BridgeType.Redshift, 'connector_')],
[BridgeType.AWSTimestream, getRef(BridgeType.AWSTimestream, 'connector_')],
])

const typeWithMultipleRefKeyMap: Map<BridgeType, Array<string>> = new Map([
Expand Down Expand Up @@ -413,6 +415,7 @@ export const useActionSchema = (): {
[BridgeType.AlloyDB, getRef(BridgeType.AlloyDB, 'action_')],
[BridgeType.CockroachDB, getRef(BridgeType.CockroachDB, 'action_')],
[BridgeType.Redshift, getRef(BridgeType.Redshift, 'action_')],
[BridgeType.AWSTimestream, getRef(BridgeType.AWSTimestream, 'action_')],
])
const getSchemaRefByType = (type: string) => {
const ref = specialActionTypeRefKeyMap.get(type)
Expand Down
1 change: 1 addition & 0 deletions src/hooks/Rule/connector/useConnectorComponentsHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ export default (
[BridgeType.MongoDB, mongoHandler],
[BridgeType.Redis, redisHandler],
[BridgeType.InfluxDB, influxDbHandler],
[BridgeType.AWSTimestream, influxDbHandler],
[BridgeType.AmazonKinesis, amazonKinesisHandler],
[BridgeType.GreptimeDB, greptimeDBHandler],
[BridgeType.Pulsar, pulsarHandler],
Expand Down
11 changes: 11 additions & 0 deletions src/hooks/Rule/connector/useSchemaConnectorPropsLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,17 @@ export default (
['server', 'parameters', 'token', 'org', 'bucket', 'database', 'username', 'password', 'ssl'],
fieldStartIndex,
),
[BridgeType.AWSTimestream]: createOrderObj(
[
'server',
'parameters.influxdb_type',
'parameters.token',
'parameters.org',
'parameters.bucket',
'parameters.ssl',
],
fieldStartIndex,
),
[BridgeType.IoTDB]: IoTDBOrderMap,
[BridgeType.Elasticsearch]: IoTDBOrderMap,
[BridgeType.AmazonKinesis]: createOrderObj(
Expand Down
Loading
Loading