|
|
@ -12,11 +12,12 @@ import { |
|
|
|
import API_BASE_URL from '../../lib/consts/API_BASE_URL'; |
|
|
|
import API_BASE_URL from '../../lib/consts/API_BASE_URL'; |
|
|
|
import { TEXT } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
import { TEXT } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import Decorator from '../../components/Decorator'; |
|
|
|
import { Panel, PanelHeader } from '../../components/Panels'; |
|
|
|
import { Panel, PanelHeader } from '../../components/Panels'; |
|
|
|
import periodicFetch from '../../lib/fetchers/periodicFetch'; |
|
|
|
import periodicFetch from '../../lib/fetchers/periodicFetch'; |
|
|
|
import Spinner from '../../components/Spinner'; |
|
|
|
import Spinner from '../../components/Spinner'; |
|
|
|
|
|
|
|
import sumstring from '../../lib/sumstring'; |
|
|
|
import { BodyText, BodyTextProps, HeaderText } from '../../components/Text'; |
|
|
|
import { BodyText, BodyTextProps, HeaderText } from '../../components/Text'; |
|
|
|
import Decorator from '../../components/Decorator'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const MOCK_NICS: NetworkInterfaceOverviewMetadata[] = [ |
|
|
|
const MOCK_NICS: NetworkInterfaceOverviewMetadata[] = [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -84,6 +85,7 @@ const NETWORK_INTERFACE_COLUMNS: MUIDataGridProps['columns'] = [ |
|
|
|
<DataGridCellText text={value} /> |
|
|
|
<DataGridCellText text={value} /> |
|
|
|
</MUIBox> |
|
|
|
</MUIBox> |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
sortComparator: (v1, v2) => sumstring(v1) - sumstring(v2), |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'networkInterfaceMACAddress', |
|
|
|
field: 'networkInterfaceMACAddress', |
|
|
@ -91,6 +93,19 @@ const NETWORK_INTERFACE_COLUMNS: MUIDataGridProps['columns'] = [ |
|
|
|
headerName: 'MAC', |
|
|
|
headerName: 'MAC', |
|
|
|
renderCell: ({ value }) => <DataGridCellText monospaced text={value} />, |
|
|
|
renderCell: ({ value }) => <DataGridCellText monospaced text={value} />, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'networkInterfaceState', |
|
|
|
|
|
|
|
headerName: 'State', |
|
|
|
|
|
|
|
renderCell: ({ value }) => { |
|
|
|
|
|
|
|
const state = String(value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<DataGridCellText |
|
|
|
|
|
|
|
text={`${state.charAt(0).toUpperCase()}${state.substring(1)}`} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'networkInterfaceSpeed', |
|
|
|
field: 'networkInterfaceSpeed', |
|
|
|
flex: 1, |
|
|
|
flex: 1, |
|
|
|