@northern.tech/store 0.15.0 → 0.16.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 +1 -0
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.js +4 -4
- package/dist/api/general-api.js +1 -1
- package/dist/api/users-api.js +1 -1
- package/dist/appSlice/index.cjs +1 -0
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.js +2 -2
- package/dist/appSlice/mocks.cjs +1 -0
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.js +2 -2
- package/dist/appSlice/thunks.cjs +12 -0
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +12 -12
- package/dist/auth.js +1 -1
- package/dist/{chunk-O3DM73SJ.js → chunk-6WJI4MOP.js} +2 -1
- package/dist/chunk-6WJI4MOP.js.map +1 -0
- package/dist/{chunk-BTE6UIGL.js → chunk-GAADWFQZ.js} +4 -4
- package/dist/{chunk-KE7R7GYG.js → chunk-M7YH35Y4.js} +5 -5
- package/dist/{chunk-ZNSCXTKF.js → chunk-MWJFQYA2.js} +6 -6
- package/dist/{chunk-2IGDYPTR.js → chunk-NJMHH7TJ.js} +8 -8
- package/dist/{chunk-X7NEALMI.js → chunk-O7DR57RN.js} +13 -1
- package/dist/{chunk-X7NEALMI.js.map → chunk-O7DR57RN.js.map} +1 -1
- package/dist/{chunk-OEFIAB26.js → chunk-WCJHYB46.js} +5 -5
- package/dist/{chunk-LROF3FA4.js → chunk-YWL3XLJH.js} +7 -7
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +11 -0
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.js +5 -5
- package/dist/constants.js +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/mocks.js +1 -1
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/deploymentsSlice/thunks.cjs +12 -0
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +12 -12
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.js +1 -1
- package/dist/devicesSlice/selectors.cjs +13 -0
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +62 -1
- package/dist/devicesSlice/selectors.d.ts +62 -1
- package/dist/devicesSlice/selectors.js +4 -2
- package/dist/devicesSlice/thunks.cjs +12 -0
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.js +12 -12
- package/dist/liststatehook.js +1 -1
- package/dist/locationutils.js +1 -1
- package/dist/monitorSlice/index.js +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/thunks.cjs +12 -0
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +10 -10
- package/dist/onboardingSlice/thunks.cjs +12 -0
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +12 -12
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/organizationSlice/thunks.cjs +12 -0
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.js +12 -12
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.js +1 -1
- package/dist/releasesSlice/thunks.cjs +12 -0
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +10 -10
- package/dist/selectors.cjs +13 -0
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +1 -1
- package/dist/selectors.d.ts +1 -1
- package/dist/selectors.js +11 -9
- package/dist/sockethook.js +1 -1
- package/dist/store.cjs +1 -0
- package/dist/store.cjs.map +1 -1
- package/dist/store.js +5 -5
- package/dist/storehooks.cjs +13 -0
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +13 -12
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +12 -0
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +12 -12
- package/dist/useDeploymentDevice.cjs +12 -0
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +12 -12
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.js +1 -1
- package/dist/usersSlice/thunks.cjs +12 -0
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.js +12 -12
- package/dist/utils.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-O3DM73SJ.js.map +0 -1
- /package/dist/{chunk-BTE6UIGL.js.map → chunk-GAADWFQZ.js.map} +0 -0
- /package/dist/{chunk-KE7R7GYG.js.map → chunk-M7YH35Y4.js.map} +0 -0
- /package/dist/{chunk-ZNSCXTKF.js.map → chunk-MWJFQYA2.js.map} +0 -0
- /package/dist/{chunk-2IGDYPTR.js.map → chunk-NJMHH7TJ.js.map} +0 -0
- /package/dist/{chunk-OEFIAB26.js.map → chunk-WCJHYB46.js.map} +0 -0
- /package/dist/{chunk-LROF3FA4.js.map → chunk-YWL3XLJH.js.map} +0 -0
package/dist/appSlice/thunks.js
CHANGED
|
@@ -3,38 +3,38 @@ 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-YWL3XLJH.js";
|
|
7
|
+
import "../chunk-GAADWFQZ.js";
|
|
8
|
+
import "../chunk-WCJHYB46.js";
|
|
9
|
+
import "../chunk-MWJFQYA2.js";
|
|
10
10
|
import "../chunk-Y3DJIMEN.js";
|
|
11
11
|
import "../chunk-5M6EUVNO.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-M7YH35Y4.js";
|
|
13
13
|
import "../chunk-TRKA7XYU.js";
|
|
14
14
|
import "../chunk-KJ4BPXMB.js";
|
|
15
|
-
import "../chunk-VCEFZTWS.js";
|
|
16
15
|
import "../chunk-PVCHKW35.js";
|
|
16
|
+
import "../chunk-VCEFZTWS.js";
|
|
17
17
|
import "../chunk-CQXDAXQF.js";
|
|
18
18
|
import "../chunk-VODRLEDP.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-6WJI4MOP.js";
|
|
20
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-
|
|
24
|
+
import "../chunk-NJMHH7TJ.js";
|
|
25
25
|
import "../chunk-GEQ2QQEE.js";
|
|
26
26
|
import "../chunk-3YJY7KQW.js";
|
|
27
|
-
import "../chunk-3NOV7X4M.js";
|
|
28
|
-
import "../chunk-YO22XLHI.js";
|
|
29
27
|
import "../chunk-JIS4PA3R.js";
|
|
28
|
+
import "../chunk-YO22XLHI.js";
|
|
29
|
+
import "../chunk-3NOV7X4M.js";
|
|
30
30
|
import "../chunk-WR6RQKF5.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-O7DR57RN.js";
|
|
32
32
|
import "../chunk-4BHM6WVX.js";
|
|
33
33
|
import "../chunk-U5TPV5X5.js";
|
|
34
34
|
import "../chunk-WWED74SG.js";
|
|
35
|
+
import "../chunk-ZKAH3APE.js";
|
|
35
36
|
import "../chunk-2DYA3X77.js";
|
|
36
37
|
import "../chunk-FAJ3I2UQ.js";
|
|
37
|
-
import "../chunk-ZKAH3APE.js";
|
|
38
38
|
import "../chunk-EL672W25.js";
|
|
39
39
|
export {
|
|
40
40
|
getLatestReleaseInfo,
|
package/dist/auth.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
updateMaxAge
|
|
7
7
|
} from "./chunk-FDSMCFV5.js";
|
|
8
8
|
import "./chunk-WWED74SG.js";
|
|
9
|
+
import "./chunk-ZKAH3APE.js";
|
|
9
10
|
import "./chunk-2DYA3X77.js";
|
|
10
11
|
import "./chunk-FAJ3I2UQ.js";
|
|
11
|
-
import "./chunk-ZKAH3APE.js";
|
|
12
12
|
import "./chunk-EL672W25.js";
|
|
13
13
|
export {
|
|
14
14
|
cleanUp,
|
|
@@ -34,6 +34,7 @@ var initialState = {
|
|
|
34
34
|
hasFeedbackEnabled: false,
|
|
35
35
|
hasMonitor: false,
|
|
36
36
|
hasMCUEnabled: false,
|
|
37
|
+
hasOldTheme: false,
|
|
37
38
|
hasReporting: false,
|
|
38
39
|
isHosted: true,
|
|
39
40
|
isEnterprise: false
|
|
@@ -154,4 +155,4 @@ export {
|
|
|
154
155
|
actions,
|
|
155
156
|
appSlice_default
|
|
156
157
|
};
|
|
157
|
-
//# sourceMappingURL=chunk-
|
|
158
|
+
//# sourceMappingURL=chunk-6WJI4MOP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/appSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { SnackbarProps } from '@mui/material';\n\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { SortOptions } from '../constants';\nimport { SORTING_OPTIONS } from '../constants';\n\nexport const sliceName = 'app';\n\nconst getYesterday = () => {\n const today = new Date();\n today.setDate(today.getDate() - 1);\n return today.toISOString();\n};\n\nexport type Repository = {\n name: string;\n version: string;\n};\n\nexport type VersionRelease = Partial<{ [versionInfo: string]: VersionRelease }> & {\n release?: string;\n release_date?: string;\n repos?: Repository[];\n supported_until?: string;\n};\n\nexport type SaasVersion = {\n date: string;\n tag: string;\n};\n\nexport type ReleaseData = {\n lts: string[];\n releases: {\n [version: string]: VersionRelease;\n };\n saas: SaasVersion[];\n};\nexport type TagData = { name: string }[];\n\nexport interface SnackbarContent extends Pick<SnackbarProps, 'action' | 'autoHideDuration' | 'message' | 'open'> {\n preventClickToCopy?: boolean;\n}\n\nexport interface SearchState {\n deviceIds: string[];\n isSearching: boolean;\n page?: number;\n perPage?: number;\n searchTerm: string;\n searchTotal: number;\n sort: SortOptions;\n}\n\nexport interface Upload {\n cancelSource: any;\n inprogress?: boolean;\n name?: string;\n progress: number;\n size?: number;\n}\n\ntype UILatestRelease = {\n releaseDate: string;\n repos: Record<string, string>;\n};\n\ntype VersionInformation = {\n [key: string]: string | UILatestRelease | undefined;\n backend?: string;\n GUI?: string;\n latestRelease?: UILatestRelease;\n};\n\nexport type SentryConfig = {\n isReduxEnabled?: string; // no parsing done here as this has to be accessed outside of the store\n location: string;\n replaysSessionSampleRate?: number;\n tracesSampleRate?: number;\n};\n\nexport type AppSliceType = {\n appInitDone: boolean;\n cancelSource: any;\n commit: string;\n demoArtifactLink: string;\n docsVersion: string;\n features: Record<string, boolean>;\n feedbackProbability: number;\n firstLoginAfterSignup: boolean;\n hostAddress: string | null;\n hostedAnnouncement: string;\n newThreshold: string;\n offlineThreshold: string;\n recaptchaSiteKey: string;\n searchState: SearchState;\n sentry: SentryConfig;\n snackbar: SnackbarContent;\n stripeAPIKey: string;\n trackerCode: string;\n uploadsById: Record<string, Upload>;\n versionInformation: VersionInformation;\n yesterday?: string;\n};\n\nexport const initialState: AppSliceType = {\n appInitDone: false,\n cancelSource: undefined,\n commit: '',\n demoArtifactLink: 'https://dgsbl4vditpls.cloudfront.net/mender-demo-artifact.mender',\n hostAddress: null,\n snackbar: {\n action: undefined,\n autoHideDuration: undefined,\n message: '',\n open: false,\n preventClickToCopy: false\n },\n // return boolean rather than organization details\n features: {\n hasAiEnabled: false,\n hasAuditlogs: false,\n hasDeltaProgress: false,\n hasMultitenancy: false,\n hasDeviceConfig: false,\n hasDeviceConnect: false,\n hasFeedbackEnabled: false,\n hasMonitor: false,\n hasMCUEnabled: false,\n hasOldTheme: false,\n hasReporting: false,\n isHosted: true,\n isEnterprise: false\n },\n feedbackProbability: 0.3,\n firstLoginAfterSignup: false,\n hostedAnnouncement: '',\n docsVersion: '',\n recaptchaSiteKey: '',\n searchState: {\n deviceIds: [],\n searchTerm: '',\n searchTotal: 0,\n isSearching: false,\n sort: {\n direction: SORTING_OPTIONS.desc\n // key: null,\n // scope: null\n }\n },\n sentry: {\n location: '',\n replaysSessionSampleRate: 0.1,\n tracesSampleRate: 1.0\n },\n stripeAPIKey: '',\n trackerCode: '',\n uploadsById: {\n // id: { progress: 0, cancelSource: undefined }\n },\n newThreshold: getYesterday(),\n offlineThreshold: getYesterday(),\n versionInformation: {\n Integration: '',\n 'Mender-Client': '',\n 'Mender-Artifact': '',\n 'Meta-Mender': ''\n },\n yesterday: undefined\n};\n\nexport const appSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n setFeatures: (state, action: PayloadAction<Record<string, boolean>>) => {\n state.features = {\n ...state.features,\n ...action.payload\n };\n },\n setSnackbar: (state, { payload }: PayloadAction<SnackbarContent | string>) => {\n if (typeof payload === 'string' || payload instanceof String) {\n state.snackbar = {\n ...initialState.snackbar,\n message: payload,\n open: !!payload\n };\n return;\n }\n const { message, autoHideDuration, action, preventClickToCopy = false } = payload;\n state.snackbar = {\n message,\n autoHideDuration,\n action,\n preventClickToCopy,\n open: !!message\n };\n },\n setFirstLoginAfterSignup: (state, action: PayloadAction<boolean>) => {\n state.firstLoginAfterSignup = action.payload;\n },\n setAnnouncement: (state, action: PayloadAction<string>) => {\n state.hostedAnnouncement = action.payload;\n },\n setSearchState: (state, action) => {\n state.searchState = {\n ...state.searchState,\n ...action.payload\n };\n },\n setOfflineThreshold: (state, action: PayloadAction<string>) => {\n state.offlineThreshold = action.payload;\n },\n initUpload: (state, action: PayloadAction<{ id: string; upload: Upload }>) => {\n const { id, upload } = action.payload;\n state.uploadsById[id] = upload;\n },\n uploadProgress: (state, action: PayloadAction<{ id: string; progress: number }>) => {\n const { id, progress } = action.payload;\n state.uploadsById[id] = {\n ...state.uploadsById[id],\n progress\n };\n },\n cleanUpUpload: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: current, ...remainder } = state.uploadsById;\n state.uploadsById = remainder;\n },\n setVersionInformation: (state, action: PayloadAction<VersionInformation>) => {\n state.versionInformation = {\n ...state.versionInformation,\n ...action.payload\n };\n },\n setEnvironmentData: (state, action) => ({ ...state, ...action.payload }),\n setAppInitDone: state => {\n state.appInitDone = true;\n }\n }\n});\n\nexport const actions = appSlice.actions;\nexport default appSlice.reducer;\n"],"mappings":";;;;;AAgBA,SAAS,mBAAmB;AAKrB,IAAM,YAAY;AAEzB,IAAM,eAAe,MAAM;AACzB,QAAM,QAAQ,oBAAI,KAAK;AACvB,QAAM,QAAQ,MAAM,QAAQ,IAAI,CAAC;AACjC,SAAO,MAAM,YAAY;AAC3B;AA6FO,IAAM,eAA6B;AAAA,EACxC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,SAAS;AAAA,IACT,MAAM;AAAA,IACN,oBAAoB;AAAA,EACtB;AAAA;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A,IACtE,gBAAgB,WAAS;AACvB,YAAM,cAAc;AAAA,IACtB;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,SAAS;AAChC,IAAO,mBAAQ,SAAS;","names":[]}
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
commonErrorFallback,
|
|
3
3
|
commonErrorHandler,
|
|
4
4
|
createAppAsyncThunk
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MWJFQYA2.js";
|
|
6
6
|
import {
|
|
7
7
|
general_api_default
|
|
8
8
|
} from "./chunk-5M6EUVNO.js";
|
|
9
9
|
import {
|
|
10
10
|
actions_default
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-M7YH35Y4.js";
|
|
12
12
|
import {
|
|
13
13
|
actions,
|
|
14
14
|
sliceName
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-53W2NRSL.js";
|
|
19
19
|
import {
|
|
20
20
|
getSearchEndpoint
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NJMHH7TJ.js";
|
|
22
22
|
import {
|
|
23
23
|
getReleasesById
|
|
24
24
|
} from "./chunk-GEQ2QQEE.js";
|
|
@@ -442,4 +442,4 @@ export {
|
|
|
442
442
|
getDeltaGenerationJobs,
|
|
443
443
|
getDeltaGenerationJobDetails
|
|
444
444
|
};
|
|
445
|
-
//# sourceMappingURL=chunk-
|
|
445
|
+
//# sourceMappingURL=chunk-GAADWFQZ.js.map
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
actions as actions8
|
|
6
6
|
} from "./chunk-KJ4BPXMB.js";
|
|
7
|
-
import {
|
|
8
|
-
actions as actions6
|
|
9
|
-
} from "./chunk-VCEFZTWS.js";
|
|
10
7
|
import {
|
|
11
8
|
actions as actions4
|
|
12
9
|
} from "./chunk-PVCHKW35.js";
|
|
10
|
+
import {
|
|
11
|
+
actions as actions6
|
|
12
|
+
} from "./chunk-VCEFZTWS.js";
|
|
13
13
|
import {
|
|
14
14
|
actions as actions5
|
|
15
15
|
} from "./chunk-CQXDAXQF.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-VODRLEDP.js";
|
|
19
19
|
import {
|
|
20
20
|
actions
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6WJI4MOP.js";
|
|
22
22
|
import {
|
|
23
23
|
actions as actions2
|
|
24
24
|
} from "./chunk-OLKM53RL.js";
|
|
@@ -38,4 +38,4 @@ var actions_default = {
|
|
|
38
38
|
export {
|
|
39
39
|
actions_default
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
41
|
+
//# sourceMappingURL=chunk-M7YH35Y4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
actions_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M7YH35Y4.js";
|
|
4
4
|
import {
|
|
5
5
|
releasesSlice_default
|
|
6
6
|
} from "./chunk-TRKA7XYU.js";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
actions as actions2,
|
|
9
9
|
usersSlice_default
|
|
10
10
|
} from "./chunk-KJ4BPXMB.js";
|
|
11
|
+
import {
|
|
12
|
+
monitorSlice_default
|
|
13
|
+
} from "./chunk-PVCHKW35.js";
|
|
11
14
|
import {
|
|
12
15
|
actions,
|
|
13
16
|
organizationSlice_default
|
|
14
17
|
} from "./chunk-VCEFZTWS.js";
|
|
15
|
-
import {
|
|
16
|
-
monitorSlice_default
|
|
17
|
-
} from "./chunk-PVCHKW35.js";
|
|
18
18
|
import {
|
|
19
19
|
onboardingSlice_default
|
|
20
20
|
} from "./chunk-CQXDAXQF.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-VODRLEDP.js";
|
|
24
24
|
import {
|
|
25
25
|
appSlice_default
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6WJI4MOP.js";
|
|
27
27
|
import {
|
|
28
28
|
deploymentsSlice_default
|
|
29
29
|
} from "./chunk-OLKM53RL.js";
|
|
@@ -139,4 +139,4 @@ export {
|
|
|
139
139
|
useAppDispatch,
|
|
140
140
|
createAppAsyncThunk
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-MWJFQYA2.js.map
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
getUserSettings
|
|
10
10
|
} from "./chunk-3YJY7KQW.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
getOrganization
|
|
15
|
-
} from "./chunk-3NOV7X4M.js";
|
|
12
|
+
getOnboarding
|
|
13
|
+
} from "./chunk-JIS4PA3R.js";
|
|
16
14
|
import {
|
|
17
15
|
getIssueCountsByType
|
|
18
16
|
} from "./chunk-YO22XLHI.js";
|
|
19
17
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
getAuditLogEntry,
|
|
19
|
+
getIsServiceProvider,
|
|
20
|
+
getOrganization
|
|
21
|
+
} from "./chunk-3NOV7X4M.js";
|
|
22
22
|
import {
|
|
23
23
|
getDeploymentsById,
|
|
24
24
|
getDeploymentsSelectionState,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getFilteringAttributes,
|
|
31
31
|
getGroupsById,
|
|
32
32
|
getListedDevices
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-O7DR57RN.js";
|
|
34
34
|
import {
|
|
35
35
|
getFeatures,
|
|
36
36
|
getSearchedDevices
|
|
@@ -289,4 +289,4 @@ export {
|
|
|
289
289
|
getAuditlogDevice,
|
|
290
290
|
getRelevantRoles
|
|
291
291
|
};
|
|
292
|
-
//# sourceMappingURL=chunk-
|
|
292
|
+
//# sourceMappingURL=chunk-NJMHH7TJ.js.map
|
|
@@ -106,6 +106,17 @@ var getAttributesList = createSelector(
|
|
|
106
106
|
[getFilteringAttributes, getFilteringAttributesFromConfig],
|
|
107
107
|
({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) => [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(duplicateFilter)
|
|
108
108
|
);
|
|
109
|
+
var getDeviceLimitStats = createSelector(
|
|
110
|
+
[getDeviceLimits, getAcceptedDevices],
|
|
111
|
+
(limits, accepted) => {
|
|
112
|
+
const { counts } = accepted;
|
|
113
|
+
return Object.entries(limits).filter(([, limit]) => limit !== 0).map(([type, limit]) => ({
|
|
114
|
+
type,
|
|
115
|
+
limit,
|
|
116
|
+
total: counts[type] || 0
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
);
|
|
109
120
|
var getDeviceTypes = createSelector(
|
|
110
121
|
[getAcceptedDevices, getDevicesById],
|
|
111
122
|
({ deviceIds = [] }, devicesById) => Object.keys(
|
|
@@ -145,6 +156,7 @@ export {
|
|
|
145
156
|
getGroupData,
|
|
146
157
|
getGroups,
|
|
147
158
|
getAttributesList,
|
|
159
|
+
getDeviceLimitStats,
|
|
148
160
|
getDeviceTypes
|
|
149
161
|
};
|
|
150
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-O7DR57RN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/devicesSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { duplicateFilter } from '@northern.tech/utils/helpers';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport type { DeviceFilter, DeviceGroup } from '.';\nimport type { DeviceAuthState } from '../constants';\nimport { DEVICE_STATES, UNGROUPED_GROUP } from '../constants';\nimport type { RootState } from '../store';\n\nexport const getAcceptedDevices = (state: RootState) => state.devices.byStatus.accepted;\nexport const getDevicesByStatus = (state: RootState) => state.devices.byStatus;\nexport const getDevicesById = (state: RootState) => state.devices.byId;\nexport const getDeviceReports = (state: RootState) => state.devices.reports;\nexport const getGroupsById = (state: RootState) => state.devices.groups.byId;\nexport const getSelectedGroup = (state: RootState) => state.devices.groups.selectedGroup;\n\nexport const getDeviceListState = (state: RootState) => state.devices.deviceList;\nexport const getListedDevices = (state: RootState) => state.devices.deviceList.deviceIds;\nexport const getFilteringAttributes = (state: RootState) => state.devices.filteringAttributes;\nexport const getDeviceFilters = (state: RootState) => state.devices.filters || [];\nconst getFilteringAttributesFromConfig = (state: RootState) => state.devices.filteringAttributesConfig.attributes;\nexport const getSortedFilteringAttributes = createSelector([getFilteringAttributes], filteringAttributes => ({\n ...filteringAttributes,\n identityAttributes: [...filteringAttributes.identityAttributes, 'id']\n}));\nexport const getDeviceLimits = (state: RootState) => state.devices.limits;\nconst getFilteringAttributesLimit = (state: RootState) => state.devices.filteringAttributesLimit;\n\nexport const getDeviceIdentityAttributes = createSelector(\n [getFilteringAttributes, getFilteringAttributesLimit],\n ({ identityAttributes }, filteringAttributesLimit) => {\n // limit the selection of the available attribute to AVAILABLE_ATTRIBUTE_LIMIT\n const attributes = identityAttributes.slice(0, filteringAttributesLimit);\n return attributes.reduce(\n (accu, value) => {\n accu.push({ value, label: value, scope: 'identity' });\n return accu;\n },\n [\n { value: 'name', label: 'Name', scope: 'tags' },\n { value: 'id', label: 'Device ID', scope: 'identity' }\n ]\n );\n }\n);\n\nexport const getDeviceCountsByStatus = createSelector([getDevicesByStatus], byStatus =>\n Object.values(DEVICE_STATES).reduce<Record<DeviceAuthState, number>>(\n (accu, deviceState) => {\n const { counts } = byStatus[deviceState];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { total, ...tieredCounts } = counts;\n const count = Object.values(tieredCounts).reduce((accu, countPerTier) => accu + countPerTier, 0);\n accu[deviceState] = count;\n accu.total = accu.total + count;\n return accu;\n },\n { total: 0 }\n )\n);\n\nexport const getDeviceById = createSelector([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = '') => devicesById[deviceId] ?? {});\n\nexport const getSelectedGroupInfo = createSelector(\n [getDeviceCountsByStatus, getGroupsById, getSelectedGroup],\n ({ accepted: acceptedDeviceTotal }, groupsById, selectedGroup) => {\n let groupCount = acceptedDeviceTotal;\n let groupFilters: DeviceFilter[] = [];\n if (selectedGroup && groupsById[selectedGroup]) {\n groupCount = groupsById[selectedGroup].total || 0;\n groupFilters = groupsById[selectedGroup].filters || [];\n }\n return { groupCount, selectedGroup, groupFilters };\n }\n);\n\nexport const getCombinedLimit = createSelector(\n [getDeviceLimits],\n deviceLimits => Object.values(deviceLimits).reduce((accu, limit) => accu + Math.max(limit ?? 0, 0), 0) // limit might be -1 for unlimited devices\n);\n\nexport const getLimitMaxed = createSelector(\n [getDeviceCountsByStatus, getCombinedLimit],\n ({ accepted: acceptedDevices }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices\n);\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const getGroupsByIdWithoutUngrouped = createSelector([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);\n\nexport const getGroupData = createSelector([getGroupsByIdWithoutUngrouped], groups => {\n const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : undefined;\n const hasDynamicGroups = Object.values(groups).some(group => !!group.id);\n return { createdGroup, hasDynamicGroups, groups };\n});\n\ntype SelectorGroup = DeviceGroup & { groupId: string };\ntype SelectorGroups = { dynamic: SelectorGroup[]; static: SelectorGroup[]; ungrouped: SelectorGroup[] };\n\nexport const getGroups = createSelector([getGroupsById], groupsById => {\n const groupNames = Object.keys(groupsById).sort();\n const groupedGroups = Object.entries(groupsById)\n .sort((a, b) => a[0].localeCompare(b[0]))\n .reduce<SelectorGroups>(\n (accu, [groupname, group]) => {\n const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;\n const groupItem = { ...group, groupId: name, name: groupname };\n if ((group.filters ?? []).length > 0) {\n if (groupname !== UNGROUPED_GROUP.id) {\n accu.dynamic.push(groupItem);\n } else {\n accu.ungrouped.push(groupItem);\n }\n } else {\n accu.static.push(groupItem);\n }\n return accu;\n },\n { dynamic: [], static: [], ungrouped: [] }\n );\n return { groupNames, ...groupedGroups };\n});\nexport const getAttributesList = createSelector(\n [getFilteringAttributes, getFilteringAttributesFromConfig],\n ({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) =>\n [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(duplicateFilter)\n);\n\nexport const getDeviceTypes = createSelector([getAcceptedDevices, getDevicesById], ({ deviceIds = [] }, devicesById) =>\n Object.keys(\n deviceIds.slice(0, 200).reduce((accu, item) => {\n const { device_type: deviceTypes = [] } = devicesById[item] ? devicesById[item].attributes : {};\n accu = deviceTypes.reduce((deviceTypeAccu, deviceType) => {\n if (deviceType.length > 1) {\n deviceTypeAccu[deviceType] = deviceTypeAccu[deviceType] ? deviceTypeAccu[deviceType] + 1 : 1;\n }\n return deviceTypeAccu;\n }, accu);\n return accu;\n }, {})\n )\n);\n"],"mappings":";;;;;;AAaA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAOxB,IAAM,qBAAqB,CAAC,UAAqB,MAAM,QAAQ,SAAS;AACxE,IAAM,qBAAqB,CAAC,UAAqB,MAAM,QAAQ;AAC/D,IAAM,iBAAiB,CAAC,UAAqB,MAAM,QAAQ;AAC3D,IAAM,mBAAmB,CAAC,UAAqB,MAAM,QAAQ;AAC7D,IAAM,gBAAgB,CAAC,UAAqB,MAAM,QAAQ,OAAO;AACjE,IAAM,mBAAmB,CAAC,UAAqB,MAAM,QAAQ,OAAO;AAEpE,IAAM,qBAAqB,CAAC,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,CAAC,MAAM,SAAS;AAC7C,YAAM,EAAE,aAAa,cAAc,CAAC,EAAE,IAAI,YAAY,IAAI,IAAI,YAAY,IAAI,EAAE,aAAa,CAAC;AAC9F,aAAO,YAAY,OAAO,CAAC,gBAAgB,eAAe;AACxD,YAAI,WAAW,SAAS,GAAG;AACzB,yBAAe,UAAU,IAAI,eAAe,UAAU,IAAI,eAAe,UAAU,IAAI,IAAI;AAAA,QAC7F;AACA,eAAO;AAAA,MACT,GAAG,IAAI;AACP,aAAO;AAAA,IACT,GAAG,CAAC,CAAC;AAAA,EACP;AACF;","names":["accu"]}
|
|
1
|
+
{"version":3,"sources":["../src/devicesSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { duplicateFilter } from '@northern.tech/utils/helpers';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport type { DeviceFilter, DeviceGroup } from '.';\nimport type { DeviceAuthState } from '../constants';\nimport { DEVICE_STATES, UNGROUPED_GROUP } from '../constants';\nimport type { RootState } from '../store';\n\nexport const getAcceptedDevices = (state: RootState) => state.devices.byStatus.accepted;\nexport const getDevicesByStatus = (state: RootState) => state.devices.byStatus;\nexport const getDevicesById = (state: RootState) => state.devices.byId;\nexport const getDeviceReports = (state: RootState) => state.devices.reports;\nexport const getGroupsById = (state: RootState) => state.devices.groups.byId;\nexport const getSelectedGroup = (state: RootState) => state.devices.groups.selectedGroup;\n\nexport const getDeviceListState = (state: RootState) => state.devices.deviceList;\nexport const getListedDevices = (state: RootState) => state.devices.deviceList.deviceIds;\nexport const getFilteringAttributes = (state: RootState) => state.devices.filteringAttributes;\nexport const getDeviceFilters = (state: RootState) => state.devices.filters || [];\nconst getFilteringAttributesFromConfig = (state: RootState) => state.devices.filteringAttributesConfig.attributes;\nexport const getSortedFilteringAttributes = createSelector([getFilteringAttributes], filteringAttributes => ({\n ...filteringAttributes,\n identityAttributes: [...filteringAttributes.identityAttributes, 'id']\n}));\nexport const getDeviceLimits = (state: RootState) => state.devices.limits;\nconst getFilteringAttributesLimit = (state: RootState) => state.devices.filteringAttributesLimit;\n\nexport const getDeviceIdentityAttributes = createSelector(\n [getFilteringAttributes, getFilteringAttributesLimit],\n ({ identityAttributes }, filteringAttributesLimit) => {\n // limit the selection of the available attribute to AVAILABLE_ATTRIBUTE_LIMIT\n const attributes = identityAttributes.slice(0, filteringAttributesLimit);\n return attributes.reduce(\n (accu, value) => {\n accu.push({ value, label: value, scope: 'identity' });\n return accu;\n },\n [\n { value: 'name', label: 'Name', scope: 'tags' },\n { value: 'id', label: 'Device ID', scope: 'identity' }\n ]\n );\n }\n);\n\nexport const getDeviceCountsByStatus = createSelector([getDevicesByStatus], byStatus =>\n Object.values(DEVICE_STATES).reduce<Record<DeviceAuthState, number>>(\n (accu, deviceState) => {\n const { counts } = byStatus[deviceState];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { total, ...tieredCounts } = counts;\n const count = Object.values(tieredCounts).reduce((accu, countPerTier) => accu + countPerTier, 0);\n accu[deviceState] = count;\n accu.total = accu.total + count;\n return accu;\n },\n { total: 0 }\n )\n);\n\nexport const getDeviceById = createSelector([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = '') => devicesById[deviceId] ?? {});\n\nexport const getSelectedGroupInfo = createSelector(\n [getDeviceCountsByStatus, getGroupsById, getSelectedGroup],\n ({ accepted: acceptedDeviceTotal }, groupsById, selectedGroup) => {\n let groupCount = acceptedDeviceTotal;\n let groupFilters: DeviceFilter[] = [];\n if (selectedGroup && groupsById[selectedGroup]) {\n groupCount = groupsById[selectedGroup].total || 0;\n groupFilters = groupsById[selectedGroup].filters || [];\n }\n return { groupCount, selectedGroup, groupFilters };\n }\n);\n\nexport const getCombinedLimit = createSelector(\n [getDeviceLimits],\n deviceLimits => Object.values(deviceLimits).reduce((accu, limit) => accu + Math.max(limit ?? 0, 0), 0) // limit might be -1 for unlimited devices\n);\n\nexport const getLimitMaxed = createSelector(\n [getDeviceCountsByStatus, getCombinedLimit],\n ({ accepted: acceptedDevices }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices\n);\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const getGroupsByIdWithoutUngrouped = createSelector([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);\n\nexport const getGroupData = createSelector([getGroupsByIdWithoutUngrouped], groups => {\n const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : undefined;\n const hasDynamicGroups = Object.values(groups).some(group => !!group.id);\n return { createdGroup, hasDynamicGroups, groups };\n});\n\ntype SelectorGroup = DeviceGroup & { groupId: string };\ntype SelectorGroups = { dynamic: SelectorGroup[]; static: SelectorGroup[]; ungrouped: SelectorGroup[] };\n\nexport const getGroups = createSelector([getGroupsById], groupsById => {\n const groupNames = Object.keys(groupsById).sort();\n const groupedGroups = Object.entries(groupsById)\n .sort((a, b) => a[0].localeCompare(b[0]))\n .reduce<SelectorGroups>(\n (accu, [groupname, group]) => {\n const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;\n const groupItem = { ...group, groupId: name, name: groupname };\n if ((group.filters ?? []).length > 0) {\n if (groupname !== UNGROUPED_GROUP.id) {\n accu.dynamic.push(groupItem);\n } else {\n accu.ungrouped.push(groupItem);\n }\n } else {\n accu.static.push(groupItem);\n }\n return accu;\n },\n { dynamic: [], static: [], ungrouped: [] }\n );\n return { groupNames, ...groupedGroups };\n});\nexport const getAttributesList = createSelector(\n [getFilteringAttributes, getFilteringAttributesFromConfig],\n ({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) =>\n [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(duplicateFilter)\n);\nexport const getDeviceLimitStats = createSelector(\n [getDeviceLimits, getAcceptedDevices],\n (limits, accepted) => {\n const { counts } = accepted;\n return Object.entries(limits)\n .filter(([, limit]) => limit !== 0)\n .map(([type, limit]) => ({\n type,\n limit,\n total: counts[type] || 0\n }));\n }\n);\n\nexport const getDeviceTypes = createSelector([getAcceptedDevices, getDevicesById], ({ deviceIds = [] }, devicesById) =>\n Object.keys(\n deviceIds.slice(0, 200).reduce((accu, item) => {\n const { device_type: deviceTypes = [] } = devicesById[item] ? devicesById[item].attributes : {};\n accu = deviceTypes.reduce((deviceTypeAccu, deviceType) => {\n if (deviceType.length > 1) {\n deviceTypeAccu[deviceType] = deviceTypeAccu[deviceType] ? deviceTypeAccu[deviceType] + 1 : 1;\n }\n return deviceTypeAccu;\n }, accu);\n return accu;\n }, {})\n )\n);\n"],"mappings":";;;;;;AAaA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAOxB,IAAM,qBAAqB,CAAC,UAAqB,MAAM,QAAQ,SAAS;AACxE,IAAM,qBAAqB,CAAC,UAAqB,MAAM,QAAQ;AAC/D,IAAM,iBAAiB,CAAC,UAAqB,MAAM,QAAQ;AAC3D,IAAM,mBAAmB,CAAC,UAAqB,MAAM,QAAQ;AAC7D,IAAM,gBAAgB,CAAC,UAAqB,MAAM,QAAQ,OAAO;AACjE,IAAM,mBAAmB,CAAC,UAAqB,MAAM,QAAQ,OAAO;AAEpE,IAAM,qBAAqB,CAAC,UAAqB,MAAM,QAAQ;AAC/D,IAAM,mBAAmB,CAAC,UAAqB,MAAM,QAAQ,WAAW;AACxE,IAAM,yBAAyB,CAAC,UAAqB,MAAM,QAAQ;AACnE,IAAM,mBAAmB,CAAC,UAAqB,MAAM,QAAQ,WAAW,CAAC;AAChF,IAAM,mCAAmC,CAAC,UAAqB,MAAM,QAAQ,0BAA0B;AAChG,IAAM,+BAA+B,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AAY,CAAC,EAAE,GAAG,gBACtG,OAAO;AAAA,IACL,UAAU,MAAM,GAAG,GAAG,EAAE,OAAO,CAAC,MAAM,SAAS;AAC7C,YAAM,EAAE,aAAa,cAAc,CAAC,EAAE,IAAI,YAAY,IAAI,IAAI,YAAY,IAAI,EAAE,aAAa,CAAC;AAC9F,aAAO,YAAY,OAAO,CAAC,gBAAgB,eAAe;AACxD,YAAI,WAAW,SAAS,GAAG;AACzB,yBAAe,UAAU,IAAI,eAAe,UAAU,IAAI,eAAe,UAAU,IAAI,IAAI;AAAA,QAC7F;AACA,eAAO;AAAA,MACT,GAAG,IAAI;AACP,aAAO;AAAA,IACT,GAAG,CAAC,CAAC;AAAA,EACP;AACF;","names":["accu"]}
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
commonErrorFallback,
|
|
3
3
|
commonErrorHandler,
|
|
4
4
|
createAppAsyncThunk
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MWJFQYA2.js";
|
|
6
6
|
import {
|
|
7
7
|
general_api_default
|
|
8
8
|
} from "./chunk-5M6EUVNO.js";
|
|
9
9
|
import {
|
|
10
10
|
actions_default
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-M7YH35Y4.js";
|
|
12
12
|
import {
|
|
13
13
|
actions,
|
|
14
14
|
sliceName
|
|
15
15
|
} from "./chunk-PVCHKW35.js";
|
|
16
16
|
import {
|
|
17
17
|
getSearchEndpoint
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NJMHH7TJ.js";
|
|
19
19
|
import {
|
|
20
20
|
getDeviceFilters
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-O7DR57RN.js";
|
|
22
22
|
import {
|
|
23
23
|
convertDeviceListStateToFilters
|
|
24
24
|
} from "./chunk-U5TPV5X5.js";
|
|
@@ -107,4 +107,4 @@ export {
|
|
|
107
107
|
getDeviceMonitorConfig,
|
|
108
108
|
changeNotificationSetting
|
|
109
109
|
};
|
|
110
|
-
//# sourceMappingURL=chunk-
|
|
110
|
+
//# sourceMappingURL=chunk-WCJHYB46.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeviceMonitorConfig,
|
|
3
3
|
getLatestDeviceAlerts
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WCJHYB46.js";
|
|
5
5
|
import {
|
|
6
6
|
commonErrorFallback,
|
|
7
7
|
commonErrorHandler,
|
|
8
8
|
createAppAsyncThunk
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MWJFQYA2.js";
|
|
10
10
|
import {
|
|
11
11
|
users_api_default
|
|
12
12
|
} from "./chunk-Y3DJIMEN.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-5M6EUVNO.js";
|
|
16
16
|
import {
|
|
17
17
|
actions_default
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-M7YH35Y4.js";
|
|
19
19
|
import {
|
|
20
20
|
actions as actions6,
|
|
21
21
|
sliceName as sliceName6
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
actions,
|
|
37
37
|
sliceName
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6WJI4MOP.js";
|
|
39
39
|
import {
|
|
40
40
|
actions as actions2,
|
|
41
41
|
sliceName as sliceName2
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
getSearchEndpoint,
|
|
53
53
|
getTenantCapabilities,
|
|
54
54
|
getUserCapabilities
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-NJMHH7TJ.js";
|
|
56
56
|
import {
|
|
57
57
|
getCurrentSession,
|
|
58
58
|
getCurrentUser,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
getDevicesById,
|
|
86
86
|
getGroupsById,
|
|
87
87
|
getSelectedGroup
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-O7DR57RN.js";
|
|
89
89
|
import {
|
|
90
90
|
getFeatures,
|
|
91
91
|
getSearchState
|
|
@@ -2771,4 +2771,4 @@ export {
|
|
|
2771
2771
|
setAllTooltipsReadState,
|
|
2772
2772
|
submitUserFeedback
|
|
2773
2773
|
};
|
|
2774
|
-
//# sourceMappingURL=chunk-
|
|
2774
|
+
//# sourceMappingURL=chunk-YWL3XLJH.js.map
|
package/dist/commonConstants.js
CHANGED
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
emptyWebhook,
|
|
12
12
|
timeUnits
|
|
13
13
|
} from "./chunk-WWED74SG.js";
|
|
14
|
+
import "./chunk-ZKAH3APE.js";
|
|
14
15
|
import "./chunk-2DYA3X77.js";
|
|
15
16
|
import "./chunk-FAJ3I2UQ.js";
|
|
16
|
-
import "./chunk-ZKAH3APE.js";
|
|
17
17
|
import "./chunk-EL672W25.js";
|
|
18
18
|
export {
|
|
19
19
|
DEVICE_LIST_MAXIMUM_LENGTH,
|
package/dist/commonSelectors.cjs
CHANGED
|
@@ -848,6 +848,17 @@ var getAttributesList = (0, import_toolkit3.createSelector)(
|
|
|
848
848
|
[getFilteringAttributes, getFilteringAttributesFromConfig],
|
|
849
849
|
({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) => [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(import_helpers2.duplicateFilter)
|
|
850
850
|
);
|
|
851
|
+
var getDeviceLimitStats = (0, import_toolkit3.createSelector)(
|
|
852
|
+
[getDeviceLimits, getAcceptedDevices],
|
|
853
|
+
(limits, accepted) => {
|
|
854
|
+
const { counts } = accepted;
|
|
855
|
+
return Object.entries(limits).filter(([, limit]) => limit !== 0).map(([type, limit]) => ({
|
|
856
|
+
type,
|
|
857
|
+
limit,
|
|
858
|
+
total: counts[type] || 0
|
|
859
|
+
}));
|
|
860
|
+
}
|
|
861
|
+
);
|
|
851
862
|
var getDeviceTypes = (0, import_toolkit3.createSelector)(
|
|
852
863
|
[getAcceptedDevices, getDevicesById],
|
|
853
864
|
({ deviceIds = [] }, devicesById) => Object.keys(
|