Skip to content

Commit

Permalink
Snapshot shows both configurations and snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jan 16, 2022
1 parent 70b96d6 commit 88a37fd
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/renderer/views/snapshots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos';
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
import OpenInBrowserIcon from '@mui/icons-material/OpenInBrowser';
import { Button, ButtonGroup, Stack } from '@mui/material';
import { Button, ButtonGroup, Stack, Typography } from '@mui/material';
import { blue, grey } from '@mui/material/colors';
import { styled } from '@mui/system';
import React from 'react';
Expand Down Expand Up @@ -38,18 +38,20 @@ export default function SnapshotsView() {
let win_size = useWindowSize();

React.useEffect(() => {
if (!keywords['jaeger.configuration_snapshot']) return;

const path = keywords['jaeger.configuration_snapshot'].values[0];

setSnapshots((snaps) => {
if (snaps.includes(path)) {
return snaps;
} else {
setIndex(snaps.length);
return [...snaps, path];
}
});
for (const kk of ['jaeger.configuration_snapshot', 'jaeger.snapshot']) {
if (!keywords[kk]) return;

const path = keywords[kk].values[0];

setSnapshots((snaps) => {
if (snaps.includes(path)) {
return snaps;
} else {
setIndex(snaps.length);
return [...snaps, path];
}
});
}
}, [keywords]);

const increaseScale = () => {
Expand Down

0 comments on commit 88a37fd

Please sign in to comment.