@northern.tech/store 0.30.0 → 0.30.1
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 -1130
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +212 -221
- package/dist/actions.d.ts +212 -220
- package/dist/actions.js +21 -18
- package/dist/actions.js.map +1 -1
- package/dist/api/general-api.cjs +61 -459
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.d.cts +15 -17
- package/dist/api/general-api.d.ts +15 -17
- package/dist/api/general-api.js +56 -15
- package/dist/api/general-api.js.map +1 -1
- package/dist/api/users-api.cjs +32 -469
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.d.cts +19 -14
- package/dist/api/users-api.d.ts +19 -13
- package/dist/api/users-api.js +30 -12
- package/dist/api/users-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +190 -144
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +2 -159
- package/dist/appSlice/constants.d.ts +2 -159
- package/dist/appSlice/constants.js +181 -29
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/index.cjs +147 -178
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +2 -148
- package/dist/appSlice/index.d.ts +2 -148
- package/dist/appSlice/index.js +142 -18
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/mocks.cjs +17 -191
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.d.cts +33 -36
- package/dist/appSlice/mocks.d.ts +33 -36
- package/dist/appSlice/mocks.js +17 -25
- package/dist/appSlice/mocks.js.map +1 -1
- package/dist/appSlice/selectors.cjs +49 -91
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +216 -230
- package/dist/appSlice/selectors.d.ts +216 -230
- package/dist/appSlice/selectors.js +29 -44
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.cjs +6 -4636
- package/dist/appSlice/thunks.d.cts +59 -62
- package/dist/appSlice/thunks.d.ts +59 -62
- package/dist/appSlice/thunks.js +2 -45
- package/dist/auth.cjs +68 -433
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +14 -14
- package/dist/auth.d.ts +14 -14
- package/dist/auth.js +65 -18
- package/dist/auth.js.map +1 -1
- package/dist/chunk-CKQMccvm.cjs +28 -0
- package/dist/commonConstants.cjs +14 -393
- package/dist/commonConstants.d.cts +2 -83
- package/dist/commonConstants.d.ts +2 -83
- package/dist/commonConstants.js +2 -33
- package/dist/commonSelectors.cjs +284 -1269
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +1623 -1416
- package/dist/commonSelectors.d.ts +1623 -1416
- package/dist/commonSelectors.js +277 -51
- package/dist/commonSelectors.js.map +1 -1
- package/dist/constants-5cdwz1iH.d.ts +160 -0
- package/dist/constants-BWEsNG5c.d.ts +28 -0
- package/dist/constants-BciiayPt.d.ts +17 -0
- package/dist/constants-C5AU0mCY.d.ts +157 -0
- package/dist/constants-CIx3fnBv.d.cts +17 -0
- package/dist/constants-CNhpIMME.d.cts +93 -0
- package/dist/constants-Cpgyuy_r.d.ts +57 -0
- package/dist/constants-D41U_jbR.d.cts +160 -0
- package/dist/constants-DK7fI3Rh.d.cts +28 -0
- package/dist/constants-DPLHhjVN.d.cts +157 -0
- package/dist/constants-DrwXHsJ1.d.ts +120 -0
- package/dist/constants-G3wymKIl.d.cts +57 -0
- package/dist/constants-MPLfugsi.d.cts +120 -0
- package/dist/constants-y2XVLQWf.d.ts +93 -0
- package/dist/constants.cjs +784 -972
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +8 -14
- package/dist/constants.d.ts +8 -14
- package/dist/constants.js +674 -232
- package/dist/constants.js.map +1 -1
- package/dist/deploymentsSlice/constants.cjs +15 -214
- package/dist/deploymentsSlice/constants.d.cts +2 -163
- package/dist/deploymentsSlice/constants.d.ts +2 -163
- package/dist/deploymentsSlice/constants.js +2 -35
- package/dist/deploymentsSlice/index.cjs +168 -302
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +2 -157
- package/dist/deploymentsSlice/index.d.ts +2 -157
- package/dist/deploymentsSlice/index.js +161 -18
- package/dist/deploymentsSlice/index.js.map +1 -1
- package/dist/deploymentsSlice/mocks.cjs +178 -433
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.d.cts +176 -178
- package/dist/deploymentsSlice/mocks.d.ts +176 -178
- package/dist/deploymentsSlice/mocks.js +178 -144
- package/dist/deploymentsSlice/mocks.js.map +1 -1
- package/dist/deploymentsSlice/selectors.cjs +44 -223
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +73 -87
- package/dist/deploymentsSlice/selectors.d.ts +73 -87
- package/dist/deploymentsSlice/selectors.js +37 -25
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.cjs +16 -4654
- package/dist/deploymentsSlice/thunks.d.cts +222 -235
- package/dist/deploymentsSlice/thunks.d.ts +222 -235
- package/dist/deploymentsSlice/thunks.js +2 -65
- package/dist/devicesSlice/constants.cjs +9 -68
- package/dist/devicesSlice/constants.d.cts +2 -37
- package/dist/devicesSlice/constants.d.ts +2 -37
- package/dist/devicesSlice/constants.js +2 -23
- package/dist/devicesSlice/index.cjs +215 -225
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +2 -202
- package/dist/devicesSlice/index.d.ts +2 -202
- package/dist/devicesSlice/index.js +209 -18
- package/dist/devicesSlice/index.js.map +1 -1
- package/dist/devicesSlice/mocks.cjs +146 -339
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.d.cts +150 -148
- package/dist/devicesSlice/mocks.d.ts +150 -148
- package/dist/devicesSlice/mocks.js +145 -132
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +145 -539
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +685 -699
- package/dist/devicesSlice/selectors.d.ts +685 -699
- package/dist/devicesSlice/selectors.js +123 -59
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.cjs +48 -4718
- package/dist/devicesSlice/thunks.d.cts +800 -752
- package/dist/devicesSlice/thunks.d.ts +800 -752
- package/dist/devicesSlice/thunks.js +2 -129
- package/dist/index-4eaLEXy_.d.cts +152 -0
- package/dist/index-BEVkIiNa.d.cts +95 -0
- package/dist/index-BP0uAq36.d.cts +159 -0
- package/dist/index-Bwx9jEiL.d.cts +71 -0
- package/dist/index-CJkrL0oA.d.ts +64 -0
- package/dist/index-CO-py5d4.d.ts +95 -0
- package/dist/index-CTt-eIY8.d.cts +154 -0
- package/dist/index-CkwVnIqd.d.ts +159 -0
- package/dist/index-Cvkvcz4r.d.ts +115 -0
- package/dist/index-DJSlDPRX.d.ts +71 -0
- package/dist/index-DqyY6oZ3.d.ts +205 -0
- package/dist/index-DtePEQPT.d.ts +152 -0
- package/dist/index-Dv3Hfxk_.d.ts +154 -0
- package/dist/index-FyYBBeN-.d.cts +115 -0
- package/dist/index-Lz5JsJ6O.d.cts +205 -0
- package/dist/index-UPc3wvVd.d.cts +64 -0
- package/dist/liststatehook.cjs +83 -948
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.d.cts +29 -239
- package/dist/liststatehook.d.ts +29 -239
- package/dist/liststatehook.js +77 -85
- package/dist/liststatehook.js.map +1 -1
- package/dist/locationutils.cjs +459 -916
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.d.cts +244 -110
- package/dist/locationutils.d.ts +244 -110
- package/dist/locationutils.js +440 -44
- package/dist/locationutils.js.map +1 -1
- package/dist/monitorSlice/constants.cjs +0 -19
- package/dist/monitorSlice/constants.d.cts +2 -5
- package/dist/monitorSlice/constants.d.ts +2 -5
- package/dist/monitorSlice/constants.js +1 -2
- package/dist/monitorSlice/index.cjs +65 -82
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +2 -94
- package/dist/monitorSlice/index.d.ts +2 -94
- package/dist/monitorSlice/index.js +59 -18
- package/dist/monitorSlice/index.js.map +1 -1
- package/dist/monitorSlice/mocks.cjs +50 -126
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.d.cts +49 -45
- package/dist/monitorSlice/mocks.d.ts +49 -45
- package/dist/monitorSlice/mocks.js +49 -62
- package/dist/monitorSlice/mocks.js.map +1 -1
- package/dist/monitorSlice/selectors.cjs +5 -29
- package/dist/monitorSlice/selectors.cjs.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +10 -1
- package/dist/monitorSlice/selectors.d.ts +10 -1
- package/dist/monitorSlice/selectors.js +5 -6
- package/dist/monitorSlice/selectors.js.map +1 -1
- package/dist/monitorSlice/thunks.cjs +83 -1914
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +112 -120
- package/dist/monitorSlice/thunks.d.ts +112 -120
- package/dist/monitorSlice/thunks.js +78 -42
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/constants.cjs +44 -69
- package/dist/onboardingSlice/constants.cjs.map +1 -1
- package/dist/onboardingSlice/constants.d.cts +2 -26
- package/dist/onboardingSlice/constants.d.ts +2 -26
- package/dist/onboardingSlice/constants.js +43 -7
- package/dist/onboardingSlice/constants.js.map +1 -1
- package/dist/onboardingSlice/index.cjs +53 -73
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +2 -62
- package/dist/onboardingSlice/index.d.ts +2 -62
- package/dist/onboardingSlice/index.js +47 -13
- package/dist/onboardingSlice/index.js.map +1 -1
- package/dist/onboardingSlice/mocks.cjs +12 -81
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.d.cts +14 -15
- package/dist/onboardingSlice/mocks.d.ts +14 -15
- package/dist/onboardingSlice/mocks.js +12 -15
- package/dist/onboardingSlice/mocks.js.map +1 -1
- package/dist/onboardingSlice/selectors.cjs +5 -29
- package/dist/onboardingSlice/selectors.cjs.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +6 -1
- package/dist/onboardingSlice/selectors.d.ts +6 -1
- package/dist/onboardingSlice/selectors.js +5 -6
- package/dist/onboardingSlice/selectors.js.map +1 -1
- package/dist/onboardingSlice/thunks.cjs +8 -4746
- package/dist/onboardingSlice/thunks.d.cts +124 -143
- package/dist/onboardingSlice/thunks.d.ts +124 -143
- package/dist/onboardingSlice/thunks.js +2 -49
- package/dist/organizationSlice/constants.cjs +11 -95
- package/dist/organizationSlice/constants.d.cts +2 -91
- package/dist/organizationSlice/constants.d.ts +2 -91
- package/dist/organizationSlice/constants.js +2 -27
- package/dist/organizationSlice/index.cjs +113 -152
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +2 -74
- package/dist/organizationSlice/index.d.ts +2 -74
- package/dist/organizationSlice/index.js +106 -18
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/mocks.cjs +215 -406
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +209 -212
- package/dist/organizationSlice/mocks.d.ts +209 -212
- package/dist/organizationSlice/mocks.js +214 -184
- package/dist/organizationSlice/mocks.js.map +1 -1
- package/dist/organizationSlice/selectors.cjs +97 -474
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +381 -389
- package/dist/organizationSlice/selectors.d.ts +381 -389
- package/dist/organizationSlice/selectors.js +78 -50
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.cjs +43 -5150
- package/dist/organizationSlice/thunks.d.cts +638 -649
- package/dist/organizationSlice/thunks.d.ts +638 -649
- package/dist/organizationSlice/thunks.js +2 -119
- package/dist/organizationSlice/types.cjs +0 -19
- package/dist/organizationSlice/types.d.cts +2 -88
- package/dist/organizationSlice/types.d.ts +2 -88
- package/dist/organizationSlice/types.js +1 -1
- package/dist/releasesSlice/constants.cjs +17 -41
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +2 -15
- package/dist/releasesSlice/constants.d.ts +2 -15
- package/dist/releasesSlice/constants.js +13 -14
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.cjs +106 -179
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +2 -113
- package/dist/releasesSlice/index.d.ts +2 -113
- package/dist/releasesSlice/index.js +100 -18
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/mocks.cjs +44 -220
- package/dist/releasesSlice/mocks.cjs.map +1 -1
- package/dist/releasesSlice/mocks.d.cts +63 -61
- package/dist/releasesSlice/mocks.d.ts +63 -61
- package/dist/releasesSlice/mocks.js +43 -59
- package/dist/releasesSlice/mocks.js.map +1 -1
- package/dist/releasesSlice/selectors.cjs +44 -439
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +268 -280
- package/dist/releasesSlice/selectors.d.ts +268 -280
- package/dist/releasesSlice/selectors.js +31 -36
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +422 -2175
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +305 -307
- package/dist/releasesSlice/thunks.d.ts +305 -307
- package/dist/releasesSlice/thunks.js +413 -65
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/selectors.cjs +136 -1530
- package/dist/selectors.d.cts +10 -36
- package/dist/selectors.d.ts +10 -36
- package/dist/selectors.js +10 -280
- package/dist/sockethook.cjs +140 -515
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.d.cts +25 -9
- package/dist/sockethook.d.ts +25 -9
- package/dist/sockethook.js +134 -135
- package/dist/sockethook.js.map +1 -1
- package/dist/store-BQxOSRC1.d.ts +234 -0
- package/dist/store-BiIA0r0A.d.cts +234 -0
- package/dist/store.cjs +117 -1290
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +3 -206
- package/dist/store.d.ts +3 -206
- package/dist/store.js +110 -32
- package/dist/store.js.map +1 -1
- package/dist/storehooks.cjs +240 -5783
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +76 -4
- package/dist/storehooks.d.ts +76 -4
- package/dist/storehooks.js +229 -265
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +2614 -5918
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +9 -36
- package/dist/thunks.d.ts +9 -36
- package/dist/thunks.js +2439 -385
- package/dist/thunks.js.map +1 -1
- package/dist/types-B2NRQLFw.d.ts +88 -0
- package/dist/types-ClEfo0dK.d.cts +88 -0
- package/dist/useDeploymentDevice.cjs +26 -4650
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.d.cts +4 -2
- package/dist/useDeploymentDevice.d.ts +4 -2
- package/dist/useDeploymentDevice.js +21 -60
- package/dist/useDeploymentDevice.js.map +1 -1
- package/dist/usersSlice/constants.cjs +8 -55
- package/dist/usersSlice/constants.d.cts +2 -52
- package/dist/usersSlice/constants.d.ts +2 -52
- package/dist/usersSlice/constants.js +2 -21
- package/dist/usersSlice/index.cjs +132 -172
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +2 -152
- package/dist/usersSlice/index.d.ts +2 -152
- package/dist/usersSlice/index.js +125 -18
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.cjs +55 -196
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.d.cts +68 -72
- package/dist/usersSlice/mocks.d.ts +68 -72
- package/dist/usersSlice/mocks.js +54 -46
- package/dist/usersSlice/mocks.js.map +1 -1
- package/dist/usersSlice/selectors.cjs +65 -567
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +364 -376
- package/dist/usersSlice/selectors.d.ts +364 -376
- package/dist/usersSlice/selectors.js +44 -50
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.cjs +39 -4698
- package/dist/usersSlice/thunks.d.cts +807 -843
- package/dist/usersSlice/thunks.d.ts +807 -843
- package/dist/usersSlice/thunks.js +2 -111
- package/dist/utils-B4I595rf.d.cts +104 -0
- package/dist/utils-DNnSR4S_.d.ts +104 -0
- package/dist/utils.cjs +229 -850
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -80
- package/dist/utils.d.ts +2 -80
- package/dist/utils.js +210 -50
- package/dist/utils.js.map +1 -1
- package/package.json +11 -13
- package/dist/appSlice/thunks.cjs.map +0 -1
- package/dist/appSlice/thunks.js.map +0 -1
- package/dist/chunk-2DYA3X77.js +0 -15
- package/dist/chunk-2DYA3X77.js.map +0 -1
- package/dist/chunk-4BHM6WVX.js +0 -50
- package/dist/chunk-4BHM6WVX.js.map +0 -1
- package/dist/chunk-4UNLEL5A.js +0 -143
- package/dist/chunk-4UNLEL5A.js.map +0 -1
- package/dist/chunk-6V5IIIF7.js +0 -396
- package/dist/chunk-6V5IIIF7.js.map +0 -1
- package/dist/chunk-ARMI6SZS.js +0 -446
- package/dist/chunk-ARMI6SZS.js.map +0 -1
- package/dist/chunk-AZF4YY3P.js +0 -108
- package/dist/chunk-AZF4YY3P.js.map +0 -1
- package/dist/chunk-B5AI2YPV.js +0 -156
- package/dist/chunk-B5AI2YPV.js.map +0 -1
- package/dist/chunk-CQXDAXQF.js +0 -51
- package/dist/chunk-CQXDAXQF.js.map +0 -1
- package/dist/chunk-DBBE6D36.js +0 -115
- package/dist/chunk-DBBE6D36.js.map +0 -1
- package/dist/chunk-ECVQVQEL.js +0 -68
- package/dist/chunk-ECVQVQEL.js.map +0 -1
- package/dist/chunk-FAJ3I2UQ.js +0 -47
- package/dist/chunk-FAJ3I2UQ.js.map +0 -1
- package/dist/chunk-FCY7BUGK.js +0 -2876
- package/dist/chunk-FCY7BUGK.js.map +0 -1
- package/dist/chunk-FG37HJLC.js +0 -157
- package/dist/chunk-FG37HJLC.js.map +0 -1
- package/dist/chunk-FQAUVV6C.js +0 -246
- package/dist/chunk-FQAUVV6C.js.map +0 -1
- package/dist/chunk-HKN3RN2Z.js +0 -41
- package/dist/chunk-HKN3RN2Z.js.map +0 -1
- package/dist/chunk-HPKXWNEF.js +0 -100
- package/dist/chunk-HPKXWNEF.js.map +0 -1
- package/dist/chunk-JIS4PA3R.js +0 -7
- package/dist/chunk-JIS4PA3R.js.map +0 -1
- package/dist/chunk-JXBTIFMS.js +0 -82
- package/dist/chunk-JXBTIFMS.js.map +0 -1
- package/dist/chunk-JYPSCCT4.js +0 -58
- package/dist/chunk-JYPSCCT4.js.map +0 -1
- package/dist/chunk-L53CPHJU.js +0 -721
- package/dist/chunk-L53CPHJU.js.map +0 -1
- package/dist/chunk-MNJXEB7S.js +0 -304
- package/dist/chunk-MNJXEB7S.js.map +0 -1
- package/dist/chunk-NMAXZ3ZY.js +0 -1
- package/dist/chunk-NMAXZ3ZY.js.map +0 -1
- package/dist/chunk-NXLXPRYW.js +0 -142
- package/dist/chunk-NXLXPRYW.js.map +0 -1
- package/dist/chunk-O6VCSLNE.js +0 -59
- package/dist/chunk-O6VCSLNE.js.map +0 -1
- package/dist/chunk-PQADM3M3.js +0 -115
- package/dist/chunk-PQADM3M3.js.map +0 -1
- package/dist/chunk-SJ75YKOA.js +0 -44
- package/dist/chunk-SJ75YKOA.js.map +0 -1
- package/dist/chunk-TUPBZ6MQ.js +0 -162
- package/dist/chunk-TUPBZ6MQ.js.map +0 -1
- package/dist/chunk-XF3TZSZS.js +0 -25
- package/dist/chunk-XF3TZSZS.js.map +0 -1
- package/dist/chunk-YB3US6OT.js +0 -61
- package/dist/chunk-YB3US6OT.js.map +0 -1
- package/dist/chunk-YDDE5TIH.js +0 -204
- package/dist/chunk-YDDE5TIH.js.map +0 -1
- package/dist/chunk-YO22XLHI.js +0 -7
- package/dist/chunk-YO22XLHI.js.map +0 -1
- package/dist/chunk-Z2O6LYVP.js +0 -144
- package/dist/chunk-Z2O6LYVP.js.map +0 -1
- package/dist/chunk-ZKAH3APE.js +0 -1
- package/dist/chunk-ZKAH3APE.js.map +0 -1
- package/dist/commonConstants.cjs.map +0 -1
- package/dist/commonConstants.js.map +0 -1
- package/dist/deploymentsSlice/constants.cjs.map +0 -1
- package/dist/deploymentsSlice/constants.js.map +0 -1
- package/dist/deploymentsSlice/thunks.cjs.map +0 -1
- package/dist/deploymentsSlice/thunks.js.map +0 -1
- package/dist/devicesSlice/constants.cjs.map +0 -1
- package/dist/devicesSlice/constants.js.map +0 -1
- package/dist/devicesSlice/thunks.cjs.map +0 -1
- package/dist/devicesSlice/thunks.js.map +0 -1
- package/dist/monitorSlice/constants.cjs.map +0 -1
- package/dist/monitorSlice/constants.js.map +0 -1
- package/dist/onboardingSlice/thunks.cjs.map +0 -1
- package/dist/onboardingSlice/thunks.js.map +0 -1
- package/dist/organizationSlice/constants.cjs.map +0 -1
- package/dist/organizationSlice/constants.js.map +0 -1
- package/dist/organizationSlice/thunks.cjs.map +0 -1
- package/dist/organizationSlice/thunks.js.map +0 -1
- package/dist/organizationSlice/types.cjs.map +0 -1
- package/dist/organizationSlice/types.js.map +0 -1
- package/dist/selectors.cjs.map +0 -1
- package/dist/selectors.js.map +0 -1
- package/dist/usersSlice/constants.cjs.map +0 -1
- package/dist/usersSlice/constants.js.map +0 -1
- package/dist/usersSlice/thunks.cjs.map +0 -1
- package/dist/usersSlice/thunks.js.map +0 -1
package/dist/commonSelectors.cjs
CHANGED
|
@@ -1,1284 +1,299 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
));
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__export(commonSelectors_exports, {
|
|
33
|
-
getAuditlogDevice: () => getAuditlogDevice,
|
|
34
|
-
getAvailableIssueOptionsByType: () => getAvailableIssueOptionsByType,
|
|
35
|
-
getDemoDeviceAddress: () => getDemoDeviceAddress,
|
|
36
|
-
getDeploymentRelease: () => getDeploymentRelease,
|
|
37
|
-
getDeviceConfigDeployment: () => getDeviceConfigDeployment,
|
|
38
|
-
getDeviceReportsForUser: () => getDeviceReportsForUser,
|
|
39
|
-
getFilterAttributes: () => getFilterAttributes,
|
|
40
|
-
getGroupNames: () => getGroupNames,
|
|
41
|
-
getIsEnterprise: () => getIsEnterprise,
|
|
42
|
-
getMappedDevicesList: () => getMappedDevicesList,
|
|
43
|
-
getOnboardingState: () => getOnboardingState,
|
|
44
|
-
getRelevantRoles: () => getRelevantRoles,
|
|
45
|
-
getSelectedDeploymentData: () => getSelectedDeploymentData,
|
|
46
|
-
getShowSecurityAlert: () => getShowSecurityAlert,
|
|
47
|
-
getTenantCapabilities: () => getTenantCapabilities,
|
|
48
|
-
getUserCapabilities: () => getUserCapabilities,
|
|
49
|
-
getUserRoles: () => getUserRoles
|
|
50
|
-
});
|
|
51
|
-
module.exports = __toCommonJS(commonSelectors_exports);
|
|
52
|
-
var import_helpers4 = require("@northern.tech/utils/helpers");
|
|
53
|
-
var import_toolkit7 = require("@reduxjs/toolkit");
|
|
54
|
-
var import_dayjs = __toESM(require("dayjs"), 1);
|
|
55
|
-
|
|
56
|
-
// src/appSlice/constants.ts
|
|
57
|
-
var import_icons_material = require("@mui/icons-material");
|
|
58
|
-
var import_utils = require("@northern.tech/utils");
|
|
59
|
-
var chartTypes = {
|
|
60
|
-
bar: { key: "bar", Icon: import_icons_material.BarChart },
|
|
61
|
-
pie: { key: "pie", Icon: import_icons_material.PieChartOutline }
|
|
62
|
-
};
|
|
63
|
-
var emptyChartSelection = { software: "", group: "", chartType: chartTypes.bar.key, attribute: "artifact_name" };
|
|
64
|
-
var defaultReportType = "distribution";
|
|
65
|
-
var defaultReports = [{ ...emptyChartSelection, group: null, attribute: "artifact_name", type: defaultReportType }];
|
|
66
|
-
var PLANS = {
|
|
67
|
-
os: {
|
|
68
|
-
id: "os",
|
|
69
|
-
name: "Basic",
|
|
70
|
-
description: "The core features of Mender. To continue using Enterprise Trial features\u2014like Delta updates, scheduled deployments, phased rollouts, device filtering, dynamic groups, RBAC, audit logs, and more\u2014please upgrade to a higher plan."
|
|
71
|
-
},
|
|
72
|
-
professional: {
|
|
73
|
-
id: "professional",
|
|
74
|
-
name: "Professional",
|
|
75
|
-
description: "Everything in Basic, plus enhanced update management and automation features."
|
|
76
|
-
},
|
|
77
|
-
enterprise: {
|
|
78
|
-
id: "enterprise",
|
|
79
|
-
name: "Enterprise",
|
|
80
|
-
description: "Every advanced feature of Mender, tailored for complex and large-scale deployments. Not available as a monthly subscription \u2014 ask us for a quote."
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
var ADDONS = {
|
|
84
|
-
configure: {
|
|
85
|
-
id: "configure",
|
|
86
|
-
title: "Configure",
|
|
87
|
-
description: "Seamlessly configure applications and devices remotely \u2013 configure each device to its environment.",
|
|
88
|
-
needs: ["hasDeviceConfig"],
|
|
89
|
-
eligible: ["os", "professional", "enterprise"]
|
|
90
|
-
},
|
|
91
|
-
monitor: {
|
|
92
|
-
id: "monitor",
|
|
93
|
-
title: "Monitor",
|
|
94
|
-
description: "Detect and analyze health issues of devices, services and applications. Set up alerts so you can act quickly.",
|
|
95
|
-
needs: ["hasMonitor"],
|
|
96
|
-
eligible: ["professional", "enterprise"]
|
|
97
|
-
},
|
|
98
|
-
troubleshoot: {
|
|
99
|
-
id: "troubleshoot",
|
|
100
|
-
title: "Troubleshoot",
|
|
101
|
-
description: "Secure, remote access to your devices \u2013 quickly diagnose and fix issues in real time.",
|
|
102
|
-
needs: ["hasDeviceConnect"],
|
|
103
|
-
eligible: ["os", "professional", "enterprise"]
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
var BENEFITS = {
|
|
107
|
-
auditlog: {
|
|
108
|
-
id: "auditlog",
|
|
109
|
-
benefit: "gain access to logs for important events such as changes to devices, deployments and user management, as well as remote terminal session replays",
|
|
110
|
-
requiredPlan: PLANS.enterprise.id
|
|
111
|
-
},
|
|
112
|
-
dashboard: { id: "dashboard", benefit: "actionable insights into the devices you are updating with Mender", requiredPlan: PLANS.enterprise.id },
|
|
113
|
-
deltaGeneration: {
|
|
114
|
-
id: "deltaGeneration",
|
|
115
|
-
benefit: "automatic delta artifacts generation to minimize data transfer and improve the update delivery",
|
|
116
|
-
requiredPlan: PLANS.enterprise.id
|
|
117
|
-
},
|
|
118
|
-
deviceConfiguration: { id: "deviceConfiguration", benefit: "device configuration features", requiredAddon: ADDONS.configure.id },
|
|
119
|
-
deviceMonitor: { id: "deviceMonitor", benefit: "device monitoring features", requiredAddon: ADDONS.monitor.id, requiredPlan: PLANS.professional.id },
|
|
120
|
-
deviceTroubleshoot: { id: "deviceTroubleshoot", benefit: "device troubleshooting features", requiredAddon: ADDONS.troubleshoot.id },
|
|
121
|
-
dynamicGroups: { id: "dynamicGroups", benefit: "create dynamic groups to ease device management", requiredPlan: PLANS.enterprise.id },
|
|
122
|
-
fullFiltering: { id: "fullFiltering", benefit: "filtering by multiple attributes to improve the device overview", requiredPlan: PLANS.professional.id },
|
|
123
|
-
gateway: { id: "gateway", benefit: "see devices connected to your gateway device for easy access", requiredPlans: PLANS.professional.id },
|
|
124
|
-
pausedDeployments: {
|
|
125
|
-
id: "pausedDeployments",
|
|
126
|
-
benefit: "granular control about update rollout to allow synchronization across your fleet",
|
|
127
|
-
requiredPlan: PLANS.enterprise.id
|
|
128
|
-
},
|
|
129
|
-
phasedDeployments: { id: "phasedDeployments", benefit: "choose to roll out deployments in multiple phases", requiredPlan: PLANS.enterprise.id },
|
|
130
|
-
rbac: { id: "rbac", benefit: "granular role based access control", requiredPlan: PLANS.enterprise.id },
|
|
131
|
-
retryDeployments: { id: "retryDeployments", benefit: "optional retries for failed rollout attempts", requiredPlan: PLANS.professional.id },
|
|
132
|
-
scheduledDeployments: {
|
|
133
|
-
id: "scheduledDeployments",
|
|
134
|
-
benefit: "scheduled deployments to steer the distribution of your updates.",
|
|
135
|
-
requiredPlan: PLANS.professional.id
|
|
136
|
-
},
|
|
137
|
-
webhookEvents: {
|
|
138
|
-
id: "webhookEvents",
|
|
139
|
-
benefit: "receive inventory events and select which type(s) of events the webhook will receive",
|
|
140
|
-
requiredPlan: PLANS.professional.id
|
|
141
|
-
},
|
|
142
|
-
default: { id: "default", benefit: "gain access to this feature", requiredPlan: PLANS.enterprise.id }
|
|
143
|
-
};
|
|
144
|
-
var DARK_MODE = "dark";
|
|
145
|
-
|
|
146
|
-
// src/appSlice/selectors.ts
|
|
147
|
-
var import_helpers = require("@northern.tech/utils/helpers");
|
|
148
|
-
var import_toolkit = require("@reduxjs/toolkit");
|
|
149
|
-
var getFeatures = (state) => state.app.features;
|
|
150
|
-
var getFullVersionInformation = (state) => state.app.versionInformation;
|
|
151
|
-
var getSearchState = (state) => state.app.searchState;
|
|
152
|
-
var getUploads = (state) => state.app.uploadsById;
|
|
153
|
-
var getIsUploading = (0, import_toolkit.createSelector)([getUploads], (uploadsById) => !!Object.keys(uploadsById).length);
|
|
154
|
-
var getSearchedDevices = (0, import_toolkit.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
|
|
155
|
-
var getVersionInformation = (0, import_toolkit.createSelector)(
|
|
156
|
-
[getFullVersionInformation, getFeatures],
|
|
157
|
-
({ Integration, ...remainder }, { isHosted }) => isHosted && Integration !== "next" ? remainder : { ...remainder, Integration }
|
|
158
|
-
);
|
|
159
|
-
var getIsPreview = (0, import_toolkit.createSelector)([getFullVersionInformation], ({ Integration }) => (0, import_helpers.versionCompare)(Integration, "next") > -1);
|
|
160
|
-
|
|
161
|
-
// src/commonConstants.tsx
|
|
162
|
-
var import_js = require("@mdi/js");
|
|
163
|
-
|
|
164
|
-
// src/constants.ts
|
|
165
|
-
var import_constants2 = require("@northern.tech/utils/constants");
|
|
166
|
-
|
|
167
|
-
// src/deploymentsSlice/constants.ts
|
|
168
|
-
var alreadyInstalled = "already-installed";
|
|
169
|
-
var deploymentSubstates = {
|
|
170
|
-
aborted: "aborted",
|
|
171
|
-
alreadyInstalled,
|
|
172
|
-
decommissioned: "decommissioned",
|
|
173
|
-
downloading: "downloading",
|
|
174
|
-
failure: "failure",
|
|
175
|
-
installing: "installing",
|
|
176
|
-
noartifact: "noartifact",
|
|
177
|
-
artifact_too_big: "artifact_too_big",
|
|
178
|
-
pause_before_committing: "pause_before_committing",
|
|
179
|
-
pause_before_installing: "pause_before_installing",
|
|
180
|
-
pause_before_rebooting: "pause_before_rebooting",
|
|
181
|
-
pending: "pending",
|
|
182
|
-
rebooting: "rebooting",
|
|
183
|
-
success: "success"
|
|
184
|
-
};
|
|
185
|
-
var deploymentStatesToSubstates = {
|
|
186
|
-
failures: [deploymentSubstates.failure, deploymentSubstates.aborted, deploymentSubstates.decommissioned],
|
|
187
|
-
inprogress: [deploymentSubstates.downloading, deploymentSubstates.installing, deploymentSubstates.rebooting],
|
|
188
|
-
paused: [deploymentSubstates.pause_before_installing, deploymentSubstates.pause_before_rebooting, deploymentSubstates.pause_before_committing],
|
|
189
|
-
pending: [deploymentSubstates.pending],
|
|
190
|
-
successes: [deploymentSubstates.success, deploymentSubstates.alreadyInstalled, deploymentSubstates.noartifact, deploymentSubstates.artifact_too_big]
|
|
191
|
-
};
|
|
192
|
-
var deploymentStatesToSubstatesWithSkipped = {
|
|
193
|
-
...deploymentStatesToSubstates,
|
|
194
|
-
failures: [deploymentSubstates.failure],
|
|
195
|
-
skipped: [
|
|
196
|
-
deploymentSubstates.aborted,
|
|
197
|
-
deploymentSubstates.noartifact,
|
|
198
|
-
deploymentSubstates.artifact_too_big,
|
|
199
|
-
deploymentSubstates.alreadyInstalled,
|
|
200
|
-
deploymentSubstates.decommissioned
|
|
201
|
-
],
|
|
202
|
-
successes: [deploymentSubstates.success]
|
|
203
|
-
};
|
|
204
|
-
var installationSubstatesMap = {
|
|
205
|
-
download: {
|
|
206
|
-
title: "download",
|
|
207
|
-
done: "downloaded",
|
|
208
|
-
successIndicators: [deploymentSubstates.installing, deploymentSubstates.rebooting, ...deploymentStatesToSubstates.paused, deploymentSubstates.success],
|
|
209
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
210
|
-
pauseConfigurationIndicator: "ArtifactInstall_Enter"
|
|
211
|
-
},
|
|
212
|
-
install: {
|
|
213
|
-
title: "install",
|
|
214
|
-
done: "installed",
|
|
215
|
-
successIndicators: [
|
|
216
|
-
deploymentSubstates.rebooting,
|
|
217
|
-
deploymentSubstates.pause_before_rebooting,
|
|
218
|
-
deploymentSubstates.pause_before_committing,
|
|
219
|
-
deploymentSubstates.success
|
|
220
|
-
],
|
|
221
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
222
|
-
pauseConfigurationIndicator: "ArtifactReboot_Enter"
|
|
223
|
-
},
|
|
224
|
-
reboot: {
|
|
225
|
-
title: "reboot",
|
|
226
|
-
done: "rebooted",
|
|
227
|
-
successIndicators: [deploymentSubstates.pause_before_committing, deploymentSubstates.success],
|
|
228
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
229
|
-
pauseConfigurationIndicator: "ArtifactCommit_Enter"
|
|
230
|
-
},
|
|
231
|
-
commit: {
|
|
232
|
-
title: "commit",
|
|
233
|
-
done: "committed",
|
|
234
|
-
successIndicators: deploymentStatesToSubstates.successes,
|
|
235
|
-
failureIndicators: deploymentStatesToSubstates.failures,
|
|
236
|
-
pauseConfigurationIndicator: void 0
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
var DEPLOYMENT_STATES = {
|
|
240
|
-
finished: "finished",
|
|
241
|
-
inprogress: "inprogress",
|
|
242
|
-
pending: "pending",
|
|
243
|
-
scheduled: "scheduled"
|
|
244
|
-
};
|
|
245
|
-
var listDefaultsByState = {
|
|
246
|
-
[DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
|
|
247
|
-
[DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
|
|
248
|
-
[DEPLOYMENT_STATES.scheduled]: { ...import_constants2.DEVICE_LIST_DEFAULTS },
|
|
249
|
-
[DEPLOYMENT_STATES.finished]: { ...import_constants2.DEVICE_LIST_DEFAULTS },
|
|
250
|
-
sort: { direction: import_constants2.SORTING_OPTIONS.desc }
|
|
251
|
-
};
|
|
252
|
-
var DEPLOYMENT_ROUTES = {
|
|
253
|
-
active: {
|
|
254
|
-
key: "active",
|
|
255
|
-
route: "/deployments/active",
|
|
256
|
-
states: [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress],
|
|
257
|
-
title: "Active"
|
|
258
|
-
},
|
|
259
|
-
finished: {
|
|
260
|
-
key: "finished",
|
|
261
|
-
route: "/deployments/finished",
|
|
262
|
-
states: [DEPLOYMENT_STATES.finished],
|
|
263
|
-
title: "Finished"
|
|
264
|
-
},
|
|
265
|
-
scheduled: {
|
|
266
|
-
key: "scheduled",
|
|
267
|
-
route: "/deployments/scheduled",
|
|
268
|
-
states: [DEPLOYMENT_STATES.scheduled],
|
|
269
|
-
title: "Scheduled"
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
var defaultStats = {
|
|
273
|
-
[deploymentSubstates.aborted]: 0,
|
|
274
|
-
[deploymentSubstates.alreadyInstalled]: 0,
|
|
275
|
-
[deploymentSubstates.decommissioned]: 0,
|
|
276
|
-
[deploymentSubstates.downloading]: 0,
|
|
277
|
-
[deploymentSubstates.failure]: 0,
|
|
278
|
-
[deploymentSubstates.installing]: 0,
|
|
279
|
-
[deploymentSubstates.noartifact]: 0,
|
|
280
|
-
[deploymentSubstates.pause_before_committing]: 0,
|
|
281
|
-
[deploymentSubstates.pause_before_installing]: 0,
|
|
282
|
-
[deploymentSubstates.pause_before_rebooting]: 0,
|
|
283
|
-
[deploymentSubstates.pending]: 0,
|
|
284
|
-
[deploymentSubstates.rebooting]: 0,
|
|
285
|
-
[deploymentSubstates.success]: 0
|
|
286
|
-
};
|
|
287
|
-
var pauseMap = {
|
|
288
|
-
[deploymentSubstates.pause_before_installing]: {
|
|
289
|
-
title: installationSubstatesMap.download.done,
|
|
290
|
-
followUp: installationSubstatesMap.download.pauseConfigurationIndicator
|
|
291
|
-
},
|
|
292
|
-
[deploymentSubstates.pause_before_rebooting]: {
|
|
293
|
-
title: installationSubstatesMap.install.done,
|
|
294
|
-
followUp: installationSubstatesMap.install.pauseConfigurationIndicator
|
|
295
|
-
},
|
|
296
|
-
[deploymentSubstates.pause_before_committing]: {
|
|
297
|
-
title: installationSubstatesMap.reboot.done,
|
|
298
|
-
followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
// src/onboardingSlice/constants.ts
|
|
303
|
-
var onboardingSteps = {
|
|
304
|
-
ONBOARDING_START: "onboarding-start",
|
|
305
|
-
DEVICES_PENDING_ONBOARDING_START: "devices-pending-onboarding-start",
|
|
306
|
-
DASHBOARD_ONBOARDING_START: "dashboard-onboarding-start",
|
|
307
|
-
DASHBOARD_ONBOARDING_PENDINGS: "dashboard-onboarding-pendings",
|
|
308
|
-
DEVICES_DELAYED_ONBOARDING: "devices-delayed-onboarding",
|
|
309
|
-
DEVICES_PENDING_ONBOARDING: "devices-pending-onboarding",
|
|
310
|
-
DEVICES_ACCEPTED_ONBOARDING: "devices-accepted-onboarding",
|
|
311
|
-
DEVICES_PENDING_ACCEPTING_ONBOARDING: "devices-pending-accepting-onboarding",
|
|
312
|
-
DEVICES_DEPLOY_RELEASE_ONBOARDING: "devices-deploy-release-onboarding",
|
|
313
|
-
SCHEDULING_ARTIFACT_SELECTION: "scheduling-artifact-selection",
|
|
314
|
-
SCHEDULING_ALL_DEVICES_SELECTION: "scheduling-all-devices-selection",
|
|
315
|
-
SCHEDULING_GROUP_SELECTION: "scheduling-group-selection",
|
|
316
|
-
SCHEDULING_RELEASE_TO_DEVICES: "scheduling-release-to-devices",
|
|
317
|
-
DEPLOYMENTS_INPROGRESS: "deployments-inprogress",
|
|
318
|
-
DEPLOYMENTS_COMPLETED: "deployments-completed",
|
|
319
|
-
DEPLOYMENTS_PAST: "deployments-past",
|
|
320
|
-
DEPLOYMENTS_PAST_COMPLETED: "deployments-past-completed",
|
|
321
|
-
DEPLOYMENTS_PAST_COMPLETED_FAILURE: "deployments-past-completed-failure",
|
|
322
|
-
ONBOARDING_CANCELED: "onboarding-canceled"
|
|
323
|
-
};
|
|
324
|
-
var orderedOnboardingSteps = [
|
|
325
|
-
onboardingSteps.DASHBOARD_ONBOARDING_START,
|
|
326
|
-
onboardingSteps.DEVICES_PENDING_ONBOARDING_START,
|
|
327
|
-
onboardingSteps.DEVICES_DELAYED_ONBOARDING,
|
|
328
|
-
onboardingSteps.DEVICES_PENDING_ONBOARDING,
|
|
329
|
-
onboardingSteps.DEVICES_PENDING_ACCEPTING_ONBOARDING,
|
|
330
|
-
onboardingSteps.DASHBOARD_ONBOARDING_PENDINGS,
|
|
331
|
-
onboardingSteps.DEVICES_ACCEPTED_ONBOARDING,
|
|
332
|
-
onboardingSteps.DEVICES_DEPLOY_RELEASE_ONBOARDING,
|
|
333
|
-
onboardingSteps.SCHEDULING_ALL_DEVICES_SELECTION,
|
|
334
|
-
onboardingSteps.SCHEDULING_GROUP_SELECTION,
|
|
335
|
-
onboardingSteps.SCHEDULING_ARTIFACT_SELECTION,
|
|
336
|
-
onboardingSteps.SCHEDULING_RELEASE_TO_DEVICES,
|
|
337
|
-
onboardingSteps.DEPLOYMENTS_INPROGRESS,
|
|
338
|
-
onboardingSteps.DEPLOYMENTS_PAST,
|
|
339
|
-
onboardingSteps.DEPLOYMENTS_PAST_COMPLETED,
|
|
340
|
-
onboardingSteps.DEPLOYMENTS_PAST_COMPLETED_FAILURE,
|
|
341
|
-
onboardingSteps.ONBOARDING_CANCELED
|
|
342
|
-
];
|
|
343
|
-
|
|
344
|
-
// src/usersSlice/constants.ts
|
|
345
|
-
var READ_STATES = {
|
|
346
|
-
read: "read",
|
|
347
|
-
seen: "seen",
|
|
348
|
-
unread: "unread"
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
// src/commonConstants.tsx
|
|
352
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
353
|
-
var timeUnits = {
|
|
354
|
-
days: "days",
|
|
355
|
-
minutes: "minutes",
|
|
356
|
-
hours: "hours"
|
|
357
|
-
};
|
|
358
|
-
var UNGROUPED_GROUP = { id: "*|=ungrouped=|*", name: "Unassigned" };
|
|
359
|
-
var DEVICE_LIST_MAXIMUM_LENGTH = 50;
|
|
360
|
-
var oneSecond = 1e3;
|
|
361
|
-
var TIMEOUTS = {
|
|
362
|
-
debounceDefault: 700,
|
|
363
|
-
debounceShort: 300,
|
|
364
|
-
halfASecond: 0.5 * oneSecond,
|
|
365
|
-
oneSecond,
|
|
366
|
-
twoSeconds: 2 * oneSecond,
|
|
367
|
-
threeSeconds: 3 * oneSecond,
|
|
368
|
-
fiveSeconds: 5 * oneSecond,
|
|
369
|
-
refreshDefault: 10 * oneSecond,
|
|
370
|
-
refreshLong: 60 * oneSecond
|
|
371
|
-
};
|
|
372
|
-
var DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };
|
|
373
|
-
var defaultIdAttribute = Object.freeze({ attribute: "id", scope: import_constants2.ATTRIBUTE_SCOPES.identity });
|
|
374
|
-
var productOrder = ["micro", "standard", "system"];
|
|
375
|
-
var credentialTypes = {
|
|
376
|
-
aws: "aws",
|
|
377
|
-
http: "http",
|
|
378
|
-
sas: "sas",
|
|
379
|
-
x509: "x509"
|
|
380
|
-
};
|
|
381
|
-
var EXTERNAL_PROVIDER = {
|
|
382
|
-
"iot-core": {
|
|
383
|
-
credentialsType: credentialTypes.aws,
|
|
384
|
-
icon: import_js.mdiAws,
|
|
385
|
-
title: "AWS IoT Core",
|
|
386
|
-
twinTitle: "Device Shadow",
|
|
387
|
-
provider: "iot-core",
|
|
388
|
-
enabled: true,
|
|
389
|
-
deviceTwin: true,
|
|
390
|
-
configHint: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "For help finding your AWS IoT Core connection string, check the AWS IoT documentation." })
|
|
391
|
-
},
|
|
392
|
-
"iot-hub": {
|
|
393
|
-
credentialsType: credentialTypes.sas,
|
|
394
|
-
icon: import_js.mdiMicrosoftAzure,
|
|
395
|
-
title: "Azure IoT Hub",
|
|
396
|
-
twinTitle: "Device Twin",
|
|
397
|
-
provider: "iot-hub",
|
|
398
|
-
enabled: true,
|
|
399
|
-
deviceTwin: true,
|
|
400
|
-
configHint: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
401
|
-
"For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described",
|
|
402
|
-
" ",
|
|
403
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
404
|
-
"a",
|
|
405
|
-
{
|
|
406
|
-
href: "https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn",
|
|
407
|
-
target: "_blank",
|
|
408
|
-
rel: "noopener noreferrer",
|
|
409
|
-
children: "here"
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
"."
|
|
413
|
-
] })
|
|
414
|
-
},
|
|
415
|
-
webhook: {
|
|
416
|
-
credentialsType: credentialTypes.http,
|
|
417
|
-
deviceTwin: false,
|
|
418
|
-
twinTitle: "",
|
|
419
|
-
// disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.
|
|
420
|
-
enabled: false,
|
|
421
|
-
provider: "webhook"
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
var emptyWebhook = {
|
|
425
|
-
description: "",
|
|
426
|
-
provider: "webhook",
|
|
427
|
-
credentials: {
|
|
428
|
-
type: EXTERNAL_PROVIDER.webhook.credentialsType,
|
|
429
|
-
[EXTERNAL_PROVIDER.webhook.credentialsType]: {
|
|
430
|
-
secret: "",
|
|
431
|
-
url: ""
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
var regionNames = new Intl.DisplayNames(["en"], { type: "region" });
|
|
436
|
-
var countries = [
|
|
437
|
-
"AD",
|
|
438
|
-
"AE",
|
|
439
|
-
"AF",
|
|
440
|
-
"AG",
|
|
441
|
-
"AI",
|
|
442
|
-
"AL",
|
|
443
|
-
"AM",
|
|
444
|
-
"AO",
|
|
445
|
-
"AQ",
|
|
446
|
-
"AR",
|
|
447
|
-
"AS",
|
|
448
|
-
"AT",
|
|
449
|
-
"AU",
|
|
450
|
-
"AW",
|
|
451
|
-
"AX",
|
|
452
|
-
"AZ",
|
|
453
|
-
"BA",
|
|
454
|
-
"BB",
|
|
455
|
-
"BD",
|
|
456
|
-
"BE",
|
|
457
|
-
"BF",
|
|
458
|
-
"BG",
|
|
459
|
-
"BH",
|
|
460
|
-
"BI",
|
|
461
|
-
"BJ",
|
|
462
|
-
"BL",
|
|
463
|
-
"BM",
|
|
464
|
-
"BN",
|
|
465
|
-
"BO",
|
|
466
|
-
"BR",
|
|
467
|
-
"BS",
|
|
468
|
-
"BT",
|
|
469
|
-
"BV",
|
|
470
|
-
"BW",
|
|
471
|
-
"BY",
|
|
472
|
-
"BZ",
|
|
473
|
-
"CA",
|
|
474
|
-
"CC",
|
|
475
|
-
"CD",
|
|
476
|
-
"CF",
|
|
477
|
-
"CG",
|
|
478
|
-
"CH",
|
|
479
|
-
"CI",
|
|
480
|
-
"CK",
|
|
481
|
-
"CL",
|
|
482
|
-
"CM",
|
|
483
|
-
"CN",
|
|
484
|
-
"CO",
|
|
485
|
-
"CR",
|
|
486
|
-
"CU",
|
|
487
|
-
"CV",
|
|
488
|
-
"CW",
|
|
489
|
-
"CX",
|
|
490
|
-
"CY",
|
|
491
|
-
"CZ",
|
|
492
|
-
"DE",
|
|
493
|
-
"DJ",
|
|
494
|
-
"DK",
|
|
495
|
-
"DM",
|
|
496
|
-
"DO",
|
|
497
|
-
"DZ",
|
|
498
|
-
"EC",
|
|
499
|
-
"EE",
|
|
500
|
-
"EG",
|
|
501
|
-
"EH",
|
|
502
|
-
"ER",
|
|
503
|
-
"ES",
|
|
504
|
-
"ET",
|
|
505
|
-
"FI",
|
|
506
|
-
"FJ",
|
|
507
|
-
"FK",
|
|
508
|
-
"FM",
|
|
509
|
-
"FO",
|
|
510
|
-
"FR",
|
|
511
|
-
"GA",
|
|
512
|
-
"GB",
|
|
513
|
-
"GD",
|
|
514
|
-
"GE",
|
|
515
|
-
"GF",
|
|
516
|
-
"GG",
|
|
517
|
-
"GH",
|
|
518
|
-
"GI",
|
|
519
|
-
"GL",
|
|
520
|
-
"GM",
|
|
521
|
-
"GN",
|
|
522
|
-
"GP",
|
|
523
|
-
"GQ",
|
|
524
|
-
"GR",
|
|
525
|
-
"GS",
|
|
526
|
-
"GT",
|
|
527
|
-
"GU",
|
|
528
|
-
"GW",
|
|
529
|
-
"GY",
|
|
530
|
-
"HK",
|
|
531
|
-
"HM",
|
|
532
|
-
"HN",
|
|
533
|
-
"HR",
|
|
534
|
-
"HT",
|
|
535
|
-
"HU",
|
|
536
|
-
"ID",
|
|
537
|
-
"IE",
|
|
538
|
-
"IL",
|
|
539
|
-
"IM",
|
|
540
|
-
"IN",
|
|
541
|
-
"IO",
|
|
542
|
-
"IQ",
|
|
543
|
-
"IR",
|
|
544
|
-
"IS",
|
|
545
|
-
"IT",
|
|
546
|
-
"JE",
|
|
547
|
-
"JM",
|
|
548
|
-
"JO",
|
|
549
|
-
"JP",
|
|
550
|
-
"KE",
|
|
551
|
-
"KG",
|
|
552
|
-
"KH",
|
|
553
|
-
"KI",
|
|
554
|
-
"KM",
|
|
555
|
-
"KN",
|
|
556
|
-
"KP",
|
|
557
|
-
"KR",
|
|
558
|
-
"KW",
|
|
559
|
-
"KY",
|
|
560
|
-
"KZ",
|
|
561
|
-
"LA",
|
|
562
|
-
"LB",
|
|
563
|
-
"LC",
|
|
564
|
-
"LI",
|
|
565
|
-
"LK",
|
|
566
|
-
"LR",
|
|
567
|
-
"LS",
|
|
568
|
-
"LT",
|
|
569
|
-
"LU",
|
|
570
|
-
"LV",
|
|
571
|
-
"LY",
|
|
572
|
-
"MA",
|
|
573
|
-
"MC",
|
|
574
|
-
"MD",
|
|
575
|
-
"ME",
|
|
576
|
-
"MF",
|
|
577
|
-
"MG",
|
|
578
|
-
"MH",
|
|
579
|
-
"MK",
|
|
580
|
-
"ML",
|
|
581
|
-
"MM",
|
|
582
|
-
"MN",
|
|
583
|
-
"MO",
|
|
584
|
-
"MP",
|
|
585
|
-
"MQ",
|
|
586
|
-
"MR",
|
|
587
|
-
"MS",
|
|
588
|
-
"MT",
|
|
589
|
-
"MU",
|
|
590
|
-
"MV",
|
|
591
|
-
"MW",
|
|
592
|
-
"MX",
|
|
593
|
-
"MY",
|
|
594
|
-
"MZ",
|
|
595
|
-
"NA",
|
|
596
|
-
"NC",
|
|
597
|
-
"NE",
|
|
598
|
-
"NF",
|
|
599
|
-
"NG",
|
|
600
|
-
"NI",
|
|
601
|
-
"NL",
|
|
602
|
-
"NO",
|
|
603
|
-
"NP",
|
|
604
|
-
"NR",
|
|
605
|
-
"NU",
|
|
606
|
-
"NZ",
|
|
607
|
-
"OM",
|
|
608
|
-
"PA",
|
|
609
|
-
"PE",
|
|
610
|
-
"PF",
|
|
611
|
-
"PG",
|
|
612
|
-
"PH",
|
|
613
|
-
"PK",
|
|
614
|
-
"PL",
|
|
615
|
-
"PM",
|
|
616
|
-
"PN",
|
|
617
|
-
"PR",
|
|
618
|
-
"PS",
|
|
619
|
-
"PT",
|
|
620
|
-
"PW",
|
|
621
|
-
"PY",
|
|
622
|
-
"QA",
|
|
623
|
-
"RE",
|
|
624
|
-
"RO",
|
|
625
|
-
"RS",
|
|
626
|
-
"RU",
|
|
627
|
-
"RW",
|
|
628
|
-
"SA",
|
|
629
|
-
"SB",
|
|
630
|
-
"SC",
|
|
631
|
-
"SD",
|
|
632
|
-
"SE",
|
|
633
|
-
"SG",
|
|
634
|
-
"SH",
|
|
635
|
-
"SI",
|
|
636
|
-
"SJ",
|
|
637
|
-
"SK",
|
|
638
|
-
"SL",
|
|
639
|
-
"SM",
|
|
640
|
-
"SN",
|
|
641
|
-
"SO",
|
|
642
|
-
"SR",
|
|
643
|
-
"SS",
|
|
644
|
-
"ST",
|
|
645
|
-
"SV",
|
|
646
|
-
"SX",
|
|
647
|
-
"SY",
|
|
648
|
-
"SZ",
|
|
649
|
-
"TC",
|
|
650
|
-
"TD",
|
|
651
|
-
"TF",
|
|
652
|
-
"TG",
|
|
653
|
-
"TH",
|
|
654
|
-
"TJ",
|
|
655
|
-
"TK",
|
|
656
|
-
"TL",
|
|
657
|
-
"TM",
|
|
658
|
-
"TN",
|
|
659
|
-
"TO",
|
|
660
|
-
"TR",
|
|
661
|
-
"TT",
|
|
662
|
-
"TV",
|
|
663
|
-
"TW",
|
|
664
|
-
"TZ",
|
|
665
|
-
"UA",
|
|
666
|
-
"UG",
|
|
667
|
-
"US",
|
|
668
|
-
"UY",
|
|
669
|
-
"UZ",
|
|
670
|
-
"VA",
|
|
671
|
-
"VC",
|
|
672
|
-
"VE",
|
|
673
|
-
"VG",
|
|
674
|
-
"VI",
|
|
675
|
-
"VN",
|
|
676
|
-
"VU",
|
|
677
|
-
"WF",
|
|
678
|
-
"WS",
|
|
679
|
-
"XK",
|
|
680
|
-
"YE",
|
|
681
|
-
"YT",
|
|
682
|
-
"ZA",
|
|
683
|
-
"ZM",
|
|
684
|
-
"ZW"
|
|
685
|
-
].map((code) => ({ code, label: regionNames.of(code) })).sort((a, b) => a.label.localeCompare(b.label));
|
|
686
|
-
|
|
687
|
-
// src/deploymentsSlice/selectors.ts
|
|
688
|
-
var import_toolkit2 = require("@reduxjs/toolkit");
|
|
689
|
-
var getDeploymentsById = (state) => state.deployments.byId;
|
|
690
|
-
var getDeploymentsByStatus = (state) => state.deployments.byStatus;
|
|
691
|
-
var getSelectedDeploymentDeviceIds = (state) => state.deployments.selectedDeviceIds;
|
|
692
|
-
var getDeploymentsSelectionState = (state) => state.deployments.selectionState;
|
|
693
|
-
var getDeploymentById = (0, import_toolkit2.createSelector)(
|
|
694
|
-
[getDeploymentsById, (_, deploymentId) => deploymentId],
|
|
695
|
-
(deploymentsById, deploymentId = "") => deploymentsById[deploymentId]
|
|
696
|
-
);
|
|
697
|
-
var getMappedDeploymentSelection = (0, import_toolkit2.createSelector)(
|
|
698
|
-
[getDeploymentsSelectionState, (_, deploymentsState) => deploymentsState, getDeploymentsById],
|
|
699
|
-
(selectionState, deploymentsState, deploymentsById) => {
|
|
700
|
-
const { selection = [] } = selectionState[deploymentsState] ?? {};
|
|
701
|
-
return selection.reduce((accu, id) => {
|
|
702
|
-
if (deploymentsById[id]) {
|
|
703
|
-
accu.push(deploymentsById[id]);
|
|
704
|
-
}
|
|
705
|
-
return accu;
|
|
706
|
-
}, []);
|
|
707
|
-
}
|
|
708
|
-
);
|
|
709
|
-
var relevantDeploymentStates = [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress, DEPLOYMENT_STATES.finished];
|
|
710
|
-
var DEPLOYMENT_CUTOFF = 3;
|
|
711
|
-
var getRecentDeployments = (0, import_toolkit2.createSelector)(
|
|
712
|
-
[getDeploymentsById, getDeploymentsByStatus],
|
|
713
|
-
(deploymentsById, deploymentsByStatus) => Object.entries(deploymentsByStatus).reduce(
|
|
714
|
-
(accu, [state, byStatus]) => {
|
|
715
|
-
if (!relevantDeploymentStates.includes(state) || !byStatus.deploymentIds.length) {
|
|
716
|
-
return accu;
|
|
717
|
-
}
|
|
718
|
-
accu[state] = byStatus.deploymentIds.reduce((accu2, id) => {
|
|
719
|
-
if (deploymentsById[id]) {
|
|
720
|
-
accu2.push(deploymentsById[id]);
|
|
721
|
-
}
|
|
722
|
-
return accu2;
|
|
723
|
-
}, []).slice(0, DEPLOYMENT_CUTOFF);
|
|
724
|
-
accu.total += byStatus.total;
|
|
725
|
-
return accu;
|
|
726
|
-
},
|
|
727
|
-
{ total: 0 }
|
|
728
|
-
)
|
|
729
|
-
);
|
|
730
|
-
|
|
731
|
-
// src/devicesSlice/selectors.ts
|
|
732
|
-
var import_helpers2 = require("@northern.tech/utils/helpers");
|
|
733
|
-
var import_toolkit3 = require("@reduxjs/toolkit");
|
|
734
|
-
var getAcceptedDevices = (state) => state.devices.byStatus.accepted;
|
|
735
|
-
var getDevicesByStatus = (state) => state.devices.byStatus;
|
|
736
|
-
var getDevicesById = (state) => state.devices.byId;
|
|
737
|
-
var getGroupsById = (state) => state.devices.groups.byId;
|
|
738
|
-
var getSelectedGroup = (state) => state.devices.groups.selectedGroup;
|
|
739
|
-
var getListedDevices = (state) => state.devices.deviceList.deviceIds;
|
|
740
|
-
var getFilteringAttributes = (state) => state.devices.filteringAttributes;
|
|
741
|
-
var getFilteringAttributesFromConfig = (state) => state.devices.filteringAttributesConfig.attributes;
|
|
742
|
-
var getSortedFilteringAttributes = (0, import_toolkit3.createSelector)([getFilteringAttributes], (filteringAttributes) => ({
|
|
743
|
-
...filteringAttributes,
|
|
744
|
-
identityAttributes: [...filteringAttributes.identityAttributes, "id"]
|
|
745
|
-
}));
|
|
746
|
-
var getDeviceLimits = (state) => state.devices.limits;
|
|
747
|
-
var getFilteringAttributesLimit = (state) => state.devices.filteringAttributesLimit;
|
|
748
|
-
var getDeviceIdentityAttributes = (0, import_toolkit3.createSelector)(
|
|
749
|
-
[getFilteringAttributes, getFilteringAttributesLimit],
|
|
750
|
-
({ identityAttributes }, filteringAttributesLimit) => {
|
|
751
|
-
const attributes = identityAttributes.slice(0, filteringAttributesLimit);
|
|
752
|
-
return attributes.reduce(
|
|
753
|
-
(accu, value) => {
|
|
754
|
-
accu.push({ value, label: value, scope: "identity" });
|
|
755
|
-
return accu;
|
|
756
|
-
},
|
|
757
|
-
[
|
|
758
|
-
{ value: "name", label: "Name", scope: "tags" },
|
|
759
|
-
{ value: "id", label: "Device ID", scope: "identity" }
|
|
760
|
-
]
|
|
761
|
-
);
|
|
762
|
-
}
|
|
763
|
-
);
|
|
764
|
-
var getDeviceCountsByStatus = (0, import_toolkit3.createSelector)(
|
|
765
|
-
[getDevicesByStatus],
|
|
766
|
-
(byStatus) => Object.values(import_constants2.DEVICE_STATES).reduce(
|
|
767
|
-
(accu, deviceState) => {
|
|
768
|
-
const { counts } = byStatus[deviceState];
|
|
769
|
-
const { total, ...tieredCounts } = counts;
|
|
770
|
-
const count = Object.values(tieredCounts).reduce((accu2, countPerTier) => accu2 + countPerTier, 0);
|
|
771
|
-
accu[deviceState] = count;
|
|
772
|
-
accu.total = accu.total + count;
|
|
773
|
-
return accu;
|
|
774
|
-
},
|
|
775
|
-
{ total: 0 }
|
|
776
|
-
)
|
|
777
|
-
);
|
|
778
|
-
var getDeviceById = (0, import_toolkit3.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => devicesById[deviceId] ?? {});
|
|
779
|
-
var getSelectedGroupInfo = (0, import_toolkit3.createSelector)(
|
|
780
|
-
[getDeviceCountsByStatus, getGroupsById, getSelectedGroup],
|
|
781
|
-
({ accepted: acceptedDeviceTotal }, groupsById, selectedGroup) => {
|
|
782
|
-
let groupCount = acceptedDeviceTotal;
|
|
783
|
-
let groupFilters = [];
|
|
784
|
-
if (selectedGroup && groupsById[selectedGroup]) {
|
|
785
|
-
groupCount = groupsById[selectedGroup].total || 0;
|
|
786
|
-
groupFilters = groupsById[selectedGroup].filters || [];
|
|
787
|
-
}
|
|
788
|
-
return { groupCount, selectedGroup, groupFilters };
|
|
789
|
-
}
|
|
790
|
-
);
|
|
791
|
-
var getCombinedLimit = (0, import_toolkit3.createSelector)(
|
|
792
|
-
[getDeviceLimits],
|
|
793
|
-
(deviceLimits) => Object.values(deviceLimits).reduce((accu, limit) => accu + Math.max(limit ?? 0, 0), 0)
|
|
794
|
-
// limit might be -1 for unlimited devices
|
|
795
|
-
);
|
|
796
|
-
var getLimitMaxed = (0, import_toolkit3.createSelector)(
|
|
797
|
-
[getDeviceCountsByStatus, getCombinedLimit],
|
|
798
|
-
({ accepted: acceptedDevices }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices
|
|
799
|
-
);
|
|
800
|
-
var getGroupsByIdWithoutUngrouped = (0, import_toolkit3.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
|
|
801
|
-
var getGroupData = (0, import_toolkit3.createSelector)([getGroupsByIdWithoutUngrouped], (groups) => {
|
|
802
|
-
const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : void 0;
|
|
803
|
-
const hasDynamicGroups = Object.values(groups).some((group) => !!group.id);
|
|
804
|
-
return { createdGroup, hasDynamicGroups, groups };
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
3
|
+
const require_appSlice_constants = require("./appSlice/constants.cjs");
|
|
4
|
+
const require_onboardingSlice_constants = require("./onboardingSlice/constants.cjs");
|
|
5
|
+
const require_constants = require("./constants.cjs");
|
|
6
|
+
const require_appSlice_selectors = require("./appSlice/selectors.cjs");
|
|
7
|
+
const require_deploymentsSlice_selectors = require("./deploymentsSlice/selectors.cjs");
|
|
8
|
+
const require_devicesSlice_selectors = require("./devicesSlice/selectors.cjs");
|
|
9
|
+
const require_monitorSlice_selectors = require("./monitorSlice/selectors.cjs");
|
|
10
|
+
const require_onboardingSlice_selectors = require("./onboardingSlice/selectors.cjs");
|
|
11
|
+
const require_organizationSlice_selectors = require("./organizationSlice/selectors.cjs");
|
|
12
|
+
const require_utils = require("./utils.cjs");
|
|
13
|
+
const require_releasesSlice_selectors = require("./releasesSlice/selectors.cjs");
|
|
14
|
+
const require_usersSlice_selectors = require("./usersSlice/selectors.cjs");
|
|
15
|
+
let _reduxjs_toolkit = require("@reduxjs/toolkit");
|
|
16
|
+
let _northern_tech_utils_helpers = require("@northern.tech/utils/helpers");
|
|
17
|
+
let dayjs = require("dayjs");
|
|
18
|
+
dayjs = require_chunk.__toESM(dayjs);
|
|
19
|
+
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
20
|
+
//#region src/commonSelectors.ts
|
|
21
|
+
const getIsEnterprise = (0, _reduxjs_toolkit.createSelector)([require_organizationSlice_selectors.getOrganization, require_appSlice_selectors.getFeatures], ({ plan = require_appSlice_constants.PLANS.os.id }, { isEnterprise, isHosted }) => isEnterprise || isHosted && plan === require_appSlice_constants.PLANS.enterprise.id);
|
|
22
|
+
const getUserRoles = (0, _reduxjs_toolkit.createSelector)([
|
|
23
|
+
require_usersSlice_selectors.getCurrentUser,
|
|
24
|
+
require_usersSlice_selectors.getRolesById,
|
|
25
|
+
getIsEnterprise
|
|
26
|
+
], (currentUser, rolesById, isEnterprise) => {
|
|
27
|
+
const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === _northern_tech_utils_constants.rolesByName.admin) : !isEnterprise;
|
|
28
|
+
return {
|
|
29
|
+
isAdmin,
|
|
30
|
+
uiPermissions: isAdmin ? require_utils.mapUserRolesToUiPermissions([_northern_tech_utils_constants.rolesByName.admin], rolesById) : require_utils.mapUserRolesToUiPermissions(currentUser.roles || [], rolesById)
|
|
31
|
+
};
|
|
805
32
|
});
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
33
|
+
const hasPermission = (thing, permission) => Object.values(thing).some((permissions) => permissions.includes(permission));
|
|
34
|
+
const getUserCapabilities = (0, _reduxjs_toolkit.createSelector)([getUserRoles, require_organizationSlice_selectors.getIsServiceProvider], ({ uiPermissions }, isServiceProvider) => {
|
|
35
|
+
const canManageReleases = hasPermission(uiPermissions.releases, _northern_tech_utils_constants.uiPermissionsById.manage.value);
|
|
36
|
+
const canReadReleases = canManageReleases || hasPermission(uiPermissions.releases, _northern_tech_utils_constants.uiPermissionsById.read.value);
|
|
37
|
+
const canUploadReleases = canManageReleases || hasPermission(uiPermissions.releases, _northern_tech_utils_constants.uiPermissionsById.upload.value);
|
|
38
|
+
const canAuditlog = uiPermissions.auditlog.includes(_northern_tech_utils_constants.uiPermissionsById.read.value);
|
|
39
|
+
const canReadUsers = uiPermissions.userManagement.includes(_northern_tech_utils_constants.uiPermissionsById.read.value);
|
|
40
|
+
const canManageUsers = uiPermissions.userManagement.includes(_northern_tech_utils_constants.uiPermissionsById.manage.value);
|
|
41
|
+
const canReadDevices = hasPermission(uiPermissions.groups, _northern_tech_utils_constants.uiPermissionsById.read.value);
|
|
42
|
+
const canWriteDevices = Object.values(uiPermissions.groups).some((groupPermissions) => groupPermissions.includes(_northern_tech_utils_constants.uiPermissionsById.read.value) && groupPermissions.length > 1);
|
|
43
|
+
const canTroubleshoot = hasPermission(uiPermissions.groups, _northern_tech_utils_constants.uiPermissionsById.connect.value);
|
|
44
|
+
const canManageDevices = hasPermission(uiPermissions.groups, _northern_tech_utils_constants.uiPermissionsById.manage.value);
|
|
45
|
+
return {
|
|
46
|
+
canAuditlog,
|
|
47
|
+
canConfigure: hasPermission(uiPermissions.groups, _northern_tech_utils_constants.uiPermissionsById.configure.value),
|
|
48
|
+
canDeploy: (uiPermissions.deployments?.includes(_northern_tech_utils_constants.uiPermissionsById.deploy.value) ?? false) || hasPermission(uiPermissions.groups, _northern_tech_utils_constants.uiPermissionsById.deploy.value),
|
|
49
|
+
canManageDevices,
|
|
50
|
+
canManageReleases,
|
|
51
|
+
canManageUsers,
|
|
52
|
+
canReadDeployments: uiPermissions.deployments?.includes(_northern_tech_utils_constants.uiPermissionsById.read.value) ?? false,
|
|
53
|
+
canReadDevices,
|
|
54
|
+
canReadReleases,
|
|
55
|
+
canReadUsers,
|
|
56
|
+
canTroubleshoot,
|
|
57
|
+
canUploadReleases,
|
|
58
|
+
canWriteDevices,
|
|
59
|
+
groupsPermissions: uiPermissions.groups,
|
|
60
|
+
releasesPermissions: uiPermissions.releases,
|
|
61
|
+
SPTenant: isServiceProvider
|
|
62
|
+
};
|
|
826
63
|
});
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
64
|
+
const getTenantCapabilities = (0, _reduxjs_toolkit.createSelector)([
|
|
65
|
+
require_appSlice_selectors.getFeatures,
|
|
66
|
+
require_organizationSlice_selectors.getOrganization,
|
|
67
|
+
getIsEnterprise
|
|
68
|
+
], ({ hasAuditlogs: isAuditlogEnabled, hasDeviceConfig: isDeviceConfigEnabled, hasDeviceConnect: isDeviceConnectEnabled, hasMonitor: isMonitorEnabled, isHosted }, { addons = [], plan = require_appSlice_constants.PLANS.os.id }, isEnterprise) => {
|
|
69
|
+
const canDelta = isEnterprise || plan === require_appSlice_constants.PLANS.professional.id;
|
|
70
|
+
return {
|
|
71
|
+
canDelta,
|
|
72
|
+
canRetry: canDelta,
|
|
73
|
+
canSchedule: canDelta,
|
|
74
|
+
hasAuditlogs: isAuditlogEnabled && isEnterprise,
|
|
75
|
+
hasDeviceConfig: addons.some((addon) => addon.name === require_appSlice_constants.ADDONS.configure.id && addon.enabled) || isDeviceConfigEnabled && !isHosted,
|
|
76
|
+
hasDeviceConnect: addons.some((addon) => addon.name === require_appSlice_constants.ADDONS.troubleshoot.id && addon.enabled) || isDeviceConnectEnabled && !isHosted,
|
|
77
|
+
hasFullFiltering: canDelta,
|
|
78
|
+
hasMonitor: isMonitorEnabled && addons.some((addon) => addon.name === require_appSlice_constants.ADDONS.monitor.id && addon.enabled),
|
|
79
|
+
isEnterprise,
|
|
80
|
+
plan
|
|
81
|
+
};
|
|
840
82
|
});
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
)
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
)
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
83
|
+
const getFilterAttributes = (0, _reduxjs_toolkit.createSelector)([require_usersSlice_selectors.getGlobalSettings, require_devicesSlice_selectors.getFilteringAttributes], ({ previousFilters }, { identityAttributes, inventoryAttributes, systemAttributes, tagAttributes }) => {
|
|
84
|
+
const deviceNameAttribute = {
|
|
85
|
+
key: "name",
|
|
86
|
+
value: "Name",
|
|
87
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.tags,
|
|
88
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.tags,
|
|
89
|
+
priority: 1
|
|
90
|
+
};
|
|
91
|
+
const deviceIdAttribute = {
|
|
92
|
+
key: "id",
|
|
93
|
+
value: "Device ID",
|
|
94
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.identity,
|
|
95
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.identity,
|
|
96
|
+
priority: 1
|
|
97
|
+
};
|
|
98
|
+
const checkInAttribute = {
|
|
99
|
+
key: "check_in_time",
|
|
100
|
+
value: "Latest activity",
|
|
101
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system,
|
|
102
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system,
|
|
103
|
+
priority: 4
|
|
104
|
+
};
|
|
105
|
+
const updateAttribute = {
|
|
106
|
+
...checkInAttribute,
|
|
107
|
+
key: "updated_ts",
|
|
108
|
+
value: "Last inventory update"
|
|
109
|
+
};
|
|
110
|
+
const firstRequestAttribute = {
|
|
111
|
+
key: "created_ts",
|
|
112
|
+
value: "First request",
|
|
113
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system,
|
|
114
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system,
|
|
115
|
+
priority: 4
|
|
116
|
+
};
|
|
117
|
+
return (0, _northern_tech_utils_helpers.attributeDuplicateFilter)([
|
|
118
|
+
...previousFilters.map((item) => ({
|
|
119
|
+
...item,
|
|
120
|
+
value: deviceIdAttribute.key === item.key ? deviceIdAttribute.value : item.key,
|
|
121
|
+
category: "recently used",
|
|
122
|
+
priority: 0
|
|
123
|
+
})),
|
|
124
|
+
deviceNameAttribute,
|
|
125
|
+
deviceIdAttribute,
|
|
126
|
+
...identityAttributes.map((item) => ({
|
|
127
|
+
key: item,
|
|
128
|
+
value: item,
|
|
129
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.identity,
|
|
130
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.identity,
|
|
131
|
+
priority: 1
|
|
132
|
+
})),
|
|
133
|
+
...inventoryAttributes.map((item) => ({
|
|
134
|
+
key: item,
|
|
135
|
+
value: item,
|
|
136
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.inventory,
|
|
137
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.inventory,
|
|
138
|
+
priority: 2
|
|
139
|
+
})),
|
|
140
|
+
...tagAttributes.map((item) => ({
|
|
141
|
+
key: item,
|
|
142
|
+
value: item,
|
|
143
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.tags,
|
|
144
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.tags,
|
|
145
|
+
priority: 3
|
|
146
|
+
})),
|
|
147
|
+
checkInAttribute,
|
|
148
|
+
updateAttribute,
|
|
149
|
+
firstRequestAttribute,
|
|
150
|
+
...systemAttributes.map((item) => ({
|
|
151
|
+
key: item,
|
|
152
|
+
value: item,
|
|
153
|
+
scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system,
|
|
154
|
+
category: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.system,
|
|
155
|
+
priority: 4
|
|
156
|
+
}))
|
|
157
|
+
], "key");
|
|
891
158
|
});
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
const entry = tiersByName[tierName];
|
|
899
|
-
if (!entry) return accu;
|
|
900
|
-
const { key, limit } = entry;
|
|
901
|
-
if (limit.value === 0) {
|
|
902
|
-
accu.disabled.push(tierName);
|
|
903
|
-
if (!skipFilter) return accu;
|
|
904
|
-
}
|
|
905
|
-
accu.limits[tierName] = {
|
|
906
|
-
id: tierName,
|
|
907
|
-
backendId: key,
|
|
908
|
-
limit: limit.value,
|
|
909
|
-
current: limit.current_value,
|
|
910
|
-
name: tierName,
|
|
911
|
-
quotaLeft: Math.max(limit.value - limit.current_value, 0),
|
|
912
|
-
limitReached: limit.value !== -1 && limit.value <= limit.current_value
|
|
913
|
-
};
|
|
914
|
-
return accu;
|
|
915
|
-
}, result);
|
|
916
|
-
};
|
|
917
|
-
var getDeviceLimitsInfo = (0, import_toolkit4.createSelector)([getOrganization], ({ device_limits }) => processDeviceLimits(device_limits));
|
|
918
|
-
var getDisabledTiers = (0, import_toolkit4.createSelector)([getDeviceLimitsInfo], ({ disabled }) => disabled);
|
|
919
|
-
var getSpLimits = (0, import_toolkit4.createSelector)([getDeviceLimitsInfo], ({ limits }) => limits);
|
|
920
|
-
var getTenantListWithLimits = (0, import_toolkit4.createSelector)([getTenantsList], (tenantList) => ({
|
|
921
|
-
...tenantList,
|
|
922
|
-
tenants: tenantList.tenants.map((tenant) => ({
|
|
923
|
-
...tenant,
|
|
924
|
-
device_limits: processDeviceLimits(tenant.device_limits, true).limits
|
|
925
|
-
}))
|
|
926
|
-
}));
|
|
927
|
-
|
|
928
|
-
// src/releasesSlice/selectors.ts
|
|
929
|
-
var import_toolkit5 = require("@reduxjs/toolkit");
|
|
930
|
-
|
|
931
|
-
// src/utils.ts
|
|
932
|
-
var import_helpers3 = require("@northern.tech/utils/helpers");
|
|
933
|
-
var filterProcessors = {
|
|
934
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
|
|
935
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
|
|
936
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
|
|
937
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
|
|
938
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
|
|
939
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
940
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
941
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers3.yes,
|
|
942
|
-
[import_constants2.DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
|
|
943
|
-
};
|
|
944
|
-
var filterAliases = {
|
|
945
|
-
$nexists: { alias: import_constants2.DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
|
|
946
|
-
};
|
|
947
|
-
var listItemMapper = (byId, ids, { cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH, defaultObject = {} }) => ids.slice(0, cutOffSize).reduce((accu, id) => {
|
|
948
|
-
if (id && byId[id]) {
|
|
949
|
-
accu.push({ ...defaultObject, ...byId[id] });
|
|
950
|
-
}
|
|
951
|
-
return accu;
|
|
952
|
-
}, []);
|
|
953
|
-
var mergePermissions = (existingPermissions = { ...import_constants2.emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
|
|
954
|
-
(accu, [key, value]) => {
|
|
955
|
-
let values;
|
|
956
|
-
if (!accu[key]) {
|
|
957
|
-
accu[key] = value;
|
|
958
|
-
return accu;
|
|
959
|
-
}
|
|
960
|
-
if (Array.isArray(value)) {
|
|
961
|
-
values = [...value, ...accu[key]].filter(import_helpers3.duplicateFilter);
|
|
962
|
-
} else {
|
|
963
|
-
values = mergePermissions(accu[key], { ...value });
|
|
964
|
-
}
|
|
965
|
-
accu[key] = values;
|
|
966
|
-
return accu;
|
|
967
|
-
},
|
|
968
|
-
{ ...addedPermissions }
|
|
969
|
-
);
|
|
970
|
-
var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
|
|
971
|
-
(accu, roleId) => {
|
|
972
|
-
if (!(roleId && roles[roleId])) {
|
|
973
|
-
return accu;
|
|
974
|
-
}
|
|
975
|
-
return mergePermissions(accu, roles[roleId].uiPermissions);
|
|
976
|
-
},
|
|
977
|
-
{ ...import_constants2.emptyUiPermissions }
|
|
978
|
-
);
|
|
979
|
-
var isDarkMode = (mode) => mode === DARK_MODE;
|
|
980
|
-
|
|
981
|
-
// src/releasesSlice/selectors.ts
|
|
982
|
-
var getSelectedReleaseId = (state) => state.releases.selectedRelease;
|
|
983
|
-
var getReleasesById = (state) => state.releases.byId;
|
|
984
|
-
var getReleaseTags = (state) => state.releases.tags;
|
|
985
|
-
var getReleaseListState = (state) => state.releases.releasesList;
|
|
986
|
-
var getListedReleases = (state) => state.releases.releasesList.releaseIds;
|
|
987
|
-
var releaseDefaults = {};
|
|
988
|
-
var getReleaseMappingDefaults = () => releaseDefaults;
|
|
989
|
-
var getReleasesList = (0, import_toolkit5.createSelector)([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
|
|
990
|
-
var getReleaseTagsById = (0, import_toolkit5.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
|
|
991
|
-
var getHasReleases = (0, import_toolkit5.createSelector)(
|
|
992
|
-
[getReleaseListState, getReleasesById],
|
|
993
|
-
({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
|
|
994
|
-
);
|
|
995
|
-
var getSelectedRelease = (0, import_toolkit5.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id || ""] ?? {});
|
|
996
|
-
var getSelectedReleases = (0, import_toolkit5.createSelector)([getReleaseListState, getReleasesList], ({ selection }, releases) => selection.map((index) => releases[index]));
|
|
997
|
-
var getDeltaJobsById = (state) => state.releases.deltaJobs;
|
|
998
|
-
var getDeltaJobById = (0, import_toolkit5.createSelector)([getDeltaJobsById, (_, jobId) => jobId], (byId, jobId) => byId[jobId]);
|
|
999
|
-
var getSelectedJobId = (state) => state.releases.selectedJob;
|
|
1000
|
-
var getSelectedJob = (0, import_toolkit5.createSelector)([getDeltaJobsById, getSelectedJobId], (byId, jobId) => byId[jobId || ""]);
|
|
1001
|
-
|
|
1002
|
-
// src/usersSlice/selectors.ts
|
|
1003
|
-
var import_toolkit6 = require("@reduxjs/toolkit");
|
|
1004
|
-
var emptyObject = {};
|
|
1005
|
-
var getRolesById = (state) => state.users.rolesById;
|
|
1006
|
-
var getTooltipsById = (state) => state.users.tooltips.byId;
|
|
1007
|
-
var getGlobalSettings = (state) => state.users.globalSettings;
|
|
1008
|
-
var getUserSettingsInitialized = (state) => state.users.userSettingsInitialized;
|
|
1009
|
-
var getCurrentUserId = (state) => state.users.currentUser;
|
|
1010
|
-
var getUsersById = (state) => state.users.byId;
|
|
1011
|
-
var getUsersList = (0, import_toolkit6.createSelector)([getUsersById], (usersById) => Object.values(usersById));
|
|
1012
|
-
var getCurrentUser = (0, import_toolkit6.createSelector)(
|
|
1013
|
-
[getUsersById, getCurrentUserId],
|
|
1014
|
-
(usersById, userId) => userId ? usersById[userId] ?? emptyObject : emptyObject
|
|
1015
|
-
);
|
|
1016
|
-
var getUserSettings = (state) => state.users.userSettings;
|
|
1017
|
-
var getSelectedDeviceAttribute = (0, import_toolkit6.createSelector)(
|
|
1018
|
-
[getUserSettings],
|
|
1019
|
-
({ columnSelection }) => columnSelection.map((attribute) => ({ attribute: attribute.key, scope: attribute.scope }))
|
|
1020
|
-
);
|
|
1021
|
-
var getIsDarkMode = (0, import_toolkit6.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
|
|
1022
|
-
var getReadAllHelptips = (0, import_toolkit6.createSelector)(
|
|
1023
|
-
[getTooltipsById],
|
|
1024
|
-
(tooltips) => Object.values(tooltips).every(({ readState }) => readState === READ_STATES.read)
|
|
1025
|
-
);
|
|
1026
|
-
var getTooltipsState = (0, import_toolkit6.createSelector)(
|
|
1027
|
-
[getTooltipsById, getUserSettings],
|
|
1028
|
-
(byId, { tooltips = {} }) => Object.entries(byId).reduce(
|
|
1029
|
-
(accu, [id, value]) => {
|
|
1030
|
-
accu[id] = { ...accu[id], ...value };
|
|
1031
|
-
return accu;
|
|
1032
|
-
},
|
|
1033
|
-
{ ...tooltips }
|
|
1034
|
-
)
|
|
1035
|
-
);
|
|
1036
|
-
var getHas2FA = (0, import_toolkit6.createSelector)(
|
|
1037
|
-
[getCurrentUser],
|
|
1038
|
-
(currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === import_constants2.twoFAStates.enabled
|
|
1039
|
-
);
|
|
1040
|
-
var getIdAttribute = (0, import_toolkit6.createSelector)([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
|
|
1041
|
-
var getOfflineThresholdSettings = (0, import_toolkit6.createSelector)([getGlobalSettings], ({ offlineThreshold }) => ({
|
|
1042
|
-
interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
|
|
1043
|
-
intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
|
|
159
|
+
const getOnboardingState = (0, _reduxjs_toolkit.createSelector)([require_onboardingSlice_selectors.getOnboarding, require_usersSlice_selectors.getUserSettings], ({ complete, progress, showTips, ...remainder }, { onboarding = {} }) => ({
|
|
160
|
+
...remainder,
|
|
161
|
+
...onboarding,
|
|
162
|
+
complete: onboarding.complete || complete,
|
|
163
|
+
progress: Object.keys(require_onboardingSlice_constants.onboardingSteps).findIndex((step) => step === progress) > Object.keys(require_onboardingSlice_constants.onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress : onboarding.progress,
|
|
164
|
+
showTips: !onboarding.showTips ? onboarding.showTips : showTips
|
|
1044
165
|
}));
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
// src/commonSelectors.ts
|
|
1049
|
-
var getIsEnterprise = (0, import_toolkit7.createSelector)(
|
|
1050
|
-
[getOrganization, getFeatures],
|
|
1051
|
-
({ plan = PLANS.os.id }, { isEnterprise, isHosted }) => isEnterprise || isHosted && plan === PLANS.enterprise.id
|
|
1052
|
-
);
|
|
1053
|
-
var getUserRoles = (0, import_toolkit7.createSelector)([getCurrentUser, getRolesById, getIsEnterprise], (currentUser, rolesById2, isEnterprise) => {
|
|
1054
|
-
const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === import_constants2.rolesByName.admin) : !isEnterprise;
|
|
1055
|
-
const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([import_constants2.rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
|
|
1056
|
-
return { isAdmin, uiPermissions };
|
|
166
|
+
const getDemoDeviceAddress = (0, _reduxjs_toolkit.createSelector)([require_devicesSlice_selectors.getDevicesById, require_onboardingSlice_selectors.getOnboarding], (devicesById, { approach, demoArtifactPort }) => {
|
|
167
|
+
const demoDeviceAddress = `http://${(0, _northern_tech_utils_helpers.getDemoDeviceAddress)(Object.values(devicesById), approach)}`;
|
|
168
|
+
return demoArtifactPort ? `${demoDeviceAddress}:${demoArtifactPort}` : demoDeviceAddress;
|
|
1057
169
|
});
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
const canManageUsers = uiPermissions.userManagement.includes(import_constants2.uiPermissionsById.manage.value);
|
|
1066
|
-
const canReadDevices = hasPermission(uiPermissions.groups, import_constants2.uiPermissionsById.read.value);
|
|
1067
|
-
const canWriteDevices = Object.values(uiPermissions.groups).some(
|
|
1068
|
-
(groupPermissions) => groupPermissions.includes(import_constants2.uiPermissionsById.read.value) && groupPermissions.length > 1
|
|
1069
|
-
);
|
|
1070
|
-
const canTroubleshoot = hasPermission(uiPermissions.groups, import_constants2.uiPermissionsById.connect.value);
|
|
1071
|
-
const canManageDevices = hasPermission(uiPermissions.groups, import_constants2.uiPermissionsById.manage.value);
|
|
1072
|
-
const canConfigure = hasPermission(uiPermissions.groups, import_constants2.uiPermissionsById.configure.value);
|
|
1073
|
-
const canDeploy = uiPermissions.deployments.includes(import_constants2.uiPermissionsById.deploy.value) || hasPermission(uiPermissions.groups, import_constants2.uiPermissionsById.deploy.value);
|
|
1074
|
-
const canReadDeployments = uiPermissions.deployments.includes(import_constants2.uiPermissionsById.read.value);
|
|
1075
|
-
return {
|
|
1076
|
-
canAuditlog,
|
|
1077
|
-
canConfigure,
|
|
1078
|
-
canDeploy,
|
|
1079
|
-
canManageDevices,
|
|
1080
|
-
canManageReleases,
|
|
1081
|
-
canManageUsers,
|
|
1082
|
-
canReadDeployments,
|
|
1083
|
-
canReadDevices,
|
|
1084
|
-
canReadReleases,
|
|
1085
|
-
canReadUsers,
|
|
1086
|
-
canTroubleshoot,
|
|
1087
|
-
canUploadReleases,
|
|
1088
|
-
canWriteDevices,
|
|
1089
|
-
groupsPermissions: uiPermissions.groups,
|
|
1090
|
-
releasesPermissions: uiPermissions.releases,
|
|
1091
|
-
SPTenant: isServiceProvider
|
|
1092
|
-
};
|
|
170
|
+
const getDeviceConfigDeployment = (0, _reduxjs_toolkit.createSelector)([require_devicesSlice_selectors.getDeviceById, require_deploymentsSlice_selectors.getDeploymentsById], (device, deploymentsById) => {
|
|
171
|
+
const { config = {} } = device;
|
|
172
|
+
const { deployment_id: configDeploymentId = "" } = config;
|
|
173
|
+
return {
|
|
174
|
+
device,
|
|
175
|
+
deviceConfigDeployment: deploymentsById[configDeploymentId] ?? {}
|
|
176
|
+
};
|
|
1093
177
|
});
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
isHosted
|
|
1102
|
-
}, { addons = [], plan = PLANS.os.id }, isEnterprise) => {
|
|
1103
|
-
const canDelta = isEnterprise || plan === PLANS.professional.id;
|
|
1104
|
-
const hasAuditlogs = isAuditlogEnabled && isEnterprise;
|
|
1105
|
-
const hasDeviceConfig = addons.some((addon) => addon.name === ADDONS.configure.id && addon.enabled) || isDeviceConfigEnabled && !isHosted;
|
|
1106
|
-
const hasDeviceConnect = addons.some((addon) => addon.name === ADDONS.troubleshoot.id && addon.enabled) || isDeviceConnectEnabled && !isHosted;
|
|
1107
|
-
const hasMonitor = isMonitorEnabled && addons.some((addon) => addon.name === ADDONS.monitor.id && addon.enabled);
|
|
1108
|
-
return {
|
|
1109
|
-
canDelta,
|
|
1110
|
-
canRetry: canDelta,
|
|
1111
|
-
canSchedule: canDelta,
|
|
1112
|
-
hasAuditlogs,
|
|
1113
|
-
hasDeviceConfig,
|
|
1114
|
-
hasDeviceConnect,
|
|
1115
|
-
hasFullFiltering: canDelta,
|
|
1116
|
-
hasMonitor,
|
|
1117
|
-
isEnterprise,
|
|
1118
|
-
plan
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
);
|
|
1122
|
-
var getFilterAttributes = (0, import_toolkit7.createSelector)(
|
|
1123
|
-
[getGlobalSettings, getFilteringAttributes],
|
|
1124
|
-
({ previousFilters }, { identityAttributes, inventoryAttributes, systemAttributes, tagAttributes }) => {
|
|
1125
|
-
const deviceNameAttribute = { key: "name", value: "Name", scope: import_constants2.ATTRIBUTE_SCOPES.tags, category: import_constants2.ATTRIBUTE_SCOPES.tags, priority: 1 };
|
|
1126
|
-
const deviceIdAttribute = { key: "id", value: "Device ID", scope: import_constants2.ATTRIBUTE_SCOPES.identity, category: import_constants2.ATTRIBUTE_SCOPES.identity, priority: 1 };
|
|
1127
|
-
const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: import_constants2.ATTRIBUTE_SCOPES.system, category: import_constants2.ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
1128
|
-
const updateAttribute = { ...checkInAttribute, key: "updated_ts", value: "Last inventory update" };
|
|
1129
|
-
const firstRequestAttribute = { key: "created_ts", value: "First request", scope: import_constants2.ATTRIBUTE_SCOPES.system, category: import_constants2.ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
1130
|
-
const attributes = [
|
|
1131
|
-
...previousFilters.map((item) => ({
|
|
1132
|
-
...item,
|
|
1133
|
-
value: deviceIdAttribute.key === item.key ? deviceIdAttribute.value : item.key,
|
|
1134
|
-
category: "recently used",
|
|
1135
|
-
priority: 0
|
|
1136
|
-
})),
|
|
1137
|
-
deviceNameAttribute,
|
|
1138
|
-
deviceIdAttribute,
|
|
1139
|
-
...identityAttributes.map((item) => ({ key: item, value: item, scope: import_constants2.ATTRIBUTE_SCOPES.identity, category: import_constants2.ATTRIBUTE_SCOPES.identity, priority: 1 })),
|
|
1140
|
-
...inventoryAttributes.map((item) => ({ key: item, value: item, scope: import_constants2.ATTRIBUTE_SCOPES.inventory, category: import_constants2.ATTRIBUTE_SCOPES.inventory, priority: 2 })),
|
|
1141
|
-
...tagAttributes.map((item) => ({ key: item, value: item, scope: import_constants2.ATTRIBUTE_SCOPES.tags, category: import_constants2.ATTRIBUTE_SCOPES.tags, priority: 3 })),
|
|
1142
|
-
checkInAttribute,
|
|
1143
|
-
updateAttribute,
|
|
1144
|
-
firstRequestAttribute,
|
|
1145
|
-
...systemAttributes.map((item) => ({ key: item, value: item, scope: import_constants2.ATTRIBUTE_SCOPES.system, category: import_constants2.ATTRIBUTE_SCOPES.system, priority: 4 }))
|
|
1146
|
-
];
|
|
1147
|
-
return (0, import_helpers4.attributeDuplicateFilter)(attributes, "key");
|
|
1148
|
-
}
|
|
1149
|
-
);
|
|
1150
|
-
var getOnboardingState = (0, import_toolkit7.createSelector)([getOnboarding, getUserSettings], ({ complete, progress, showTips, ...remainder }, { onboarding = {} }) => ({
|
|
1151
|
-
...remainder,
|
|
1152
|
-
...onboarding,
|
|
1153
|
-
complete: onboarding.complete || complete,
|
|
1154
|
-
progress: Object.keys(onboardingSteps).findIndex((step) => step === progress) > Object.keys(onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress : onboarding.progress,
|
|
1155
|
-
showTips: !onboarding.showTips ? onboarding.showTips : showTips
|
|
1156
|
-
}));
|
|
1157
|
-
var getDemoDeviceAddress = (0, import_toolkit7.createSelector)([getDevicesById, getOnboarding], (devicesById, { approach, demoArtifactPort }) => {
|
|
1158
|
-
const demoDeviceAddress = `http://${(0, import_helpers4.getDemoDeviceAddress)(Object.values(devicesById), approach)}`;
|
|
1159
|
-
return demoArtifactPort ? `${demoDeviceAddress}:${demoArtifactPort}` : demoDeviceAddress;
|
|
178
|
+
const getDeploymentRelease = (0, _reduxjs_toolkit.createSelector)([
|
|
179
|
+
require_deploymentsSlice_selectors.getDeploymentsById,
|
|
180
|
+
require_deploymentsSlice_selectors.getDeploymentsSelectionState,
|
|
181
|
+
require_releasesSlice_selectors.getReleasesById
|
|
182
|
+
], (deploymentsById, { selectedId = "" }, releasesById) => {
|
|
183
|
+
const deployment = deploymentsById[selectedId] ?? {};
|
|
184
|
+
return deployment?.artifact_name && releasesById[deployment.artifact_name] ? releasesById[deployment.artifact_name] : { device_types_compatible: [] };
|
|
1160
185
|
});
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
186
|
+
const getSelectedDeploymentData = (0, _reduxjs_toolkit.createSelector)([
|
|
187
|
+
require_deploymentsSlice_selectors.getDeploymentsById,
|
|
188
|
+
require_deploymentsSlice_selectors.getDeploymentsSelectionState,
|
|
189
|
+
require_devicesSlice_selectors.getDevicesById,
|
|
190
|
+
require_deploymentsSlice_selectors.getSelectedDeploymentDeviceIds
|
|
191
|
+
], (deploymentsById, { selectedId = "" }, devicesById, selectedDeviceIds) => {
|
|
192
|
+
const deployment = deploymentsById[selectedId] ?? {};
|
|
193
|
+
const { devices = {} } = deployment;
|
|
194
|
+
return {
|
|
195
|
+
deployment,
|
|
196
|
+
selectedDevices: selectedDeviceIds.map((deviceId) => ({
|
|
197
|
+
...devicesById[deviceId],
|
|
198
|
+
...devices[deviceId] ?? {}
|
|
199
|
+
}))
|
|
200
|
+
};
|
|
1166
201
|
});
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
);
|
|
1185
|
-
var getAvailableIssueOptionsByType = (0, import_toolkit7.createSelector)(
|
|
1186
|
-
[getTenantCapabilities, getIssueCountsByType],
|
|
1187
|
-
({ hasFullFiltering, hasMonitor }, issueCounts) => Object.values(import_constants2.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, title }) => {
|
|
1188
|
-
if (isCategory || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) {
|
|
1189
|
-
return accu;
|
|
1190
|
-
}
|
|
1191
|
-
accu[key] = { count: issueCounts[key].filtered, key, title };
|
|
1192
|
-
return accu;
|
|
1193
|
-
}, {})
|
|
1194
|
-
);
|
|
1195
|
-
var getGroupNames = (0, import_toolkit7.createSelector)([getGroupsById, getUserRoles], (groupsById, { uiPermissions }) => {
|
|
1196
|
-
const { [UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
|
|
1197
|
-
return Object.keys(
|
|
1198
|
-
Object.entries(groups).reduce((accu, [groupName, group]) => {
|
|
1199
|
-
if (group.filterId || uiPermissions.groups[import_constants2.ALL_DEVICES]) {
|
|
1200
|
-
accu[groupName] = group;
|
|
1201
|
-
}
|
|
1202
|
-
return accu;
|
|
1203
|
-
}, uiPermissions.groups)
|
|
1204
|
-
).sort();
|
|
202
|
+
const getAvailableIssueOptionsByType = (0, _reduxjs_toolkit.createSelector)([getTenantCapabilities, require_monitorSlice_selectors.getIssueCountsByType], ({ hasFullFiltering, hasMonitor }, issueCounts) => Object.values(_northern_tech_utils_constants.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, title }) => {
|
|
203
|
+
if (isCategory || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) return accu;
|
|
204
|
+
accu[key] = {
|
|
205
|
+
count: issueCounts[key].filtered,
|
|
206
|
+
key,
|
|
207
|
+
title
|
|
208
|
+
};
|
|
209
|
+
return accu;
|
|
210
|
+
}, {}));
|
|
211
|
+
const getGroupNames = (0, _reduxjs_toolkit.createSelector)([require_devicesSlice_selectors.getGroupsById, getUserRoles], (groupsById, { uiPermissions }) => {
|
|
212
|
+
const { [require_constants.UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
|
|
213
|
+
return Object.keys(Object.entries(groups).reduce((accu, [groupName, group]) => {
|
|
214
|
+
if (group.filters || uiPermissions.groups[_northern_tech_utils_constants.ALL_DEVICES]) accu[groupName] = group;
|
|
215
|
+
return accu;
|
|
216
|
+
}, { ...uiPermissions.groups })).sort();
|
|
1205
217
|
});
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
218
|
+
const getDeviceReportsForUser = (0, _reduxjs_toolkit.createSelector)([
|
|
219
|
+
require_usersSlice_selectors.getUserSettings,
|
|
220
|
+
require_usersSlice_selectors.getCurrentUser,
|
|
221
|
+
require_usersSlice_selectors.getGlobalSettings,
|
|
222
|
+
require_devicesSlice_selectors.getDevicesById
|
|
223
|
+
], ({ reports }, { id: currentUserId }, globalSettings, devicesById) => reports || globalSettings[`${currentUserId}-reports`] || (Object.keys(devicesById).length ? require_appSlice_constants.defaultReports : []));
|
|
224
|
+
const listTypeDeviceIdMap = {
|
|
225
|
+
deviceList: require_devicesSlice_selectors.getListedDevices,
|
|
226
|
+
search: require_appSlice_selectors.getSearchedDevices
|
|
227
|
+
};
|
|
228
|
+
const deviceMapDefault = {
|
|
229
|
+
defaultObject: { auth_sets: [] },
|
|
230
|
+
cutOffSize: 50
|
|
1213
231
|
};
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
);
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
232
|
+
const getDeviceMappingDefaults = () => deviceMapDefault;
|
|
233
|
+
const getMappedDevicesList = (0, _reduxjs_toolkit.createSelector)([
|
|
234
|
+
require_devicesSlice_selectors.getDevicesById,
|
|
235
|
+
(state, listType) => listTypeDeviceIdMap[listType](state),
|
|
236
|
+
getDeviceMappingDefaults
|
|
237
|
+
], require_utils.listItemMapper);
|
|
238
|
+
const getAuditlogDevice = (0, _reduxjs_toolkit.createSelector)([require_organizationSlice_selectors.getAuditLogEntry, require_devicesSlice_selectors.getDevicesById], (auditlogEvent, devicesById) => {
|
|
239
|
+
let auditlogDevice = {};
|
|
240
|
+
if (auditlogEvent) {
|
|
241
|
+
const { object } = auditlogEvent;
|
|
242
|
+
const objectData = object;
|
|
243
|
+
if (objectData?.type === "device" && objectData.id) auditlogDevice = {
|
|
244
|
+
id: objectData.id,
|
|
245
|
+
...objectData.device ?? {}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
...auditlogDevice,
|
|
250
|
+
...auditlogDevice.id ? devicesById[auditlogDevice.id] : {}
|
|
251
|
+
};
|
|
1228
252
|
});
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
const index = accu.findIndex(({ value }) => value === key);
|
|
1241
|
-
accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
|
|
1242
|
-
return accu;
|
|
1243
|
-
}, roles);
|
|
253
|
+
const getRelevantRoles = (0, _reduxjs_toolkit.createSelector)([require_organizationSlice_selectors.getOrganization, require_usersSlice_selectors.getRolesList], ({ service_provider }, roles) => {
|
|
254
|
+
if (service_provider) return roles.reduce((accu, role) => {
|
|
255
|
+
if (_northern_tech_utils_constants.rolesById[role.value]) return accu;
|
|
256
|
+
accu.push(role);
|
|
257
|
+
return accu;
|
|
258
|
+
}, [...Object.values(_northern_tech_utils_constants.serviceProviderRolesById)]);
|
|
259
|
+
return Object.keys(_northern_tech_utils_constants.rolesById).reverse().reduce((accu, key) => {
|
|
260
|
+
const index = accu.findIndex(({ value }) => value === key);
|
|
261
|
+
if (index >= 0) accu = [accu[index], ...accu.filter((_, itemIndex) => index !== itemIndex)];
|
|
262
|
+
return accu;
|
|
263
|
+
}, roles);
|
|
1244
264
|
});
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
const today = (0, import_dayjs.default)();
|
|
1260
|
-
const dismissedMonthAgo = today.diff(dismissedTimestamp, "months");
|
|
1261
|
-
return dismissedMonthAgo > 0;
|
|
1262
|
-
}
|
|
1263
|
-
);
|
|
1264
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1265
|
-
0 && (module.exports = {
|
|
1266
|
-
getAuditlogDevice,
|
|
1267
|
-
getAvailableIssueOptionsByType,
|
|
1268
|
-
getDemoDeviceAddress,
|
|
1269
|
-
getDeploymentRelease,
|
|
1270
|
-
getDeviceConfigDeployment,
|
|
1271
|
-
getDeviceReportsForUser,
|
|
1272
|
-
getFilterAttributes,
|
|
1273
|
-
getGroupNames,
|
|
1274
|
-
getIsEnterprise,
|
|
1275
|
-
getMappedDevicesList,
|
|
1276
|
-
getOnboardingState,
|
|
1277
|
-
getRelevantRoles,
|
|
1278
|
-
getSelectedDeploymentData,
|
|
1279
|
-
getShowSecurityAlert,
|
|
1280
|
-
getTenantCapabilities,
|
|
1281
|
-
getUserCapabilities,
|
|
1282
|
-
getUserRoles
|
|
265
|
+
const getShowSecurityAlert = (0, _reduxjs_toolkit.createSelector)([
|
|
266
|
+
require_usersSlice_selectors.getCurrentUser,
|
|
267
|
+
require_usersSlice_selectors.getHas2FA,
|
|
268
|
+
require_appSlice_selectors.getFeatures,
|
|
269
|
+
getIsEnterprise,
|
|
270
|
+
require_usersSlice_selectors.getUserSettingsInitialized,
|
|
271
|
+
require_usersSlice_selectors.getSecurityAlertDismissedTimestamp
|
|
272
|
+
], (currentUser, has2FA, features, isEnterprise, settingsInitialized, dismissedTimestamp) => {
|
|
273
|
+
const isOAuth2 = !!currentUser?.sso?.length;
|
|
274
|
+
const userVerified = !!currentUser.verified;
|
|
275
|
+
const isHosted = features?.isHosted;
|
|
276
|
+
if (!currentUser || !settingsInitialized || has2FA || !(isEnterprise || isHosted) || isOAuth2 && userVerified) return false;
|
|
277
|
+
if (dismissedTimestamp === null) return true;
|
|
278
|
+
return (0, dayjs.default)().diff(dismissedTimestamp, "months") > 0;
|
|
1283
279
|
});
|
|
280
|
+
//#endregion
|
|
281
|
+
exports.getAuditlogDevice = getAuditlogDevice;
|
|
282
|
+
exports.getAvailableIssueOptionsByType = getAvailableIssueOptionsByType;
|
|
283
|
+
exports.getDemoDeviceAddress = getDemoDeviceAddress;
|
|
284
|
+
exports.getDeploymentRelease = getDeploymentRelease;
|
|
285
|
+
exports.getDeviceConfigDeployment = getDeviceConfigDeployment;
|
|
286
|
+
exports.getDeviceReportsForUser = getDeviceReportsForUser;
|
|
287
|
+
exports.getFilterAttributes = getFilterAttributes;
|
|
288
|
+
exports.getGroupNames = getGroupNames;
|
|
289
|
+
exports.getIsEnterprise = getIsEnterprise;
|
|
290
|
+
exports.getMappedDevicesList = getMappedDevicesList;
|
|
291
|
+
exports.getOnboardingState = getOnboardingState;
|
|
292
|
+
exports.getRelevantRoles = getRelevantRoles;
|
|
293
|
+
exports.getSelectedDeploymentData = getSelectedDeploymentData;
|
|
294
|
+
exports.getShowSecurityAlert = getShowSecurityAlert;
|
|
295
|
+
exports.getTenantCapabilities = getTenantCapabilities;
|
|
296
|
+
exports.getUserCapabilities = getUserCapabilities;
|
|
297
|
+
exports.getUserRoles = getUserRoles;
|
|
298
|
+
|
|
1284
299
|
//# sourceMappingURL=commonSelectors.cjs.map
|