diff --git a/packages/frinx-inventory-client/src/__generated__/graphql.ts b/packages/frinx-inventory-client/src/__generated__/graphql.ts index 44428f93e..18970bcfc 100644 --- a/packages/frinx-inventory-client/src/__generated__/graphql.ts +++ b/packages/frinx-inventory-client/src/__generated__/graphql.ts @@ -659,6 +659,7 @@ export type Device = Node & { name: Scalars['String']['output']; port: Maybe; serviceState: DeviceServiceState; + software: Maybe; source: DeviceSource; updatedAt: Scalars['String']['output']; vendor: Maybe; @@ -687,6 +688,11 @@ export type DeviceEdge = { node: Device; }; +export type DeviceListUsage = { + __typename?: 'DeviceListUsage'; + devicesUsage: Array>; +}; + export type DeviceOrderByInput = { direction: SortDirection; sortKey: SortDeviceBy; @@ -707,6 +713,19 @@ export type DeviceSource = | 'IMPORTED' | 'MANUAL'; +export type DeviceUsage = { + __typename?: 'DeviceUsage'; + cpuLoad: Scalars['Float']['output']; + memoryLoad: Scalars['Float']['output']; +}; + +export type DevicesUsage = { + __typename?: 'DevicesUsage'; + cpuLoad: Scalars['Float']['output']; + deviceName: Scalars['String']['output']; + memoryLoad: Scalars['Float']['output']; +}; + export type DiffData = { __typename?: 'DiffData'; data: Scalars['String']['output']; @@ -1075,13 +1094,12 @@ export type OutputParameters = { value: Scalars['String']['output']; }; -/** Holds information about the requested pagination page */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor: Maybe; + endCursor: Maybe; hasNextPage: Scalars['Boolean']['output']; hasPreviousPage: Scalars['Boolean']['output']; - startCursor: Maybe; + startCursor: Maybe; }; export type PaginationArgs = { @@ -3329,10 +3347,24 @@ export type DeviceInventoryQueryZonesArgs = { export type DeviceInventorySubscription = { __typename?: 'deviceInventorySubscription'; + deviceUsage: Maybe; + devicesUsage: Maybe; uniconfigShell: Maybe; }; +export type DeviceInventorySubscriptionDeviceUsageArgs = { + deviceName: Scalars['String']['input']; + refreshEverySec?: InputMaybe; +}; + + +export type DeviceInventorySubscriptionDevicesUsageArgs = { + deviceNames: Array; + refreshEverySec?: InputMaybe; +}; + + export type DeviceInventorySubscriptionUniconfigShellArgs = { input?: InputMaybe; sessionId: Scalars['String']['input']; @@ -3956,7 +3988,7 @@ export type DevicesQueryVariables = Exact<{ }>; -export type DevicesQuery = { __typename?: 'Query', deviceInventory: { __typename?: 'deviceInventoryQuery', devices: { __typename?: 'DeviceConnection', edges: Array<{ __typename?: 'DeviceEdge', node: { __typename?: 'Device', id: string, name: string, createdAt: string, isInstalled: boolean, serviceState: DeviceServiceState, zone: { __typename?: 'Zone', id: string, name: string } } }>, pageInfo: { __typename?: 'PageInfo', startCursor: any | null, endCursor: any | null, hasNextPage: boolean, hasPreviousPage: boolean } } } }; +export type DevicesQuery = { __typename?: 'Query', deviceInventory: { __typename?: 'deviceInventoryQuery', devices: { __typename?: 'DeviceConnection', edges: Array<{ __typename?: 'DeviceEdge', node: { __typename?: 'Device', id: string, name: string, createdAt: string, isInstalled: boolean, serviceState: DeviceServiceState, version: string | null, model: string | null, software: string | null, zone: { __typename?: 'Zone', id: string, name: string } } }>, pageInfo: { __typename?: 'PageInfo', startCursor: string | null, endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean } } } }; export type InstallDeviceMutationVariables = Exact<{ id: Scalars['String']['input']; @@ -4053,7 +4085,7 @@ export type StreamsQueryVariables = Exact<{ }>; -export type StreamsQuery = { __typename?: 'Query', deviceInventory: { __typename?: 'deviceInventoryQuery', streams: { __typename?: 'StreamConnection', edges: Array<{ __typename?: 'StreamEdge', node: { __typename?: 'Stream', id: string, streamName: string, deviceName: string, createdAt: string, isActive: boolean } }>, pageInfo: { __typename?: 'PageInfo', startCursor: any | null, endCursor: any | null, hasNextPage: boolean, hasPreviousPage: boolean } } } }; +export type StreamsQuery = { __typename?: 'Query', deviceInventory: { __typename?: 'deviceInventoryQuery', streams: { __typename?: 'StreamConnection', edges: Array<{ __typename?: 'StreamEdge', node: { __typename?: 'Stream', id: string, streamName: string, deviceName: string, createdAt: string, isActive: boolean } }>, pageInfo: { __typename?: 'PageInfo', startCursor: string | null, endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean } } } }; export type ActivateStreamMutationVariables = Exact<{ id: Scalars['String']['input']; diff --git a/packages/frinx-inventory-client/src/pages/device-list/device-list.tsx b/packages/frinx-inventory-client/src/pages/device-list/device-list.tsx index 03585d189..67dcc63cf 100644 --- a/packages/frinx-inventory-client/src/pages/device-list/device-list.tsx +++ b/packages/frinx-inventory-client/src/pages/device-list/device-list.tsx @@ -79,6 +79,9 @@ const DEVICES_QUERY = gql` createdAt isInstalled serviceState + version + model + software zone { id name diff --git a/packages/frinx-inventory-client/src/pages/device-list/device-table.tsx b/packages/frinx-inventory-client/src/pages/device-list/device-table.tsx index a63bb051a..75fd64be5 100644 --- a/packages/frinx-inventory-client/src/pages/device-list/device-table.tsx +++ b/packages/frinx-inventory-client/src/pages/device-list/device-table.tsx @@ -71,6 +71,9 @@ const DeviceTable: VoidFunctionComponent = ({ )} + + Model/Version + = ({ const { isInstalled } = device; const localDate = getLocalDateFromUTC(device.createdAt); const isLoading = installLoadingMap[device.id] ?? false; + const isUnknown = device.model == null && device.software == null && device.version == null; return ( @@ -122,8 +126,27 @@ const DeviceTable: VoidFunctionComponent = ({ /> - - {device.name} + + + {device.name} + + {isUnknown && ( + + + + + + )} + + + + + {device.model ?? device.software ?? '?'} / {device.version ?? '?'}