-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(28974): refactor the group metadata editor * feat(28974): add list of nodes in the group * refactor(28974): refactor event log to allow fine-grained configurati… * refactor(28974): export the adapter status component * refactor(28974): change the rendering options for unknown status * refactor(28974): change the option for the local event log * feat(28974): redesign the group side panel * feat(28974): update translations * fix(28974): fix bug with undefined filtered node * refactor(28974): fix pagination bar * refactor(28974): fix action toolbars * refactor(28974): fix translations * teat(28974): fix teats * chore(28974): a bit of cleaning * refactor(28974): fix translations * test(28974): add tests * fix(28974): fix rendering of node type * test(28974): add tests * test(28974): add tests * fix(28974): fix block * fix(28974): fix the magic code * fix(28974): fix a bug with the metrics container * test(28974): fix tests
- Loading branch information
Showing
17 changed files
with
484 additions
and
109 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
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
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
...ntend/src/modules/ProtocolAdapters/components/adapters/AdapterStatusContainer.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,20 @@ | ||
import { AdapterStatusContainer } from '@/modules/ProtocolAdapters/components/adapters/AdapterStatusContainer.tsx' | ||
import { mockAdapterConnectionStatus } from '@/api/hooks/useConnection/__handlers__' | ||
import { MOCK_ADAPTER_ID } from '@/__test-utils__/mocks.ts' | ||
|
||
describe('AdapterStatusContainer', () => { | ||
beforeEach(() => { | ||
cy.viewport(800, 900) | ||
cy.intercept('api/v1/management/protocol-adapters/status', { items: [mockAdapterConnectionStatus] }).as('getStatus') | ||
}) | ||
|
||
it('should render properly an existing adapter', () => { | ||
cy.mountWithProviders(<AdapterStatusContainer id={MOCK_ADAPTER_ID} />) | ||
cy.getByTestId('connection-status').should('have.text', 'Connected') | ||
}) | ||
|
||
it('should render unknown if not an adapter', () => { | ||
cy.mountWithProviders(<AdapterStatusContainer id="not-an-adapter" />) | ||
cy.getByTestId('connection-status').should('have.text', 'Unknown') | ||
}) | ||
}) |
11 changes: 11 additions & 0 deletions
11
.../src/frontend/src/modules/ProtocolAdapters/components/adapters/AdapterStatusContainer.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,11 @@ | ||
import { FC } from 'react' | ||
import { useGetAdaptersStatus } from '@/api/hooks/useConnection/useGetAdaptersStatus.ts' | ||
import { ConnectionStatusBadge } from '@/components/ConnectionStatusBadge' | ||
|
||
export const AdapterStatusContainer: FC<{ id: string }> = ({ id }) => { | ||
const { data: connections } = useGetAdaptersStatus() | ||
|
||
const connection = connections?.items?.find((e) => e.id === id) | ||
|
||
return <ConnectionStatusBadge status={connection} /> | ||
} |
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
Oops, something went wrong.