-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/lazy-loading #31
Merged
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
659df04
lazy loading in credentials
petrKavulok 9bbf4cc
lazy loadinf in Clients
petrKavulok edee7a1
lazy loading in tenants
petrKavulok e4c84f5
obsolete code removal
petrKavulok 0f26424
lazy loading in sessions
petrKavulok f1a3446
lazy loading in Resources
petrKavulok 9f9c09c
lazy loading in home moduleů
petrKavulok bf5713b
lazy loading in Roles
petrKavulok 678c748
CHANGELOG.md update
petrKavulok 676a8c5
Merge branch 'main' into feature/lazy-loading
petrKavulok ebd7e08
asab-webui's componentLoader for lazy loading init
petrKavulok 76b8e62
init componentLoader for lazy loading in HomeContainer
petrKavulok b3c9eb6
Merge branch 'main' into feature/lazy-loading
petrKavulok b04950e
Merge branch 'main' into feature/lazy-loading
petrKavulok c1c5539
CHANGELOG.md update
petrKavulok e0489a3
CHANGELOG.md & asab-webui submodule update
petrKavulok 052aa8e
CHANGELOG.md typo update
petrKavulok 256615a
CHANGELOG.md sprint no. update
petrKavulok 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 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 |
---|---|---|
|
@@ -38,8 +38,6 @@ function TenantDetailContainer(props) { | |
const [page, setPage] = useState(1); | ||
const [filter, setFilter] = useState(""); | ||
const limit = 10; | ||
const [username, setUsername] = useState(); | ||
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. @petrKavulok PLease add the information about what has been removed and why to the changelog please :) |
||
const [edit, setEdit] = useState(false); | ||
const [loading, setLoading] = useState(true); | ||
const [loadingCustomData, setLoadingCustomData] = useState(true); | ||
const [show, setShow] = useState(false); | ||
|
@@ -124,10 +122,6 @@ function TenantDetailContainer(props) { | |
retrieveData(); | ||
}, []); | ||
|
||
useEffect(() => { | ||
data.created_by && retrieveUserName(); | ||
}, [data.created_by]); | ||
|
||
const retrieveData = async () => { | ||
try { | ||
let response = await SeaCatAuthAPI.get(`/tenant/${tenant_id}`); | ||
|
@@ -141,19 +135,6 @@ function TenantDetailContainer(props) { | |
} | ||
}; | ||
|
||
const retrieveUserName = async () => { | ||
try { | ||
let response = await SeaCatAuthAPI.put(`usernames`, [data.created_by]); | ||
if (response.data.result !== "OK") { | ||
throw new Error(t("TenantDetailContainer|Something went wrong, failed to fetch assigned credentials")); | ||
} | ||
setUsername(response.data.data[data.created_by]); | ||
} catch (e) { | ||
console.error(e); | ||
props.app.addAlert("warning", `${t("TenantDetailContainer|Something went wrong, failed to fetch assigned credentials")}. ${e?.response?.data?.message}`, 30); | ||
} | ||
} | ||
|
||
const retrieveAssignedCredentials = async () => { | ||
try { | ||
let response = await SeaCatAuthAPI.get(`/credentials?m=tenant&f=${tenant_id}`, {params: {p:page, i: limit}}); | ||
|
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
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.
@petrKavulok Ok, why were those items removed and why it is not in changelog or at least in the description of this PR then? Its very hard to distinguish from reviewers point of view, why this change has been made without any context .
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.
I removed it because I noticed that this functionality was already taken care of by the
<Credentials />
component. I should have made a separate PR for that. Sorry, next time I'll separate it to two PRs