Skip to content

Commit

Permalink
refactor(nms): move FEG Gateway Add Button to equipment page
Browse files Browse the repository at this point in the history
Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>
  • Loading branch information
Neudrino committed Jul 26, 2022
1 parent 44f94ca commit f2ad7dd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 419 deletions.
21 changes: 21 additions & 0 deletions nms/app/components/feg/FEGGatewayDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,27 @@ function virtualApnRulesToObject(
});
}

export function FEGAddGatewayButton() {
const [isVisible, setIsVisible] = useState(false);

const handleClose = () => setIsVisible(false);

return (
<>
<Button
onClick={() => setIsVisible(true)}
color="primary"
size="small"
variant="contained">
Add Gateway
</Button>
{isVisible && (
<FEGGatewayDialog onClose={handleClose} onSave={handleClose} />
)}
</>
);
}

export default function FEGGatewayDialog(props: Props) {
const classes = useStyles();
const params = useParams();
Expand Down
227 changes: 0 additions & 227 deletions nms/app/components/feg/FEGGateways.tsx

This file was deleted.

16 changes: 4 additions & 12 deletions nms/app/components/feg/FEGSections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ import type {SectionsConfigs} from '../layout/Section';

import AlarmIcon from '@material-ui/icons/Alarm';
import AlarmsDashboard from '../../views/alarms/AlarmsDashboard';
import CellWifiIcon from '@material-ui/icons/CellWifi';
import DashboardIcon from '@material-ui/icons/Dashboard';
import FEGConfigure from './FEGConfigure';
import FEGDashboard from '../../views/dashboard/feg/FEGDashboard';
import FEGEquipmentDashboard from '../../views/equipment/FEGEquipmentDashboard';
import FEGGateways from './FEGGateways';
import FEGMetrics from './FEGMetrics';
import FEGNetworkDashboard from '../../views/network/FEGNetworkDashboard';
import NetworkCheckIcon from '@material-ui/icons/NetworkCheck';
Expand All @@ -37,23 +35,17 @@ export function getFEGSections(): SectionsConfigs {
component: FEGDashboard,
},
{
path: 'gateways',
label: 'Gateways',
icon: <CellWifiIcon />,
component: FEGGateways,
path: 'equipment',
label: 'Equipment',
icon: <RouterIcon />,
component: FEGEquipmentDashboard,
},
{
path: 'network',
label: 'Network',
icon: <NetworkCheckIcon />,
component: FEGNetworkDashboard,
},
{
path: 'equipment',
label: 'Equipment',
icon: <RouterIcon />,
component: FEGEquipmentDashboard,
},
{
path: 'configure',
label: 'Configure',
Expand Down

0 comments on commit f2ad7dd

Please sign in to comment.