This commit is contained in:
burnettk 2024-01-30 13:18:44 -05:00
parent b4f85925d6
commit 4cb1f33ac9
No known key found for this signature in database
1 changed files with 11 additions and 13 deletions

View File

@ -37,20 +37,18 @@ export default function DataStoreListTiles({
);
useEffect(() => {
if (permissionsLoaded) {
if (ability.can('GET', targetUris.dataStoreListPath)) {
if (defaultDataStores) {
setDataStores(defaultDataStores);
} else {
let queryParams = '?per_page=1000';
if (processGroup) {
queryParams = `${queryParams}&process_group_identifier=${processGroup.id}`;
}
HttpService.makeCallToBackend({
path: `${targetUris.dataStoreListPath}${queryParams}`,
successCallback: setDataStores,
});
if (permissionsLoaded && ability.can('GET', targetUris.dataStoreListPath)) {
if (defaultDataStores) {
setDataStores(defaultDataStores);
} else {
let queryParams = '?per_page=1000';
if (processGroup) {
queryParams = `${queryParams}&process_group_identifier=${processGroup.id}`;
}
HttpService.makeCallToBackend({
path: `${targetUris.dataStoreListPath}${queryParams}`,
successCallback: setDataStores,
});
}
}
}, [