fixed devices page not refreshing after changing group
This commit is contained in:
parent
db1b3c54a4
commit
538c807766
3 changed files with 30 additions and 21 deletions
|
|
@ -112,10 +112,6 @@ export default function Devices() {
|
|||
})
|
||||
}, [tab])
|
||||
|
||||
useEffect(() => {
|
||||
console.log(groupPermissions)
|
||||
}, [groupPermissions])
|
||||
|
||||
const openProvisionDialog = () => {
|
||||
setIsProvisionDialogOpen(true);
|
||||
};
|
||||
|
|
@ -182,7 +178,6 @@ export default function Devices() {
|
|||
}
|
||||
|
||||
const loadDevices = () => {
|
||||
console.log("loading devices")
|
||||
setDevicesLoading(true)
|
||||
deviceAPI.list(
|
||||
limit,
|
||||
|
|
@ -217,7 +212,6 @@ export default function Devices() {
|
|||
getContextTypes()
|
||||
).then(resp => {
|
||||
let stats = pond.DeviceStatistics.fromObject(resp.data.stats)
|
||||
// console.log(stats)
|
||||
setStats(stats)
|
||||
}).finally(() => {
|
||||
setLoadingStats(false)
|
||||
|
|
@ -233,7 +227,6 @@ export default function Devices() {
|
|||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
// console.log("groups loaded")
|
||||
loadGroups()
|
||||
}, [groupLimit, groupPage, orderGroup, orderGroupBy, searchGroup])
|
||||
|
||||
|
|
@ -397,7 +390,7 @@ export default function Devices() {
|
|||
onRowClick={toDevice}
|
||||
setSearchText={setSearch}
|
||||
isLoading={devicesLoading}
|
||||
actions={getGroup() && <GroupActions group={getGroup()} permissions={groupPermissions} devices={devices} refreshCallback={loadGroups}/>}
|
||||
actions={getGroup() && <GroupActions group={getGroup()} permissions={groupPermissions} devices={devices} refreshCallback={loadDevices}/>}
|
||||
/>
|
||||
<ProvisionDevice
|
||||
isOpen={isProvisionDialogOpen}
|
||||
|
|
@ -411,6 +404,7 @@ export default function Devices() {
|
|||
closeDialogCallback={closeGroupSettings}
|
||||
refreshCallback={loadDevices}
|
||||
canEdit={true}
|
||||
groupDevices={devices}
|
||||
/>
|
||||
</PageContainer>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue