-
Notifications
You must be signed in to change notification settings - Fork 7
Vulnerability scanner: Add ability to see all items on a server if one is an administrator #322
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,6 @@ | |
| "requiredFeatures": [ | ||
| "API Publishing" | ||
| ], | ||
| "version": "2.0.2" | ||
| "version": "3.0.2" | ||
| } | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -20,20 +20,22 @@ export const useContentStore = defineStore("content", () => { | |
| const contentList = ref<ContentListItem[]>([]); | ||
| const isLoading = ref(false); | ||
| const error = ref<Error | null>(null); | ||
| const showAllContent = ref(false); | ||
|
|
||
| // Track if content has been loaded | ||
| // Track if content has been loaded for the current mode | ||
| const isContentLoaded = ref(false); | ||
|
|
||
| // Fetch all available content items | ||
| async function fetchContentList() { | ||
| // Skip if content is already loaded | ||
| if (isContentLoaded.value && contentList.value.length > 0) return; | ||
| async function fetchContentList(forceRefresh: boolean = false) { | ||
| // Skip if content is already loaded for this mode (unless forcing refresh) | ||
| if (!forceRefresh && isContentLoaded.value && contentList.value.length > 0) return; | ||
|
Comment on lines
+29
to
+31
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using this it was a bit jarring to flip back and forth and have the entire UI reload. I wonder if we could store the content separately so once loaded a use can swap back and forth. Definitely too big for this PR though since that would require a substantial refactor. |
||
|
|
||
| isLoading.value = true; | ||
| error.value = null; | ||
|
|
||
| try { | ||
| const response = await fetch("api/content"); | ||
| const url = showAllContent.value ? "api/content?show_all=true" : "api/content"; | ||
| const response = await fetch(url); | ||
|
|
||
| if (!response.ok) { | ||
| throw new Error(`HTTP error! Status: ${response.status}`); | ||
|
|
@@ -57,6 +59,7 @@ export const useContentStore = defineStore("content", () => { | |
| isLoading, | ||
| error, | ||
| isContentLoaded, | ||
| showAllContent, | ||
|
|
||
| // Actions | ||
| fetchContentList, | ||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice, but not necessary to break this into a separate component.