[arvados-workbench2] updated: 2.4.0-193-g8a14f234
git repository hosting
git at public.arvados.org
Wed Oct 5 19:23:11 UTC 2022
Summary of changes:
src/services/common-service/common-resource-service.test.ts | 5 +++--
src/services/common-service/common-service.ts | 10 ++++------
src/store/virtual-machines/virtual-machines-actions.ts | 2 ++
3 files changed, 9 insertions(+), 8 deletions(-)
via 8a14f234c55995ad2c4ffea54f12e1763090ec0d (commit)
via 0095829c16c9756ca03a278687a89fafe2870f86 (commit)
from 0f55c7182b5231712e77f2538dd0c69336558647 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 8a14f234c55995ad2c4ffea54f12e1763090ec0d
Author: Stephen Smith <stephen at curii.com>
Date: Wed Oct 5 15:22:53 2022 -0400
18979: Filter user vm panel request to only fetch current user login permissions
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/store/virtual-machines/virtual-machines-actions.ts b/src/store/virtual-machines/virtual-machines-actions.ts
index 37503e61..bd07efb6 100644
--- a/src/store/virtual-machines/virtual-machines-actions.ts
+++ b/src/store/virtual-machines/virtual-machines-actions.ts
@@ -105,11 +105,13 @@ export const loadVirtualMachinesAdminData = () =>
export const loadVirtualMachinesUserData = () =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch<any>(loadRequestedDate());
+ const user = getState().auth.user;
const virtualMachines = await services.virtualMachineService.list();
const virtualMachinesUuids = virtualMachines.items.map(it => it.uuid);
const links = await services.linkService.list({
filters: new FilterBuilder()
.addIn("head_uuid", virtualMachinesUuids)
+ .addEqual("tail_uuid", user?.uuid)
.getFilters()
});
dispatch(virtualMachinesActions.SET_VIRTUAL_MACHINES(virtualMachines));
commit 0095829c16c9756ca03a278687a89fafe2870f86
Author: Stephen Smith <stephen at curii.com>
Date: Wed Oct 5 15:22:13 2022 -0400
18979: Switch common resource list request to use urlencoded post body for large requests
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/services/common-service/common-resource-service.test.ts b/src/services/common-service/common-resource-service.test.ts
index b94756ae..7f47f20e 100644
--- a/src/services/common-service/common-resource-service.test.ts
+++ b/src/services/common-service/common-resource-service.test.ts
@@ -136,8 +136,9 @@ describe("CommonResourceService", () => {
await commonResourceService.list({ filters: tooBig });
expect(axiosMock.history.get.length).toBe(0);
expect(axiosMock.history.post.length).toBe(1);
- expect(axiosMock.history.post[0].data.get('filters')).toBe(`[${tooBig}]`);
- expect(axiosMock.history.post[0].params._method).toBe('GET');
+ const postParams = new URLSearchParams(axiosMock.history.post[0].data);
+ expect(postParams.get('filters')).toBe(`[${tooBig}]`);
+ expect(postParams.get('_method')).toBe('GET');
});
it("#list using GET when query string is not too big", async () => {
diff --git a/src/services/common-service/common-service.ts b/src/services/common-service/common-service.ts
index f16a2024..bdae87ab 100644
--- a/src/services/common-service/common-service.ts
+++ b/src/services/common-service/common-service.ts
@@ -156,7 +156,9 @@ export class CommonService<T> {
);
} else {
// Using the POST special case to avoid URI length 414 errors.
- const formData = new FormData();
+ // We must use urlencoded post body since api doesn't support form data
+ // const formData = new FormData();
+ const formData = new URLSearchParams();
formData.append("_method", "GET");
Object.keys(params).forEach(key => {
if (params[key] !== undefined) {
@@ -164,11 +166,7 @@ export class CommonService<T> {
}
});
return CommonService.defaultResponse(
- this.serverApi.post(`/${this.resourceType}`, formData, {
- params: {
- _method: 'GET'
- }
- }),
+ this.serverApi.post(`/${this.resourceType}`, formData, {}),
this.actions,
showErrors
);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list