-
Notifications
You must be signed in to change notification settings - Fork 134
Allow delete database schema #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
77520d7
Fix: register DELETE /graphs/{graph_id} router at module level (was n…
gkorland 0e9a975
Merge branch 'staging' into delete-graph
gkorland 89a7685
Delete demo_organization.py
gkorland 00f0ecd
Delete E2E_TESTING_SUMMARY.md
gkorland 46afa5a
revert
gkorland b24d2b4
return 404 on deleted graph
gkorland 47a0216
fix css
gkorland 4a035ef
Merge branch 'staging' into delete-graph
gkorland 5b8a1bf
Merge branch 'staging' into delete-graph
gkorland 6accd67
Merge branch 'staging' into delete-graph
gkorland e0d292c
Merge branch 'staging' into delete-graph
gkorland 4921a0a
fix delete graph
gkorland 4deb0f1
Merge branch 'staging' into delete-graph
gkorland 9b91bf9
Potential fix for code scanning alert no. 131: Log Injection
gkorland ffef1df
sanitize_log_input
gkorland 483b6be
fix message
gkorland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,62 @@ | ||
| /** | ||
| * Helper to manage the custom graph selector UI. | ||
| * Exposes functions to get/set the selected graph and render the list. | ||
| */ | ||
| import { DOM } from './config'; | ||
|
|
||
| export function getSelectedGraph(): string | null { | ||
| const selectedLabel = document.getElementById('graph-selected'); | ||
| const text = selectedLabel?.querySelector('.dropdown-text')?.textContent; | ||
| if (text) return text; | ||
| return null; | ||
| } | ||
|
|
||
| export function setSelectedGraph(name: string) { | ||
| const selectedLabel = document.getElementById('graph-selected'); | ||
| const textNode = selectedLabel?.querySelector('.dropdown-text'); | ||
| if (textNode) textNode.textContent = name; | ||
| } | ||
|
|
||
| export function clearGraphOptions() { | ||
| const optionsContainer = document.getElementById('graph-options'); | ||
| if (optionsContainer) optionsContainer.innerHTML = ''; | ||
| } | ||
|
|
||
| export function addGraphOption(name: string, onSelect: (n: string) => void, onDelete: (n: string) => void) { | ||
| const optionsContainer = document.getElementById('graph-options'); | ||
| if (!optionsContainer) return; | ||
| const row = document.createElement('div'); | ||
| row.className = 'dropdown-option'; | ||
| row.setAttribute('data-value', name); | ||
| const icon = document.createElement('span'); | ||
| icon.className = 'db-icon'; | ||
| // optional: could add icons later | ||
| const text = document.createElement('span'); | ||
| text.textContent = name; | ||
| row.appendChild(icon); | ||
| row.appendChild(text); | ||
|
|
||
| const delBtn = document.createElement('button'); | ||
| delBtn.className = 'delete-btn'; | ||
| delBtn.title = `Delete ${name}`; | ||
| delBtn.innerHTML = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6"></path><path d="M14 11v6"></path><path d="M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2"></path></svg>`; | ||
| row.appendChild(delBtn); | ||
|
|
||
| row.addEventListener('click', () => { | ||
| setSelectedGraph(name); | ||
| onSelect(name); | ||
| optionsContainer.classList.remove('open'); | ||
| }); | ||
|
|
||
| delBtn.addEventListener('click', (ev) => { | ||
| ev.stopPropagation(); | ||
| onDelete(name); | ||
| }); | ||
|
|
||
| optionsContainer.appendChild(row); | ||
| } | ||
|
|
||
| export function toggleOptions() { | ||
| const optionsContainer = document.getElementById('graph-options'); | ||
| if (optionsContainer) optionsContainer.classList.toggle('open'); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.