@northern.tech/store 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.cjs +21 -16
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +7 -22
- package/dist/actions.d.ts +7 -22
- package/dist/actions.js +8 -8
- package/dist/appSlice/index.cjs +1 -0
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +1 -1
- package/dist/appSlice/index.d.ts +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/mocks.cjs +1 -0
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.js +1 -1
- package/dist/appSlice/selectors.d.cts +34 -528
- package/dist/appSlice/selectors.d.ts +34 -528
- package/dist/appSlice/thunks.cjs +46 -41
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.d.cts +5 -3
- package/dist/appSlice/thunks.d.ts +5 -3
- package/dist/appSlice/thunks.js +15 -15
- package/dist/{chunk-C5NXNZ7F.js → chunk-2SAH2AN2.js} +23 -30
- package/dist/chunk-2SAH2AN2.js.map +1 -0
- package/dist/{chunk-QOFVCPRW.js → chunk-5PUF4LA5.js} +1 -1
- package/dist/chunk-5PUF4LA5.js.map +1 -0
- package/dist/{chunk-ZRMB4U7Z.js → chunk-5XUPXMYV.js} +4 -4
- package/dist/{chunk-ZNAJKEP2.js → chunk-CQXDAXQF.js} +1 -1
- package/dist/chunk-CQXDAXQF.js.map +1 -0
- package/dist/{chunk-OFGCC3GM.js → chunk-IUGHRJV2.js} +2 -1
- package/dist/chunk-IUGHRJV2.js.map +1 -0
- package/dist/{chunk-WCBHYLUK.js → chunk-KJ4BPXMB.js} +1 -1
- package/dist/chunk-KJ4BPXMB.js.map +1 -0
- package/dist/{chunk-OGUVURJ5.js → chunk-KVZEKHVC.js} +12 -12
- package/dist/{chunk-5ZCZTTYX.js → chunk-LX4YRTYY.js} +5 -5
- package/dist/{chunk-C2LGE3P6.js → chunk-OLKM53RL.js} +1 -1
- package/dist/chunk-OLKM53RL.js.map +1 -0
- package/dist/{chunk-4HSH7RH3.js → chunk-PIFXECFW.js} +10 -10
- package/dist/{chunk-HLX5L3IM.js → chunk-PVCHKW35.js} +1 -1
- package/dist/chunk-PVCHKW35.js.map +1 -0
- package/dist/{chunk-REZWSU22.js → chunk-VODRLEDP.js} +21 -17
- package/dist/chunk-VODRLEDP.js.map +1 -0
- package/dist/{chunk-MH5WPYQI.js → chunk-X7NEALMI.js} +16 -9
- package/dist/chunk-X7NEALMI.js.map +1 -0
- package/dist/{chunk-TKIOEF3B.js → chunk-ZWLCUOQN.js} +6 -6
- package/dist/commonSelectors.cjs +15 -8
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +178 -3523
- package/dist/commonSelectors.d.ts +178 -3523
- package/dist/commonSelectors.js +3 -3
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +1 -1
- package/dist/deploymentsSlice/index.d.ts +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.js +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +16 -138
- package/dist/deploymentsSlice/selectors.d.ts +16 -138
- package/dist/deploymentsSlice/thunks.cjs +46 -41
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +4 -2
- package/dist/deploymentsSlice/thunks.d.ts +4 -2
- package/dist/deploymentsSlice/thunks.js +15 -15
- package/dist/devicesSlice/index.cjs +20 -16
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +11 -20
- package/dist/devicesSlice/index.d.ts +11 -20
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.cjs +24 -22
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.d.cts +20 -12
- package/dist/devicesSlice/mocks.d.ts +20 -12
- package/dist/devicesSlice/mocks.js +5 -7
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +15 -8
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +207 -1730
- package/dist/devicesSlice/selectors.d.ts +207 -1730
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/devicesSlice/thunks.cjs +46 -43
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +12 -46
- package/dist/devicesSlice/thunks.d.ts +12 -46
- package/dist/devicesSlice/thunks.js +15 -17
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +1 -1
- package/dist/monitorSlice/index.d.ts +1 -1
- package/dist/monitorSlice/index.js +1 -1
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/thunks.cjs +36 -24
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +3 -2
- package/dist/monitorSlice/thunks.d.ts +3 -2
- package/dist/monitorSlice/thunks.js +13 -13
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +1 -1
- package/dist/onboardingSlice/index.d.ts +1 -1
- package/dist/onboardingSlice/index.js +1 -1
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.js +1 -1
- package/dist/onboardingSlice/thunks.cjs +46 -41
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +7 -15
- package/dist/onboardingSlice/thunks.d.ts +7 -15
- package/dist/onboardingSlice/thunks.js +15 -15
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +41 -31
- package/dist/organizationSlice/index.d.ts +41 -31
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.d.cts +42 -659
- package/dist/organizationSlice/selectors.d.ts +42 -659
- package/dist/organizationSlice/thunks.cjs +46 -41
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +4 -1
- package/dist/organizationSlice/thunks.d.ts +4 -1
- package/dist/organizationSlice/thunks.js +15 -15
- package/dist/organizationSlice/types.cjs.map +1 -1
- package/dist/organizationSlice/types.d.cts +2 -12
- package/dist/organizationSlice/types.d.ts +2 -12
- package/dist/releasesSlice/mocks.d.cts +7 -1
- package/dist/releasesSlice/mocks.d.ts +7 -1
- package/dist/releasesSlice/selectors.d.cts +155 -930
- package/dist/releasesSlice/selectors.d.ts +155 -930
- package/dist/releasesSlice/thunks.cjs +36 -24
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +4 -2
- package/dist/releasesSlice/thunks.d.ts +4 -2
- package/dist/releasesSlice/thunks.js +13 -13
- package/dist/selectors.cjs +15 -8
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +6 -3
- package/dist/selectors.d.ts +6 -3
- package/dist/selectors.js +17 -17
- package/dist/store.cjs +21 -16
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +40 -658
- package/dist/store.d.ts +40 -658
- package/dist/store.js +9 -9
- package/dist/storehooks.cjs +47 -41
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +16 -15
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +46 -43
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +7 -5
- package/dist/thunks.d.ts +7 -5
- package/dist/thunks.js +15 -17
- package/dist/useDeploymentDevice.cjs +46 -41
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +15 -15
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +46 -46
- package/dist/usersSlice/index.d.ts +46 -46
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.d.cts +75 -1436
- package/dist/usersSlice/selectors.d.ts +75 -1436
- package/dist/usersSlice/thunks.cjs +46 -41
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.d.cts +3 -1
- package/dist/usersSlice/thunks.d.ts +3 -1
- package/dist/usersSlice/thunks.js +15 -15
- package/package.json +7 -7
- package/dist/chunk-C2LGE3P6.js.map +0 -1
- package/dist/chunk-C5NXNZ7F.js.map +0 -1
- package/dist/chunk-HLX5L3IM.js.map +0 -1
- package/dist/chunk-MH5WPYQI.js.map +0 -1
- package/dist/chunk-OFGCC3GM.js.map +0 -1
- package/dist/chunk-QOFVCPRW.js.map +0 -1
- package/dist/chunk-REZWSU22.js.map +0 -1
- package/dist/chunk-WCBHYLUK.js.map +0 -1
- package/dist/chunk-ZNAJKEP2.js.map +0 -1
- /package/dist/{chunk-ZRMB4U7Z.js.map → chunk-5XUPXMYV.js.map} +0 -0
- /package/dist/{chunk-OGUVURJ5.js.map → chunk-KVZEKHVC.js.map} +0 -0
- /package/dist/{chunk-5ZCZTTYX.js.map → chunk-LX4YRTYY.js.map} +0 -0
- /package/dist/{chunk-4HSH7RH3.js.map → chunk-PIFXECFW.js.map} +0 -0
- /package/dist/{chunk-TKIOEF3B.js.map → chunk-ZWLCUOQN.js.map} +0 -0
|
@@ -3,21 +3,23 @@ import { AppDispatch, RootState } from '../store.cjs';
|
|
|
3
3
|
import { SearchState } from './index.cjs';
|
|
4
4
|
import 'redux-thunk';
|
|
5
5
|
import 'redux';
|
|
6
|
-
import '@northern.tech/utils/constants';
|
|
7
|
-
import '../usersSlice/constants.cjs';
|
|
8
6
|
import '../usersSlice/index.cjs';
|
|
9
7
|
import 'immer';
|
|
10
8
|
import '@northern.tech/types/MenderTypes';
|
|
9
|
+
import '@northern.tech/utils/constants';
|
|
11
10
|
import '../commonConstants.cjs';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
12
|
+
import '../usersSlice/constants.cjs';
|
|
13
13
|
import '../releasesSlice/index.cjs';
|
|
14
|
+
import '../organizationSlice/index.cjs';
|
|
14
15
|
import '../organizationSlice/types.cjs';
|
|
15
16
|
import './constants.cjs';
|
|
16
17
|
import '@mui/material/OverridableComponent';
|
|
17
18
|
import '@mui/material';
|
|
18
19
|
import '../organizationSlice/constants.cjs';
|
|
19
20
|
import '../onboardingSlice/index.cjs';
|
|
20
|
-
import '
|
|
21
|
+
import '../monitorSlice/index.cjs';
|
|
22
|
+
import '../monitorSlice/constants.cjs';
|
|
21
23
|
import '../deploymentsSlice/index.cjs';
|
|
22
24
|
import '../devicesSlice/index.cjs';
|
|
23
25
|
import '../devicesSlice/constants.cjs';
|
|
@@ -3,21 +3,23 @@ import { AppDispatch, RootState } from '../store.js';
|
|
|
3
3
|
import { SearchState } from './index.js';
|
|
4
4
|
import 'redux-thunk';
|
|
5
5
|
import 'redux';
|
|
6
|
-
import '@northern.tech/utils/constants';
|
|
7
|
-
import '../usersSlice/constants.js';
|
|
8
6
|
import '../usersSlice/index.js';
|
|
9
7
|
import 'immer';
|
|
10
8
|
import '@northern.tech/types/MenderTypes';
|
|
9
|
+
import '@northern.tech/utils/constants';
|
|
11
10
|
import '../commonConstants.js';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
12
|
+
import '../usersSlice/constants.js';
|
|
13
13
|
import '../releasesSlice/index.js';
|
|
14
|
+
import '../organizationSlice/index.js';
|
|
14
15
|
import '../organizationSlice/types.js';
|
|
15
16
|
import './constants.js';
|
|
16
17
|
import '@mui/material/OverridableComponent';
|
|
17
18
|
import '@mui/material';
|
|
18
19
|
import '../organizationSlice/constants.js';
|
|
19
20
|
import '../onboardingSlice/index.js';
|
|
20
|
-
import '
|
|
21
|
+
import '../monitorSlice/index.js';
|
|
22
|
+
import '../monitorSlice/constants.js';
|
|
21
23
|
import '../deploymentsSlice/index.js';
|
|
22
24
|
import '../devicesSlice/index.js';
|
|
23
25
|
import '../devicesSlice/constants.js';
|
package/dist/appSlice/thunks.js
CHANGED
|
@@ -3,32 +3,32 @@ import {
|
|
|
3
3
|
setFirstLoginAfterSignup,
|
|
4
4
|
setOfflineThreshold,
|
|
5
5
|
setSearchState
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-2SAH2AN2.js";
|
|
7
|
+
import "../chunk-5XUPXMYV.js";
|
|
8
|
+
import "../chunk-ZWLCUOQN.js";
|
|
9
|
+
import "../chunk-KVZEKHVC.js";
|
|
10
10
|
import "../chunk-Y3DJIMEN.js";
|
|
11
11
|
import "../chunk-5M6EUVNO.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-PIFXECFW.js";
|
|
13
|
+
import "../chunk-KJ4BPXMB.js";
|
|
13
14
|
import "../chunk-TRKA7XYU.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-C2LGE3P6.js";
|
|
15
|
+
import "../chunk-5PUF4LA5.js";
|
|
16
|
+
import "../chunk-PVCHKW35.js";
|
|
17
|
+
import "../chunk-CQXDAXQF.js";
|
|
18
|
+
import "../chunk-VODRLEDP.js";
|
|
19
|
+
import "../chunk-IUGHRJV2.js";
|
|
20
|
+
import "../chunk-OLKM53RL.js";
|
|
21
21
|
import "../chunk-FDSMCFV5.js";
|
|
22
22
|
import "../chunk-53W2NRSL.js";
|
|
23
23
|
import "../chunk-NMAXZ3ZY.js";
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-GGBE6KJV.js";
|
|
24
|
+
import "../chunk-LX4YRTYY.js";
|
|
26
25
|
import "../chunk-7QKCBSFU.js";
|
|
26
|
+
import "../chunk-GGBE6KJV.js";
|
|
27
27
|
import "../chunk-3NOV7X4M.js";
|
|
28
28
|
import "../chunk-YO22XLHI.js";
|
|
29
29
|
import "../chunk-JIS4PA3R.js";
|
|
30
30
|
import "../chunk-WR6RQKF5.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-X7NEALMI.js";
|
|
32
32
|
import "../chunk-BYUPW7RA.js";
|
|
33
33
|
import "../chunk-GX2TWNLC.js";
|
|
34
34
|
import "../chunk-WWED74SG.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeviceMonitorConfig,
|
|
3
3
|
getLatestDeviceAlerts
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZWLCUOQN.js";
|
|
5
5
|
import {
|
|
6
6
|
commonErrorFallback,
|
|
7
7
|
commonErrorHandler,
|
|
8
8
|
createAppAsyncThunk
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KVZEKHVC.js";
|
|
10
10
|
import {
|
|
11
11
|
users_api_default
|
|
12
12
|
} from "./chunk-Y3DJIMEN.js";
|
|
@@ -15,31 +15,31 @@ import {
|
|
|
15
15
|
} from "./chunk-5M6EUVNO.js";
|
|
16
16
|
import {
|
|
17
17
|
actions_default
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PIFXECFW.js";
|
|
19
19
|
import {
|
|
20
20
|
actions as actions6,
|
|
21
21
|
sliceName as sliceName6
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KJ4BPXMB.js";
|
|
23
23
|
import {
|
|
24
24
|
actions as actions5,
|
|
25
25
|
sliceName as sliceName5
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5PUF4LA5.js";
|
|
27
27
|
import {
|
|
28
28
|
actions as actions4,
|
|
29
29
|
sliceName as sliceName4
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CQXDAXQF.js";
|
|
31
31
|
import {
|
|
32
32
|
actions as actions3,
|
|
33
33
|
sliceName as sliceName3
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-VODRLEDP.js";
|
|
35
35
|
import {
|
|
36
36
|
actions,
|
|
37
37
|
sliceName
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-IUGHRJV2.js";
|
|
39
39
|
import {
|
|
40
40
|
actions as actions2,
|
|
41
41
|
sliceName as sliceName2
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-OLKM53RL.js";
|
|
43
43
|
import {
|
|
44
44
|
cleanUp,
|
|
45
45
|
getSessionInfo,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
getSearchEndpoint,
|
|
53
53
|
getTenantCapabilities,
|
|
54
54
|
getUserCapabilities
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-LX4YRTYY.js";
|
|
56
56
|
import {
|
|
57
57
|
getCurrentSession,
|
|
58
58
|
getCurrentUser,
|
|
@@ -78,13 +78,14 @@ import {
|
|
|
78
78
|
import {
|
|
79
79
|
getAcceptedDevices,
|
|
80
80
|
getDeviceById,
|
|
81
|
+
getDeviceCountsByStatus,
|
|
81
82
|
getDeviceFilters,
|
|
82
83
|
getDeviceListState,
|
|
83
84
|
getDeviceReports,
|
|
84
85
|
getDevicesById,
|
|
85
86
|
getGroupsById,
|
|
86
87
|
getSelectedGroup
|
|
87
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-X7NEALMI.js";
|
|
88
89
|
import {
|
|
89
90
|
getFeatures,
|
|
90
91
|
getSearchState
|
|
@@ -922,21 +923,13 @@ var getDeviceInfo = createAppAsyncThunk(`${sliceName3}/getDeviceInfo`, (deviceId
|
|
|
922
923
|
}
|
|
923
924
|
return Promise.all(tasks);
|
|
924
925
|
});
|
|
925
|
-
var getDeviceCount = createAppAsyncThunk(
|
|
926
|
-
`${sliceName3}/getDeviceCount`,
|
|
927
|
-
(status, { dispatch, getState }) => general_api_default.post(getSearchEndpoint(getState()), {
|
|
928
|
-
page: 1,
|
|
929
|
-
per_page: 1,
|
|
930
|
-
filters: mapFiltersToTerms([{ key: "status", value: status, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }]),
|
|
931
|
-
attributes: defaultAttributes
|
|
932
|
-
}).then((response) => {
|
|
933
|
-
const count = Number(response.headers[headerNames.total]);
|
|
934
|
-
return dispatch(actions3.setDevicesCountByStatus({ count, status }));
|
|
935
|
-
})
|
|
936
|
-
);
|
|
937
926
|
var getAllDeviceCounts = createAppAsyncThunk(
|
|
938
927
|
`${sliceName3}/getAllDeviceCounts`,
|
|
939
|
-
(_, { dispatch }) =>
|
|
928
|
+
(_, { dispatch }) => general_api_default.get(`${inventoryApiUrlV2}/statistics`).then(({ data }) => {
|
|
929
|
+
const { devices_by_status } = data;
|
|
930
|
+
Object.entries(devices_by_status).map(([status, countsPerTier]) => dispatch(actions3.setDevicesCountByStatus({ countsPerTier, status })));
|
|
931
|
+
return;
|
|
932
|
+
})
|
|
940
933
|
);
|
|
941
934
|
var getDeviceLimits = createAppAsyncThunk(
|
|
942
935
|
`${sliceName3}/getDeviceLimit`,
|
|
@@ -1008,7 +1001,7 @@ var getDevicesByStatus = createAppAsyncThunk(
|
|
|
1008
1001
|
const state2 = getState();
|
|
1009
1002
|
const deviceAccu = reduceReceivedDevices(response.data, [], state2, status);
|
|
1010
1003
|
let total = !applicableFilters.length ? Number(response.headers[headerNames.total]) : 0;
|
|
1011
|
-
if (status && state2.devices.byStatus[status].total === deviceAccu.ids.length) {
|
|
1004
|
+
if (status && state2.devices.byStatus[status].counts.total === deviceAccu.ids.length) {
|
|
1012
1005
|
total = deviceAccu.ids.length;
|
|
1013
1006
|
}
|
|
1014
1007
|
const tasks = [dispatch(actions3.receivedDevices(deviceAccu.devicesById))];
|
|
@@ -1115,8 +1108,8 @@ var updateReportData = createAppAsyncThunk(`${sliceName3}/updateReportData`, (re
|
|
|
1115
1108
|
const { group = "" } = report;
|
|
1116
1109
|
const devicesById = getDevicesById(getState());
|
|
1117
1110
|
const groups = getGroupsById(getState());
|
|
1118
|
-
const
|
|
1119
|
-
const totalDeviceCount = groups[group] ? groups[group].total :
|
|
1111
|
+
const { accepted: acceptedDevicesCount } = getDeviceCountsByStatus(getState());
|
|
1112
|
+
const totalDeviceCount = groups[group] ? groups[group].total : acceptedDevicesCount;
|
|
1120
1113
|
const reportsData = getDeviceReports(getState());
|
|
1121
1114
|
const newReports = [...reportsData];
|
|
1122
1115
|
newReports[reportIndex] = initializeDistributionData(report, groups, devicesById, totalDeviceCount);
|
|
@@ -1134,6 +1127,7 @@ var getReportDataWithoutBackendSupport = createAppAsyncThunk(
|
|
|
1134
1127
|
const effectiveAttribute = software ? software : attribute;
|
|
1135
1128
|
const devicesById = getDevicesById(getState());
|
|
1136
1129
|
const acceptedDevices = getAcceptedDevices(getState());
|
|
1130
|
+
const { accepted: acceptedDevicesCount } = getDeviceCountsByStatus(getState());
|
|
1137
1131
|
const groups = getGroupsById(getState());
|
|
1138
1132
|
const { deviceIds = [], filters = [], total = 0 } = groups[group] || {};
|
|
1139
1133
|
let groupDevicesRequest = Promise.resolve({
|
|
@@ -1141,7 +1135,7 @@ var getReportDataWithoutBackendSupport = createAppAsyncThunk(
|
|
|
1141
1135
|
});
|
|
1142
1136
|
if (group && (!(deviceIds.length && total) || deviceIds.length !== total || !deviceIds.every((id) => !!devicesById[id]))) {
|
|
1143
1137
|
groupDevicesRequest = filters.length ? dispatch(getAllDynamicGroupDevices({ group, attribute: effectiveAttribute })).unwrap() : dispatch(getAllGroupDevices({ group, attribute: effectiveAttribute })).unwrap();
|
|
1144
|
-
} else if (!group && (acceptedDevices.deviceIds.length !==
|
|
1138
|
+
} else if (!group && (acceptedDevices.deviceIds.length !== acceptedDevicesCount || !acceptedDevices.deviceIds.every((id) => !!devicesById[id]))) {
|
|
1145
1139
|
groupDevicesRequest = dispatch(getAllDevicesByStatus({ status: DEVICE_STATES.accepted, attribute: effectiveAttribute })).unwrap();
|
|
1146
1140
|
}
|
|
1147
1141
|
return groupDevicesRequest.then(() => dispatch(updateReportData(reportIndex)));
|
|
@@ -2665,7 +2659,6 @@ export {
|
|
|
2665
2659
|
getAllDynamicGroupDevices,
|
|
2666
2660
|
getDeviceById2 as getDeviceById,
|
|
2667
2661
|
getDeviceInfo,
|
|
2668
|
-
getDeviceCount,
|
|
2669
2662
|
getAllDeviceCounts,
|
|
2670
2663
|
getDeviceLimits,
|
|
2671
2664
|
setDeviceListState,
|
|
@@ -2778,4 +2771,4 @@ export {
|
|
|
2778
2771
|
setAllTooltipsReadState,
|
|
2779
2772
|
submitUserFeedback
|
|
2780
2773
|
};
|
|
2781
|
-
//# sourceMappingURL=chunk-
|
|
2774
|
+
//# sourceMappingURL=chunk-2SAH2AN2.js.map
|