Skip to content
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

[react-components/dashboard] upgrade react-leaflet and fix map overlays #553

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d6d3da1
update gri sizing to auto
vallq Oct 11, 2021
d4f1050
remove table headers
vallq Oct 11, 2021
f606e40
add padding to table and remove headers
vallq Oct 11, 2021
bf685c3
fix height of scrollable panels and tables
vallq Oct 11, 2021
879d74c
update doors and lifts panel
vallq Oct 12, 2021
f84ee40
update cell colors
vallq Oct 12, 2021
6e08d5f
add padding to door state labels
vallq Oct 12, 2021
acb79b1
localise css to buttons
vallq Oct 12, 2021
e6e0ff0
update stories with lifts and doors of longer nnames
vallq Oct 12, 2021
1aba5ed
change building to infrastructure
vallq Oct 12, 2021
10bea7d
update with tooltip and truncating when word is too long
vallq Oct 14, 2021
68fec50
use mui theme formatting and colors
vallq Oct 19, 2021
14eb804
standardise workcell tables
vallq Oct 19, 2021
7ff5133
update to use theme spacing
vallq Oct 22, 2021
44e1334
use contrastText instead of getContrastText
vallq Oct 26, 2021
c47d9f6
add style for workcells table
vallq Oct 26, 2021
20f5d7c
(Feat) zooming in of infrastructure components (#540)
Nov 5, 2021
62e8090
merge branch 'main' of https://github.com/open-rmf/rmf-web into featu…
vallq Nov 10, 2021
f6b49c7
resolve type errors
vallq Nov 11, 2021
5360ef5
fix panel interfaces
vallq Nov 12, 2021
3f108ae
add margin to lift panel
vallq Nov 12, 2021
f312b04
add leaflet umap to panels
vallq Nov 12, 2021
a36845f
add styling for absolute positioning
vallq Nov 12, 2021
b914973
update test spec details
vallq Nov 12, 2021
b573f71
add top margin for ingestor table
vallq Nov 12, 2021
8ced325
update themes provider
vallq Nov 17, 2021
8a713ab
merge branch 'main' of https://github.com/open-rmf/rmf-web into featu…
vallq Nov 22, 2021
e05653d
remove sticky header and update table cell variants
vallq Nov 23, 2021
4816c42
add leaflet prop for centering function
vallq Nov 23, 2021
0deaa34
fix lint errors
vallq Nov 23, 2021
f7460df
revert imports
vallq Nov 23, 2021
f855411
commit new api client lib version
vallq Nov 23, 2021
bcca266
add event handlers and overlay handlers to schedule visualizer
vallq Nov 24, 2021
d78a190
merge branch 'main' of https://github.com/open-rmf/rmf-web into fix/m…
vallq Nov 24, 2021
4401d85
revert lint changes in dashboard components
vallq Nov 24, 2021
7c8bcd4
temp removal of traj time control
vallq Nov 24, 2021
5757d4f
merge branch 'feature/infrastructure-tab' of https://github.com/open-…
vallq Nov 25, 2021
79db590
change leaflet context api
vallq Nov 25, 2021
b3767f3
use leafletcontextinterface for components
vallq Dec 2, 2021
0d2a086
add leaflet map to dashboard
vallq Dec 2, 2021
93e69a5
add ref to map container
vallq Dec 2, 2021
954d443
restore zoom to center on icon
vallq Dec 7, 2021
188c0b7
merge branch 'main' of https://github.com/open-rmf/rmf-web into fix/m…
vallq Dec 7, 2021
b8b99ee
render maps
vallq Dec 9, 2021
e46a626
revert svgoverlay ref to previous
vallq Dec 9, 2021
4f94827
add lift and door states to robot page:
vallq Dec 9, 2021
0ba56f8
update piplock and package-lock
vallq Dec 9, 2021
53543aa
add in prev traj time control, exclude from build
vallq Dec 9, 2021
b50742b
merge branch 'main' of https://github.com/open-rmf/rmf-web into fix/m…
vallq Dec 9, 2021
f32e776
minor ui updates for celled components
vallq Dec 9, 2021
3d22d09
add todo and eslint disable line
vallq Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 142 additions & 118 deletions Pipfile.lock

Large diffs are not rendered by default.

2,231 changes: 1,105 additions & 1,126 deletions package-lock.json

Large diffs are not rendered by default.

137 changes: 68 additions & 69 deletions packages/api-client/lib/openapi/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2391,12 +2391,11 @@ export const AdminApiFp = function (configuration?: Configuration) {
permission: Permission,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.addRolePermissionAdminRolesRolePermissionsPost(
role,
permission,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.addRolePermissionAdminRolesRolePermissionsPost(
role,
permission,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand All @@ -2412,12 +2411,11 @@ export const AdminApiFp = function (configuration?: Configuration) {
postRoles: PostRoles,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.addUserRoleAdminUsersUsernameRolesPost(
username,
postRoles,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.addUserRoleAdminUsersUsernameRolesPost(
username,
postRoles,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -2501,12 +2499,11 @@ export const AdminApiFp = function (configuration?: Configuration) {
role: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.deleteUserRoleAdminUsersUsernameRolesRoleDelete(
username,
role,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUserRoleAdminUsersUsernameRolesRoleDelete(
username,
role,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand All @@ -2520,11 +2517,10 @@ export const AdminApiFp = function (configuration?: Configuration) {
role: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Permission>>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getRolePermissionsAdminRolesRolePermissionsGet(
role,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.getRolePermissionsAdminRolesRolePermissionsGet(
role,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -2598,12 +2594,11 @@ export const AdminApiFp = function (configuration?: Configuration) {
postMakeAdmin: PostMakeAdmin,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.makeAdminAdminUsersUsernameMakeAdminPost(
username,
postMakeAdmin,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.makeAdminAdminUsersUsernameMakeAdminPost(
username,
postMakeAdmin,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand All @@ -2619,12 +2614,11 @@ export const AdminApiFp = function (configuration?: Configuration) {
permission: Permission,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.removeRolePermissionAdminRolesRolePermissionsRemovePost(
role,
permission,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.removeRolePermissionAdminRolesRolePermissionsRemovePost(
role,
permission,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand All @@ -2640,12 +2634,11 @@ export const AdminApiFp = function (configuration?: Configuration) {
postRoles: Array<PostRoles>,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.setUserRolesAdminUsersUsernameRolesPut(
username,
postRoles,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.setUserRolesAdminUsersUsernameRolesPut(
username,
postRoles,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
};
Expand Down Expand Up @@ -3318,8 +3311,9 @@ export const DefaultApiFp = function (configuration?: Configuration) {
async getEffectivePermissionsPermissionsGet(
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Permission>>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getEffectivePermissionsPermissionsGet(options);
const localVarAxiosArgs = await localVarAxiosParamCreator.getEffectivePermissionsPermissionsGet(
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -3546,8 +3540,10 @@ export const DispensersApiFp = function (configuration?: Configuration) {
guid: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DispenserHealth>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getDispenserHealthDispensersGuidHealthGet(guid, options);
const localVarAxiosArgs = await localVarAxiosParamCreator.getDispenserHealthDispensersGuidHealthGet(
guid,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand All @@ -3561,8 +3557,10 @@ export const DispensersApiFp = function (configuration?: Configuration) {
guid: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DispenserState>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getDispenserStateDispensersGuidStateGet(guid, options);
const localVarAxiosArgs = await localVarAxiosParamCreator.getDispenserStateDispensersGuidStateGet(
guid,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -3925,12 +3923,11 @@ export const DoorsApiFp = function (configuration?: Configuration) {
doorRequest: DoorRequest,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.postDoorRequestDoorsDoorNameRequestPost(
doorName,
doorRequest,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.postDoorRequestDoorsDoorNameRequestPost(
doorName,
doorRequest,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
};
Expand Down Expand Up @@ -4347,12 +4344,11 @@ export const FleetsApiFp = function (configuration?: Configuration) {
robot: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RobotHealth>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getRobotHealthFleetsFleetRobotHealthGet(
fleet,
robot,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.getRobotHealthFleetsFleetRobotHealthGet(
fleet,
robot,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -4700,8 +4696,10 @@ export const IngestorsApiFp = function (configuration?: Configuration) {
guid: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngestorHealth>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getIngestorHealthIngestorsGuidHealthGet(guid, options);
const localVarAxiosArgs = await localVarAxiosParamCreator.getIngestorHealthIngestorsGuidHealthGet(
guid,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand All @@ -4715,8 +4713,10 @@ export const IngestorsApiFp = function (configuration?: Configuration) {
guid: string,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngestorState>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.getIngestorStateIngestorsGuidStateGet(guid, options);
const localVarAxiosArgs = await localVarAxiosParamCreator.getIngestorStateIngestorsGuidStateGet(
guid,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -5079,12 +5079,11 @@ export const LiftsApiFp = function (configuration?: Configuration) {
liftRequest: LiftRequest,
options?: any,
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.postLiftRequestLiftsLiftNameRequestPost(
liftName,
liftRequest,
options,
);
const localVarAxiosArgs = await localVarAxiosParamCreator.postLiftRequestLiftsLiftNameRequestPost(
liftName,
liftRequest,
options,
);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
};
Expand Down
10 changes: 5 additions & 5 deletions packages/dashboard/src/components/admin/role-list-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ export function RoleListPage(): JSX.Element | null {
createRole={async (role) => {
try {
await adminApi.createRoleAdminRolesPost({ name: role });
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
deleteRole={async (role) => {
try {
await adminApi.deleteRoleAdminRolesRoleDelete(role);
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
getPermissions={async (role) => {
try {
return (await adminApi.getRolePermissionsAdminRolesRolePermissionsGet(role)).data;
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
savePermission={async (role, permission) => {
try {
await adminApi.addRolePermissionAdminRolesRolePermissionsPost(role, permission);
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
Expand All @@ -50,7 +50,7 @@ export function RoleListPage(): JSX.Element | null {
role,
permission,
);
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
Expand Down
12 changes: 5 additions & 7 deletions packages/dashboard/src/components/admin/user-profile-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function UserProfilePage(): JSX.Element | null {
(async () => {
try {
setUser((await safeAsync(adminApi.getUserAdminUsersUsernameGet(userId))).data);
} catch (e) {
} catch (e: any) {
if ((e as AxiosError).response?.status !== 404) {
throw new Error(getApiErrorMessage(e));
}
Expand Down Expand Up @@ -53,7 +53,7 @@ export function UserProfilePage(): JSX.Element | null {
try {
await adminApi.makeAdminAdminUsersUsernameMakeAdminPost(user.username, { admin });
refresh();
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
Expand All @@ -64,20 +64,18 @@ export function UserProfilePage(): JSX.Element | null {
getAllRoles={async () => {
try {
return (await adminApi.getRolesAdminRolesGet()).data;
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
saveRoles={async (roles) => {
try {
await adminApi.setUserRolesAdminUsersUsernameRolesPut(
user.username,
roles.map((r) => ({
name: r,
})),
roles.map((r) => ({ name: r })),
);
refresh();
} catch (e) {
} catch (e: any) {
throw new Error(getApiErrorMessage(e));
}
}}
Expand Down
Loading