Skip to content

Commit 373ca45

Browse files
committed
added select all services button
1 parent bde42f8 commit 373ca45

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

app/context/ApplicationContext.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ const ApplicationContextProvider: React.FC<AppContextProps> = React.memo(props =
4444
console.log({application});
4545
// console.log('Hi, inside ApplicationConext - fetchServicesNames callback. Sending servicesRequest to ipcMain.');
4646
console.log('app when fetch services name: ', application);
47-
console.log(application)
47+
4848
ipcRenderer.send('servicesRequest');
4949
ipcRenderer.on('servicesResponse', (event: Electron.Event, data: any) => {
5050
//data here refers to the data coming the services document of the database
5151
let result: any;
5252
result = JSON.parse(data);
53-
console.log('result from ipcrenderer services response is: ', result);
53+
5454
// console.log('Calling setServicesData passing in above result. Current servicesData is the following: ', servicesData);
5555
setServicesData(result);
5656
ipcRenderer.removeAllListeners('servicesResponse');
@@ -71,7 +71,6 @@ const ApplicationContextProvider: React.FC<AppContextProps> = React.memo(props =
7171
ipcRenderer.removeAllListeners('databaseConnected');
7272
ipcRenderer.send('connect', username, index, URI, databaseType);
7373
ipcRenderer.on('databaseConnected', (event: Electron.Event, data: any) => {
74-
console.log({data});
7574
if(data === true) {
7675
fetchServicesNames(application);
7776
} else {

app/modals/ServicesModal/ServicesLink.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,19 @@ const ServicesLink = (props) => {
3131
{service.microservice}
3232
</div>
3333
))}
34-
<Link id='selectLink'
35-
className="router link"
34+
<Link
35+
className="selectLink router link"
3636
to={services.length > 0 ? `/applications/${app}/${services.join(' ')}` : '#'}
3737
>
3838
{services.length === 0 && 'Select Services'}
3939
{services.length === 1 && 'Display Service'}
4040
{services.length > 1 && 'Compare Services'}
4141
</Link>
42+
<Link
43+
className="selectLink router link"
44+
to={`/applications/${app}/client event-bus items inventory orders auth`}>
45+
Select All Services
46+
</Link>
4247
</div>
4348
)
4449
}

app/modals/ServicesModal/ServicesModal.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
text-align: center;
5050
font-weight: 100;
5151

52-
&#selectLink {
52+
&.selectLink {
5353
background-color: #fbdca3;
5454
}
5555

@@ -83,4 +83,4 @@
8383
font-weight: 100;
8484
color: #444d56;
8585
border-radius: 5px;
86-
}
86+
}

app/modals/ServicesModal/ServicesModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const ServicesModal: React.FC<ServicesModalProps> = React.memo(({ i, app }) => {
2727
const { servicesData, connectToDB } = useContext(ApplicationContext);
2828
const [services, setServices] = useState<Array<string>>([]);
2929
console.log(services);
30+
console.log(services.join(' '));
3031
const [ cardName,dbType,dbURI,description,serviceType ] = applications[i]
3132

3233

0 commit comments

Comments
 (0)