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
|
#!/bin/sh
|
||||||
|
export TZ=UTC
|
||||||
|
|
||||||
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --proxy-headers --log-level ${S_LOGLEVEL:-warning}
|
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --proxy-headers --log-level ${S_LOGLEVEL:-warning}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
export TZ=UTC
|
||||||
export ASSIST_KEY=ignore
|
export ASSIST_KEY=ignore
|
||||||
uvicorn app:app --host 0.0.0.0 --port 8888 --log-level ${S_LOGLEVEL:-warning}
|
uvicorn app:app --host 0.0.0.0 --port 8888 --log-level ${S_LOGLEVEL:-warning}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
export TZ=UTC
|
||||||
|
|
||||||
uvicorn app_alerts:app --reload --port 8888 --log-level ${S_LOGLEVEL:-warning}
|
uvicorn app_alerts:app --reload --port 8888 --log-level ${S_LOGLEVEL:-warning}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
export TZ=UTC
|
||||||
|
|
||||||
uvicorn app:app --reload --log-level ${S_LOGLEVEL:-warning}
|
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: "REQUEST",
|
||||||
schemas.EventType.REQUEST_DETAILS: "REQUEST",
|
schemas.EventType.REQUEST_DETAILS: "REQUEST",
|
||||||
schemas.PerformanceEventType.FETCH_FAILED: "REQUEST",
|
schemas.PerformanceEventType.FETCH_FAILED: "REQUEST",
|
||||||
|
schemas.GraphqlFilterType.GRAPHQL_NAME: "GRAPHQL",
|
||||||
schemas.EventType.STATE_ACTION: "STATEACTION",
|
schemas.EventType.STATE_ACTION: "STATEACTION",
|
||||||
schemas.EventType.ERROR: "ERROR",
|
schemas.EventType.ERROR: "ERROR",
|
||||||
schemas.PerformanceEventType.LOCATION_AVG_CPU_LOAD: 'PERFORMANCE',
|
schemas.PerformanceEventType.LOCATION_AVG_CPU_LOAD: 'PERFORMANCE',
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
export TZ=UTC
|
||||||
sh env_vars.sh
|
sh env_vars.sh
|
||||||
source /tmp/.env.override
|
source /tmp/.env.override
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
export TZ=UTC
|
||||||
export ASSIST_KEY=ignore
|
export ASSIST_KEY=ignore
|
||||||
sh env_vars.sh
|
sh env_vars.sh
|
||||||
source /tmp/.env.override
|
source /tmp/.env.override
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
export TZ=UTC
|
||||||
export ASSIST_KEY=ignore
|
export ASSIST_KEY=ignore
|
||||||
sh env_vars.sh
|
sh env_vars.sh
|
||||||
source /tmp/.env.override
|
source /tmp/.env.override
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ const lineLength = 40;
|
||||||
function WSPanel({ socketMsgList, onClose }: Props) {
|
function WSPanel({ socketMsgList, onClose }: Props) {
|
||||||
const [query, setQuery] = React.useState('');
|
const [query, setQuery] = React.useState('');
|
||||||
const [list, setList] = React.useState(socketMsgList);
|
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);
|
setQuery(e.target.value);
|
||||||
const newList = filterList(socketMsgList, e.target.value, [
|
const newList = filterList(socketMsgList, e.target.value, [
|
||||||
'data',
|
'data',
|
||||||
|
|
@ -69,15 +69,16 @@ function WSPanel({ socketMsgList, onClose }: Props) {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{list.map((msg) => (
|
{list.map((msg, i) => (
|
||||||
<Row
|
<Row
|
||||||
msg={msg}
|
msg={msg}
|
||||||
key={msg.timestamp}
|
key={msg.timestamp}
|
||||||
onSelect={() => setSelectedRow(msg)}
|
onSelect={() => setSelectedRow({ msg, id: i })}
|
||||||
|
isSelected={selectedRow ? selectedRow.id === i : false}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{selectedRow ? (
|
{selectedRow ? (
|
||||||
<SelectedRow msg={selectedRow} onClose={() => setSelectedRow(null)} />
|
<SelectedRow msg={selectedRow.msg} onClose={() => setSelectedRow(null)} />
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</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 (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<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'
|
'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>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,11 @@ function SessionsTabOverview() {
|
||||||
) : null}
|
) : null}
|
||||||
<SessionHeader />
|
<SessionHeader />
|
||||||
<div className="border-b" />
|
<div className="border-b" />
|
||||||
<LatestSessionsMessage />
|
|
||||||
{!isNotesRoute ? (
|
{!isNotesRoute ? (
|
||||||
<SessionList />
|
<>
|
||||||
|
<LatestSessionsMessage />
|
||||||
|
<SessionList />
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<NotesList />
|
<NotesList />
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,16 @@ import { observer } from 'mobx-react-lite';
|
||||||
function LatestSessionsMessage() {
|
function LatestSessionsMessage() {
|
||||||
const { searchStore } = useStore();
|
const { searchStore } = useStore();
|
||||||
const count = searchStore.latestList.size;
|
const count = searchStore.latestList.size;
|
||||||
|
|
||||||
|
const onShowNewSessions = () => {
|
||||||
|
void searchStore.updateCurrentPage(1, true);
|
||||||
|
};
|
||||||
|
|
||||||
return count > 0 ? (
|
return count > 0 ? (
|
||||||
<div
|
<div
|
||||||
className="bg-amber-50 p-1 flex w-full border-b text-center justify-center link"
|
className="bg-amber-50 p-1 flex w-full border-b text-center justify-center link"
|
||||||
style={{ backgroundColor: 'rgb(255 251 235)' }}
|
style={{ backgroundColor: 'rgb(255 251 235)' }}
|
||||||
onClick={() => searchStore.updateCurrentPage(1)}
|
onClick={onShowNewSessions}
|
||||||
>
|
>
|
||||||
Show {numberWithCommas(count)} New {count > 1 ? 'Sessions' : 'Session'}
|
Show {numberWithCommas(count)} New {count > 1 ? 'Sessions' : 'Session'}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -162,15 +162,14 @@ class SearchStore {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateCurrentPage(page: number) {
|
updateCurrentPage(page: number, force = false) {
|
||||||
this.currentPage = page;
|
this.currentPage = page;
|
||||||
void this.fetchSessions();
|
void this.fetchSessions(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
setActiveTab(tab: string) {
|
setActiveTab(tab: string) {
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.activeTab = TAB_MAP[tab];
|
this.activeTab = TAB_MAP[tab];
|
||||||
this.currentPage = 1;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -229,12 +228,13 @@ class SearchStore {
|
||||||
if (this.latestRequestTime) {
|
if (this.latestRequestTime) {
|
||||||
const period = Period({ rangeName: CUSTOM_RANGE, start: this.latestRequestTime, end: Date.now() });
|
const period = Period({ rangeName: CUSTOM_RANGE, start: this.latestRequestTime, end: Date.now() });
|
||||||
const newTimestamps: any = period.toJSON();
|
const newTimestamps: any = period.toJSON();
|
||||||
filter.startTimestamp = newTimestamps.startDate;
|
filter.startDate = newTimestamps.startDate;
|
||||||
filter.endTimestamp = newTimestamps.endDate;
|
filter.endDate = newTimestamps.endDate;
|
||||||
}
|
}
|
||||||
searchService.checkLatestSessions(filter).then((response: any) => {
|
searchService.checkLatestSessions(filter).then((response: any) => {
|
||||||
this.latestList = response;
|
runInAction(() => {
|
||||||
this.latestRequestTime = Date.now();
|
this.latestList = List(response);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ class SearchStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.value && filter.value[0] && filter.value[0] !== '') {
|
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);
|
filter.filters = filter.filters.concat(tagFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.latestRequestTime = Date.now();
|
||||||
|
this.latestList = List();
|
||||||
|
|
||||||
await sessionStore.fetchSessions({
|
await sessionStore.fetchSessions({
|
||||||
...filter,
|
...filter,
|
||||||
page: this.currentPage,
|
page: this.currentPage,
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ export default class SessionStore {
|
||||||
}
|
}
|
||||||
const nextEntryNum =
|
const nextEntryNum =
|
||||||
keys.length > 0
|
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;
|
: 0;
|
||||||
this.prefetchedMobUrls[sessionId] = {
|
this.prefetchedMobUrls[sessionId] = {
|
||||||
data: fileData,
|
data: fileData,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"@babel/plugin-transform-private-methods": "^7.23.3",
|
"@babel/plugin-transform-private-methods": "^7.23.3",
|
||||||
"@floating-ui/react-dom-interactions": "^0.10.3",
|
"@floating-ui/react-dom-interactions": "^0.10.3",
|
||||||
"@medv/finder": "^3.1.0",
|
"@medv/finder": "^3.1.0",
|
||||||
"@sentry/browser": "^5.21.1",
|
"@sentry/browser": "^8.34.0",
|
||||||
"@svg-maps/world": "^1.0.1",
|
"@svg-maps/world": "^1.0.1",
|
||||||
"@tanstack/react-query": "^5.56.2",
|
"@tanstack/react-query": "^5.56.2",
|
||||||
"@wojtekmaj/react-daterange-picker": "^6.0.0",
|
"@wojtekmaj/react-daterange-picker": "^6.0.0",
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ COMMON_PG_PASSWORD="change_me_pg_password"
|
||||||
COMMON_VERSION="v1.16.0"
|
COMMON_VERSION="v1.16.0"
|
||||||
## DB versions
|
## DB versions
|
||||||
######################################
|
######################################
|
||||||
POSTGRES_VERSION="14.5.0"
|
POSTGRES_VERSION="15.10.0"
|
||||||
REDIS_VERSION="6.0.12-debian-10-r33"
|
REDIS_VERSION="6.0.12-debian-10-r33"
|
||||||
MINIO_VERSION="2023.2.10-debian-11-r1"
|
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
|
# 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.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# 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
|
# 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.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# 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
|
# 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.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
AppVersion: "v1.21.0"
|
AppVersion: "v1.21.3"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue