File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,10 +5,16 @@ import SetupContext from '../context/SetupContext';
55import AddService from './AddService.jsx' ;
66
77const ServicesDashboard = ( props ) => {
8+ // Used to toggle setup required if user wants to add a new database.
89 const setup = useContext ( SetupContext ) ;
10+
11+ // List of the databases saved by users to track microservices.
912 const serviceList = useContext ( DashboardContext ) ;
13+
14+ // Used to hold the buttons created for each database found in context.
1015 const [ serviceSelected , setSelection ] = useState ( ) ;
1116
17+ // Creates button for each database in dashboard context.
1218 const renderServiceList = ( context ) => {
1319 const buttonStore = [ ] ;
1420 for ( let i = 0 ; i < context . length ; i += 1 ) {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22
33const { ipcRenderer } = window . require ( 'electron' ) ;
44
5+ // Contains an array of just the names of the databases saved by the user.
56const DashboardContext = React . createContext ( ipcRenderer . sendSync ( 'dashboard' ) ) ;
67
78export const DashboardProvider = DashboardContext . Provider ;
You can’t perform that action at this time.
0 commit comments