Skip to content

Commit

Permalink
Make gateway ID a link in Gateway overview page
Browse files Browse the repository at this point in the history
Signed-off-by: Karthik Subraveti <karthikshyam@gmail.com>
  • Loading branch information
karthiksubraveti committed Aug 7, 2020
1 parent a061442 commit bdb80d9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
16 changes: 13 additions & 3 deletions nms/app/packages/magmalte/app/views/equipment/EquipmentEnodeb.js
Expand Up @@ -19,6 +19,7 @@ import ActionTable from '../../components/ActionTable';
import DateTimeMetricChart from '../../components/DateTimeMetricChart';
import EnodebContext from '../../components/context/EnodebContext';
import Grid from '@material-ui/core/Grid';
import Link from '@material-ui/core/Link';
import React from 'react';
import SettingsInputAntennaIcon from '@material-ui/icons/SettingsInputAntenna';
import withAlert from '@fbcnms/ui/components/Alert/withAlert';
Expand Down Expand Up @@ -130,7 +131,18 @@ function EnodebTableRaw(props: WithAlert) {
data={enbRows}
columns={[
{title: 'Name', field: 'name'},
{title: 'Serial Number', field: 'id'},
{
title: 'Serial Number',
field: 'id',
render: currRow => (
<Link
variant="body2"
component="button"
onClick={() => history.push(relativeUrl('/' + currRow.id))}>
{currRow.id}
</Link>
),
},
{title: 'Session State Name', field: 'sessionName'},
{title: 'Health', field: 'health'},
{title: 'Reported Time', field: 'reportedTime', type: 'datetime'},
Expand Down Expand Up @@ -169,8 +181,6 @@ function EnodebTableRaw(props: WithAlert) {
});
},
},
{name: 'Deactivate'},
{name: 'Reboot'},
]}
options={{
actionsColumnIndex: -1,
Expand Down
31 changes: 26 additions & 5 deletions nms/app/packages/magmalte/app/views/equipment/EquipmentGateway.js
Expand Up @@ -23,6 +23,7 @@ import GatewayCheckinChart from './GatewayCheckinChart';
import GatewayContext from '../../components/context/GatewayContext';
import GatewayTierContext from '../../components/context/GatewayTierContext';
import Grid from '@material-ui/core/Grid';
import Link from '@material-ui/core/Link';
import OutlinedInput from '@material-ui/core/OutlinedInput';
import Paper from '@material-ui/core/Paper';
import React, {useState} from 'react';
Expand Down Expand Up @@ -214,7 +215,19 @@ function GatewayTableRaw(props: WithAlert) {
data={lteGatewayUpgradeRows}
columns={[
{title: 'Name', field: 'name', editable: 'never'},
{title: 'ID', field: 'id', editable: 'never'},
{
title: 'ID',
field: 'id',
editable: 'never',
render: currRow => (
<Link
variant="body2"
component="button"
onClick={() => history.push(relativeUrl('/' + currRow.id))}>
{currRow.id}
</Link>
),
},
{title: 'Hardware ID', field: 'hardwareId', editable: 'never'},
{
title: 'Current Version',
Expand Down Expand Up @@ -266,7 +279,18 @@ function GatewayTableRaw(props: WithAlert) {
data={lteGatewayRows}
columns={[
{title: 'Name', field: 'name'},
{title: 'ID', field: 'id'},
{
title: 'ID',
field: 'id',
render: currRow => (
<Link
variant="body2"
component="button"
onClick={() => history.push(relativeUrl('/' + currRow.id))}>
{currRow.id}
</Link>
),
},
{title: 'enodeBs', field: 'num_enodeb', type: 'numeric'},
{title: 'Subscribers', field: 'num_subscribers', type: 'numeric'},
{title: 'Health', field: 'health'},
Expand Down Expand Up @@ -306,9 +330,6 @@ function GatewayTableRaw(props: WithAlert) {
});
},
},

{name: 'Deactivate'},
{name: 'Reboot'},
]}
options={{
actionsColumnIndex: -1,
Expand Down
Expand Up @@ -20,6 +20,7 @@ import AddSubscriberButton from './SubscriberAddDialog';
import AppBar from '@material-ui/core/AppBar';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import Link from '@material-ui/core/Link';
import LoadingFiller from '@fbcnms/ui/components/LoadingFiller';
import MagmaV1API from '@fbcnms/magma-api/client/WebClient';
import NestedRouteLink from '@fbcnms/ui/components/NestedRouteLink';
Expand Down Expand Up @@ -252,7 +253,21 @@ function SubscriberDashboardInternal({
})}
columns={[
{title: 'Name', field: 'name'},
{title: 'IMSI', field: 'imsi'},
{title: '', field: ''},
{
title: 'IMSI',
field: 'imsi',
render: currRow => (
<Link
variant="body2"
component="button"
onClick={() =>
history.push(relativeUrl('/' + currRow.imsi))
}>
{currRow.imsi}
</Link>
),
},
{title: 'Service', field: 'service'},
{title: 'Current Usage', field: 'currentUsage'},
{title: 'Daily Average', field: 'dailyAvg'},
Expand Down

0 comments on commit bdb80d9

Please sign in to comment.