Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Dialog, DialogContent, Grid } from '@mui/material';
import 'bootstrap/dist/css/bootstrap.min.css';
import './app.css';

import { useAppDispatch, useAppSelector } from './app/hooks'
import InfoView from './features/info/InfoView';
Expand Down
25 changes: 25 additions & 0 deletions frontend/src/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.MuiDialog-paper {
max-width: 96%;
}
.MuiGrid-item:nth-child(2) {
flex-basis: 20%;
max-width: 20%;
}
.MuiGrid-item:nth-child(3) {
flex-basis: 20%;
max-width: 20%;
}
.MuiGrid-item:nth-child(4) {
flex-basis: 60%;
max-width: 60%;
}
td.MuiTableCell-root {
vertical-align: top;
}
body {
word-break: break-all !important;
}
pre {
overflow: visible !important;
max-width: 600px;
}
5 changes: 3 additions & 2 deletions frontend/src/features/appbar/AppBarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@ export default function AppBarView(){
const info = fetchinfo();
const excludeNoise = useAppSelector((state) => state.selections.noiseCancellationIsOn);
const {start, end} = useAppSelector((state) => state.selections.dateTimeRange);
const tenMinutesInMillisseconds = 10 * 60 * 1000;
const dispatch = useAppDispatch();
return <AppBar position='static'>
<Toolbar>
<Typography variant="h6" color="inherit" sx={{ flexGrow: 1 }}>{info.name}</Typography>
<DateTimeRangePicker
onChange={(range) => {
const [s, e] = (Array.isArray(range) && range[0] && range[1]) ? [range[0], range[1]] : [new Date(Date.now() - 24*3600*1000), new Date()];
const [s, e] = (Array.isArray(range) && range[0] && range[1]) ? [range[0], range[1]] : [new Date(Date.now() - tenMinutesInMillisseconds), new Date()];
dispatch(setDateTimeRange({start: s.getTime(), end: e.getTime()}));
}}
value={[new Date(start), new Date(end)]}
disableClock={true}
disableClock={false}
/>
<Tooltip title={excludeNoise?"Show Noise":"Hide Noise"}>
<IconButton color="inherit" aria-label="logs">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/features/selections/selectionsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const initialState: Selections = {
infoIsOpen: false,
deleteRequestAlertIsOpen: false,
requestIsOpen: false,
dateTimeRange: {start: Date.now() - 5*60*1000, end: Date.now()} // last 5 minute
dateTimeRange: {start: Date.now() - 10*60*1000, end: Date.now()} // last 10 minute
};
const slice = createSlice({
name: 'selections',
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/ai/diffy/proxy/HttpResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public HttpResponse(String status, HttpHeaders headers, String body) {
}

public String getStatus() {
if (status.contains(" ")) {
return status.trim().split("\\s+")[0];
}
return status;
}

Expand Down