-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(25265): Add a schema mapping editor to the subscriptions * feat(25265): add custom field for the outward subscription editor * feat(25265): add mocks * feat(25265): add mocks * refactor(25265): refactor the json schema browser * feat(25265): add list component for subscription * feat(25265): add placeholder for the data model components * feat(25265): add placeholder for mapping editor * feat(25265): add placeholder for the mapping item * feat(25265): add container for the subscription * feat(25265): add react query hooks for payloads * refactor(25265): refactor mocks * fix(25265): fix props * fix(25265): fix initial size of the side panel * refactor(25265): add the data models into the source and destination … * feat(25265): add topic selector * feat(25265): add handler for changes * refactor(25265): refactor topic and tag icons * fix(25265): fix mocks * feat(25265): add support for PLC Tags * refactor(25265): add placeholder for transformation editor * fix(25265): fix loader * fix(25265): add PLC Tags * fix(25265): add PLC Tags * fix(25265): fix layout * fix(25265): fix types * fix(25265): fix types * chore(25265): update dependencies * fix(25265): remove faker generator * feat(25265): add drag and drop * fix(25265): fix layout * feat(25265): add draggable flag to the property browser * refactor(25265): add support for mapping validation * chore(25265): linting * feat(25265): update translations * refactor(25265): fix the mocks * refactor(25265): fix types * fix(25265): fix extraction of object-based properties * feat(25265): serialise the mappings * refactor(25265): fix layout * chore(25265): eslint * chore(25265): bit of cleaning * test(25265): fix test * test(25265): add test * chore(25265): a bit of renaming * refactor(25265): export the custom border style for drop zones * refactor(25265): refactor main icons * refactor(25265): refactor tags * test(25265): add tests * test(25265): add tests * test(25265): add tests * test(25265): add tests * test(25265): add tests * test(25265): add tests * test(25265): add tests * test(25265): fix tests * test(25265): fix tests * refactor(25265): fix button size * fix(25265): fix bug with finding mapping * test(25265): add tests * test(25265): fix coverage * refactor(25265): refactor component * refactor(25265): refactor component * test(25265): add tests * fix(25265): fix creatable status * test(25265): add tests * fix(25265): fix review issues
- Loading branch information
Showing
64 changed files
with
1,587 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
hivemq-edge/src/frontend/src/api/hooks/useTopicOntology/useGetDeviceTags.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useQuery } from '@tanstack/react-query' | ||
import { QUERY_KEYS } from '@/api/utils.ts' | ||
|
||
import { ApiError } from '@/api/__generated__' | ||
import { DeviceTags } from '@/modules/Subscriptions/types.ts' | ||
import { MOCK_DEVICE_TAGS } from '@/api/hooks/useTopicOntology/__handlers__' | ||
|
||
/** | ||
* @deprecated This is a mock, replace with https://hivemq.kanbanize.com/ctrl_board/57/cards/25736/details/ | ||
*/ | ||
export const useGetDeviceTags = (adapterId: string | undefined) => { | ||
return useQuery<DeviceTags[], ApiError>({ | ||
queryKey: [QUERY_KEYS.ADAPTERS, adapterId, QUERY_KEYS.DISCOVERY_TAGS], | ||
queryFn: async () => { | ||
await new Promise((resolve) => setTimeout(resolve, 1000)) | ||
return MOCK_DEVICE_TAGS | ||
}, | ||
enabled: Boolean(adapterId), | ||
}) | ||
} |
18 changes: 18 additions & 0 deletions
18
hivemq-edge/src/frontend/src/api/hooks/useTopicOntology/useGetSubscriptionPayloads.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { useQuery } from '@tanstack/react-query' | ||
import { QUERY_KEYS } from '@/api/utils.ts' | ||
|
||
import { ApiError, JsonNode } from '@/api/__generated__' | ||
|
||
/** | ||
* @deprecated This is a mock, replace with https://hivemq.kanbanize.com/ctrl_board/57/cards/25257/details/ | ||
*/ | ||
export const useGetSubscriptionPayloads = (topic: string | string[], adapter?: string) => { | ||
return useQuery<JsonNode, ApiError>({ | ||
queryKey: [QUERY_KEYS.DISCOVERY_PAYLOADS, topic], | ||
queryFn: async () => { | ||
await new Promise((resolve) => setTimeout(resolve, 1000)) | ||
return [] | ||
}, | ||
enabled: Boolean(adapter), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
hivemq-edge/src/frontend/src/components/Icons/TopicIcon.spec.cy.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { ClientIcon, PLCTagIcon, TopicIcon } from '@/components/Icons/TopicIcon.tsx' | ||
|
||
describe('TopicIcon', () => { | ||
beforeEach(() => { | ||
cy.viewport(100, 100) | ||
}) | ||
|
||
it('should render properly ', () => { | ||
cy.mountWithProviders(<TopicIcon />) | ||
cy.get('svg').should('have.attr', 'aria-label', 'Topic') | ||
cy.percySnapshot('Component: TopicIcon') | ||
}) | ||
}) | ||
|
||
describe('PLCTagIcon', () => { | ||
beforeEach(() => { | ||
cy.viewport(100, 100) | ||
}) | ||
|
||
it('should render properly ', () => { | ||
cy.mountWithProviders(<PLCTagIcon />) | ||
cy.get('svg').should('have.attr', 'aria-label', 'Tag') | ||
cy.percySnapshot('Component: PLCTagIcon') | ||
}) | ||
}) | ||
|
||
describe('ClientIcon', () => { | ||
beforeEach(() => { | ||
cy.viewport(100, 100) | ||
}) | ||
|
||
it('should render properly ', () => { | ||
cy.mountWithProviders(<ClientIcon />) | ||
cy.get('svg').should('have.attr', 'aria-label', 'Client') | ||
cy.percySnapshot('Component: ClientIcon') | ||
}) | ||
}) |
Oops, something went wrong.