Compare commits
12 commits
main
...
fix-sessio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01fd9d55e2 | ||
|
|
39ab109126 | ||
|
|
954bfbf8f7 | ||
|
|
c0197cdfeb | ||
|
|
16d875cfda | ||
|
|
12ab110e0e | ||
|
|
f48808f42e | ||
|
|
b080a98764 | ||
|
|
dd885c65ac | ||
|
|
0ad2836650 | ||
|
|
20b76a0ed9 | ||
|
|
884f3499ef |
18 changed files with 43 additions and 24 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
export TZ=UTC
|
||||
|
||||
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --proxy-headers --log-level ${S_LOGLEVEL:-warning}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
export TZ=UTC
|
||||
export ASSIST_KEY=ignore
|
||||
uvicorn app:app --host 0.0.0.0 --port 8888 --log-level ${S_LOGLEVEL:-warning}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/zsh
|
||||
export TZ=UTC
|
||||
|
||||
uvicorn app_alerts:app --reload --port 8888 --log-level ${S_LOGLEVEL:-warning}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/zsh
|
||||
export TZ=UTC
|
||||
|
||||
uvicorn app:app --reload --log-level ${S_LOGLEVEL:-warning}
|
||||
|
|
@ -58,6 +58,7 @@ def get_event_type(event_type: Union[schemas.EventType, schemas.PerformanceEvent
|
|||
schemas.EventType.REQUEST: "REQUEST",
|
||||
schemas.EventType.REQUEST_DETAILS: "REQUEST",
|
||||
schemas.PerformanceEventType.FETCH_FAILED: "REQUEST",
|
||||
schemas.GraphqlFilterType.GRAPHQL_NAME: "GRAPHQL",
|
||||
schemas.EventType.STATE_ACTION: "STATEACTION",
|
||||
schemas.EventType.ERROR: "ERROR",
|
||||
schemas.PerformanceEventType.LOCATION_AVG_CPU_LOAD: 'PERFORMANCE',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
export TZ=UTC
|
||||
sh env_vars.sh
|
||||
source /tmp/.env.override
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
export TZ=UTC
|
||||
export ASSIST_KEY=ignore
|
||||
sh env_vars.sh
|
||||
source /tmp/.env.override
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
export TZ=UTC
|
||||
export ASSIST_KEY=ignore
|
||||
sh env_vars.sh
|
||||
source /tmp/.env.override
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ const lineLength = 40;
|
|||
function WSPanel({ socketMsgList, onClose }: Props) {
|
||||
const [query, setQuery] = React.useState('');
|
||||
const [list, setList] = React.useState(socketMsgList);
|
||||
const [selectedRow, setSelectedRow] = React.useState<SocketMsg | null>(null);
|
||||
const [selectedRow, setSelectedRow] = React.useState<{ msg: SocketMsg, id: number } | null>(null);
|
||||
|
||||
const onQueryChange = (e) => {
|
||||
const onQueryChange = (e: any) => {
|
||||
setQuery(e.target.value);
|
||||
const newList = filterList(socketMsgList, e.target.value, [
|
||||
'data',
|
||||
|
|
@ -69,15 +69,16 @@ function WSPanel({ socketMsgList, onClose }: Props) {
|
|||
position: 'relative',
|
||||
}}
|
||||
>
|
||||
{list.map((msg) => (
|
||||
{list.map((msg, i) => (
|
||||
<Row
|
||||
msg={msg}
|
||||
key={msg.timestamp}
|
||||
onSelect={() => setSelectedRow(msg)}
|
||||
onSelect={() => setSelectedRow({ msg, id: i })}
|
||||
isSelected={selectedRow ? selectedRow.id === i : false}
|
||||
/>
|
||||
))}
|
||||
{selectedRow ? (
|
||||
<SelectedRow msg={selectedRow} onClose={() => setSelectedRow(null)} />
|
||||
<SelectedRow msg={selectedRow.msg} onClose={() => setSelectedRow(null)} />
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -127,7 +128,7 @@ function MsgDirection({ dir }: { dir: 'up' | 'down' }) {
|
|||
);
|
||||
}
|
||||
|
||||
function Row({ msg, onSelect }: { msg: SocketMsg; onSelect: () => void }) {
|
||||
function Row({ msg, onSelect, isSelected }: { msg: SocketMsg; isSelected: boolean; onSelect: () => void }) {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
|
|
@ -149,7 +150,7 @@ function Row({ msg, onSelect }: { msg: SocketMsg; onSelect: () => void }) {
|
|||
'rounded-full font-bold text-xl p-2 bg-white w-6 h-6 flex items-center justify-center'
|
||||
}
|
||||
>
|
||||
<span>{isOpen ? '-' : '+'}</span>
|
||||
<span>{isSelected ? '-' : '+'}</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,9 +37,11 @@ function SessionsTabOverview() {
|
|||
) : null}
|
||||
<SessionHeader />
|
||||
<div className="border-b" />
|
||||
<LatestSessionsMessage />
|
||||
{!isNotesRoute ? (
|
||||
<SessionList />
|
||||
<>
|
||||
<LatestSessionsMessage />
|
||||
<SessionList />
|
||||
</>
|
||||
) : (
|
||||
<NotesList />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,16 @@ import { observer } from 'mobx-react-lite';
|
|||
function LatestSessionsMessage() {
|
||||
const { searchStore } = useStore();
|
||||
const count = searchStore.latestList.size;
|
||||
|
||||
const onShowNewSessions = () => {
|
||||
void searchStore.updateCurrentPage(1, true);
|
||||
};
|
||||
|
||||
return count > 0 ? (
|
||||
<div
|
||||
className="bg-amber-50 p-1 flex w-full border-b text-center justify-center link"
|
||||
style={{ backgroundColor: 'rgb(255 251 235)' }}
|
||||
onClick={() => searchStore.updateCurrentPage(1)}
|
||||
onClick={onShowNewSessions}
|
||||
>
|
||||
Show {numberWithCommas(count)} New {count > 1 ? 'Sessions' : 'Session'}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -162,15 +162,14 @@ class SearchStore {
|
|||
});
|
||||
}
|
||||
|
||||
updateCurrentPage(page: number) {
|
||||
updateCurrentPage(page: number, force = false) {
|
||||
this.currentPage = page;
|
||||
void this.fetchSessions();
|
||||
void this.fetchSessions(force);
|
||||
}
|
||||
|
||||
setActiveTab(tab: string) {
|
||||
runInAction(() => {
|
||||
this.activeTab = TAB_MAP[tab];
|
||||
this.currentPage = 1;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -229,12 +228,13 @@ class SearchStore {
|
|||
if (this.latestRequestTime) {
|
||||
const period = Period({ rangeName: CUSTOM_RANGE, start: this.latestRequestTime, end: Date.now() });
|
||||
const newTimestamps: any = period.toJSON();
|
||||
filter.startTimestamp = newTimestamps.startDate;
|
||||
filter.endTimestamp = newTimestamps.endDate;
|
||||
filter.startDate = newTimestamps.startDate;
|
||||
filter.endDate = newTimestamps.endDate;
|
||||
}
|
||||
searchService.checkLatestSessions(filter).then((response: any) => {
|
||||
this.latestList = response;
|
||||
this.latestRequestTime = Date.now();
|
||||
runInAction(() => {
|
||||
this.latestList = List(response);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ class SearchStore {
|
|||
}
|
||||
|
||||
if (filter.value && filter.value[0] && filter.value[0] !== '') {
|
||||
this.fetchSessions();
|
||||
void this.fetchSessions();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -336,6 +336,9 @@ class SearchStore {
|
|||
filter.filters = filter.filters.concat(tagFilter);
|
||||
}
|
||||
|
||||
this.latestRequestTime = Date.now();
|
||||
this.latestList = List();
|
||||
|
||||
await sessionStore.fetchSessions({
|
||||
...filter,
|
||||
page: this.currentPage,
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ export default class SessionStore {
|
|||
}
|
||||
const nextEntryNum =
|
||||
keys.length > 0
|
||||
? Math.max(...keys.map((key) => this.prefetchedMobUrls[key].entryNum || 0)) + 1
|
||||
? Math.max(...keys.map((key) => this.prefetchedMobUrls[key]?.entryNum || 0)) + 1
|
||||
: 0;
|
||||
this.prefetchedMobUrls[sessionId] = {
|
||||
data: fileData,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"@babel/plugin-transform-private-methods": "^7.23.3",
|
||||
"@floating-ui/react-dom-interactions": "^0.10.3",
|
||||
"@medv/finder": "^3.1.0",
|
||||
"@sentry/browser": "^5.21.1",
|
||||
"@sentry/browser": "^8.34.0",
|
||||
"@svg-maps/world": "^1.0.1",
|
||||
"@tanstack/react-query": "^5.56.2",
|
||||
"@wojtekmaj/react-daterange-picker": "^6.0.0",
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ COMMON_PG_PASSWORD="change_me_pg_password"
|
|||
COMMON_VERSION="v1.16.0"
|
||||
## DB versions
|
||||
######################################
|
||||
POSTGRES_VERSION="14.5.0"
|
||||
POSTGRES_VERSION="15.10.0"
|
||||
REDIS_VERSION="6.0.12-debian-10-r33"
|
||||
MINIO_VERSION="2023.2.10-debian-11-r1"
|
||||
######################################
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ version: 0.1.1
|
|||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
AppVersion: "v1.21.0"
|
||||
AppVersion: "v1.21.1"
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ version: 0.1.7
|
|||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
AppVersion: "v1.21.0"
|
||||
AppVersion: "v1.21.1"
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ version: 0.1.10
|
|||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
AppVersion: "v1.21.0"
|
||||
AppVersion: "v1.21.3"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue