-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a sessions pane in the left sidebar. Whenever a new query tab is created, a new entry will be added to the list of sessions. When the tab is closed, the session entry will remain. When the session is clicked, it will either activate the associated tab if it exists, or it will restore that tab, along with it's history. You can right click a session to delete it. Deleting it will destroy the associated tab and history. The display name of the tab is text of the most recent query in that sessions history.
- Loading branch information
Showing
36 changed files
with
383 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,3 +265,7 @@ | |
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.list-none { | ||
list-style-type: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
align-items: center; | ||
} | ||
|
||
.flex-shrink-0 { | ||
.shrink-0 { | ||
flex-shrink: 0; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import {DomainModel} from "src/core/domain-model" | ||
import {Store} from "../state/types" | ||
import {Entity} from "bullet" | ||
|
||
export function initDomainModels(args: {store: Store}) { | ||
DomainModel.store = args.store | ||
Entity.store = args.store | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export type HistoryView = "tree" | "linear" | ||
export type SectionName = "pools" | "queries" | "history" | ||
export type SectionName = "pools" | "queries" | "sessions" | ||
export type OpenMap = {[id: string]: boolean} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
apps/zui/src/js/state/migrations/202407221450_populateSessions.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import {migrate} from "src/test/unit/helpers/migrate" | ||
import {getAllStates} from "./utils/getTestState" | ||
|
||
test("migrating 202407221450_populateSessions", async () => { | ||
const next = await migrate({state: "v1.17.0", to: "202407221450"}) | ||
|
||
const sessions = { | ||
entities: { | ||
KbZNe9FuSHnKKfB398B0Z: { | ||
id: "KbZNe9FuSHnKKfB398B0Z", | ||
name: null, | ||
createdAt: expect.any(String), | ||
updatedAt: expect.any(String), | ||
}, | ||
Zf8vsxTZ4mqT7IK1OtvRf: { | ||
id: "Zf8vsxTZ4mqT7IK1OtvRf", | ||
name: null, | ||
createdAt: expect.any(String), | ||
updatedAt: expect.any(String), | ||
}, | ||
sIpManYfhNgo6gWdu10bA: { | ||
id: "sIpManYfhNgo6gWdu10bA", | ||
name: null, | ||
createdAt: expect.any(String), | ||
updatedAt: expect.any(String), | ||
}, | ||
}, | ||
ids: [ | ||
"KbZNe9FuSHnKKfB398B0Z", | ||
"sIpManYfhNgo6gWdu10bA", | ||
"Zf8vsxTZ4mqT7IK1OtvRf", | ||
], | ||
} | ||
|
||
const histories = { | ||
KbZNe9FuSHnKKfB398B0Z: [ | ||
{ | ||
queryId: "KbZNe9FuSHnKKfB398B0Z", | ||
version: "mDbO6knM4vakcKQ0u4CLv", | ||
}, | ||
], | ||
Zf8vsxTZ4mqT7IK1OtvRf: [ | ||
{ | ||
queryId: "Zf8vsxTZ4mqT7IK1OtvRf", | ||
version: "88LzM379511XaOMGPKkHB", | ||
}, | ||
{ | ||
queryId: "Zf8vsxTZ4mqT7IK1OtvRf", | ||
version: "YXX7LtHVgCJRgJPNR-USP", | ||
}, | ||
], | ||
sIpManYfhNgo6gWdu10bA: [ | ||
{ | ||
queryId: "sIpManYfhNgo6gWdu10bA", | ||
version: "BQS4GdEC5JcgV1fankooP", | ||
}, | ||
], | ||
} | ||
|
||
for (const state of getAllStates(next)) { | ||
expect(state.querySessions).toEqual(sessions) | ||
expect(state.sessionHistories).toEqual(histories) | ||
} | ||
}) |
Oops, something went wrong.