fix: hide ????????? after session terminate (0.3.8)
Persist session_terminated in event details, expose in API, and update Events/Dashboard UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -299,7 +299,7 @@
|
||||
Обрыв RDS
|
||||
</button>
|
||||
<button
|
||||
v-if="eventSupportsSessionTerminate(e)"
|
||||
v-if="showEventSessionTerminateButton(e)"
|
||||
type="button"
|
||||
class="secondary dash-qwinsta-btn"
|
||||
:disabled="sessionTerminateLoadingId === e.id"
|
||||
@@ -342,6 +342,7 @@ import { onMounted, onUnmounted, ref } from "vue";
|
||||
|
||||
import {
|
||||
apiFetch,
|
||||
ApiError,
|
||||
getToken,
|
||||
postEventTerminateSession,
|
||||
type DashboardSummary,
|
||||
@@ -353,7 +354,7 @@ import RdgQwinstaModal from "../components/RdgQwinstaModal.vue";
|
||||
import { useRdgQwinsta } from "../composables/useRdgQwinsta";
|
||||
import { formatServerName } from "../utils/hostDisplay";
|
||||
import { hasRdgFlapUi, rdgQwinstaEventId } from "../utils/rdgFlap";
|
||||
import { eventSupportsSessionTerminate } from "../utils/sessionActions";
|
||||
import { markEventSessionTerminatedInList, showEventSessionTerminateButton } from "../utils/sessionActions";
|
||||
|
||||
const { qwinstaLoadingId, qwinstaModal, closeQwinstaModal, runQwinsta, runLogoff } = useRdgQwinsta();
|
||||
const sessionTerminateLoadingId = ref<number | null>(null);
|
||||
@@ -386,8 +387,13 @@ async function runSessionTerminate(event: EventSummary) {
|
||||
const res = await postEventTerminateSession(event.id);
|
||||
if (!res.ok) {
|
||||
window.alert(res.message);
|
||||
} else {
|
||||
markEventSessionTerminatedInList(data.value?.recent_events, event.id);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof ApiError && e.status === 409) {
|
||||
markEventSessionTerminatedInList(data.value?.recent_events, event.id);
|
||||
}
|
||||
window.alert(e instanceof Error ? e.message : "Ошибка завершения сессии");
|
||||
} finally {
|
||||
sessionTerminateLoadingId.value = null;
|
||||
|
||||
Reference in New Issue
Block a user