Skip to content

Commit e131d5e

Browse files
Resolve new dashboard context
1 parent eb95b80 commit e131d5e

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

app/components/Applications.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ const Applications = () => {
2323
};
2424

2525
// Handle clicks on Application cards
26-
const handleClick = (app: string, i: number) => {
26+
const handleClick = (selectedApp: string, i: number) => {
2727
setIndex(i);
28-
setApp(app);
28+
setApp(selectedApp);
29+
console.log('handle', selectedApp)
2930
setOpen(true);
3031
};
3132

@@ -56,18 +57,18 @@ const Applications = () => {
5657

5758
return (
5859
<>
59-
{applications.map((app: string, i: number | any | string | undefined) => (
60+
{applications.map((app: string[], i: number | any | string | undefined) => (
6061
<Grid item xs={6} key={i}>
6162
<Paper
6263
className={classes.paper}
6364
id={i}
6465
key={i}
65-
onClick={(event: React.MouseEvent<HTMLElement>) => handleClick(app, i)}
66+
onClick={(event: React.MouseEvent<HTMLElement>) => handleClick(app[0], i)}
6667
>
67-
{app}
68+
{app[0]}
6869
<IconButton
6970
aria-label="Delete"
70-
onClick={(event: React.MouseEvent<HTMLElement>) => confirmDelete(app, i)}
71+
onClick={(event: React.MouseEvent<HTMLElement>) => confirmDelete(app[0], i)}
7172
color="primary"
7273
>
7374
<DeleteForeverOutlinedIcon className={classes.hover} />

app/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ApplicationContext } from '../context/ApplicationContext';
55
import '../stylesheets/Header.scss';
66

77
export interface HeaderProps {
8-
app: string;
8+
app: string[];
99
service: string;
1010
live: boolean;
1111
setLive: React.Dispatch<React.SetStateAction<boolean>>;

app/containers/GraphsContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import RouteTrace from '../charts/RouteTrace';
1818
import '../stylesheets/GraphsContainer.scss';
1919

2020
export interface Params {
21-
app: string;
21+
app: any;
2222
service: string;
2323
}
2424

app/stylesheets/Header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ select {
3939
&:first-of-type {
4040
position: absolute;
4141
top: 25px;
42-
left: 50px;
42+
left: 130px;
4343
background-color: transparent;
4444
border: 2px solid $sidebarblue;
4545
color: $sidebarblue;

0 commit comments

Comments
 (0)