@northern.tech/store 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.cjs +80 -833
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +229 -85
- package/dist/actions.d.ts +229 -85
- package/dist/actions.js +14 -14
- package/dist/api/general-api.cjs +274 -148
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.d.cts +1 -1
- package/dist/api/general-api.d.ts +1 -1
- package/dist/api/general-api.js +7 -7
- package/dist/api/users-api.cjs +274 -148
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.d.cts +7 -5
- package/dist/api/users-api.d.ts +7 -5
- package/dist/api/users-api.js +8 -8
- package/dist/appSlice/constants.cjs +23 -43
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +109 -119
- package/dist/appSlice/constants.d.ts +109 -119
- package/dist/appSlice/constants.js +1 -11
- package/dist/appSlice/index.cjs +25 -242
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +119 -1531
- package/dist/appSlice/index.d.ts +119 -1531
- package/dist/appSlice/index.js +6 -6
- package/dist/appSlice/mocks.cjs +186 -0
- package/dist/appSlice/mocks.cjs.map +1 -0
- package/dist/appSlice/mocks.d.cts +39 -0
- package/dist/appSlice/mocks.d.ts +39 -0
- package/dist/appSlice/mocks.js +27 -0
- package/dist/appSlice/mocks.js.map +1 -0
- package/dist/appSlice/selectors.cjs +31 -5
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +709 -23
- package/dist/appSlice/selectors.d.ts +709 -23
- package/dist/appSlice/selectors.js +21 -1
- package/dist/appSlice/thunks.cjs +1563 -1790
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.d.cts +34 -14
- package/dist/appSlice/thunks.d.ts +34 -14
- package/dist/appSlice/thunks.js +30 -29
- package/dist/auth.cjs +276 -153
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +13 -10
- package/dist/auth.d.ts +13 -10
- package/dist/auth.js +6 -8
- package/dist/{chunk-CK6YE6AN.js → chunk-2DYA3X77.js} +3 -1
- package/dist/{chunk-CK6YE6AN.js.map → chunk-2DYA3X77.js.map} +1 -1
- package/dist/{chunk-2CYOM4BK.js → chunk-4TUJPE6G.js} +19 -4
- package/dist/chunk-4TUJPE6G.js.map +1 -0
- package/dist/{chunk-7PVGDMNM.js → chunk-6KGTHJKC.js} +23 -27
- package/dist/chunk-6KGTHJKC.js.map +1 -0
- package/dist/chunk-7C4SQBEE.js +715 -0
- package/dist/chunk-7C4SQBEE.js.map +1 -0
- package/dist/{chunk-QRGTG4YB.js → chunk-ABJLRDCO.js} +10 -11
- package/dist/chunk-ABJLRDCO.js.map +1 -0
- package/dist/{chunk-LEMVXAYP.js → chunk-CW5T6OGF.js} +56 -22
- package/dist/chunk-CW5T6OGF.js.map +1 -0
- package/dist/{chunk-MRCFLG45.js → chunk-FAJ3I2UQ.js} +2 -1
- package/dist/chunk-FAJ3I2UQ.js.map +1 -0
- package/dist/{chunk-DCK2DBOA.js → chunk-IQG5I7AM.js} +29 -39
- package/dist/chunk-IQG5I7AM.js.map +1 -0
- package/dist/chunk-JUGE7L3K.js +110 -0
- package/dist/chunk-JUGE7L3K.js.map +1 -0
- package/dist/{chunk-7JKWI5FK.js → chunk-JXQUFKID.js} +2 -2
- package/dist/chunk-JXQUFKID.js.map +1 -0
- package/dist/chunk-KC7SKI3U.js +389 -0
- package/dist/chunk-KC7SKI3U.js.map +1 -0
- package/dist/{chunk-YDS36ALB.js → chunk-KJNNEDRV.js} +11 -7
- package/dist/chunk-KJNNEDRV.js.map +1 -0
- package/dist/chunk-MBKAZVE3.js +44 -0
- package/dist/chunk-MBKAZVE3.js.map +1 -0
- package/dist/{chunk-TI2RL5P2.js → chunk-MZNANSS2.js} +12 -7
- package/dist/chunk-MZNANSS2.js.map +1 -0
- package/dist/{chunk-LTKOV26W.js → chunk-N2KLYPS5.js} +138 -95
- package/dist/chunk-N2KLYPS5.js.map +1 -0
- package/dist/{chunk-UWMYZNUB.js → chunk-OHF3YUXX.js} +25 -40
- package/dist/chunk-OHF3YUXX.js.map +1 -0
- package/dist/{chunk-CYV6632F.js → chunk-OOICURFL.js} +2 -2
- package/dist/chunk-OOICURFL.js.map +1 -0
- package/dist/{chunk-VMNMD6KF.js → chunk-PGFVHKP5.js} +5 -7
- package/dist/chunk-PGFVHKP5.js.map +1 -0
- package/dist/{chunk-JAROCU6M.js → chunk-QHK7GGV4.js} +3 -3
- package/dist/chunk-QHK7GGV4.js.map +1 -0
- package/dist/{chunk-YT73QWCN.js → chunk-RS37Y2PQ.js} +3 -3
- package/dist/chunk-RS37Y2PQ.js.map +1 -0
- package/dist/{chunk-TUACATJA.js → chunk-UGSLGUS6.js} +8 -6
- package/dist/chunk-UGSLGUS6.js.map +1 -0
- package/dist/{chunk-DAPAXWA5.js → chunk-URNS6A5T.js} +14 -14
- package/dist/{chunk-FGKMJS3B.js → chunk-VANBSJS5.js} +2 -4
- package/dist/chunk-VANBSJS5.js.map +1 -0
- package/dist/{chunk-HPBE6KYY.js → chunk-VUFRP6P3.js} +5 -6
- package/dist/chunk-VUFRP6P3.js.map +1 -0
- package/dist/{chunk-X7IEZBM4.js → chunk-X4GUACQO.js} +8 -5
- package/dist/chunk-X4GUACQO.js.map +1 -0
- package/dist/{chunk-4XJMRVFI.js → chunk-XWYJACQC.js} +45 -22
- package/dist/chunk-XWYJACQC.js.map +1 -0
- package/dist/{chunk-AMGWP7A4.js → chunk-ZJW3QIPM.js} +8 -9
- package/dist/chunk-ZJW3QIPM.js.map +1 -0
- package/dist/chunk-ZKAH3APE.js +1 -0
- package/dist/chunk-ZKAH3APE.js.map +1 -0
- package/dist/{chunk-2JHFUQ6B.js → chunk-ZN5TB2NJ.js} +963 -883
- package/dist/chunk-ZN5TB2NJ.js.map +1 -0
- package/dist/{chunk-WXL7PVI5.js → chunk-ZRSYBSSY.js} +18 -12
- package/dist/chunk-ZRSYBSSY.js.map +1 -0
- package/dist/commonConstants.cjs +279 -173
- package/dist/commonConstants.cjs.map +1 -1
- package/dist/commonConstants.d.cts +46 -212
- package/dist/commonConstants.d.ts +46 -212
- package/dist/commonConstants.js +11 -19
- package/dist/commonSelectors.cjs +513 -778
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +4307 -279
- package/dist/commonSelectors.d.ts +4307 -279
- package/dist/commonSelectors.js +13 -13
- package/dist/constants.cjs +355 -655
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +11 -9
- package/dist/constants.d.ts +11 -9
- package/dist/constants.js +37 -29
- package/dist/deploymentsSlice/constants.cjs +5 -360
- package/dist/deploymentsSlice/constants.cjs.map +1 -1
- package/dist/deploymentsSlice/constants.d.cts +59 -39
- package/dist/deploymentsSlice/constants.d.ts +59 -39
- package/dist/deploymentsSlice/constants.js +5 -11
- package/dist/deploymentsSlice/index.cjs +17 -365
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +142 -2359
- package/dist/deploymentsSlice/index.d.ts +142 -2359
- package/dist/deploymentsSlice/index.js +6 -6
- package/dist/deploymentsSlice/mocks.cjs +429 -0
- package/dist/deploymentsSlice/mocks.cjs.map +1 -0
- package/dist/deploymentsSlice/mocks.d.cts +189 -0
- package/dist/deploymentsSlice/mocks.d.ts +189 -0
- package/dist/deploymentsSlice/mocks.js +146 -0
- package/dist/deploymentsSlice/mocks.js.map +1 -0
- package/dist/deploymentsSlice/selectors.cjs +5 -353
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +167 -11
- package/dist/deploymentsSlice/selectors.d.ts +167 -11
- package/dist/deploymentsSlice/selectors.js +6 -6
- package/dist/deploymentsSlice/thunks.cjs +1551 -1778
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +134 -76
- package/dist/deploymentsSlice/thunks.d.ts +134 -76
- package/dist/deploymentsSlice/thunks.js +30 -29
- package/dist/devicesSlice/constants.cjs +5 -375
- package/dist/devicesSlice/constants.cjs.map +1 -1
- package/dist/devicesSlice/constants.d.cts +8 -16
- package/dist/devicesSlice/constants.d.ts +8 -16
- package/dist/devicesSlice/constants.js +7 -25
- package/dist/devicesSlice/index.cjs +17 -381
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +196 -2208
- package/dist/devicesSlice/index.d.ts +196 -2208
- package/dist/devicesSlice/index.js +6 -6
- package/dist/devicesSlice/mocks.cjs +336 -0
- package/dist/devicesSlice/mocks.cjs.map +1 -0
- package/dist/devicesSlice/mocks.d.cts +154 -0
- package/dist/devicesSlice/mocks.d.ts +154 -0
- package/dist/devicesSlice/mocks.js +136 -0
- package/dist/devicesSlice/mocks.js.map +1 -0
- package/dist/devicesSlice/selectors.cjs +280 -293
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +1791 -82
- package/dist/devicesSlice/selectors.d.ts +1791 -82
- package/dist/devicesSlice/selectors.js +8 -6
- package/dist/devicesSlice/thunks.cjs +1699 -1936
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +374 -291
- package/dist/devicesSlice/thunks.d.ts +374 -291
- package/dist/devicesSlice/thunks.js +36 -45
- package/dist/liststatehook.cjs +935 -0
- package/dist/liststatehook.cjs.map +1 -0
- package/dist/liststatehook.d.cts +234 -0
- package/dist/liststatehook.d.ts +234 -0
- package/dist/liststatehook.js +88 -0
- package/dist/liststatehook.js.map +1 -0
- package/dist/locationutils.cjs +906 -0
- package/dist/locationutils.cjs.map +1 -0
- package/dist/locationutils.d.cts +114 -0
- package/dist/locationutils.d.ts +114 -0
- package/dist/locationutils.js +46 -0
- package/dist/locationutils.js.map +1 -0
- package/dist/monitorSlice/constants.cjs +0 -146
- package/dist/monitorSlice/constants.cjs.map +1 -1
- package/dist/monitorSlice/constants.d.cts +4 -5
- package/dist/monitorSlice/constants.d.ts +4 -5
- package/dist/monitorSlice/constants.js +1 -12
- package/dist/monitorSlice/index.cjs +5 -353
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +63 -260
- package/dist/monitorSlice/index.d.ts +63 -260
- package/dist/monitorSlice/index.js +6 -6
- package/dist/monitorSlice/mocks.cjs +130 -0
- package/dist/monitorSlice/mocks.cjs.map +1 -0
- package/dist/monitorSlice/mocks.d.cts +57 -0
- package/dist/monitorSlice/mocks.d.ts +57 -0
- package/dist/monitorSlice/mocks.js +65 -0
- package/dist/monitorSlice/mocks.js.map +1 -0
- package/dist/monitorSlice/thunks.cjs +633 -880
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +90 -21
- package/dist/monitorSlice/thunks.d.ts +90 -21
- package/dist/monitorSlice/thunks.js +26 -26
- package/dist/onboardingSlice/constants.cjs +1 -0
- package/dist/onboardingSlice/constants.cjs.map +1 -1
- package/dist/onboardingSlice/constants.d.cts +23 -20
- package/dist/onboardingSlice/constants.d.ts +23 -20
- package/dist/onboardingSlice/constants.js +1 -1
- package/dist/onboardingSlice/index.cjs +1 -3
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +50 -225
- package/dist/onboardingSlice/index.d.ts +50 -225
- package/dist/onboardingSlice/index.js +1 -1
- package/dist/onboardingSlice/mocks.cjs +83 -0
- package/dist/onboardingSlice/mocks.cjs.map +1 -0
- package/dist/onboardingSlice/mocks.d.cts +19 -0
- package/dist/onboardingSlice/mocks.d.ts +19 -0
- package/dist/onboardingSlice/mocks.js +17 -0
- package/dist/onboardingSlice/mocks.js.map +1 -0
- package/dist/onboardingSlice/thunks.cjs +1787 -2020
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +63 -36
- package/dist/onboardingSlice/thunks.d.ts +63 -36
- package/dist/onboardingSlice/thunks.js +30 -31
- package/dist/organizationSlice/constants.cjs +8 -748
- package/dist/organizationSlice/constants.cjs.map +1 -1
- package/dist/organizationSlice/constants.d.cts +36 -116
- package/dist/organizationSlice/constants.d.ts +36 -116
- package/dist/organizationSlice/constants.js +7 -17
- package/dist/organizationSlice/index.cjs +14 -368
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +45 -73
- package/dist/organizationSlice/index.d.ts +45 -73
- package/dist/organizationSlice/index.js +6 -6
- package/dist/organizationSlice/mocks.cjs +234 -0
- package/dist/organizationSlice/mocks.cjs.map +1 -0
- package/dist/organizationSlice/mocks.d.cts +107 -0
- package/dist/organizationSlice/mocks.d.ts +107 -0
- package/dist/organizationSlice/mocks.js +101 -0
- package/dist/organizationSlice/mocks.js.map +1 -0
- package/dist/organizationSlice/selectors.cjs +301 -146
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +888 -51
- package/dist/organizationSlice/selectors.d.ts +888 -51
- package/dist/organizationSlice/selectors.js +14 -6
- package/dist/organizationSlice/thunks.cjs +2616 -2759
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +322 -131
- package/dist/organizationSlice/thunks.d.ts +322 -131
- package/dist/organizationSlice/thunks.js +44 -29
- package/dist/organizationSlice/types.cjs.map +1 -1
- package/dist/organizationSlice/types.d.cts +62 -79
- package/dist/organizationSlice/types.d.ts +62 -79
- package/dist/releasesSlice/constants.cjs +3 -0
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +2 -1
- package/dist/releasesSlice/constants.d.ts +2 -1
- package/dist/releasesSlice/constants.js +3 -1
- package/dist/releasesSlice/index.cjs +5 -222
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +52 -473
- package/dist/releasesSlice/index.d.ts +52 -473
- package/dist/releasesSlice/index.js +6 -6
- package/dist/releasesSlice/mocks.cjs +177 -0
- package/dist/releasesSlice/mocks.cjs.map +1 -0
- package/dist/releasesSlice/mocks.d.cts +49 -0
- package/dist/releasesSlice/mocks.d.ts +49 -0
- package/dist/releasesSlice/mocks.js +61 -0
- package/dist/releasesSlice/mocks.js.map +1 -0
- package/dist/releasesSlice/selectors.cjs +293 -165
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +886 -24
- package/dist/releasesSlice/selectors.d.ts +886 -24
- package/dist/releasesSlice/selectors.js +9 -7
- package/dist/releasesSlice/thunks.cjs +827 -1017
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +150 -130
- package/dist/releasesSlice/thunks.d.ts +150 -130
- package/dist/releasesSlice/thunks.js +33 -26
- package/dist/selectors.cjs +565 -780
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +37 -8
- package/dist/selectors.d.ts +37 -8
- package/dist/selectors.js +54 -18
- package/dist/sockethook.cjs +519 -0
- package/dist/sockethook.cjs.map +1 -0
- package/dist/sockethook.d.cts +10 -0
- package/dist/sockethook.d.ts +10 -0
- package/dist/sockethook.js +139 -0
- package/dist/sockethook.js.map +1 -0
- package/dist/store.cjs +121 -840
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +697 -1961
- package/dist/store.d.ts +697 -1961
- package/dist/store.js +18 -16
- package/dist/storehooks.cjs +1854 -1968
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +46 -63
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +2138 -2231
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +25 -7
- package/dist/thunks.d.ts +25 -7
- package/dist/thunks.js +54 -45
- package/dist/{deploymentdevicehook.cjs → useDeploymentDevice.cjs} +1797 -2026
- package/dist/useDeploymentDevice.cjs.map +1 -0
- package/dist/useDeploymentDevice.js +63 -0
- package/dist/useDeploymentDevice.js.map +1 -0
- package/dist/usersSlice/constants.cjs +5 -747
- package/dist/usersSlice/constants.cjs.map +1 -1
- package/dist/usersSlice/constants.d.cts +16 -774
- package/dist/usersSlice/constants.d.ts +16 -774
- package/dist/usersSlice/constants.js +7 -30
- package/dist/usersSlice/index.cjs +10 -721
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +136 -7900
- package/dist/usersSlice/index.d.ts +136 -7900
- package/dist/usersSlice/index.js +6 -6
- package/dist/usersSlice/mocks.cjs +200 -0
- package/dist/usersSlice/mocks.cjs.map +1 -0
- package/dist/usersSlice/mocks.d.cts +83 -0
- package/dist/usersSlice/mocks.d.ts +83 -0
- package/dist/usersSlice/mocks.js +47 -0
- package/dist/usersSlice/mocks.js.map +1 -0
- package/dist/usersSlice/selectors.cjs +319 -566
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +1651 -59
- package/dist/usersSlice/selectors.d.ts +1651 -59
- package/dist/usersSlice/selectors.js +13 -9
- package/dist/usersSlice/thunks.cjs +1666 -1893
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.d.cts +362 -312
- package/dist/usersSlice/thunks.d.ts +362 -312
- package/dist/usersSlice/thunks.js +30 -29
- package/dist/utils.cjs +428 -292
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +44 -22
- package/dist/utils.d.ts +44 -22
- package/dist/utils.js +12 -6
- package/package.json +18 -8
- package/dist/api/types/AWSCredentials.ts +0 -16
- package/dist/api/types/Actor.ts +0 -35
- package/dist/api/types/Addon.ts +0 -17
- package/dist/api/types/AddonTenantadm.ts +0 -17
- package/dist/api/types/Address.ts +0 -6
- package/dist/api/types/AddressUpdate.ts +0 -12
- package/dist/api/types/Alert.ts +0 -34
- package/dist/api/types/AlertDetails.ts +0 -23
- package/dist/api/types/AlertSubject.ts +0 -23
- package/dist/api/types/ApiBurst.ts +0 -21
- package/dist/api/types/ApiBurstTenantadm.ts +0 -21
- package/dist/api/types/ApiLimits.ts +0 -16
- package/dist/api/types/ApiLimitsTenantadm.ts +0 -16
- package/dist/api/types/ApiQuota.ts +0 -17
- package/dist/api/types/ApiQuotaTenantadm.ts +0 -17
- package/dist/api/types/Artifact.ts +0 -48
- package/dist/api/types/ArtifactDeployments.ts +0 -48
- package/dist/api/types/ArtifactInfo.ts +0 -11
- package/dist/api/types/ArtifactInfoDeployments.ts +0 -11
- package/dist/api/types/ArtifactLink.ts +0 -11
- package/dist/api/types/ArtifactTypeInfo.ts +0 -13
- package/dist/api/types/ArtifactTypeInfoDeployments.ts +0 -13
- package/dist/api/types/ArtifactUpdate.ts +0 -10
- package/dist/api/types/ArtifactUploadLink.ts +0 -15
- package/dist/api/types/Attribute.ts +0 -36
- package/dist/api/types/AttributeInventory.ts +0 -32
- package/dist/api/types/AuditLog.ts +0 -26
- package/dist/api/types/AuthSet.ts +0 -37
- package/dist/api/types/AuthSetDeviceauth.ts +0 -37
- package/dist/api/types/AuthSetIot_manager.ts +0 -33
- package/dist/api/types/AutoAuthRequest.ts +0 -23
- package/dist/api/types/AzureSharedAccessSecret.ts +0 -11
- package/dist/api/types/BillingInfo.ts +0 -13
- package/dist/api/types/BillingProfile.ts +0 -37
- package/dist/api/types/BillingProfileUpdate.ts +0 -37
- package/dist/api/types/BinaryDeltaConfiguration.ts +0 -15
- package/dist/api/types/BinaryDeltaConfigurationDeployments.ts +0 -15
- package/dist/api/types/BinaryDeltaLimits.ts +0 -21
- package/dist/api/types/BinaryDeltaLimitsDeployments.ts +0 -15
- package/dist/api/types/BoundingBox.ts +0 -9
- package/dist/api/types/CancelRequest.ts +0 -10
- package/dist/api/types/CardData.ts +0 -49
- package/dist/api/types/CardSetupData.ts +0 -17
- package/dist/api/types/CheckoutData.ts +0 -13
- package/dist/api/types/Configuration.ts +0 -11
- package/dist/api/types/Count.ts +0 -13
- package/dist/api/types/Credentials.ts +0 -23
- package/dist/api/types/DBusSubsystem.ts +0 -27
- package/dist/api/types/DeltaConfiguration.ts +0 -14
- package/dist/api/types/DeltaConfigurationDeployments.ts +0 -14
- package/dist/api/types/Deployment.ts +0 -45
- package/dist/api/types/DeploymentAggregation.ts +0 -16
- package/dist/api/types/DeploymentAggregationItem.ts +0 -16
- package/dist/api/types/DeploymentAggregationTerm.ts +0 -22
- package/dist/api/types/DeploymentAggregationTerms.ts +0 -16
- package/dist/api/types/DeploymentAttributeProjection.ts +0 -10
- package/dist/api/types/DeploymentAuditlogs.ts +0 -11
- package/dist/api/types/DeploymentDeployments.ts +0 -98
- package/dist/api/types/DeploymentFilterTerm.ts +0 -35
- package/dist/api/types/DeploymentIdentifier.ts +0 -10
- package/dist/api/types/DeploymentPhase.ts +0 -23
- package/dist/api/types/DeploymentPhaseDeployments.ts +0 -23
- package/dist/api/types/DeploymentReporting.ts +0 -46
- package/dist/api/types/DeploymentSearchTerms.ts +0 -37
- package/dist/api/types/DeploymentSortTerm.ts +0 -23
- package/dist/api/types/DeploymentStatistics.ts +0 -15
- package/dist/api/types/DeploymentStatisticsDeployments.ts +0 -15
- package/dist/api/types/DeploymentStatusStatistics.ts +0 -54
- package/dist/api/types/DeploymentStatusStatisticsDeployments.ts +0 -54
- package/dist/api/types/Device.ts +0 -20
- package/dist/api/types/DeviceAggregation.ts +0 -16
- package/dist/api/types/DeviceAggregationItem.ts +0 -16
- package/dist/api/types/DeviceAggregationTerm.ts +0 -26
- package/dist/api/types/DeviceAggregationTerms.ts +0 -20
- package/dist/api/types/DeviceAttribute.ts +0 -22
- package/dist/api/types/DeviceAttributeProjection.ts +0 -14
- package/dist/api/types/DeviceAuditlogs.ts +0 -17
- package/dist/api/types/DeviceAuthEvent.ts +0 -23
- package/dist/api/types/DeviceConfiguration.ts +0 -16
- package/dist/api/types/DeviceDeployment.ts +0 -11
- package/dist/api/types/DeviceDeployments.ts +0 -29
- package/dist/api/types/DeviceDeviceauth.ts +0 -42
- package/dist/api/types/DeviceFilterAttribute.ts +0 -21
- package/dist/api/types/DeviceFilterTerm.ts +0 -39
- package/dist/api/types/DeviceInventory.ts +0 -19
- package/dist/api/types/DeviceInventoryInventory.ts +0 -19
- package/dist/api/types/DeviceReporting.ts +0 -22
- package/dist/api/types/DeviceSearchTerms.ts +0 -37
- package/dist/api/types/DeviceSortTerm.ts +0 -27
- package/dist/api/types/DeviceState.ts +0 -32
- package/dist/api/types/DeviceStateDeviceconnect.ts +0 -33
- package/dist/api/types/DeviceStateIot_manager.ts +0 -14
- package/dist/api/types/DeviceStatus.ts +0 -19
- package/dist/api/types/DeviceWithImage.ts +0 -80
- package/dist/api/types/DirectUploadMetadata.ts +0 -18
- package/dist/api/types/EmailVerificationCompletion.ts +0 -13
- package/dist/api/types/EmailVerificationRequest.ts +0 -13
- package/dist/api/types/Error.ts +0 -17
- package/dist/api/types/ErrorAuditlogs.ts +0 -13
- package/dist/api/types/ErrorDeployments.ts +0 -17
- package/dist/api/types/ErrorDeviceauth.ts +0 -13
- package/dist/api/types/ErrorDeviceconfig.ts +0 -17
- package/dist/api/types/ErrorDeviceconnect.ts +0 -17
- package/dist/api/types/ErrorDevicemonitor.ts +0 -17
- package/dist/api/types/ErrorExt.ts +0 -18
- package/dist/api/types/ErrorInventory.ts +0 -17
- package/dist/api/types/ErrorIot_manager.ts +0 -17
- package/dist/api/types/ErrorNotFound.ts +0 -17
- package/dist/api/types/ErrorReporting.ts +0 -18
- package/dist/api/types/ErrorTenantadm.ts +0 -13
- package/dist/api/types/ErrorUseradm.ts +0 -17
- package/dist/api/types/Event.ts +0 -48
- package/dist/api/types/ExternalIdentity.ts +0 -17
- package/dist/api/types/Features.ts +0 -17
- package/dist/api/types/FileUpload.ts +0 -23
- package/dist/api/types/Filter.ts +0 -19
- package/dist/api/types/FilterAttribute.ts +0 -21
- package/dist/api/types/FilterDefinition.ts +0 -18
- package/dist/api/types/FilterDeployments.ts +0 -19
- package/dist/api/types/FilterInventory.ts +0 -19
- package/dist/api/types/FilterPredicate.ts +0 -48
- package/dist/api/types/FilterPredicateDeployments.ts +0 -48
- package/dist/api/types/FilterPredicateInventory.ts +0 -78
- package/dist/api/types/GeoBoundingBox.ts +0 -8
- package/dist/api/types/GeoBoundingBoxFilter.ts +0 -5
- package/dist/api/types/GeoDistance.ts +0 -15
- package/dist/api/types/GeoDistanceFilter.ts +0 -8
- package/dist/api/types/GeoPoint.ts +0 -14
- package/dist/api/types/Group.ts +0 -10
- package/dist/api/types/HTTP.ts +0 -19
- package/dist/api/types/IdentityData.ts +0 -25
- package/dist/api/types/InputParameter.ts +0 -8
- package/dist/api/types/Integration.ts +0 -30
- package/dist/api/types/JobStatus.ts +0 -13
- package/dist/api/types/Limit.ts +0 -21
- package/dist/api/types/LimitDeployments.ts +0 -21
- package/dist/api/types/LimitDeviceauth.ts +0 -10
- package/dist/api/types/LimitUseradm.ts +0 -11
- package/dist/api/types/Limits.ts +0 -11
- package/dist/api/types/LineDescriptor.ts +0 -11
- package/dist/api/types/LogSubsystem.ts +0 -23
- package/dist/api/types/LoginOptions.ts +0 -18
- package/dist/api/types/ManagementAPIConfiguration.ts +0 -5
- package/dist/api/types/MenderTypes.ts +0 -213
- package/dist/api/types/MonitorConfiguration.ts +0 -22
- package/dist/api/types/NewConfigurationDeployment.ts +0 -15
- package/dist/api/types/NewConfigurationDeploymentResponse.ts +0 -10
- package/dist/api/types/NewDeployment.ts +0 -42
- package/dist/api/types/NewDeploymentForGroup.ts +0 -33
- package/dist/api/types/NewDeploymentPhase.ts +0 -37
- package/dist/api/types/NewDeploymentPhaseDeployments.ts +0 -20
- package/dist/api/types/NewDeploymentV2.ts +0 -34
- package/dist/api/types/NewTenant.ts +0 -49
- package/dist/api/types/Object.ts +0 -38
- package/dist/api/types/OwnUserUpdate.ts +0 -21
- package/dist/api/types/PasswordResetCompletion.ts +0 -17
- package/dist/api/types/PasswordResetRequest.ts +0 -13
- package/dist/api/types/Permission.ts +0 -21
- package/dist/api/types/PermissionObject.ts +0 -14
- package/dist/api/types/PermissionSet.ts +0 -22
- package/dist/api/types/PermissionSetWithScope.ts +0 -15
- package/dist/api/types/PersonalAccessToken.ts +0 -29
- package/dist/api/types/PersonalAccessTokenRequest.ts +0 -18
- package/dist/api/types/Plan.ts +0 -19
- package/dist/api/types/PlanBindingDetails.ts +0 -13
- package/dist/api/types/PlanChangeRequest.ts +0 -14
- package/dist/api/types/PlanLimits.ts +0 -12
- package/dist/api/types/PreAuthSet.ts +0 -16
- package/dist/api/types/Release.ts +0 -32
- package/dist/api/types/ReleaseDeployments.ts +0 -32
- package/dist/api/types/ReleaseUpdate.ts +0 -13
- package/dist/api/types/Releases.ts +0 -9
- package/dist/api/types/ReleasesDeleteError.ts +0 -21
- package/dist/api/types/ReleasesDeployments.ts +0 -9
- package/dist/api/types/Role.ts +0 -19
- package/dist/api/types/RolePermission.ts +0 -25
- package/dist/api/types/RolePermissionObject.ts +0 -17
- package/dist/api/types/RoleUseradm.ts +0 -19
- package/dist/api/types/SAMLMetadata.ts +0 -21
- package/dist/api/types/Scope.ts +0 -19
- package/dist/api/types/SelectAttribute.ts +0 -17
- package/dist/api/types/ServiceSubsystem.ts +0 -19
- package/dist/api/types/Settings.ts +0 -23
- package/dist/api/types/SortCriteria.ts +0 -30
- package/dist/api/types/SsoObject.ts +0 -21
- package/dist/api/types/Status.ts +0 -18
- package/dist/api/types/StatusDeviceauth.ts +0 -18
- package/dist/api/types/StatusTenantadm.ts +0 -17
- package/dist/api/types/StorageLimit.ts +0 -17
- package/dist/api/types/SubscriptionData.ts +0 -8
- package/dist/api/types/SupportRequest.ts +0 -17
- package/dist/api/types/Tag.ts +0 -27
- package/dist/api/types/Tags.ts +0 -10
- package/dist/api/types/TaskResult.ts +0 -13
- package/dist/api/types/TaskResultCLI.ts +0 -10
- package/dist/api/types/TaskResultHTTPRequest.ts +0 -8
- package/dist/api/types/TaskResultHTTPResponse.ts +0 -10
- package/dist/api/types/Tenant.ts +0 -26
- package/dist/api/types/TenantApiLimits.ts +0 -12
- package/dist/api/types/TenantApiLimitsTenantadm.ts +0 -12
- package/dist/api/types/TenantIdName.ts +0 -14
- package/dist/api/types/TenantIdsData.ts +0 -10
- package/dist/api/types/TenantInfo.ts +0 -14
- package/dist/api/types/TenantShortInfo.ts +0 -21
- package/dist/api/types/TenantTenantadm.ts +0 -54
- package/dist/api/types/TenantsIdName.ts +0 -6
- package/dist/api/types/Update.ts +0 -17
- package/dist/api/types/UpdateChildTenant.ts +0 -17
- package/dist/api/types/UpdateDeployments.ts +0 -18
- package/dist/api/types/UpdateFile.ts +0 -13
- package/dist/api/types/UpdateFileDeployments.ts +0 -13
- package/dist/api/types/UpdateTypes.ts +0 -8
- package/dist/api/types/UpgradeCompleteRequest.ts +0 -25
- package/dist/api/types/User.ts +0 -13
- package/dist/api/types/UserAuditlogs.ts +0 -13
- package/dist/api/types/UserNew.ts +0 -26
- package/dist/api/types/UserUpdate.ts +0 -25
- package/dist/api/types/UserUseradm.ts +0 -45
- package/dist/api/types/UserWithTenantInfo.ts +0 -12
- package/dist/api/types/XDeltaArgs.ts +0 -9
- package/dist/api/types/XDeltaArgsDeployments.ts +0 -9
- package/dist/api/types/XDeltaArgsLimits.ts +0 -10
- package/dist/api/types/XDeltaArgsLimitsDeployments.ts +0 -10
- package/dist/chunk-2CYOM4BK.js.map +0 -1
- package/dist/chunk-2JHFUQ6B.js.map +0 -1
- package/dist/chunk-4B3IMP4I.js +0 -245
- package/dist/chunk-4B3IMP4I.js.map +0 -1
- package/dist/chunk-4XJMRVFI.js.map +0 -1
- package/dist/chunk-7JKWI5FK.js.map +0 -1
- package/dist/chunk-7PVGDMNM.js.map +0 -1
- package/dist/chunk-AMGWP7A4.js.map +0 -1
- package/dist/chunk-C5NEDBJI.js +0 -727
- package/dist/chunk-C5NEDBJI.js.map +0 -1
- package/dist/chunk-CYV6632F.js.map +0 -1
- package/dist/chunk-DCK2DBOA.js.map +0 -1
- package/dist/chunk-FGKMJS3B.js.map +0 -1
- package/dist/chunk-HPBE6KYY.js.map +0 -1
- package/dist/chunk-JAROCU6M.js.map +0 -1
- package/dist/chunk-LEMVXAYP.js.map +0 -1
- package/dist/chunk-LGNOTPUG.js +0 -106
- package/dist/chunk-LGNOTPUG.js.map +0 -1
- package/dist/chunk-LIJIIRON.js +0 -28
- package/dist/chunk-LIJIIRON.js.map +0 -1
- package/dist/chunk-LTKOV26W.js.map +0 -1
- package/dist/chunk-MRCFLG45.js.map +0 -1
- package/dist/chunk-QRGTG4YB.js.map +0 -1
- package/dist/chunk-TI2RL5P2.js.map +0 -1
- package/dist/chunk-TUACATJA.js.map +0 -1
- package/dist/chunk-UWMYZNUB.js.map +0 -1
- package/dist/chunk-VMNMD6KF.js.map +0 -1
- package/dist/chunk-WXL7PVI5.js.map +0 -1
- package/dist/chunk-X7IEZBM4.js.map +0 -1
- package/dist/chunk-YDS36ALB.js.map +0 -1
- package/dist/chunk-YT73QWCN.js.map +0 -1
- package/dist/deploymentdevicehook.cjs.map +0 -1
- package/dist/deploymentdevicehook.js +0 -62
- package/dist/deploymentdevicehook.js.map +0 -1
- /package/dist/{chunk-DAPAXWA5.js.map → chunk-URNS6A5T.js.map} +0 -0
- /package/dist/{deploymentdevicehook.d.cts → useDeploymentDevice.d.cts} +0 -0
- /package/dist/{deploymentdevicehook.d.ts → useDeploymentDevice.d.ts} +0 -0
|
@@ -41,13 +41,25 @@ __export(thunks_exports, {
|
|
|
41
41
|
getUpdateTypes: () => getUpdateTypes,
|
|
42
42
|
removeArtifact: () => removeArtifact,
|
|
43
43
|
removeRelease: () => removeRelease,
|
|
44
|
+
removeReleases: () => removeReleases,
|
|
44
45
|
selectRelease: () => selectRelease,
|
|
45
46
|
setReleaseTags: () => setReleaseTags,
|
|
46
47
|
setReleasesListState: () => setReleasesListState,
|
|
48
|
+
setReleasesTags: () => setReleasesTags,
|
|
49
|
+
setSingleReleaseTags: () => setSingleReleaseTags,
|
|
47
50
|
updateReleaseInfo: () => updateReleaseInfo,
|
|
48
51
|
uploadArtifact: () => uploadArtifact
|
|
49
52
|
});
|
|
50
53
|
module.exports = __toCommonJS(thunks_exports);
|
|
54
|
+
var import_helpers8 = require("@northern.tech/utils/helpers");
|
|
55
|
+
var import_axios2 = require("axios");
|
|
56
|
+
var import_uuid = require("uuid");
|
|
57
|
+
|
|
58
|
+
// src/releasesSlice/index.ts
|
|
59
|
+
var import_toolkit = require("@reduxjs/toolkit");
|
|
60
|
+
|
|
61
|
+
// src/constants.ts
|
|
62
|
+
var import_constants4 = require("@northern.tech/utils/constants");
|
|
51
63
|
|
|
52
64
|
// src/appSlice/constants.ts
|
|
53
65
|
var import_icons_material = require("@mui/icons-material");
|
|
@@ -55,16 +67,6 @@ var startingDeviceCount = {
|
|
|
55
67
|
os: "for first 50 devices",
|
|
56
68
|
professional: "for first 250 devices"
|
|
57
69
|
};
|
|
58
|
-
var apiRoot = "/api/management";
|
|
59
|
-
var apiUrl = {
|
|
60
|
-
v1: `${apiRoot}/v1`,
|
|
61
|
-
v2: `${apiRoot}/v2`
|
|
62
|
-
};
|
|
63
|
-
var headerNames = {
|
|
64
|
-
link: "link",
|
|
65
|
-
location: "location",
|
|
66
|
-
total: "x-total-count"
|
|
67
|
-
};
|
|
68
70
|
var chartTypes = {
|
|
69
71
|
bar: { key: "bar", Icon: import_icons_material.BarChart },
|
|
70
72
|
pie: { key: "pie", Icon: import_icons_material.PieChartOutline }
|
|
@@ -76,28 +78,30 @@ var PLANS = {
|
|
|
76
78
|
os: {
|
|
77
79
|
id: "os",
|
|
78
80
|
name: "Basic",
|
|
81
|
+
minimalDeviceCount: 50,
|
|
79
82
|
offer: true,
|
|
80
|
-
price: "$
|
|
83
|
+
price: "$34 / month",
|
|
81
84
|
deviceCount: startingDeviceCount.os,
|
|
82
|
-
|
|
83
|
-
price2: "for first 6 months;\n$29/month thereafter",
|
|
85
|
+
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.",
|
|
84
86
|
features: ["Access to core features of Mender", "Basic support"]
|
|
85
87
|
},
|
|
86
88
|
professional: {
|
|
87
89
|
id: "professional",
|
|
88
90
|
name: "Professional",
|
|
91
|
+
minimalDeviceCount: 250,
|
|
89
92
|
offer: true,
|
|
90
|
-
price: "$
|
|
93
|
+
price: "$291 / month",
|
|
91
94
|
deviceCount: startingDeviceCount.professional,
|
|
92
|
-
|
|
93
|
-
price2: "for first 6 months;\n$249/month thereafter",
|
|
95
|
+
description: "Everything in Basic, plus enhanced update management and automation features.",
|
|
94
96
|
features: ["Advanced OTA features", "Higher priority support"]
|
|
95
97
|
},
|
|
96
98
|
enterprise: {
|
|
97
99
|
id: "enterprise",
|
|
98
100
|
name: "Enterprise",
|
|
101
|
+
minimalDeviceCount: 1e3,
|
|
99
102
|
price: "Custom pricing",
|
|
100
103
|
deviceCount: "Unlimited devices",
|
|
104
|
+
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.",
|
|
101
105
|
features: ["All Mender features", "Advanced security features", "SLA-backed support"]
|
|
102
106
|
}
|
|
103
107
|
};
|
|
@@ -117,21 +121,6 @@ var ADDONS = {
|
|
|
117
121
|
},
|
|
118
122
|
eligible: ["os", "professional", "enterprise"]
|
|
119
123
|
},
|
|
120
|
-
troubleshoot: {
|
|
121
|
-
id: "troubleshoot",
|
|
122
|
-
title: "Troubleshoot",
|
|
123
|
-
description: "Expand your plan with device troubleshooting features",
|
|
124
|
-
needs: ["hasDeviceConnect"],
|
|
125
|
-
os: {
|
|
126
|
-
price: "$27/month",
|
|
127
|
-
deviceCount: startingDeviceCount.os
|
|
128
|
-
},
|
|
129
|
-
professional: {
|
|
130
|
-
price: "$72/month",
|
|
131
|
-
deviceCount: startingDeviceCount.professional
|
|
132
|
-
},
|
|
133
|
-
eligible: ["os", "professional", "enterprise"]
|
|
134
|
-
},
|
|
135
124
|
monitor: {
|
|
136
125
|
id: "monitor",
|
|
137
126
|
title: "Monitor",
|
|
@@ -146,6 +135,21 @@ var ADDONS = {
|
|
|
146
135
|
deviceCount: startingDeviceCount.professional
|
|
147
136
|
},
|
|
148
137
|
eligible: ["professional", "enterprise"]
|
|
138
|
+
},
|
|
139
|
+
troubleshoot: {
|
|
140
|
+
id: "troubleshoot",
|
|
141
|
+
title: "Troubleshoot",
|
|
142
|
+
description: "Expand your plan with device troubleshooting features",
|
|
143
|
+
needs: ["hasDeviceConnect"],
|
|
144
|
+
os: {
|
|
145
|
+
price: "$27/month",
|
|
146
|
+
deviceCount: startingDeviceCount.os
|
|
147
|
+
},
|
|
148
|
+
professional: {
|
|
149
|
+
price: "$72/month",
|
|
150
|
+
deviceCount: startingDeviceCount.professional
|
|
151
|
+
},
|
|
152
|
+
eligible: ["os", "professional", "enterprise"]
|
|
149
153
|
}
|
|
150
154
|
};
|
|
151
155
|
var BENEFITS = {
|
|
@@ -186,139 +190,15 @@ var DARK_MODE = "dark";
|
|
|
186
190
|
|
|
187
191
|
// src/commonConstants.tsx
|
|
188
192
|
var import_js = require("@mdi/js");
|
|
193
|
+
var import_MenderTypes = require("@northern.tech/types/MenderTypes");
|
|
189
194
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
190
|
-
var DEVICE_LIST_DEFAULTS = {
|
|
191
|
-
page: 1,
|
|
192
|
-
perPage: 20
|
|
193
|
-
};
|
|
194
195
|
var timeUnits = {
|
|
195
196
|
days: "days",
|
|
196
197
|
minutes: "minutes",
|
|
197
198
|
hours: "hours"
|
|
198
199
|
};
|
|
199
|
-
var ALL_DEVICES = "All devices";
|
|
200
200
|
var UNGROUPED_GROUP = { id: "*|=ungrouped=|*", name: "Unassigned" };
|
|
201
201
|
var DEVICE_LIST_MAXIMUM_LENGTH = 50;
|
|
202
|
-
var DEVICE_FILTERING_OPTIONS = {
|
|
203
|
-
$eq: { key: "$eq", title: "equals", shortform: "=" },
|
|
204
|
-
$ne: { key: "$ne", title: "not equal", shortform: "!=" },
|
|
205
|
-
$gt: {
|
|
206
|
-
key: "$gt",
|
|
207
|
-
title: ">",
|
|
208
|
-
shortform: ">",
|
|
209
|
-
help: 'The "greater than" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
|
|
210
|
-
},
|
|
211
|
-
$gte: {
|
|
212
|
-
title: ">=",
|
|
213
|
-
shortform: ">=",
|
|
214
|
-
help: 'The "greater than or equal" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
|
|
215
|
-
},
|
|
216
|
-
$lt: {
|
|
217
|
-
key: "$lt",
|
|
218
|
-
title: "<",
|
|
219
|
-
shortform: "<",
|
|
220
|
-
help: 'The "lesser than" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
|
|
221
|
-
},
|
|
222
|
-
$lte: {
|
|
223
|
-
title: "<=",
|
|
224
|
-
shortform: "<=",
|
|
225
|
-
help: 'The "lesser than or equal" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
|
|
226
|
-
},
|
|
227
|
-
$ltne: {
|
|
228
|
-
key: "$ltne",
|
|
229
|
-
title: "$ltne",
|
|
230
|
-
shortform: "ltne",
|
|
231
|
-
help: 'The "lesser than or does not exist" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
|
|
232
|
-
},
|
|
233
|
-
$in: {
|
|
234
|
-
key: "$in",
|
|
235
|
-
title: "in",
|
|
236
|
-
shortform: "in",
|
|
237
|
-
help: 'The "in" operator accepts a list of comma-separated values. It matches if the selected field is equal to one of the specified values.'
|
|
238
|
-
},
|
|
239
|
-
$nin: {
|
|
240
|
-
key: "$nin",
|
|
241
|
-
title: "not in",
|
|
242
|
-
shortform: "not in",
|
|
243
|
-
help: `The "not in" operator accepts a list of comma-separated values. It matches if the selected field's value is not equal to any of the specified options.`
|
|
244
|
-
},
|
|
245
|
-
$exists: {
|
|
246
|
-
key: "$exists",
|
|
247
|
-
title: "exists",
|
|
248
|
-
shortform: "exists",
|
|
249
|
-
value: true,
|
|
250
|
-
help: `The "exists" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`
|
|
251
|
-
},
|
|
252
|
-
$nexists: {
|
|
253
|
-
key: "$nexists",
|
|
254
|
-
title: `doesn't exist`,
|
|
255
|
-
shortform: `doesn't exist`,
|
|
256
|
-
value: true,
|
|
257
|
-
help: `The "doesn't exist" operator matches if the selected field's value has no value. No value needs to be provided for this operator.`
|
|
258
|
-
},
|
|
259
|
-
$regex: {
|
|
260
|
-
key: "$regex",
|
|
261
|
-
title: `matches regular expression`,
|
|
262
|
-
shortform: `matches`,
|
|
263
|
-
help: `The "regular expression" operator matches the selected field's value with a Perl compatible regular expression (PCRE), automatically anchored by ^. If the regular expression is not valid, the filter will produce no results. If you need to specify options and flags, you can provide the full regex in the format of /regex/flags, for example.`
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
var DEVICE_ISSUE_OPTIONS = {
|
|
267
|
-
issues: {
|
|
268
|
-
isCategory: true,
|
|
269
|
-
key: "issues",
|
|
270
|
-
title: "Devices with issues",
|
|
271
|
-
filterRule: {}
|
|
272
|
-
},
|
|
273
|
-
offline: {
|
|
274
|
-
issueCategory: "issues",
|
|
275
|
-
key: "offline",
|
|
276
|
-
needsFullFiltering: true,
|
|
277
|
-
needsMonitor: false,
|
|
278
|
-
needsReporting: false,
|
|
279
|
-
filterRule: {
|
|
280
|
-
scope: "system",
|
|
281
|
-
key: "check_in_time",
|
|
282
|
-
operator: DEVICE_FILTERING_OPTIONS.$ltne.key,
|
|
283
|
-
value: ({ offlineThreshold }) => offlineThreshold
|
|
284
|
-
},
|
|
285
|
-
title: "Offline devices"
|
|
286
|
-
},
|
|
287
|
-
failedLastUpdate: {
|
|
288
|
-
issueCategory: "issues",
|
|
289
|
-
key: "failedLastUpdate",
|
|
290
|
-
needsFullFiltering: false,
|
|
291
|
-
needsMonitor: false,
|
|
292
|
-
needsReporting: true,
|
|
293
|
-
filterRule: { scope: "monitor", key: "failed_last_update", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },
|
|
294
|
-
title: "Deployment failed"
|
|
295
|
-
},
|
|
296
|
-
monitoring: {
|
|
297
|
-
issueCategory: "issues",
|
|
298
|
-
key: "monitoring",
|
|
299
|
-
needsFullFiltering: false,
|
|
300
|
-
needsMonitor: true,
|
|
301
|
-
needsReporting: false,
|
|
302
|
-
filterRule: { scope: "monitor", key: "alerts", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },
|
|
303
|
-
title: "Monitoring alert"
|
|
304
|
-
},
|
|
305
|
-
authRequests: {
|
|
306
|
-
key: "authRequests",
|
|
307
|
-
needsFullFiltering: false,
|
|
308
|
-
needsMonitor: false,
|
|
309
|
-
needsReporting: true,
|
|
310
|
-
filterRule: { scope: "monitor", key: "auth_requests", operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },
|
|
311
|
-
title: "Devices with new authentication requests"
|
|
312
|
-
},
|
|
313
|
-
gatewayDevices: {
|
|
314
|
-
key: "gatewayDevices",
|
|
315
|
-
needsFullFiltering: false,
|
|
316
|
-
needsMonitor: false,
|
|
317
|
-
needsReporting: true,
|
|
318
|
-
filterRule: { scope: "inventory", key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: "true" },
|
|
319
|
-
title: "Gateway devices"
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
202
|
var oneSecond = 1e3;
|
|
323
203
|
var TIMEOUTS = {
|
|
324
204
|
debounceDefault: 700,
|
|
@@ -331,23 +211,12 @@ var TIMEOUTS = {
|
|
|
331
211
|
refreshDefault: 10 * oneSecond,
|
|
332
212
|
refreshLong: 60 * oneSecond
|
|
333
213
|
};
|
|
334
|
-
var SORTING_OPTIONS = {
|
|
335
|
-
asc: "asc",
|
|
336
|
-
desc: "desc"
|
|
337
|
-
};
|
|
338
214
|
var DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };
|
|
339
|
-
var
|
|
340
|
-
inventory: "inventory",
|
|
341
|
-
identity: "identity",
|
|
342
|
-
monitor: "monitor",
|
|
343
|
-
system: "system",
|
|
344
|
-
tags: "tags"
|
|
345
|
-
};
|
|
346
|
-
var defaultIdAttribute = Object.freeze({ attribute: "id", scope: ATTRIBUTE_SCOPES.identity });
|
|
215
|
+
var defaultIdAttribute = Object.freeze({ attribute: "id", scope: import_constants4.ATTRIBUTE_SCOPES.identity });
|
|
347
216
|
var credentialTypes = {
|
|
348
|
-
aws:
|
|
349
|
-
http:
|
|
350
|
-
sas:
|
|
217
|
+
aws: import_MenderTypes.Credentials.type.AWS,
|
|
218
|
+
http: import_MenderTypes.Credentials.type.HTTP,
|
|
219
|
+
sas: import_MenderTypes.Credentials.type.SAS,
|
|
351
220
|
x509: "x509"
|
|
352
221
|
};
|
|
353
222
|
var EXTERNAL_PROVIDER = {
|
|
@@ -387,31 +256,277 @@ var EXTERNAL_PROVIDER = {
|
|
|
387
256
|
webhook: {
|
|
388
257
|
credentialsType: credentialTypes.http,
|
|
389
258
|
deviceTwin: false,
|
|
259
|
+
twinTitle: "",
|
|
390
260
|
// disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.
|
|
391
261
|
enabled: false,
|
|
392
262
|
provider: "webhook"
|
|
393
263
|
}
|
|
394
264
|
};
|
|
395
|
-
var
|
|
396
|
-
var emptyUiPermissions = Object.freeze({
|
|
397
|
-
auditlog: [],
|
|
398
|
-
deployments: [],
|
|
399
|
-
groups: Object.freeze({}),
|
|
400
|
-
releases: Object.freeze({}),
|
|
401
|
-
tenantManagement: [],
|
|
402
|
-
userManagement: []
|
|
403
|
-
});
|
|
404
|
-
var emptyRole = Object.freeze({
|
|
405
|
-
name: void 0,
|
|
265
|
+
var emptyWebhook = {
|
|
406
266
|
description: "",
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
267
|
+
provider: import_MenderTypes.Integration.provider.WEBHOOK,
|
|
268
|
+
credentials: {
|
|
269
|
+
type: EXTERNAL_PROVIDER.webhook.credentialsType,
|
|
270
|
+
[EXTERNAL_PROVIDER.webhook.credentialsType]: {
|
|
271
|
+
secret: "",
|
|
272
|
+
url: ""
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
var regionNames = new Intl.DisplayNames(["en"], { type: "region" });
|
|
277
|
+
var countries = [
|
|
278
|
+
"AD",
|
|
279
|
+
"AE",
|
|
280
|
+
"AF",
|
|
281
|
+
"AG",
|
|
282
|
+
"AI",
|
|
283
|
+
"AL",
|
|
284
|
+
"AM",
|
|
285
|
+
"AO",
|
|
286
|
+
"AQ",
|
|
287
|
+
"AR",
|
|
288
|
+
"AS",
|
|
289
|
+
"AT",
|
|
290
|
+
"AU",
|
|
291
|
+
"AW",
|
|
292
|
+
"AX",
|
|
293
|
+
"AZ",
|
|
294
|
+
"BA",
|
|
295
|
+
"BB",
|
|
296
|
+
"BD",
|
|
297
|
+
"BE",
|
|
298
|
+
"BF",
|
|
299
|
+
"BG",
|
|
300
|
+
"BH",
|
|
301
|
+
"BI",
|
|
302
|
+
"BJ",
|
|
303
|
+
"BL",
|
|
304
|
+
"BM",
|
|
305
|
+
"BN",
|
|
306
|
+
"BO",
|
|
307
|
+
"BR",
|
|
308
|
+
"BS",
|
|
309
|
+
"BT",
|
|
310
|
+
"BV",
|
|
311
|
+
"BW",
|
|
312
|
+
"BY",
|
|
313
|
+
"BZ",
|
|
314
|
+
"CA",
|
|
315
|
+
"CC",
|
|
316
|
+
"CD",
|
|
317
|
+
"CF",
|
|
318
|
+
"CG",
|
|
319
|
+
"CH",
|
|
320
|
+
"CI",
|
|
321
|
+
"CK",
|
|
322
|
+
"CL",
|
|
323
|
+
"CM",
|
|
324
|
+
"CN",
|
|
325
|
+
"CO",
|
|
326
|
+
"CR",
|
|
327
|
+
"CU",
|
|
328
|
+
"CV",
|
|
329
|
+
"CW",
|
|
330
|
+
"CX",
|
|
331
|
+
"CY",
|
|
332
|
+
"CZ",
|
|
333
|
+
"DE",
|
|
334
|
+
"DJ",
|
|
335
|
+
"DK",
|
|
336
|
+
"DM",
|
|
337
|
+
"DO",
|
|
338
|
+
"DZ",
|
|
339
|
+
"EC",
|
|
340
|
+
"EE",
|
|
341
|
+
"EG",
|
|
342
|
+
"EH",
|
|
343
|
+
"ER",
|
|
344
|
+
"ES",
|
|
345
|
+
"ET",
|
|
346
|
+
"FI",
|
|
347
|
+
"FJ",
|
|
348
|
+
"FK",
|
|
349
|
+
"FM",
|
|
350
|
+
"FO",
|
|
351
|
+
"FR",
|
|
352
|
+
"GA",
|
|
353
|
+
"GB",
|
|
354
|
+
"GD",
|
|
355
|
+
"GE",
|
|
356
|
+
"GF",
|
|
357
|
+
"GG",
|
|
358
|
+
"GH",
|
|
359
|
+
"GI",
|
|
360
|
+
"GL",
|
|
361
|
+
"GM",
|
|
362
|
+
"GN",
|
|
363
|
+
"GP",
|
|
364
|
+
"GQ",
|
|
365
|
+
"GR",
|
|
366
|
+
"GS",
|
|
367
|
+
"GT",
|
|
368
|
+
"GU",
|
|
369
|
+
"GW",
|
|
370
|
+
"GY",
|
|
371
|
+
"HK",
|
|
372
|
+
"HM",
|
|
373
|
+
"HN",
|
|
374
|
+
"HR",
|
|
375
|
+
"HT",
|
|
376
|
+
"HU",
|
|
377
|
+
"ID",
|
|
378
|
+
"IE",
|
|
379
|
+
"IL",
|
|
380
|
+
"IM",
|
|
381
|
+
"IN",
|
|
382
|
+
"IO",
|
|
383
|
+
"IQ",
|
|
384
|
+
"IR",
|
|
385
|
+
"IS",
|
|
386
|
+
"IT",
|
|
387
|
+
"JE",
|
|
388
|
+
"JM",
|
|
389
|
+
"JO",
|
|
390
|
+
"JP",
|
|
391
|
+
"KE",
|
|
392
|
+
"KG",
|
|
393
|
+
"KH",
|
|
394
|
+
"KI",
|
|
395
|
+
"KM",
|
|
396
|
+
"KN",
|
|
397
|
+
"KP",
|
|
398
|
+
"KR",
|
|
399
|
+
"KW",
|
|
400
|
+
"KY",
|
|
401
|
+
"KZ",
|
|
402
|
+
"LA",
|
|
403
|
+
"LB",
|
|
404
|
+
"LC",
|
|
405
|
+
"LI",
|
|
406
|
+
"LK",
|
|
407
|
+
"LR",
|
|
408
|
+
"LS",
|
|
409
|
+
"LT",
|
|
410
|
+
"LU",
|
|
411
|
+
"LV",
|
|
412
|
+
"LY",
|
|
413
|
+
"MA",
|
|
414
|
+
"MC",
|
|
415
|
+
"MD",
|
|
416
|
+
"ME",
|
|
417
|
+
"MF",
|
|
418
|
+
"MG",
|
|
419
|
+
"MH",
|
|
420
|
+
"MK",
|
|
421
|
+
"ML",
|
|
422
|
+
"MM",
|
|
423
|
+
"MN",
|
|
424
|
+
"MO",
|
|
425
|
+
"MP",
|
|
426
|
+
"MQ",
|
|
427
|
+
"MR",
|
|
428
|
+
"MS",
|
|
429
|
+
"MT",
|
|
430
|
+
"MU",
|
|
431
|
+
"MV",
|
|
432
|
+
"MW",
|
|
433
|
+
"MX",
|
|
434
|
+
"MY",
|
|
435
|
+
"MZ",
|
|
436
|
+
"NA",
|
|
437
|
+
"NC",
|
|
438
|
+
"NE",
|
|
439
|
+
"NF",
|
|
440
|
+
"NG",
|
|
441
|
+
"NI",
|
|
442
|
+
"NL",
|
|
443
|
+
"NO",
|
|
444
|
+
"NP",
|
|
445
|
+
"NR",
|
|
446
|
+
"NU",
|
|
447
|
+
"NZ",
|
|
448
|
+
"OM",
|
|
449
|
+
"PA",
|
|
450
|
+
"PE",
|
|
451
|
+
"PF",
|
|
452
|
+
"PG",
|
|
453
|
+
"PH",
|
|
454
|
+
"PK",
|
|
455
|
+
"PL",
|
|
456
|
+
"PM",
|
|
457
|
+
"PN",
|
|
458
|
+
"PR",
|
|
459
|
+
"PS",
|
|
460
|
+
"PT",
|
|
461
|
+
"PW",
|
|
462
|
+
"PY",
|
|
463
|
+
"QA",
|
|
464
|
+
"RE",
|
|
465
|
+
"RO",
|
|
466
|
+
"RS",
|
|
467
|
+
"RU",
|
|
468
|
+
"RW",
|
|
469
|
+
"SA",
|
|
470
|
+
"SB",
|
|
471
|
+
"SC",
|
|
472
|
+
"SD",
|
|
473
|
+
"SE",
|
|
474
|
+
"SG",
|
|
475
|
+
"SH",
|
|
476
|
+
"SI",
|
|
477
|
+
"SJ",
|
|
478
|
+
"SK",
|
|
479
|
+
"SL",
|
|
480
|
+
"SM",
|
|
481
|
+
"SN",
|
|
482
|
+
"SO",
|
|
483
|
+
"SR",
|
|
484
|
+
"SS",
|
|
485
|
+
"ST",
|
|
486
|
+
"SV",
|
|
487
|
+
"SX",
|
|
488
|
+
"SY",
|
|
489
|
+
"SZ",
|
|
490
|
+
"TC",
|
|
491
|
+
"TD",
|
|
492
|
+
"TF",
|
|
493
|
+
"TG",
|
|
494
|
+
"TH",
|
|
495
|
+
"TJ",
|
|
496
|
+
"TK",
|
|
497
|
+
"TL",
|
|
498
|
+
"TM",
|
|
499
|
+
"TN",
|
|
500
|
+
"TO",
|
|
501
|
+
"TR",
|
|
502
|
+
"TT",
|
|
503
|
+
"TV",
|
|
504
|
+
"TW",
|
|
505
|
+
"TZ",
|
|
506
|
+
"UA",
|
|
507
|
+
"UG",
|
|
508
|
+
"US",
|
|
509
|
+
"UY",
|
|
510
|
+
"UZ",
|
|
511
|
+
"VA",
|
|
512
|
+
"VC",
|
|
513
|
+
"VE",
|
|
514
|
+
"VG",
|
|
515
|
+
"VI",
|
|
516
|
+
"VN",
|
|
517
|
+
"VU",
|
|
518
|
+
"WF",
|
|
519
|
+
"WS",
|
|
520
|
+
"XK",
|
|
521
|
+
"YE",
|
|
522
|
+
"YT",
|
|
523
|
+
"ZA",
|
|
524
|
+
"ZM",
|
|
525
|
+
"ZW"
|
|
526
|
+
].map((code) => ({ code, label: regionNames.of(code) })).sort((a, b) => a.label.localeCompare(b.label));
|
|
410
527
|
|
|
411
528
|
// src/deploymentsSlice/constants.ts
|
|
412
529
|
var alreadyInstalled = "already-installed";
|
|
413
|
-
var deploymentsApiUrl = `${apiUrl.v1}/deployments`;
|
|
414
|
-
var deploymentsApiUrlV2 = `${apiUrl.v2}/deployments`;
|
|
415
530
|
var deploymentSubstates = {
|
|
416
531
|
aborted: "aborted",
|
|
417
532
|
alreadyInstalled,
|
|
@@ -484,9 +599,9 @@ var DEPLOYMENT_STATES = {
|
|
|
484
599
|
var listDefaultsByState = {
|
|
485
600
|
[DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
|
|
486
601
|
[DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
|
|
487
|
-
[DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },
|
|
488
|
-
[DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
|
|
489
|
-
sort: { direction: SORTING_OPTIONS.desc }
|
|
602
|
+
[DEPLOYMENT_STATES.scheduled]: { ...import_constants4.DEVICE_LIST_DEFAULTS },
|
|
603
|
+
[DEPLOYMENT_STATES.finished]: { ...import_constants4.DEVICE_LIST_DEFAULTS },
|
|
604
|
+
sort: { direction: import_constants4.SORTING_OPTIONS.desc }
|
|
490
605
|
};
|
|
491
606
|
var DEFAULT_PENDING_INPROGRESS_COUNT = 10;
|
|
492
607
|
var DEPLOYMENT_ROUTES = {
|
|
@@ -543,29 +658,11 @@ var pauseMap = {
|
|
|
543
658
|
followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator
|
|
544
659
|
}
|
|
545
660
|
};
|
|
546
|
-
var limitDefault = { min: 5, max: 100, default: 10 };
|
|
547
661
|
|
|
548
662
|
// src/devicesSlice/constants.ts
|
|
549
|
-
var emptyFilter = { key: null, value: "", operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "inventory" };
|
|
550
|
-
var deviceAuthV2 = `${apiUrl.v2}/devauth`;
|
|
551
|
-
var deviceConnect = `${apiUrl.v1}/deviceconnect`;
|
|
552
|
-
var inventoryApiUrl = `${apiUrl.v1}/inventory`;
|
|
553
|
-
var inventoryApiUrlV2 = `${apiUrl.v2}/inventory`;
|
|
554
|
-
var deviceConfig = `${apiUrl.v1}/deviceconfig/configurations/device`;
|
|
555
|
-
var reportingApiUrl = `${apiUrl.v1}/reporting`;
|
|
556
|
-
var iotManagerBaseURL = `${apiUrl.v1}/iot-manager`;
|
|
557
|
-
var DEVICE_STATES = {
|
|
558
|
-
accepted: "accepted",
|
|
559
|
-
pending: "pending",
|
|
560
|
-
preauth: "preauthorized",
|
|
561
|
-
rejected: "rejected"
|
|
562
|
-
};
|
|
663
|
+
var emptyFilter = { key: null, value: "", operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "inventory" };
|
|
563
664
|
var geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({ attribute, scope: "inventory" }));
|
|
564
665
|
|
|
565
|
-
// src/monitorSlice/constants.ts
|
|
566
|
-
var alertChannels = { email: "email" };
|
|
567
|
-
var monitorApiUrlv1 = `${apiUrl.v1}/devicemonitor`;
|
|
568
|
-
|
|
569
666
|
// src/onboardingSlice/constants.ts
|
|
570
667
|
var onboardingSteps = {
|
|
571
668
|
ONBOARDING_START: "onboarding-start",
|
|
@@ -582,6 +679,7 @@ var onboardingSteps = {
|
|
|
582
679
|
SCHEDULING_GROUP_SELECTION: "scheduling-group-selection",
|
|
583
680
|
SCHEDULING_RELEASE_TO_DEVICES: "scheduling-release-to-devices",
|
|
584
681
|
DEPLOYMENTS_INPROGRESS: "deployments-inprogress",
|
|
682
|
+
DEPLOYMENTS_COMPLETED: "deployments-completed",
|
|
585
683
|
DEPLOYMENTS_PAST: "deployments-past",
|
|
586
684
|
DEPLOYMENTS_PAST_COMPLETED: "deployments-past-completed",
|
|
587
685
|
DEPLOYMENTS_PAST_COMPLETED_FAILURE: "deployments-past-completed-failure",
|
|
@@ -608,10 +706,6 @@ var orderedOnboardingSteps = [
|
|
|
608
706
|
];
|
|
609
707
|
|
|
610
708
|
// src/organizationSlice/constants.ts
|
|
611
|
-
var auditLogsApiUrl = `${apiUrl.v1}/auditlogs`;
|
|
612
|
-
var tenantadmApiUrlv1 = `${apiUrl.v1}/tenantadm`;
|
|
613
|
-
var tenantadmApiUrlv2 = `${apiUrl.v2}/tenantadm`;
|
|
614
|
-
var ssoIdpApiUrlv1 = `${apiUrl.v1}/useradm/sso/idp/metadata`;
|
|
615
709
|
var auditlogTypes = {
|
|
616
710
|
artifact: { title: "Artifact", queryParameter: "object_type", value: "artifact" },
|
|
617
711
|
deployment: { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
|
|
@@ -622,17 +716,6 @@ var auditlogTypes = {
|
|
|
622
716
|
};
|
|
623
717
|
var AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];
|
|
624
718
|
var SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
|
|
625
|
-
var emptyWebhook = {
|
|
626
|
-
description: "",
|
|
627
|
-
enabled: true,
|
|
628
|
-
credentials: {
|
|
629
|
-
type: EXTERNAL_PROVIDER.webhook.credentialsType,
|
|
630
|
-
[EXTERNAL_PROVIDER.webhook.credentialsType]: {
|
|
631
|
-
secret: "",
|
|
632
|
-
url: ""
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
};
|
|
636
719
|
var TENANT_LIST_DEFAULT = {
|
|
637
720
|
page: 1,
|
|
638
721
|
perPage: 20
|
|
@@ -644,385 +727,7 @@ var rootfsImageVersion = "rootfs-image.version";
|
|
|
644
727
|
var softwareTitleMap = { [rootfsImageVersion]: { title: "Root filesystem", priority: 0, key: rootfsImageVersion } };
|
|
645
728
|
|
|
646
729
|
// src/usersSlice/constants.ts
|
|
647
|
-
var useradmApiUrlv1 = `${apiUrl.v1}/useradm`;
|
|
648
|
-
var useradmApiUrlv2 = `${apiUrl.v2}/useradm`;
|
|
649
|
-
var staticRolesByName = {
|
|
650
|
-
admin: "RBAC_ROLE_PERMIT_ALL",
|
|
651
|
-
readOnly: "RBAC_ROLE_OBSERVER",
|
|
652
|
-
ci: "RBAC_ROLE_CI",
|
|
653
|
-
deploymentsManager: "RBAC_ROLE_DEPLOYMENTS_MANAGER",
|
|
654
|
-
terminalAccess: "RBAC_ROLE_REMOTE_TERMINAL"
|
|
655
|
-
};
|
|
656
|
-
var PermissionTypes = {
|
|
657
|
-
Any: "any",
|
|
658
|
-
Get: "GET",
|
|
659
|
-
Post: "POST",
|
|
660
|
-
Put: "PUT",
|
|
661
|
-
Delete: "DELETE",
|
|
662
|
-
Patch: "PATCH",
|
|
663
|
-
DeviceGroup: "DEVICE_GROUP",
|
|
664
|
-
DeviceId: "DEVICE_ID"
|
|
665
|
-
};
|
|
666
|
-
var permissionSetIds = {
|
|
667
|
-
Basic: "Basic",
|
|
668
|
-
ConfigureDevices: "ConfigureDevices",
|
|
669
|
-
ConnectToDevices: "ConnectToDevices",
|
|
670
|
-
DeployToDevices: "DeployToDevices",
|
|
671
|
-
ManageDevices: "ManageDevices",
|
|
672
|
-
ManageReleases: "ManageReleases",
|
|
673
|
-
ManageTenants: "ManageTenants",
|
|
674
|
-
ManageUsers: "ManageUsers",
|
|
675
|
-
ReadAuditLogs: "ReadAuditLogs",
|
|
676
|
-
ReadDevices: "ReadDevices",
|
|
677
|
-
ReadReleases: "ReadReleases",
|
|
678
|
-
ReadTenants: "ReadTenants",
|
|
679
|
-
ReadUsers: "ReadUsers",
|
|
680
|
-
SuperUser: "SuperUser",
|
|
681
|
-
UploadArtifacts: "UploadArtifacts"
|
|
682
|
-
};
|
|
683
|
-
var uiPermissionsById = {
|
|
684
|
-
configure: {
|
|
685
|
-
explanations: { groups: `'Configure' allows the user to use mender-configure features and apply configurations.` },
|
|
686
|
-
permissionLevel: 2,
|
|
687
|
-
permissionSets: { groups: permissionSetIds.ConfigureDevices },
|
|
688
|
-
title: "Configure",
|
|
689
|
-
value: "configure",
|
|
690
|
-
verbs: [PermissionTypes.Get, PermissionTypes.Put, PermissionTypes.Post]
|
|
691
|
-
},
|
|
692
|
-
connect: {
|
|
693
|
-
explanations: { groups: `'Connect' allows the user to use mender-connect features and Troubleshoot add-ons.` },
|
|
694
|
-
permissionLevel: 2,
|
|
695
|
-
permissionSets: { groups: permissionSetIds.ConnectToDevices },
|
|
696
|
-
title: "Connect",
|
|
697
|
-
value: "connect",
|
|
698
|
-
verbs: [PermissionTypes.Get, PermissionTypes.Put]
|
|
699
|
-
},
|
|
700
|
-
deploy: {
|
|
701
|
-
explanations: { groups: `'Deploy' allows the user to deploy software or configuration updates to devices.` },
|
|
702
|
-
permissionLevel: 2,
|
|
703
|
-
permissionSets: { deployments: permissionSetIds.DeployToDevices, groups: permissionSetIds.DeployToDevices },
|
|
704
|
-
title: "Deploy",
|
|
705
|
-
value: "deploy",
|
|
706
|
-
verbs: [PermissionTypes.Post]
|
|
707
|
-
},
|
|
708
|
-
manage: {
|
|
709
|
-
explanations: {
|
|
710
|
-
groups: `'Manage' allows the user to edit device name, notes, and manage authentication status. For 'All devices' it also allows the user to edit and create device groups.`,
|
|
711
|
-
releases: `'Manage' allows the user to upload new artifacts, edit release descriptions and remove artifacts.`
|
|
712
|
-
},
|
|
713
|
-
permissionLevel: 2,
|
|
714
|
-
permissionSets: {
|
|
715
|
-
groups: permissionSetIds.ManageDevices,
|
|
716
|
-
releases: permissionSetIds.ManageReleases,
|
|
717
|
-
tenantManagement: permissionSetIds.ManageTenants,
|
|
718
|
-
userManagement: permissionSetIds.ManageUsers
|
|
719
|
-
},
|
|
720
|
-
title: "Manage",
|
|
721
|
-
value: "manage",
|
|
722
|
-
verbs: [PermissionTypes.Post, PermissionTypes.Put, PermissionTypes.Patch]
|
|
723
|
-
},
|
|
724
|
-
read: {
|
|
725
|
-
explanations: { groups: `'Read' allows the user to view devices.` },
|
|
726
|
-
permissionLevel: 1,
|
|
727
|
-
permissionSets: {
|
|
728
|
-
auditlog: permissionSetIds.ReadAuditLogs,
|
|
729
|
-
groups: permissionSetIds.ReadDevices,
|
|
730
|
-
releases: permissionSetIds.ReadReleases,
|
|
731
|
-
tenantManagement: permissionSetIds.ReadTenants,
|
|
732
|
-
userManagement: permissionSetIds.ReadUsers
|
|
733
|
-
},
|
|
734
|
-
title: "Read",
|
|
735
|
-
value: "read",
|
|
736
|
-
verbs: [PermissionTypes.Get, PermissionTypes.Post]
|
|
737
|
-
},
|
|
738
|
-
upload: {
|
|
739
|
-
explanations: { groups: `'Upload' allows the user to upload new Artifacts.` },
|
|
740
|
-
unscopedOnly: { releases: true },
|
|
741
|
-
permissionLevel: 1,
|
|
742
|
-
permissionSets: { releases: permissionSetIds.UploadArtifacts },
|
|
743
|
-
title: "Upload",
|
|
744
|
-
value: "upload",
|
|
745
|
-
verbs: [PermissionTypes.Post, PermissionTypes.Put, PermissionTypes.Patch]
|
|
746
|
-
}
|
|
747
|
-
};
|
|
748
|
-
var scopedPermissionAreas = {
|
|
749
|
-
groups: { key: "groups", excessiveAccessSelector: ALL_DEVICES, scopeType: "DeviceGroups" },
|
|
750
|
-
releases: { key: "releases", excessiveAccessSelector: ALL_RELEASES, scopeType: "Releases" }
|
|
751
|
-
};
|
|
752
|
-
var uiPermissionsByArea = {
|
|
753
|
-
auditlog: {
|
|
754
|
-
endpoints: [{ path: /\/(auditlog)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] }],
|
|
755
|
-
explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
|
|
756
|
-
key: "auditlog",
|
|
757
|
-
uiPermissions: [uiPermissionsById.read],
|
|
758
|
-
title: "System Audit Log"
|
|
759
|
-
},
|
|
760
|
-
deployments: {
|
|
761
|
-
endpoints: [
|
|
762
|
-
{ path: /\/(deployments\/deployments)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.deploy] },
|
|
763
|
-
{ path: /\/(deployments\/deployments)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
|
|
764
|
-
{ path: /\/(deployments\/config)/i, types: [PermissionTypes.Get, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] }
|
|
765
|
-
],
|
|
766
|
-
explanation: "Providing deploy permissions will allow deployments to be created using the releases and devices a user has access to.",
|
|
767
|
-
key: "deployments",
|
|
768
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.deploy],
|
|
769
|
-
title: "Deployments"
|
|
770
|
-
},
|
|
771
|
-
groups: {
|
|
772
|
-
endpoints: [
|
|
773
|
-
{
|
|
774
|
-
path: /\/(devauth|inventory|deviceconfig|devicemonitor|deviceconnect\/devices)/i,
|
|
775
|
-
types: [PermissionTypes.Get],
|
|
776
|
-
uiPermissions: [uiPermissionsById.read]
|
|
777
|
-
},
|
|
778
|
-
{ path: /\/(devauth|inventory)/i, types: [PermissionTypes.Put, PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] },
|
|
779
|
-
{ path: /\/(deviceconfig)/i, types: [PermissionTypes.Get, PermissionTypes.Put, PermissionTypes.Post], uiPermissions: [uiPermissionsById.configure] },
|
|
780
|
-
{ path: /\/(deviceconnect\/devices)/i, types: [PermissionTypes.Get, PermissionTypes.Post], uiPermissions: [uiPermissionsById.connect] }
|
|
781
|
-
],
|
|
782
|
-
explanation: "Device group management permissions control the degree to which devices in a group can be accessed and moved to other groups.",
|
|
783
|
-
key: "groups",
|
|
784
|
-
scope: scopedPermissionAreas.groups.scopeType,
|
|
785
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.deploy, uiPermissionsById.configure, uiPermissionsById.connect],
|
|
786
|
-
title: "Group Management"
|
|
787
|
-
},
|
|
788
|
-
releases: {
|
|
789
|
-
endpoints: [
|
|
790
|
-
{ path: /\/(deployments\/artifacts|deployments\/deployments\/releases)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
|
|
791
|
-
{
|
|
792
|
-
path: /\/(deployments\/artifacts|deployments\/deployments\/releases)/i,
|
|
793
|
-
types: [PermissionTypes.Post, PermissionTypes.Put],
|
|
794
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.upload]
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
path: /\/(deployments\/artifacts|deployments\/deployments\/releases)/i,
|
|
798
|
-
types: [PermissionTypes.Delete],
|
|
799
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage]
|
|
800
|
-
}
|
|
801
|
-
],
|
|
802
|
-
explanation: "Release permissions can be granted to allow artifact & release modifications, as well as the creation of new releases.",
|
|
803
|
-
key: "releases",
|
|
804
|
-
scope: "ReleaseTags",
|
|
805
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.upload],
|
|
806
|
-
title: "Release Management"
|
|
807
|
-
},
|
|
808
|
-
tenantManagement: {
|
|
809
|
-
endpoints: [
|
|
810
|
-
{ path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
|
|
811
|
-
{ path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] },
|
|
812
|
-
{ path: /\/(users\/exists)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.manage] }
|
|
813
|
-
],
|
|
814
|
-
explanation: "Tenant management permissions allow listing, creating and modifying child tenants",
|
|
815
|
-
key: "tenantManagement",
|
|
816
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
|
|
817
|
-
title: "Tenant Management"
|
|
818
|
-
},
|
|
819
|
-
userManagement: {
|
|
820
|
-
endpoints: [
|
|
821
|
-
{ path: /\/(useradm)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
|
|
822
|
-
{ path: /\/(useradm)/i, types: [PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] }
|
|
823
|
-
],
|
|
824
|
-
explanation: "User management permissions should be granted carefully, as these allow privilege increases for any users managed by a user with user management permissions",
|
|
825
|
-
key: "userManagement",
|
|
826
|
-
uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
|
|
827
|
-
title: "User Management"
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
var permissionMapper = (permission) => permission.value;
|
|
831
|
-
var rolesById = Object.freeze({
|
|
832
|
-
[staticRolesByName.admin]: {
|
|
833
|
-
name: "Admin",
|
|
834
|
-
value: staticRolesByName.admin,
|
|
835
|
-
description: "Full access",
|
|
836
|
-
permissions: [],
|
|
837
|
-
// permissions refers to the values returned from the backend
|
|
838
|
-
uiPermissions: {
|
|
839
|
-
...emptyUiPermissions,
|
|
840
|
-
auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
|
|
841
|
-
deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
|
|
842
|
-
groups: { [ALL_DEVICES]: uiPermissionsByArea.groups.uiPermissions.map(permissionMapper) },
|
|
843
|
-
releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) },
|
|
844
|
-
userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper)
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
[staticRolesByName.readOnly]: {
|
|
848
|
-
name: "Read Access",
|
|
849
|
-
value: staticRolesByName.readOnly,
|
|
850
|
-
description: "",
|
|
851
|
-
permissions: [],
|
|
852
|
-
uiPermissions: {
|
|
853
|
-
...emptyUiPermissions,
|
|
854
|
-
deployments: [uiPermissionsById.read.value],
|
|
855
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] },
|
|
856
|
-
releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] },
|
|
857
|
-
userManagement: [uiPermissionsById.read.value]
|
|
858
|
-
}
|
|
859
|
-
},
|
|
860
|
-
[staticRolesByName.ci]: {
|
|
861
|
-
name: "Releases Manager",
|
|
862
|
-
value: staticRolesByName.ci,
|
|
863
|
-
description: "",
|
|
864
|
-
permissions: [],
|
|
865
|
-
uiPermissions: {
|
|
866
|
-
...emptyUiPermissions,
|
|
867
|
-
releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) }
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
[staticRolesByName.deploymentsManager]: {
|
|
871
|
-
name: "Deployments Manager",
|
|
872
|
-
value: staticRolesByName.deploymentsManager,
|
|
873
|
-
description: "",
|
|
874
|
-
permissions: [],
|
|
875
|
-
uiPermissions: {
|
|
876
|
-
...emptyUiPermissions,
|
|
877
|
-
deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
|
|
878
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.deploy.value, uiPermissionsById.read.value] },
|
|
879
|
-
releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
|
|
880
|
-
}
|
|
881
|
-
},
|
|
882
|
-
[staticRolesByName.terminalAccess]: {
|
|
883
|
-
name: "Troubleshooting",
|
|
884
|
-
value: staticRolesByName.terminalAccess,
|
|
885
|
-
description: "Access to the troubleshooting features: Remote Terminal, File Transfer, Port Forwarding",
|
|
886
|
-
permissions: [],
|
|
887
|
-
uiPermissions: {
|
|
888
|
-
...emptyUiPermissions,
|
|
889
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.connect.value] }
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
});
|
|
893
|
-
var serviceProviderRolesById = {
|
|
894
|
-
admin: {
|
|
895
|
-
name: "Admin",
|
|
896
|
-
value: staticRolesByName.admin,
|
|
897
|
-
description: "Full access",
|
|
898
|
-
permissions: [],
|
|
899
|
-
uiPermissions: {
|
|
900
|
-
...emptyUiPermissions,
|
|
901
|
-
auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
|
|
902
|
-
userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper),
|
|
903
|
-
tenantManagement: uiPermissionsByArea.tenantManagement.uiPermissions.map(permissionMapper)
|
|
904
|
-
}
|
|
905
|
-
},
|
|
906
|
-
readOnly: {
|
|
907
|
-
name: "Read access",
|
|
908
|
-
value: staticRolesByName.readOnly,
|
|
909
|
-
description: "This role can see all linked organizations but cannot make any changes",
|
|
910
|
-
permissions: [],
|
|
911
|
-
uiPermissions: {
|
|
912
|
-
...emptyUiPermissions,
|
|
913
|
-
auditlog: [uiPermissionsById.read.value],
|
|
914
|
-
userManagement: [uiPermissionsById.read.value],
|
|
915
|
-
tenantManagement: [uiPermissionsById.read.value]
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
var defaultPermissionSets = {
|
|
920
|
-
[permissionSetIds.Basic]: {
|
|
921
|
-
name: permissionSetIds.Basic,
|
|
922
|
-
result: {
|
|
923
|
-
// this is needed to prevent the detailed permissions of the basic permission set from being interpreted as allowing read & management access to user endpoints
|
|
924
|
-
userManagement: [uiPermissionsById.read.value]
|
|
925
|
-
}
|
|
926
|
-
},
|
|
927
|
-
[permissionSetIds.SuperUser]: {
|
|
928
|
-
name: permissionSetIds.SuperUser,
|
|
929
|
-
result: {
|
|
930
|
-
...rolesById[staticRolesByName.admin].uiPermissions
|
|
931
|
-
}
|
|
932
|
-
},
|
|
933
|
-
[permissionSetIds.ManageUsers]: {
|
|
934
|
-
name: permissionSetIds.ManageUsers,
|
|
935
|
-
result: {
|
|
936
|
-
userManagement: [uiPermissionsById.manage.value]
|
|
937
|
-
}
|
|
938
|
-
},
|
|
939
|
-
[permissionSetIds.ReadAuditLogs]: {
|
|
940
|
-
name: permissionSetIds.ReadAuditLogs,
|
|
941
|
-
result: {
|
|
942
|
-
auditlog: [uiPermissionsById.read.value]
|
|
943
|
-
}
|
|
944
|
-
},
|
|
945
|
-
[permissionSetIds.ReadReleases]: {
|
|
946
|
-
name: permissionSetIds.ReadReleases,
|
|
947
|
-
result: {
|
|
948
|
-
releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
|
|
949
|
-
}
|
|
950
|
-
},
|
|
951
|
-
[permissionSetIds.ReadTenants]: {
|
|
952
|
-
name: permissionSetIds.ReadTenants,
|
|
953
|
-
result: {
|
|
954
|
-
tenantManagement: [uiPermissionsById.read.value]
|
|
955
|
-
}
|
|
956
|
-
},
|
|
957
|
-
[permissionSetIds.ManageTenants]: {
|
|
958
|
-
name: permissionSetIds.ManageTenants,
|
|
959
|
-
result: {
|
|
960
|
-
tenantManagement: [uiPermissionsById.manage.value]
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
[permissionSetIds.ReadUsers]: {
|
|
964
|
-
name: permissionSetIds.ReadUsers,
|
|
965
|
-
result: {
|
|
966
|
-
userManagement: [uiPermissionsById.read.value]
|
|
967
|
-
}
|
|
968
|
-
},
|
|
969
|
-
[permissionSetIds.UploadArtifacts]: {
|
|
970
|
-
name: permissionSetIds.UploadArtifacts,
|
|
971
|
-
result: {
|
|
972
|
-
releases: { [ALL_RELEASES]: [uiPermissionsById.upload.value] }
|
|
973
|
-
}
|
|
974
|
-
},
|
|
975
|
-
[permissionSetIds.ManageReleases]: {
|
|
976
|
-
name: permissionSetIds.ManageReleases,
|
|
977
|
-
result: {
|
|
978
|
-
releases: { [ALL_RELEASES]: [uiPermissionsById.manage.value] }
|
|
979
|
-
}
|
|
980
|
-
},
|
|
981
|
-
[permissionSetIds.ConfigureDevices]: {
|
|
982
|
-
name: permissionSetIds.ConfigureDevices,
|
|
983
|
-
result: {
|
|
984
|
-
deployments: [uiPermissionsById.read.value, uiPermissionsById.deploy.value],
|
|
985
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.configure.value] }
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
|
-
[permissionSetIds.ConnectToDevices]: {
|
|
989
|
-
name: permissionSetIds.ConnectToDevices,
|
|
990
|
-
result: {
|
|
991
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.connect.value] }
|
|
992
|
-
}
|
|
993
|
-
},
|
|
994
|
-
[permissionSetIds.DeployToDevices]: {
|
|
995
|
-
name: permissionSetIds.DeployToDevices,
|
|
996
|
-
result: {
|
|
997
|
-
deployments: [uiPermissionsById.deploy.value, uiPermissionsById.manage.value, uiPermissionsById.read.value],
|
|
998
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.deploy.value] }
|
|
999
|
-
}
|
|
1000
|
-
},
|
|
1001
|
-
[permissionSetIds.ManageDevices]: {
|
|
1002
|
-
name: permissionSetIds.ManageDevices,
|
|
1003
|
-
result: {
|
|
1004
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.manage.value] }
|
|
1005
|
-
}
|
|
1006
|
-
},
|
|
1007
|
-
[permissionSetIds.ReadDevices]: {
|
|
1008
|
-
name: permissionSetIds.ReadDevices,
|
|
1009
|
-
result: {
|
|
1010
|
-
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] }
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
730
|
var USER_LOGOUT = "USER_LOGOUT";
|
|
1015
|
-
var rolesByName = {
|
|
1016
|
-
...staticRolesByName,
|
|
1017
|
-
deploymentCreation: { action: "CREATE_DEPLOYMENT", object: { type: "DEVICE_GROUP", value: void 0 } },
|
|
1018
|
-
groupAccess: { action: "VIEW_DEVICE", object: { type: "DEVICE_GROUP", value: void 0 } },
|
|
1019
|
-
userManagement: { action: "http", object: { type: "any", value: `${useradmApiUrlv1}/.*` } }
|
|
1020
|
-
};
|
|
1021
|
-
var twoFAStates = {
|
|
1022
|
-
enabled: "enabled",
|
|
1023
|
-
disabled: "disabled",
|
|
1024
|
-
unverified: "unverified"
|
|
1025
|
-
};
|
|
1026
731
|
var settingsKeys = { initialized: "settings-initialized" };
|
|
1027
732
|
var READ_STATES = {
|
|
1028
733
|
read: "read",
|
|
@@ -1030,27 +735,122 @@ var READ_STATES = {
|
|
|
1030
735
|
unread: "unread"
|
|
1031
736
|
};
|
|
1032
737
|
|
|
738
|
+
// src/releasesSlice/index.ts
|
|
739
|
+
var sliceName = "releases";
|
|
740
|
+
var initialState = {
|
|
741
|
+
/*
|
|
742
|
+
* Return list of saved artifacts objects
|
|
743
|
+
*/
|
|
744
|
+
/*
|
|
745
|
+
* return list of artifacts where duplicate names are collated with device compatibility lists combined
|
|
746
|
+
*/
|
|
747
|
+
// artifacts: AppStore.getCollatedArtifacts(AppStore.getArtifactsRepo()),
|
|
748
|
+
artifacts: [],
|
|
749
|
+
/*
|
|
750
|
+
* Return list of saved release objects
|
|
751
|
+
*/
|
|
752
|
+
byId: {
|
|
753
|
+
/*
|
|
754
|
+
[releaseName]: {
|
|
755
|
+
artifacts: [
|
|
756
|
+
{
|
|
757
|
+
id: '',
|
|
758
|
+
name: '',
|
|
759
|
+
description: '',
|
|
760
|
+
device_types_compatible: [],
|
|
761
|
+
...
|
|
762
|
+
updates: [{
|
|
763
|
+
files: [
|
|
764
|
+
{ size: 123, name: '' }
|
|
765
|
+
],
|
|
766
|
+
type_info: { type: '' }
|
|
767
|
+
}],
|
|
768
|
+
url: '' // optional
|
|
769
|
+
}
|
|
770
|
+
],
|
|
771
|
+
modified: ''
|
|
772
|
+
device_types_compatible,
|
|
773
|
+
name: '',
|
|
774
|
+
tags: ['something'],
|
|
775
|
+
notes: ''
|
|
776
|
+
}
|
|
777
|
+
*/
|
|
778
|
+
},
|
|
779
|
+
releasesList: {
|
|
780
|
+
...import_constants4.DEVICE_LIST_DEFAULTS,
|
|
781
|
+
searchedIds: [],
|
|
782
|
+
releaseIds: [],
|
|
783
|
+
selection: [],
|
|
784
|
+
sort: {
|
|
785
|
+
direction: import_constants4.SORTING_OPTIONS.desc,
|
|
786
|
+
key: "modified"
|
|
787
|
+
},
|
|
788
|
+
isLoading: void 0,
|
|
789
|
+
searchTerm: "",
|
|
790
|
+
searchTotal: 0,
|
|
791
|
+
selectedTags: [],
|
|
792
|
+
total: 0,
|
|
793
|
+
type: ""
|
|
794
|
+
},
|
|
795
|
+
tags: [],
|
|
796
|
+
updateTypes: [],
|
|
797
|
+
/*
|
|
798
|
+
* Return single release with corresponding Artifacts
|
|
799
|
+
*/
|
|
800
|
+
selectedRelease: null
|
|
801
|
+
};
|
|
802
|
+
var releaseSlice = (0, import_toolkit.createSlice)({
|
|
803
|
+
name: sliceName,
|
|
804
|
+
initialState,
|
|
805
|
+
reducers: {
|
|
806
|
+
receiveRelease: (state, action) => {
|
|
807
|
+
const { name } = action.payload;
|
|
808
|
+
state.byId[name] = action.payload;
|
|
809
|
+
},
|
|
810
|
+
receiveReleases: (state, action) => {
|
|
811
|
+
state.byId = action.payload;
|
|
812
|
+
},
|
|
813
|
+
receiveReleaseTags: (state, action) => {
|
|
814
|
+
state.tags = action.payload;
|
|
815
|
+
},
|
|
816
|
+
receiveReleaseTypes: (state, action) => {
|
|
817
|
+
state.updateTypes = action.payload;
|
|
818
|
+
},
|
|
819
|
+
removeRelease: (state, action) => {
|
|
820
|
+
const { [action.payload]: toBeRemoved, ...byId } = state.byId;
|
|
821
|
+
state.byId = byId;
|
|
822
|
+
state.selectedRelease = action.payload === state.selectedRelease ? null : state.selectedRelease;
|
|
823
|
+
},
|
|
824
|
+
selectedRelease: (state, action) => {
|
|
825
|
+
state.selectedRelease = action.payload;
|
|
826
|
+
},
|
|
827
|
+
setReleaseListState: (state, action) => {
|
|
828
|
+
state.releasesList = action.payload;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
var actions = releaseSlice.actions;
|
|
833
|
+
var releasesSlice_default = releaseSlice.reducer;
|
|
834
|
+
|
|
1033
835
|
// src/appSlice/index.ts
|
|
1034
|
-
var
|
|
1035
|
-
var
|
|
836
|
+
var import_toolkit2 = require("@reduxjs/toolkit");
|
|
837
|
+
var sliceName2 = "app";
|
|
1036
838
|
var getYesterday = () => {
|
|
1037
839
|
const today = /* @__PURE__ */ new Date();
|
|
1038
840
|
today.setDate(today.getDate() - 1);
|
|
1039
841
|
return today.toISOString();
|
|
1040
842
|
};
|
|
1041
|
-
var
|
|
843
|
+
var initialState2 = {
|
|
1042
844
|
cancelSource: void 0,
|
|
845
|
+
commit: "",
|
|
1043
846
|
demoArtifactLink: "https://dgsbl4vditpls.cloudfront.net/mender-demo-artifact.mender",
|
|
1044
847
|
hostAddress: null,
|
|
1045
848
|
snackbar: {
|
|
1046
|
-
open: false,
|
|
1047
|
-
message: "",
|
|
1048
|
-
maxWidth: 900,
|
|
1049
|
-
autoHideDuration: void 0,
|
|
1050
849
|
action: void 0,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
850
|
+
autoHideDuration: void 0,
|
|
851
|
+
message: "",
|
|
852
|
+
open: false,
|
|
853
|
+
preventClickToCopy: false
|
|
1054
854
|
},
|
|
1055
855
|
// return boolean rather than organization details
|
|
1056
856
|
features: {
|
|
@@ -1063,7 +863,7 @@ var initialState = {
|
|
|
1063
863
|
hasMonitor: false,
|
|
1064
864
|
hasReporting: false,
|
|
1065
865
|
isDemoMode: false,
|
|
1066
|
-
isHosted:
|
|
866
|
+
isHosted: true,
|
|
1067
867
|
isEnterprise: false
|
|
1068
868
|
},
|
|
1069
869
|
feedbackProbability: 0.3,
|
|
@@ -1075,16 +875,22 @@ var initialState = {
|
|
|
1075
875
|
deviceIds: [],
|
|
1076
876
|
searchTerm: "",
|
|
1077
877
|
searchTotal: 0,
|
|
878
|
+
isSearching: false,
|
|
1078
879
|
sort: {
|
|
1079
|
-
direction: SORTING_OPTIONS.desc
|
|
880
|
+
direction: import_constants4.SORTING_OPTIONS.desc
|
|
1080
881
|
// key: null,
|
|
1081
882
|
// scope: null
|
|
1082
883
|
}
|
|
1083
884
|
},
|
|
885
|
+
sentry: {
|
|
886
|
+
location: "",
|
|
887
|
+
replaysSessionSampleRate: 0.1,
|
|
888
|
+
tracesSampleRate: 1
|
|
889
|
+
},
|
|
1084
890
|
stripeAPIKey: "",
|
|
1085
891
|
trackerCode: "",
|
|
1086
892
|
uploadsById: {
|
|
1087
|
-
// id: {
|
|
893
|
+
// id: { progress: 0, cancelSource: undefined }
|
|
1088
894
|
},
|
|
1089
895
|
newThreshold: getYesterday(),
|
|
1090
896
|
offlineThreshold: getYesterday(),
|
|
@@ -1092,17 +898,13 @@ var initialState = {
|
|
|
1092
898
|
Integration: "",
|
|
1093
899
|
"Mender-Client": "",
|
|
1094
900
|
"Mender-Artifact": "",
|
|
1095
|
-
"Meta-Mender": ""
|
|
1096
|
-
Deployments: "",
|
|
1097
|
-
Deviceauth: "",
|
|
1098
|
-
Inventory: "",
|
|
1099
|
-
GUI: "latest"
|
|
901
|
+
"Meta-Mender": ""
|
|
1100
902
|
},
|
|
1101
903
|
yesterday: void 0
|
|
1102
904
|
};
|
|
1103
|
-
var appSlice = (0,
|
|
1104
|
-
name:
|
|
1105
|
-
initialState,
|
|
905
|
+
var appSlice = (0, import_toolkit2.createSlice)({
|
|
906
|
+
name: sliceName2,
|
|
907
|
+
initialState: initialState2,
|
|
1106
908
|
reducers: {
|
|
1107
909
|
setFeatures: (state, action) => {
|
|
1108
910
|
state.features = {
|
|
@@ -1111,19 +913,17 @@ var appSlice = (0, import_toolkit.createSlice)({
|
|
|
1111
913
|
};
|
|
1112
914
|
},
|
|
1113
915
|
setSnackbar: (state, { payload }) => {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
916
|
+
if (typeof payload === "string") {
|
|
917
|
+
state.snackbar.message = payload;
|
|
918
|
+
return;
|
|
1117
919
|
}
|
|
920
|
+
const { message, autoHideDuration, action, preventClickToCopy = false } = payload;
|
|
1118
921
|
state.snackbar = {
|
|
1119
|
-
open: message ? true : false,
|
|
1120
922
|
message,
|
|
1121
|
-
maxWidth: 900,
|
|
1122
923
|
autoHideDuration,
|
|
1123
924
|
action,
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
onClose
|
|
925
|
+
preventClickToCopy,
|
|
926
|
+
open: !!message
|
|
1127
927
|
};
|
|
1128
928
|
},
|
|
1129
929
|
setFirstLoginAfterSignup: (state, action) => {
|
|
@@ -1162,18 +962,16 @@ var appSlice = (0, import_toolkit.createSlice)({
|
|
|
1162
962
|
...action.payload
|
|
1163
963
|
};
|
|
1164
964
|
},
|
|
1165
|
-
setEnvironmentData: (state, action) => {
|
|
1166
|
-
return { ...state, ...action.payload };
|
|
1167
|
-
}
|
|
965
|
+
setEnvironmentData: (state, action) => ({ ...state, ...action.payload })
|
|
1168
966
|
}
|
|
1169
967
|
});
|
|
1170
|
-
var
|
|
968
|
+
var actions2 = appSlice.actions;
|
|
1171
969
|
var appSlice_default = appSlice.reducer;
|
|
1172
970
|
|
|
1173
971
|
// src/deploymentsSlice/index.ts
|
|
1174
|
-
var
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
972
|
+
var import_toolkit3 = require("@reduxjs/toolkit");
|
|
973
|
+
var sliceName3 = "deployments";
|
|
974
|
+
var initialState3 = {
|
|
1177
975
|
byId: {
|
|
1178
976
|
// [id]: { statistics: { status: {}, total_size }, devices: { [deploymentId]: { id, log } }, totalDeviceCount }
|
|
1179
977
|
},
|
|
@@ -1195,20 +993,20 @@ var initialState2 = {
|
|
|
1195
993
|
sourceWindow: -1
|
|
1196
994
|
},
|
|
1197
995
|
binaryDeltaLimits: {
|
|
1198
|
-
timeout: { ...limitDefault, default: 60, max: 3600, min: 60 },
|
|
1199
|
-
sourceWindow: limitDefault,
|
|
1200
|
-
inputWindow: limitDefault,
|
|
1201
|
-
duplicatesWindow: limitDefault,
|
|
1202
|
-
instructionBuffer: limitDefault
|
|
996
|
+
timeout: { ...import_constants4.limitDefault, default: 60, max: 3600, min: 60 },
|
|
997
|
+
sourceWindow: import_constants4.limitDefault,
|
|
998
|
+
inputWindow: import_constants4.limitDefault,
|
|
999
|
+
duplicatesWindow: import_constants4.limitDefault,
|
|
1000
|
+
instructionBuffer: import_constants4.limitDefault
|
|
1203
1001
|
}
|
|
1204
1002
|
},
|
|
1205
1003
|
deploymentDeviceLimit: 5e3,
|
|
1206
1004
|
selectedDeviceIds: [],
|
|
1207
1005
|
selectionState: {
|
|
1208
|
-
finished: { ...DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
|
|
1209
|
-
inprogress: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
|
|
1210
|
-
pending: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
|
|
1211
|
-
scheduled: { ...DEVICE_LIST_DEFAULTS, selection: [] },
|
|
1006
|
+
finished: { ...import_constants4.DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
|
|
1007
|
+
inprogress: { ...import_constants4.DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
|
|
1008
|
+
pending: { ...import_constants4.DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
|
|
1009
|
+
scheduled: { ...import_constants4.DEVICE_LIST_DEFAULTS, selection: [] },
|
|
1212
1010
|
general: {
|
|
1213
1011
|
state: DEPLOYMENT_ROUTES.active.key,
|
|
1214
1012
|
showCreationDialog: false,
|
|
@@ -1219,9 +1017,9 @@ var initialState2 = {
|
|
|
1219
1017
|
selectedId: void 0
|
|
1220
1018
|
}
|
|
1221
1019
|
};
|
|
1222
|
-
var deploymentsSlice = (0,
|
|
1223
|
-
name:
|
|
1224
|
-
initialState:
|
|
1020
|
+
var deploymentsSlice = (0, import_toolkit3.createSlice)({
|
|
1021
|
+
name: sliceName3,
|
|
1022
|
+
initialState: initialState3,
|
|
1225
1023
|
reducers: {
|
|
1226
1024
|
createdDeployment: (state, action) => {
|
|
1227
1025
|
state.byId[action.payload.id] = {
|
|
@@ -1230,7 +1028,8 @@ var deploymentsSlice = (0, import_toolkit2.createSlice)({
|
|
|
1230
1028
|
};
|
|
1231
1029
|
state.byStatus[DEPLOYMENT_STATES.pending].total = state.byStatus[DEPLOYMENT_STATES.pending].total + 1;
|
|
1232
1030
|
state.byStatus[DEPLOYMENT_STATES.pending].deploymentIds = [...state.byStatus.pending.deploymentIds, action.payload.id];
|
|
1233
|
-
state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection]
|
|
1031
|
+
state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection];
|
|
1032
|
+
state.selectionState[DEPLOYMENT_STATES.pending].total = (state.selectionState[DEPLOYMENT_STATES.pending].total || 0) + 1;
|
|
1234
1033
|
},
|
|
1235
1034
|
removedDeployment: (state, action) => {
|
|
1236
1035
|
const { [action.payload]: removedDeployment, ...remainder } = state.byId;
|
|
@@ -1292,14 +1091,14 @@ var deploymentsSlice = (0, import_toolkit2.createSlice)({
|
|
|
1292
1091
|
}
|
|
1293
1092
|
}
|
|
1294
1093
|
});
|
|
1295
|
-
var
|
|
1094
|
+
var actions3 = deploymentsSlice.actions;
|
|
1296
1095
|
var deploymentsSlice_default = deploymentsSlice.reducer;
|
|
1297
1096
|
|
|
1298
1097
|
// src/devicesSlice/index.ts
|
|
1299
1098
|
var import_helpers = require("@northern.tech/utils/helpers");
|
|
1300
|
-
var
|
|
1301
|
-
var
|
|
1302
|
-
var
|
|
1099
|
+
var import_toolkit4 = require("@reduxjs/toolkit");
|
|
1100
|
+
var sliceName4 = "devices";
|
|
1101
|
+
var initialState4 = {
|
|
1303
1102
|
byId: {
|
|
1304
1103
|
// [deviceId]: {
|
|
1305
1104
|
// ...,
|
|
@@ -1307,26 +1106,30 @@ var initialState3 = {
|
|
|
1307
1106
|
// }
|
|
1308
1107
|
},
|
|
1309
1108
|
byStatus: {
|
|
1310
|
-
[DEVICE_STATES.accepted]: { deviceIds: [], total: 0 },
|
|
1109
|
+
[import_constants4.DEVICE_STATES.accepted]: { deviceIds: [], total: 0 },
|
|
1311
1110
|
active: { deviceIds: [], total: 0 },
|
|
1312
1111
|
inactive: { deviceIds: [], total: 0 },
|
|
1313
|
-
[DEVICE_STATES.pending]: { deviceIds: [], total: 0 },
|
|
1314
|
-
[DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
|
|
1315
|
-
[DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
|
|
1112
|
+
[import_constants4.DEVICE_STATES.pending]: { deviceIds: [], total: 0 },
|
|
1113
|
+
[import_constants4.DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
|
|
1114
|
+
[import_constants4.DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
|
|
1316
1115
|
},
|
|
1317
1116
|
deviceList: {
|
|
1318
1117
|
deviceIds: [],
|
|
1319
|
-
...DEVICE_LIST_DEFAULTS,
|
|
1118
|
+
...import_constants4.DEVICE_LIST_DEFAULTS,
|
|
1320
1119
|
selectedAttributes: [],
|
|
1321
1120
|
selectedIssues: [],
|
|
1322
1121
|
selection: [],
|
|
1323
1122
|
sort: {
|
|
1324
|
-
direction: SORTING_OPTIONS.desc
|
|
1123
|
+
direction: import_constants4.SORTING_OPTIONS.desc
|
|
1325
1124
|
// key: null,
|
|
1326
1125
|
// scope: null
|
|
1327
1126
|
},
|
|
1328
|
-
state: DEVICE_STATES.accepted,
|
|
1329
|
-
total: 0
|
|
1127
|
+
state: import_constants4.DEVICE_STATES.accepted,
|
|
1128
|
+
total: 0,
|
|
1129
|
+
refreshTrigger: false,
|
|
1130
|
+
isLoading: false,
|
|
1131
|
+
detailsTab: "",
|
|
1132
|
+
open: false
|
|
1330
1133
|
},
|
|
1331
1134
|
filters: [
|
|
1332
1135
|
// { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }
|
|
@@ -1353,9 +1156,9 @@ var initialState3 = {
|
|
|
1353
1156
|
selectedGroup: void 0
|
|
1354
1157
|
}
|
|
1355
1158
|
};
|
|
1356
|
-
var devicesSlice = (0,
|
|
1357
|
-
name:
|
|
1358
|
-
initialState:
|
|
1159
|
+
var devicesSlice = (0, import_toolkit4.createSlice)({
|
|
1160
|
+
name: sliceName4,
|
|
1161
|
+
initialState: initialState4,
|
|
1359
1162
|
reducers: {
|
|
1360
1163
|
receivedGroups: (state, action) => {
|
|
1361
1164
|
state.groups.byId = action.payload;
|
|
@@ -1398,7 +1201,7 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
|
|
|
1398
1201
|
};
|
|
1399
1202
|
},
|
|
1400
1203
|
selectGroup: (state, { payload: group }) => {
|
|
1401
|
-
state.deviceList.deviceIds = state.groups.byId[group] && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
|
|
1204
|
+
state.deviceList.deviceIds = group && state.groups.byId[group] && state.groups.byId[group].deviceIds && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
|
|
1402
1205
|
state.groups.selectedGroup = group;
|
|
1403
1206
|
},
|
|
1404
1207
|
removeGroup: (state, action) => {
|
|
@@ -1450,9 +1253,6 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
|
|
|
1450
1253
|
const { count, status } = action.payload;
|
|
1451
1254
|
state.byStatus[status].total = count;
|
|
1452
1255
|
},
|
|
1453
|
-
setTotalDevices: (state, action) => {
|
|
1454
|
-
state.total = action.payload;
|
|
1455
|
-
},
|
|
1456
1256
|
setDeviceLimit: (state, action) => {
|
|
1457
1257
|
state.limit = action.payload;
|
|
1458
1258
|
},
|
|
@@ -1465,39 +1265,39 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
|
|
|
1465
1265
|
maybeUpdateDevicesByStatus: (state, action) => {
|
|
1466
1266
|
const { deviceId, authId } = action.payload;
|
|
1467
1267
|
const device = state.byId[deviceId];
|
|
1468
|
-
const hasMultipleAuthSets = authId ? device.auth_sets.filter((authset) => authset.id !== authId).length > 0 : false;
|
|
1469
|
-
if (!hasMultipleAuthSets && Object.values(DEVICE_STATES).includes(device.status)) {
|
|
1268
|
+
const hasMultipleAuthSets = authId && device.auth_sets ? device.auth_sets.filter((authset) => authset.id !== authId).length > 0 : false;
|
|
1269
|
+
if (!hasMultipleAuthSets && Object.values(import_constants4.DEVICE_STATES).includes(device.status)) {
|
|
1470
1270
|
const deviceIds = state.byStatus[device.status].deviceIds.filter((id) => id !== deviceId);
|
|
1471
1271
|
state.byStatus[device.status] = { deviceIds, total: Math.max(0, state.byStatus[device.status].total - 1) };
|
|
1472
1272
|
}
|
|
1473
1273
|
}
|
|
1474
1274
|
}
|
|
1475
1275
|
});
|
|
1476
|
-
var
|
|
1276
|
+
var actions4 = devicesSlice.actions;
|
|
1477
1277
|
var devicesSlice_default = devicesSlice.reducer;
|
|
1478
1278
|
|
|
1479
1279
|
// src/monitorSlice/index.ts
|
|
1480
|
-
var
|
|
1481
|
-
var
|
|
1482
|
-
var
|
|
1280
|
+
var import_toolkit5 = require("@reduxjs/toolkit");
|
|
1281
|
+
var sliceName5 = "monitor";
|
|
1282
|
+
var initialState5 = {
|
|
1483
1283
|
alerts: {
|
|
1484
|
-
alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },
|
|
1284
|
+
alertList: { ...import_constants4.DEVICE_LIST_DEFAULTS, total: 0 },
|
|
1485
1285
|
byDeviceId: {}
|
|
1486
1286
|
},
|
|
1487
1287
|
issueCounts: {
|
|
1488
|
-
byType: Object.
|
|
1288
|
+
byType: Object.keys(import_constants4.DEVICE_ISSUE_OPTIONS).reduce((accu, key) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
|
|
1489
1289
|
},
|
|
1490
1290
|
settings: {
|
|
1491
1291
|
global: {
|
|
1492
1292
|
channels: {
|
|
1493
|
-
...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
|
|
1293
|
+
...Object.keys(import_constants4.alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
|
|
1494
1294
|
}
|
|
1495
1295
|
}
|
|
1496
1296
|
}
|
|
1497
1297
|
};
|
|
1498
|
-
var monitorSlice = (0,
|
|
1499
|
-
name:
|
|
1500
|
-
initialState:
|
|
1298
|
+
var monitorSlice = (0, import_toolkit5.createSlice)({
|
|
1299
|
+
name: sliceName5,
|
|
1300
|
+
initialState: initialState5,
|
|
1501
1301
|
reducers: {
|
|
1502
1302
|
changeAlertChannel: (state, action) => {
|
|
1503
1303
|
const { channel, enabled } = action.payload;
|
|
@@ -1520,13 +1320,13 @@ var monitorSlice = (0, import_toolkit4.createSlice)({
|
|
|
1520
1320
|
}
|
|
1521
1321
|
}
|
|
1522
1322
|
});
|
|
1523
|
-
var
|
|
1323
|
+
var actions5 = monitorSlice.actions;
|
|
1524
1324
|
var monitorSlice_default = monitorSlice.reducer;
|
|
1525
1325
|
|
|
1526
1326
|
// src/onboardingSlice/index.ts
|
|
1527
|
-
var
|
|
1528
|
-
var
|
|
1529
|
-
var
|
|
1327
|
+
var import_toolkit6 = require("@reduxjs/toolkit");
|
|
1328
|
+
var sliceName6 = "onboarding";
|
|
1329
|
+
var initialState6 = {
|
|
1530
1330
|
approach: null,
|
|
1531
1331
|
complete: false,
|
|
1532
1332
|
deviceType: null,
|
|
@@ -1535,13 +1335,11 @@ var initialState5 = {
|
|
|
1535
1335
|
showTips: null,
|
|
1536
1336
|
showTipsDialog: false
|
|
1537
1337
|
};
|
|
1538
|
-
var onboardingSlice = (0,
|
|
1539
|
-
name:
|
|
1540
|
-
initialState:
|
|
1338
|
+
var onboardingSlice = (0, import_toolkit6.createSlice)({
|
|
1339
|
+
name: sliceName6,
|
|
1340
|
+
initialState: initialState6,
|
|
1541
1341
|
reducers: {
|
|
1542
|
-
setOnboardingState: (state, action) => {
|
|
1543
|
-
return { ...state, ...action.payload };
|
|
1544
|
-
},
|
|
1342
|
+
setOnboardingState: (state, action) => ({ ...state, ...action.payload }),
|
|
1545
1343
|
setDemoArtifactPort: (state, action) => {
|
|
1546
1344
|
state.demoArtifactPort = action.payload;
|
|
1547
1345
|
},
|
|
@@ -1565,13 +1363,13 @@ var onboardingSlice = (0, import_toolkit5.createSlice)({
|
|
|
1565
1363
|
}
|
|
1566
1364
|
}
|
|
1567
1365
|
});
|
|
1568
|
-
var
|
|
1366
|
+
var actions6 = onboardingSlice.actions;
|
|
1569
1367
|
var onboardingSlice_default = onboardingSlice.reducer;
|
|
1570
1368
|
|
|
1571
1369
|
// src/organizationSlice/index.ts
|
|
1572
|
-
var
|
|
1573
|
-
var
|
|
1574
|
-
var
|
|
1370
|
+
var import_toolkit7 = require("@reduxjs/toolkit");
|
|
1371
|
+
var sliceName7 = "organization";
|
|
1372
|
+
var initialState7 = {
|
|
1575
1373
|
card: {
|
|
1576
1374
|
last4: "",
|
|
1577
1375
|
expiration: { month: 1, year: 2020 },
|
|
@@ -1584,7 +1382,7 @@ var initialState6 = {
|
|
|
1584
1382
|
tenants: [],
|
|
1585
1383
|
selectedTenant: null,
|
|
1586
1384
|
sort: {
|
|
1587
|
-
direction: SORTING_OPTIONS.desc,
|
|
1385
|
+
direction: import_constants4.SORTING_OPTIONS.desc,
|
|
1588
1386
|
key: "name"
|
|
1589
1387
|
}
|
|
1590
1388
|
},
|
|
@@ -1594,15 +1392,16 @@ var initialState6 = {
|
|
|
1594
1392
|
auditlog: {
|
|
1595
1393
|
events: [],
|
|
1596
1394
|
selectionState: {
|
|
1597
|
-
...DEVICE_LIST_DEFAULTS,
|
|
1395
|
+
...import_constants4.DEVICE_LIST_DEFAULTS,
|
|
1598
1396
|
detail: void 0,
|
|
1599
1397
|
endDate: void 0,
|
|
1600
1398
|
selectedIssue: void 0,
|
|
1601
|
-
sort: { direction: SORTING_OPTIONS.desc },
|
|
1399
|
+
sort: { direction: import_constants4.SORTING_OPTIONS.desc },
|
|
1602
1400
|
startDate: void 0,
|
|
1603
1401
|
total: 0,
|
|
1604
1402
|
type: void 0,
|
|
1605
|
-
user: void 0
|
|
1403
|
+
user: void 0,
|
|
1404
|
+
isLoading: false
|
|
1606
1405
|
}
|
|
1607
1406
|
},
|
|
1608
1407
|
externalDeviceIntegrations: [
|
|
@@ -1616,9 +1415,9 @@ var initialState6 = {
|
|
|
1616
1415
|
eventsTotal: 0
|
|
1617
1416
|
}
|
|
1618
1417
|
};
|
|
1619
|
-
var organizationSlice = (0,
|
|
1620
|
-
name:
|
|
1621
|
-
initialState:
|
|
1418
|
+
var organizationSlice = (0, import_toolkit7.createSlice)({
|
|
1419
|
+
name: sliceName7,
|
|
1420
|
+
initialState: initialState7,
|
|
1622
1421
|
reducers: {
|
|
1623
1422
|
receiveAuditLogs: (state, action) => {
|
|
1624
1423
|
const { events, total } = action.payload;
|
|
@@ -1640,6 +1439,12 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
|
|
|
1640
1439
|
setOrganization: (state, action) => {
|
|
1641
1440
|
state.organization = { ...state.organization, ...action.payload };
|
|
1642
1441
|
},
|
|
1442
|
+
setSubscription: (state, action) => {
|
|
1443
|
+
state.organization.subscription = { ...state.organization.subscription, ...action.payload };
|
|
1444
|
+
},
|
|
1445
|
+
setBillingProfile: (state, action) => {
|
|
1446
|
+
state.organization.billing_profile = action.payload;
|
|
1447
|
+
},
|
|
1643
1448
|
setTenantListState: (state, action) => {
|
|
1644
1449
|
state.tenantList = action.payload;
|
|
1645
1450
|
},
|
|
@@ -1656,107 +1461,9 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
|
|
|
1656
1461
|
}
|
|
1657
1462
|
}
|
|
1658
1463
|
});
|
|
1659
|
-
var
|
|
1464
|
+
var actions7 = organizationSlice.actions;
|
|
1660
1465
|
var organizationSlice_default = organizationSlice.reducer;
|
|
1661
1466
|
|
|
1662
|
-
// src/releasesSlice/index.ts
|
|
1663
|
-
var import_toolkit7 = require("@reduxjs/toolkit");
|
|
1664
|
-
var sliceName7 = "releases";
|
|
1665
|
-
var initialState7 = {
|
|
1666
|
-
/*
|
|
1667
|
-
* Return list of saved artifacts objects
|
|
1668
|
-
*/
|
|
1669
|
-
/*
|
|
1670
|
-
* return list of artifacts where duplicate names are collated with device compatibility lists combined
|
|
1671
|
-
*/
|
|
1672
|
-
// artifacts: AppStore.getCollatedArtifacts(AppStore.getArtifactsRepo()),
|
|
1673
|
-
artifacts: [],
|
|
1674
|
-
/*
|
|
1675
|
-
* Return list of saved release objects
|
|
1676
|
-
*/
|
|
1677
|
-
byId: {
|
|
1678
|
-
/*
|
|
1679
|
-
[releaseName]: {
|
|
1680
|
-
artifacts: [
|
|
1681
|
-
{
|
|
1682
|
-
id: '',
|
|
1683
|
-
name: '',
|
|
1684
|
-
description: '',
|
|
1685
|
-
device_types_compatible: [],
|
|
1686
|
-
...
|
|
1687
|
-
updates: [{
|
|
1688
|
-
files: [
|
|
1689
|
-
{ size: 123, name: '' }
|
|
1690
|
-
],
|
|
1691
|
-
type_info: { type: '' }
|
|
1692
|
-
}],
|
|
1693
|
-
url: '' // optional
|
|
1694
|
-
}
|
|
1695
|
-
],
|
|
1696
|
-
modified: ''
|
|
1697
|
-
device_types_compatible,
|
|
1698
|
-
name: '',
|
|
1699
|
-
tags: ['something'],
|
|
1700
|
-
notes: ''
|
|
1701
|
-
}
|
|
1702
|
-
*/
|
|
1703
|
-
},
|
|
1704
|
-
releasesList: {
|
|
1705
|
-
...DEVICE_LIST_DEFAULTS,
|
|
1706
|
-
searchedIds: [],
|
|
1707
|
-
releaseIds: [],
|
|
1708
|
-
selection: [],
|
|
1709
|
-
sort: {
|
|
1710
|
-
direction: SORTING_OPTIONS.desc,
|
|
1711
|
-
key: "modified"
|
|
1712
|
-
},
|
|
1713
|
-
isLoading: void 0,
|
|
1714
|
-
searchTerm: "",
|
|
1715
|
-
searchTotal: 0,
|
|
1716
|
-
selectedTags: [],
|
|
1717
|
-
total: 0,
|
|
1718
|
-
type: ""
|
|
1719
|
-
},
|
|
1720
|
-
tags: [],
|
|
1721
|
-
updateTypes: [],
|
|
1722
|
-
/*
|
|
1723
|
-
* Return single release with corresponding Artifacts
|
|
1724
|
-
*/
|
|
1725
|
-
selectedRelease: null
|
|
1726
|
-
};
|
|
1727
|
-
var releaseSlice = (0, import_toolkit7.createSlice)({
|
|
1728
|
-
name: sliceName7,
|
|
1729
|
-
initialState: initialState7,
|
|
1730
|
-
reducers: {
|
|
1731
|
-
receiveRelease: (state, action) => {
|
|
1732
|
-
const { name } = action.payload;
|
|
1733
|
-
state.byId[name] = action.payload;
|
|
1734
|
-
},
|
|
1735
|
-
receiveReleases: (state, action) => {
|
|
1736
|
-
state.byId = action.payload;
|
|
1737
|
-
},
|
|
1738
|
-
receiveReleaseTags: (state, action) => {
|
|
1739
|
-
state.tags = action.payload;
|
|
1740
|
-
},
|
|
1741
|
-
receiveReleaseTypes: (state, action) => {
|
|
1742
|
-
state.updateTypes = action.payload;
|
|
1743
|
-
},
|
|
1744
|
-
removeRelease: (state, action) => {
|
|
1745
|
-
const { [action.payload]: toBeRemoved, ...byId } = state.byId;
|
|
1746
|
-
state.byId = byId;
|
|
1747
|
-
state.selectedRelease = action.payload === state.selectedRelease ? null : state.selectedRelease;
|
|
1748
|
-
},
|
|
1749
|
-
selectedRelease: (state, action) => {
|
|
1750
|
-
state.selectedRelease = action.payload;
|
|
1751
|
-
},
|
|
1752
|
-
setReleaseListState: (state, action) => {
|
|
1753
|
-
state.releasesList = action.payload;
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
});
|
|
1757
|
-
var actions7 = releaseSlice.actions;
|
|
1758
|
-
var releasesSlice_default = releaseSlice.reducer;
|
|
1759
|
-
|
|
1760
1467
|
// src/usersSlice/index.ts
|
|
1761
1468
|
var import_toolkit8 = require("@reduxjs/toolkit");
|
|
1762
1469
|
var sliceName8 = "users";
|
|
@@ -1776,11 +1483,12 @@ var initialState8 = {
|
|
|
1776
1483
|
retries: 0
|
|
1777
1484
|
},
|
|
1778
1485
|
permissionSetsById: {
|
|
1779
|
-
...defaultPermissionSets
|
|
1486
|
+
...import_constants4.defaultPermissionSets
|
|
1780
1487
|
},
|
|
1781
1488
|
rolesById: {
|
|
1782
|
-
...rolesById
|
|
1489
|
+
...import_constants4.rolesById
|
|
1783
1490
|
},
|
|
1491
|
+
rolesInitialized: false,
|
|
1784
1492
|
settingsInitialized: false,
|
|
1785
1493
|
showConnectDeviceDialog: false,
|
|
1786
1494
|
showFeedbackDialog: false,
|
|
@@ -1816,9 +1524,6 @@ var usersSlice = (0, import_toolkit8.createSlice)({
|
|
|
1816
1524
|
state.byId[action.payload.id] = action.payload;
|
|
1817
1525
|
state.currentUser = action.payload.id;
|
|
1818
1526
|
},
|
|
1819
|
-
createdUser: (state, action) => {
|
|
1820
|
-
state.byId[0] = action.payload;
|
|
1821
|
-
},
|
|
1822
1527
|
removedUser: (state, action) => {
|
|
1823
1528
|
const { [action.payload]: removedUser, ...byId } = state.byId;
|
|
1824
1529
|
state.byId = byId;
|
|
@@ -1835,6 +1540,10 @@ var usersSlice = (0, import_toolkit8.createSlice)({
|
|
|
1835
1540
|
},
|
|
1836
1541
|
receivedRoles: (state, action) => {
|
|
1837
1542
|
state.rolesById = action.payload;
|
|
1543
|
+
state.rolesInitialized = true;
|
|
1544
|
+
},
|
|
1545
|
+
finishedRoleInitialization: (state, action) => {
|
|
1546
|
+
state.rolesInitialized = action.payload;
|
|
1838
1547
|
},
|
|
1839
1548
|
createdRole: (state, action) => {
|
|
1840
1549
|
state.rolesById[action.payload.name] = {
|
|
@@ -1865,7 +1574,7 @@ var usersSlice = (0, import_toolkit8.createSlice)({
|
|
|
1865
1574
|
},
|
|
1866
1575
|
setTooltipState: (state, action) => {
|
|
1867
1576
|
const { id, readState = READ_STATES.read } = action.payload;
|
|
1868
|
-
state.tooltips.byId[id]
|
|
1577
|
+
state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };
|
|
1869
1578
|
},
|
|
1870
1579
|
setTooltipsState: (state, action) => {
|
|
1871
1580
|
state.tooltips.byId = {
|
|
@@ -1889,13 +1598,13 @@ var usersSlice_default = usersSlice.reducer;
|
|
|
1889
1598
|
|
|
1890
1599
|
// src/actions.ts
|
|
1891
1600
|
var actions_default = {
|
|
1892
|
-
...actions,
|
|
1893
1601
|
...actions2,
|
|
1894
1602
|
...actions3,
|
|
1895
1603
|
...actions4,
|
|
1896
1604
|
...actions5,
|
|
1897
1605
|
...actions6,
|
|
1898
1606
|
...actions7,
|
|
1607
|
+
...actions,
|
|
1899
1608
|
...actions8
|
|
1900
1609
|
};
|
|
1901
1610
|
|
|
@@ -1905,7 +1614,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
1905
1614
|
// src/auth.ts
|
|
1906
1615
|
var import_universal_cookie = __toESM(require("universal-cookie"), 1);
|
|
1907
1616
|
var cookies = new import_universal_cookie.default();
|
|
1908
|
-
var emptySession = Object.freeze({ token: "",
|
|
1617
|
+
var emptySession = Object.freeze({ token: "", expiresAt: void 0 });
|
|
1909
1618
|
var tokenCache = "";
|
|
1910
1619
|
var getSessionInfo = () => {
|
|
1911
1620
|
let sessionInfo = { ...emptySession };
|
|
@@ -1918,15 +1627,15 @@ var getSessionInfo = () => {
|
|
|
1918
1627
|
return { ...emptySession };
|
|
1919
1628
|
}
|
|
1920
1629
|
if (!sessionInfo.token) {
|
|
1921
|
-
|
|
1630
|
+
const jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
1922
1631
|
if (jwtTokenFromCookie) {
|
|
1923
|
-
setSessionInfo({ token: jwtTokenFromCookie
|
|
1632
|
+
setSessionInfo({ token: jwtTokenFromCookie });
|
|
1924
1633
|
sessionInfo.token = jwtTokenFromCookie;
|
|
1925
1634
|
cookies.remove("JWT");
|
|
1926
1635
|
cookies.remove("JWT", { path: "/" });
|
|
1927
1636
|
}
|
|
1928
1637
|
}
|
|
1929
|
-
sessionInfo.token = sessionInfo.token ||
|
|
1638
|
+
sessionInfo.token = sessionInfo.token || "";
|
|
1930
1639
|
tokenCache = sessionInfo.token;
|
|
1931
1640
|
return sessionInfo;
|
|
1932
1641
|
};
|
|
@@ -1980,26 +1689,37 @@ var Api = {
|
|
|
1980
1689
|
};
|
|
1981
1690
|
var general_api_default = Api;
|
|
1982
1691
|
|
|
1983
|
-
// src/
|
|
1692
|
+
// src/locationutils.ts
|
|
1984
1693
|
var import_helpers2 = require("@northern.tech/utils/helpers");
|
|
1694
|
+
var defaultSelector = (result) => result[0];
|
|
1695
|
+
var commonFields = {
|
|
1696
|
+
...Object.keys(import_constants4.DEVICE_LIST_DEFAULTS).reduce((accu, key) => ({ ...accu, [key]: { parse: Number, select: defaultSelector, target: key } }), {}),
|
|
1697
|
+
id: { parse: String, select: (i) => i, target: "id" },
|
|
1698
|
+
issues: { parse: void 0, select: defaultSelector, target: "selectedIssues" },
|
|
1699
|
+
open: { parse: Boolean, select: defaultSelector, target: "open" }
|
|
1700
|
+
};
|
|
1701
|
+
var formatReleases = ({ pageState: { searchTerm, selectedTags = [], tab, type } }) => Object.entries({ name: searchTerm, tab, type }).reduce(
|
|
1702
|
+
(accu, [key, value]) => value ? [...accu, `${key}=${value}`] : accu,
|
|
1703
|
+
selectedTags.map((tag) => `tag=${tag}`)
|
|
1704
|
+
).join("&");
|
|
1705
|
+
|
|
1706
|
+
// src/appSlice/selectors.ts
|
|
1707
|
+
var import_helpers3 = require("@northern.tech/utils/helpers");
|
|
1985
1708
|
var import_toolkit9 = require("@reduxjs/toolkit");
|
|
1986
|
-
var getAppDocsVersion = (state) => state.app.docsVersion;
|
|
1987
1709
|
var getFeatures = (state) => state.app.features;
|
|
1988
1710
|
var getFullVersionInformation = (state) => state.app.versionInformation;
|
|
1989
|
-
var getDocsVersion = (0, import_toolkit9.createSelector)([getAppDocsVersion, getFeatures], (appDocsVersion, { isHosted }) => {
|
|
1990
|
-
const docsVersion = appDocsVersion ? `${appDocsVersion}/` : "development/";
|
|
1991
|
-
return isHosted ? "" : docsVersion;
|
|
1992
|
-
});
|
|
1993
1711
|
var getSearchState = (state) => state.app.searchState;
|
|
1712
|
+
var getUploads = (state) => state.app.uploadsById;
|
|
1713
|
+
var getIsUploading = (0, import_toolkit9.createSelector)([getUploads], (uploadsById) => !!Object.keys(uploadsById).length);
|
|
1994
1714
|
var getSearchedDevices = (0, import_toolkit9.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
|
|
1995
1715
|
var getVersionInformation = (0, import_toolkit9.createSelector)(
|
|
1996
1716
|
[getFullVersionInformation, getFeatures],
|
|
1997
|
-
({ Integration, ...remainder }, { isHosted }) => isHosted &&
|
|
1717
|
+
({ Integration: Integration2, ...remainder }, { isHosted }) => isHosted && Integration2 !== "next" ? remainder : { ...remainder, Integration: Integration2 }
|
|
1998
1718
|
);
|
|
1999
|
-
var getIsPreview = (0, import_toolkit9.createSelector)([getFullVersionInformation], ({ Integration }) => (0,
|
|
1719
|
+
var getIsPreview = (0, import_toolkit9.createSelector)([getFullVersionInformation], ({ Integration: Integration2 }) => (0, import_helpers3.versionCompare)(Integration2, "next") > -1);
|
|
2000
1720
|
|
|
2001
1721
|
// src/commonSelectors.ts
|
|
2002
|
-
var
|
|
1722
|
+
var import_helpers6 = require("@northern.tech/utils/helpers");
|
|
2003
1723
|
var import_toolkit15 = require("@reduxjs/toolkit");
|
|
2004
1724
|
|
|
2005
1725
|
// src/deploymentsSlice/selectors.ts
|
|
@@ -2043,7 +1763,7 @@ var getRecentDeployments = (0, import_toolkit10.createSelector)(
|
|
|
2043
1763
|
);
|
|
2044
1764
|
|
|
2045
1765
|
// src/devicesSlice/selectors.ts
|
|
2046
|
-
var
|
|
1766
|
+
var import_helpers4 = require("@northern.tech/utils/helpers");
|
|
2047
1767
|
var import_toolkit11 = require("@reduxjs/toolkit");
|
|
2048
1768
|
var getAcceptedDevices = (state) => state.devices.byStatus.accepted;
|
|
2049
1769
|
var getDevicesByStatus = (state) => state.devices.byStatus;
|
|
@@ -2077,7 +1797,7 @@ var getDeviceIdentityAttributes = (0, import_toolkit11.createSelector)(
|
|
|
2077
1797
|
);
|
|
2078
1798
|
var getDeviceCountsByStatus = (0, import_toolkit11.createSelector)(
|
|
2079
1799
|
[getDevicesByStatus],
|
|
2080
|
-
(byStatus) => Object.values(DEVICE_STATES).reduce((accu, state) => {
|
|
1800
|
+
(byStatus) => Object.values(import_constants4.DEVICE_STATES).reduce((accu, state) => {
|
|
2081
1801
|
accu[state] = byStatus[state].total || 0;
|
|
2082
1802
|
return accu;
|
|
2083
1803
|
}, {})
|
|
@@ -2089,7 +1809,7 @@ var getSelectedGroupInfo = (0, import_toolkit11.createSelector)(
|
|
|
2089
1809
|
let groupCount = acceptedDeviceTotal;
|
|
2090
1810
|
let groupFilters = [];
|
|
2091
1811
|
if (selectedGroup && groupsById[selectedGroup]) {
|
|
2092
|
-
groupCount = groupsById[selectedGroup].total;
|
|
1812
|
+
groupCount = groupsById[selectedGroup].total || 0;
|
|
2093
1813
|
groupFilters = groupsById[selectedGroup].filters || [];
|
|
2094
1814
|
}
|
|
2095
1815
|
return { groupCount, selectedGroup, groupFilters };
|
|
@@ -2100,13 +1820,18 @@ var getLimitMaxed = (0, import_toolkit11.createSelector)(
|
|
|
2100
1820
|
({ total: acceptedDevices = 0 }, deviceLimit) => Boolean(deviceLimit && deviceLimit <= acceptedDevices)
|
|
2101
1821
|
);
|
|
2102
1822
|
var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
|
|
1823
|
+
var getGroupData = (0, import_toolkit11.createSelector)([getGroupsByIdWithoutUngrouped], (groups) => {
|
|
1824
|
+
const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : void 0;
|
|
1825
|
+
const hasDynamicGroups = Object.values(groups).some((group) => !!group.id);
|
|
1826
|
+
return { createdGroup, hasDynamicGroups, groups };
|
|
1827
|
+
});
|
|
2103
1828
|
var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsById) => {
|
|
2104
1829
|
const groupNames = Object.keys(groupsById).sort();
|
|
2105
1830
|
const groupedGroups = Object.entries(groupsById).sort((a, b) => a[0].localeCompare(b[0])).reduce(
|
|
2106
1831
|
(accu, [groupname, group]) => {
|
|
2107
1832
|
const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
|
|
2108
1833
|
const groupItem = { ...group, groupId: name, name: groupname };
|
|
2109
|
-
if (group.filters
|
|
1834
|
+
if ((group.filters ?? []).length > 0) {
|
|
2110
1835
|
if (groupname !== UNGROUPED_GROUP.id) {
|
|
2111
1836
|
accu.dynamic.push(groupItem);
|
|
2112
1837
|
} else {
|
|
@@ -2123,7 +1848,7 @@ var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsByI
|
|
|
2123
1848
|
});
|
|
2124
1849
|
var getAttributesList = (0, import_toolkit11.createSelector)(
|
|
2125
1850
|
[getFilteringAttributes, getFilteringAttributesFromConfig],
|
|
2126
|
-
({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) => [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(
|
|
1851
|
+
({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) => [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(import_helpers4.duplicateFilter)
|
|
2127
1852
|
);
|
|
2128
1853
|
var getDeviceTypes = (0, import_toolkit11.createSelector)(
|
|
2129
1854
|
[getAcceptedDevices, getDevicesById],
|
|
@@ -2149,12 +1874,14 @@ var getOnboarding = (state) => state.onboarding;
|
|
|
2149
1874
|
|
|
2150
1875
|
// src/organizationSlice/selectors.ts
|
|
2151
1876
|
var import_toolkit12 = require("@reduxjs/toolkit");
|
|
1877
|
+
var import_dayjs = __toESM(require("dayjs"), 1);
|
|
1878
|
+
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"), 1);
|
|
2152
1879
|
var getOrganization = (state) => state.organization.organization;
|
|
2153
1880
|
var getExternalIntegrations = (state) => state.organization.externalDeviceIntegrations;
|
|
2154
1881
|
var getAuditLog = (state) => state.organization.auditlog.events;
|
|
2155
1882
|
var getAuditLogSelectionState = (state) => state.organization.auditlog.selectionState;
|
|
2156
1883
|
var getWebhookEvents = (state) => state.organization.webhooks.events;
|
|
2157
|
-
var getWebhookEventTotal = (state) => state.organization.webhooks.
|
|
1884
|
+
var getWebhookEventTotal = (state) => state.organization.webhooks.eventsTotal;
|
|
2158
1885
|
var getDeviceTwinIntegrations = (0, import_toolkit12.createSelector)(
|
|
2159
1886
|
[getExternalIntegrations],
|
|
2160
1887
|
(integrations) => integrations.filter((integration) => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)
|
|
@@ -2175,22 +1902,31 @@ var getAuditLogEntry = (0, import_toolkit12.createSelector)([getAuditLog, getAud
|
|
|
2175
1902
|
const [eventAction, eventTime] = atob(selectedId).split("|");
|
|
2176
1903
|
return events.find((item) => item.action === eventAction && item.time === eventTime);
|
|
2177
1904
|
});
|
|
1905
|
+
import_dayjs.default.extend(import_relativeTime.default);
|
|
1906
|
+
var newPricingIntroduction = (0, import_dayjs.default)("2025-06-03T00:00");
|
|
1907
|
+
var getHasCurrentPricing = (0, import_toolkit12.createSelector)(
|
|
1908
|
+
[getOrganization],
|
|
1909
|
+
({ id }) => !!id && (0, import_dayjs.default)(parseInt(id.substring(0, 8), 16) * 1e3) >= newPricingIntroduction
|
|
1910
|
+
);
|
|
1911
|
+
|
|
1912
|
+
// src/releasesSlice/selectors.ts
|
|
1913
|
+
var import_toolkit13 = require("@reduxjs/toolkit");
|
|
2178
1914
|
|
|
2179
1915
|
// src/utils.ts
|
|
2180
|
-
var
|
|
1916
|
+
var import_helpers5 = require("@northern.tech/utils/helpers");
|
|
2181
1917
|
var filterProcessors = {
|
|
2182
|
-
[DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
|
|
2183
|
-
[DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
|
|
2184
|
-
[DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
|
|
2185
|
-
[DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
|
|
2186
|
-
[DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
|
|
2187
|
-
[DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
2188
|
-
[DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
2189
|
-
[DEVICE_FILTERING_OPTIONS.$exists.key]:
|
|
2190
|
-
[DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
|
|
1918
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
|
|
1919
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
|
|
1920
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
|
|
1921
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
|
|
1922
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
|
|
1923
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
1924
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
1925
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers5.yes,
|
|
1926
|
+
[import_constants4.DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
|
|
2191
1927
|
};
|
|
2192
1928
|
var filterAliases = {
|
|
2193
|
-
$nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
|
|
1929
|
+
$nexists: { alias: import_constants4.DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
|
|
2194
1930
|
};
|
|
2195
1931
|
var mapFiltersToTerms = (filters) => filters.map((filter) => ({
|
|
2196
1932
|
scope: filter.scope,
|
|
@@ -2199,35 +1935,40 @@ var mapFiltersToTerms = (filters) => filters.map((filter) => ({
|
|
|
2199
1935
|
value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
|
|
2200
1936
|
}));
|
|
2201
1937
|
var convertIssueOptionsToFilters = (issuesSelection, filtersState = {}) => issuesSelection.map((item) => {
|
|
2202
|
-
if (typeof DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
|
|
2203
|
-
return { ...DEVICE_ISSUE_OPTIONS[item].filterRule, value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
|
|
1938
|
+
if (typeof import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
|
|
1939
|
+
return { ...import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule, value: import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
|
|
2204
1940
|
}
|
|
2205
|
-
return DEVICE_ISSUE_OPTIONS[item].filterRule;
|
|
1941
|
+
return import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule;
|
|
2206
1942
|
});
|
|
2207
|
-
var convertDeviceListStateToFilters = ({
|
|
1943
|
+
var convertDeviceListStateToFilters = ({
|
|
1944
|
+
filters = [],
|
|
1945
|
+
group,
|
|
1946
|
+
groups = { byId: {} },
|
|
1947
|
+
offlineThreshold,
|
|
1948
|
+
selectedIssues = [],
|
|
1949
|
+
status
|
|
1950
|
+
}) => {
|
|
2208
1951
|
let applicableFilters = [...filters];
|
|
2209
1952
|
if (typeof group === "string" && !(groups.byId[group]?.filters || applicableFilters).length) {
|
|
2210
|
-
applicableFilters.push({ key: "group", value: group, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
|
|
1953
|
+
applicableFilters.push({ key: "group", value: group, operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
|
|
2211
1954
|
}
|
|
2212
1955
|
const nonMonitorFilters = applicableFilters.filter(
|
|
2213
|
-
(filter) => !Object.values(DEVICE_ISSUE_OPTIONS).some(
|
|
1956
|
+
(filter) => !Object.values(import_constants4.DEVICE_ISSUE_OPTIONS).some(
|
|
2214
1957
|
({ filterRule }) => filter.scope !== "inventory" && filterRule.scope === filter.scope && filterRule.key === filter.key
|
|
2215
1958
|
)
|
|
2216
1959
|
);
|
|
2217
1960
|
const deviceIssueFilters = convertIssueOptionsToFilters(selectedIssues, { offlineThreshold });
|
|
2218
1961
|
applicableFilters = [...nonMonitorFilters, ...deviceIssueFilters];
|
|
2219
|
-
const effectiveFilters = status ? [...applicableFilters, { key: "status", value: status, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }] : applicableFilters;
|
|
1962
|
+
const effectiveFilters = status ? [...applicableFilters, { key: "status", value: status, operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }] : applicableFilters;
|
|
2220
1963
|
return { applicableFilters: nonMonitorFilters, filterTerms: mapFiltersToTerms(effectiveFilters) };
|
|
2221
1964
|
};
|
|
2222
|
-
var listItemMapper = (byId, ids, {
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
};
|
|
2230
|
-
var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
|
|
1965
|
+
var listItemMapper = (byId, ids, { cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH, defaultObject = {} }) => ids.slice(0, cutOffSize).reduce((accu, id) => {
|
|
1966
|
+
if (id && byId[id]) {
|
|
1967
|
+
accu.push({ ...defaultObject, ...byId[id] });
|
|
1968
|
+
}
|
|
1969
|
+
return accu;
|
|
1970
|
+
}, []);
|
|
1971
|
+
var mergePermissions = (existingPermissions = { ...import_constants4.emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
|
|
2231
1972
|
(accu, [key, value]) => {
|
|
2232
1973
|
let values;
|
|
2233
1974
|
if (!accu[key]) {
|
|
@@ -2235,7 +1976,7 @@ var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPe
|
|
|
2235
1976
|
return accu;
|
|
2236
1977
|
}
|
|
2237
1978
|
if (Array.isArray(value)) {
|
|
2238
|
-
values = [...value, ...accu[key]].filter(
|
|
1979
|
+
values = [...value, ...accu[key]].filter(import_helpers5.duplicateFilter);
|
|
2239
1980
|
} else {
|
|
2240
1981
|
values = mergePermissions(accu[key], { ...value });
|
|
2241
1982
|
}
|
|
@@ -2251,7 +1992,7 @@ var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
|
|
|
2251
1992
|
}
|
|
2252
1993
|
return mergePermissions(accu, roles[roleId].uiPermissions);
|
|
2253
1994
|
},
|
|
2254
|
-
{ ...emptyUiPermissions }
|
|
1995
|
+
{ ...import_constants4.emptyUiPermissions }
|
|
2255
1996
|
);
|
|
2256
1997
|
var progress = ({ loaded, total }) => {
|
|
2257
1998
|
let uploadProgress3 = loaded / total * 100;
|
|
@@ -2260,39 +2001,44 @@ var progress = ({ loaded, total }) => {
|
|
|
2260
2001
|
var isDarkMode = (mode) => mode === DARK_MODE;
|
|
2261
2002
|
|
|
2262
2003
|
// src/releasesSlice/selectors.ts
|
|
2263
|
-
var import_toolkit13 = require("@reduxjs/toolkit");
|
|
2264
2004
|
var getSelectedReleaseId = (state) => state.releases.selectedRelease;
|
|
2265
2005
|
var getReleasesById = (state) => state.releases.byId;
|
|
2266
2006
|
var getReleaseTags = (state) => state.releases.tags;
|
|
2267
2007
|
var getReleaseListState = (state) => state.releases.releasesList;
|
|
2268
2008
|
var getListedReleases = (state) => state.releases.releasesList.releaseIds;
|
|
2269
|
-
var
|
|
2009
|
+
var releaseDefaults = {};
|
|
2010
|
+
var getReleaseMappingDefaults = () => releaseDefaults;
|
|
2270
2011
|
var getReleasesList = (0, import_toolkit13.createSelector)([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
|
|
2271
2012
|
var getReleaseTagsById = (0, import_toolkit13.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
|
|
2272
2013
|
var getHasReleases = (0, import_toolkit13.createSelector)(
|
|
2273
2014
|
[getReleaseListState, getReleasesById],
|
|
2274
2015
|
({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
|
|
2275
2016
|
);
|
|
2276
|
-
var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});
|
|
2017
|
+
var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id || ""] ?? {});
|
|
2018
|
+
var getSelectedReleases = (0, import_toolkit13.createSelector)([getReleaseListState, getReleasesList], ({ selection }, releases) => selection.map((index) => releases[index]));
|
|
2277
2019
|
|
|
2278
2020
|
// src/usersSlice/selectors.ts
|
|
2279
2021
|
var import_toolkit14 = require("@reduxjs/toolkit");
|
|
2022
|
+
var emptyObject = {};
|
|
2280
2023
|
var getRolesById = (state) => state.users.rolesById;
|
|
2281
2024
|
var getTooltipsById = (state) => state.users.tooltips.byId;
|
|
2282
2025
|
var getGlobalSettings = (state) => state.users.globalSettings;
|
|
2283
2026
|
var getCurrentUserId = (state) => state.users.currentUser;
|
|
2284
2027
|
var getUsersById = (state) => state.users.byId;
|
|
2285
2028
|
var getUsersList = (0, import_toolkit14.createSelector)([getUsersById], (usersById) => Object.values(usersById));
|
|
2286
|
-
var getCurrentUser = (0, import_toolkit14.createSelector)(
|
|
2029
|
+
var getCurrentUser = (0, import_toolkit14.createSelector)(
|
|
2030
|
+
[getUsersById, getCurrentUserId],
|
|
2031
|
+
(usersById, userId) => userId ? usersById[userId] ?? emptyObject : emptyObject
|
|
2032
|
+
);
|
|
2287
2033
|
var getUserSettings = (state) => state.users.userSettings;
|
|
2288
2034
|
var getSelectedDeviceAttribute = (0, import_toolkit14.createSelector)(
|
|
2289
2035
|
[getUserSettings],
|
|
2290
2036
|
({ columnSelection }) => columnSelection.map((attribute) => ({ attribute: attribute.key, scope: attribute.scope }))
|
|
2291
2037
|
);
|
|
2292
2038
|
var getIsDarkMode = (0, import_toolkit14.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
|
|
2293
|
-
var
|
|
2039
|
+
var getReadAllHelptips = (0, import_toolkit14.createSelector)(
|
|
2294
2040
|
[getTooltipsById],
|
|
2295
|
-
(tooltips) => Object.values(tooltips).
|
|
2041
|
+
(tooltips) => Object.values(tooltips).every(({ readState }) => readState === READ_STATES.read)
|
|
2296
2042
|
);
|
|
2297
2043
|
var getTooltipsState = (0, import_toolkit14.createSelector)(
|
|
2298
2044
|
[getTooltipsById, getUserSettings],
|
|
@@ -2306,7 +2052,7 @@ var getTooltipsState = (0, import_toolkit14.createSelector)(
|
|
|
2306
2052
|
);
|
|
2307
2053
|
var getHas2FA = (0, import_toolkit14.createSelector)(
|
|
2308
2054
|
[getCurrentUser],
|
|
2309
|
-
(currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === twoFAStates.enabled
|
|
2055
|
+
(currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === import_constants4.twoFAStates.enabled
|
|
2310
2056
|
);
|
|
2311
2057
|
var getIdAttribute = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
|
|
2312
2058
|
var getOfflineThresholdSettings = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ offlineThreshold }) => ({
|
|
@@ -2322,37 +2068,34 @@ var getIsEnterprise = (0, import_toolkit15.createSelector)(
|
|
|
2322
2068
|
);
|
|
2323
2069
|
var getAttrsEndpoint = (0, import_toolkit15.createSelector)(
|
|
2324
2070
|
[getFeatures],
|
|
2325
|
-
({ hasReporting }) => hasReporting ? `${reportingApiUrl}/devices/search/attributes` : `${inventoryApiUrlV2}/filters/attributes`
|
|
2071
|
+
({ hasReporting }) => hasReporting ? `${import_constants4.reportingApiUrl}/devices/search/attributes` : `${import_constants4.inventoryApiUrlV2}/filters/attributes`
|
|
2326
2072
|
);
|
|
2327
2073
|
var getSearchEndpoint = (0, import_toolkit15.createSelector)(
|
|
2328
2074
|
[getFeatures],
|
|
2329
|
-
({ hasReporting }) => hasReporting ? `${reportingApiUrl}/devices/search` : `${inventoryApiUrlV2}/filters/search`
|
|
2330
|
-
);
|
|
2331
|
-
var getUserRoles = (0, import_toolkit15.createSelector)(
|
|
2332
|
-
[getCurrentUser, getRolesById, getIsEnterprise, getFeatures, getOrganization],
|
|
2333
|
-
(currentUser, rolesById2, isEnterprise, { isHosted, hasMultitenancy }, { plan = PLANS.os.id }) => {
|
|
2334
|
-
const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
|
|
2335
|
-
const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
|
|
2336
|
-
return { isAdmin, uiPermissions };
|
|
2337
|
-
}
|
|
2075
|
+
({ hasReporting }) => hasReporting ? `${import_constants4.reportingApiUrl}/devices/search` : `${import_constants4.inventoryApiUrlV2}/filters/search`
|
|
2338
2076
|
);
|
|
2077
|
+
var getUserRoles = (0, import_toolkit15.createSelector)([getCurrentUser, getRolesById, getIsEnterprise], (currentUser, rolesById2, isEnterprise) => {
|
|
2078
|
+
const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === import_constants4.rolesByName.admin) : !isEnterprise;
|
|
2079
|
+
const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([import_constants4.rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
|
|
2080
|
+
return { isAdmin, uiPermissions };
|
|
2081
|
+
});
|
|
2339
2082
|
var hasPermission = (thing, permission) => Object.values(thing).some((permissions) => permissions.includes(permission));
|
|
2340
2083
|
var getUserCapabilities = (0, import_toolkit15.createSelector)([getUserRoles, getIsServiceProvider], ({ uiPermissions }, isServiceProvider) => {
|
|
2341
|
-
const canManageReleases = hasPermission(uiPermissions.releases, uiPermissionsById.manage.value);
|
|
2342
|
-
const canReadReleases = canManageReleases || hasPermission(uiPermissions.releases, uiPermissionsById.read.value);
|
|
2343
|
-
const canUploadReleases = canManageReleases || hasPermission(uiPermissions.releases, uiPermissionsById.upload.value);
|
|
2344
|
-
const canAuditlog = uiPermissions.auditlog.includes(uiPermissionsById.read.value);
|
|
2345
|
-
const canReadUsers = uiPermissions.userManagement.includes(uiPermissionsById.read.value);
|
|
2346
|
-
const canManageUsers = uiPermissions.userManagement.includes(uiPermissionsById.manage.value);
|
|
2347
|
-
const canReadDevices = hasPermission(uiPermissions.groups, uiPermissionsById.read.value);
|
|
2084
|
+
const canManageReleases = hasPermission(uiPermissions.releases, import_constants4.uiPermissionsById.manage.value);
|
|
2085
|
+
const canReadReleases = canManageReleases || hasPermission(uiPermissions.releases, import_constants4.uiPermissionsById.read.value);
|
|
2086
|
+
const canUploadReleases = canManageReleases || hasPermission(uiPermissions.releases, import_constants4.uiPermissionsById.upload.value);
|
|
2087
|
+
const canAuditlog = uiPermissions.auditlog.includes(import_constants4.uiPermissionsById.read.value);
|
|
2088
|
+
const canReadUsers = uiPermissions.userManagement.includes(import_constants4.uiPermissionsById.read.value);
|
|
2089
|
+
const canManageUsers = uiPermissions.userManagement.includes(import_constants4.uiPermissionsById.manage.value);
|
|
2090
|
+
const canReadDevices = hasPermission(uiPermissions.groups, import_constants4.uiPermissionsById.read.value);
|
|
2348
2091
|
const canWriteDevices = Object.values(uiPermissions.groups).some(
|
|
2349
|
-
(groupPermissions) => groupPermissions.includes(uiPermissionsById.read.value) && groupPermissions.length > 1
|
|
2092
|
+
(groupPermissions) => groupPermissions.includes(import_constants4.uiPermissionsById.read.value) && groupPermissions.length > 1
|
|
2350
2093
|
);
|
|
2351
|
-
const canTroubleshoot = hasPermission(uiPermissions.groups, uiPermissionsById.connect.value);
|
|
2352
|
-
const canManageDevices = hasPermission(uiPermissions.groups, uiPermissionsById.manage.value);
|
|
2353
|
-
const canConfigure = hasPermission(uiPermissions.groups, uiPermissionsById.configure.value);
|
|
2354
|
-
const canDeploy = uiPermissions.deployments.includes(uiPermissionsById.deploy.value) || hasPermission(uiPermissions.groups, uiPermissionsById.deploy.value);
|
|
2355
|
-
const canReadDeployments = uiPermissions.deployments.includes(uiPermissionsById.read.value);
|
|
2094
|
+
const canTroubleshoot = hasPermission(uiPermissions.groups, import_constants4.uiPermissionsById.connect.value);
|
|
2095
|
+
const canManageDevices = hasPermission(uiPermissions.groups, import_constants4.uiPermissionsById.manage.value);
|
|
2096
|
+
const canConfigure = hasPermission(uiPermissions.groups, import_constants4.uiPermissionsById.configure.value);
|
|
2097
|
+
const canDeploy = uiPermissions.deployments.includes(import_constants4.uiPermissionsById.deploy.value) || hasPermission(uiPermissions.groups, import_constants4.uiPermissionsById.deploy.value);
|
|
2098
|
+
const canReadDeployments = uiPermissions.deployments.includes(import_constants4.uiPermissionsById.read.value);
|
|
2356
2099
|
return {
|
|
2357
2100
|
canAuditlog,
|
|
2358
2101
|
canConfigure,
|
|
@@ -2403,11 +2146,11 @@ var getTenantCapabilities = (0, import_toolkit15.createSelector)(
|
|
|
2403
2146
|
var getFilterAttributes = (0, import_toolkit15.createSelector)(
|
|
2404
2147
|
[getGlobalSettings, getFilteringAttributes],
|
|
2405
2148
|
({ previousFilters }, { identityAttributes, inventoryAttributes, systemAttributes, tagAttributes }) => {
|
|
2406
|
-
const deviceNameAttribute = { key: "name", value: "Name", scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 1 };
|
|
2407
|
-
const deviceIdAttribute = { key: "id", value: "Device ID", scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 };
|
|
2408
|
-
const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
2149
|
+
const deviceNameAttribute = { key: "name", value: "Name", scope: import_constants4.ATTRIBUTE_SCOPES.tags, category: import_constants4.ATTRIBUTE_SCOPES.tags, priority: 1 };
|
|
2150
|
+
const deviceIdAttribute = { key: "id", value: "Device ID", scope: import_constants4.ATTRIBUTE_SCOPES.identity, category: import_constants4.ATTRIBUTE_SCOPES.identity, priority: 1 };
|
|
2151
|
+
const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: import_constants4.ATTRIBUTE_SCOPES.system, category: import_constants4.ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
2409
2152
|
const updateAttribute = { ...checkInAttribute, key: "updated_ts", value: "Last inventory update" };
|
|
2410
|
-
const firstRequestAttribute = { key: "created_ts", value: "First request", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
2153
|
+
const firstRequestAttribute = { key: "created_ts", value: "First request", scope: import_constants4.ATTRIBUTE_SCOPES.system, category: import_constants4.ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
2411
2154
|
const attributes = [
|
|
2412
2155
|
...previousFilters.map((item) => ({
|
|
2413
2156
|
...item,
|
|
@@ -2417,15 +2160,15 @@ var getFilterAttributes = (0, import_toolkit15.createSelector)(
|
|
|
2417
2160
|
})),
|
|
2418
2161
|
deviceNameAttribute,
|
|
2419
2162
|
deviceIdAttribute,
|
|
2420
|
-
...identityAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 })),
|
|
2421
|
-
...inventoryAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.inventory, category: ATTRIBUTE_SCOPES.inventory, priority: 2 })),
|
|
2422
|
-
...tagAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 3 })),
|
|
2163
|
+
...identityAttributes.map((item) => ({ key: item, value: item, scope: import_constants4.ATTRIBUTE_SCOPES.identity, category: import_constants4.ATTRIBUTE_SCOPES.identity, priority: 1 })),
|
|
2164
|
+
...inventoryAttributes.map((item) => ({ key: item, value: item, scope: import_constants4.ATTRIBUTE_SCOPES.inventory, category: import_constants4.ATTRIBUTE_SCOPES.inventory, priority: 2 })),
|
|
2165
|
+
...tagAttributes.map((item) => ({ key: item, value: item, scope: import_constants4.ATTRIBUTE_SCOPES.tags, category: import_constants4.ATTRIBUTE_SCOPES.tags, priority: 3 })),
|
|
2423
2166
|
checkInAttribute,
|
|
2424
2167
|
updateAttribute,
|
|
2425
2168
|
firstRequestAttribute,
|
|
2426
|
-
...systemAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 }))
|
|
2169
|
+
...systemAttributes.map((item) => ({ key: item, value: item, scope: import_constants4.ATTRIBUTE_SCOPES.system, category: import_constants4.ATTRIBUTE_SCOPES.system, priority: 4 }))
|
|
2427
2170
|
];
|
|
2428
|
-
return (0,
|
|
2171
|
+
return (0, import_helpers6.attributeDuplicateFilter)(attributes, "key");
|
|
2429
2172
|
}
|
|
2430
2173
|
);
|
|
2431
2174
|
var getOnboardingState = (0, import_toolkit15.createSelector)([getOnboarding, getUserSettings], ({ complete, progress: progress2, showTips, ...remainder }, { onboarding = {} }) => ({
|
|
@@ -2436,7 +2179,7 @@ var getOnboardingState = (0, import_toolkit15.createSelector)([getOnboarding, ge
|
|
|
2436
2179
|
showTips: !onboarding.showTips ? onboarding.showTips : showTips
|
|
2437
2180
|
}));
|
|
2438
2181
|
var getDemoDeviceAddress = (0, import_toolkit15.createSelector)([getDevicesById, getOnboarding], (devicesById, { approach, demoArtifactPort }) => {
|
|
2439
|
-
const demoDeviceAddress = `http://${(0,
|
|
2182
|
+
const demoDeviceAddress = `http://${(0, import_helpers6.getDemoDeviceAddress)(Object.values(devicesById), approach)}`;
|
|
2440
2183
|
return demoArtifactPort ? `${demoDeviceAddress}:${demoArtifactPort}` : demoDeviceAddress;
|
|
2441
2184
|
});
|
|
2442
2185
|
var getDeviceConfigDeployment = (0, import_toolkit15.createSelector)([getDeviceById, getDeploymentsById], (device, deploymentsById) => {
|
|
@@ -2465,7 +2208,7 @@ var getSelectedDeploymentData = (0, import_toolkit15.createSelector)(
|
|
|
2465
2208
|
);
|
|
2466
2209
|
var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
|
|
2467
2210
|
[getFeatures, getTenantCapabilities, getIssueCountsByType],
|
|
2468
|
-
({ hasReporting }, { hasFullFiltering, hasMonitor }, issueCounts) => Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, needsReporting, title }) => {
|
|
2211
|
+
({ hasReporting }, { hasFullFiltering, hasMonitor }, issueCounts) => Object.values(import_constants4.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, needsReporting, title }) => {
|
|
2469
2212
|
if (isCategory || needsReporting && !hasReporting || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) {
|
|
2470
2213
|
return accu;
|
|
2471
2214
|
}
|
|
@@ -2473,14 +2216,11 @@ var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
|
|
|
2473
2216
|
return accu;
|
|
2474
2217
|
}, {})
|
|
2475
2218
|
);
|
|
2476
|
-
var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUserRoles
|
|
2219
|
+
var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUserRoles], (groupsById, { uiPermissions }) => {
|
|
2477
2220
|
const { [UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
|
|
2478
|
-
if (staticOnly) {
|
|
2479
|
-
return Object.keys(uiPermissions.groups).sort();
|
|
2480
|
-
}
|
|
2481
2221
|
return Object.keys(
|
|
2482
2222
|
Object.entries(groups).reduce((accu, [groupName, group]) => {
|
|
2483
|
-
if (group.filterId || uiPermissions.groups[ALL_DEVICES]) {
|
|
2223
|
+
if (group.filterId || uiPermissions.groups[import_constants4.ALL_DEVICES]) {
|
|
2484
2224
|
accu[groupName] = group;
|
|
2485
2225
|
}
|
|
2486
2226
|
return accu;
|
|
@@ -2489,9 +2229,7 @@ var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUser
|
|
|
2489
2229
|
});
|
|
2490
2230
|
var getDeviceReportsForUser = (0, import_toolkit15.createSelector)(
|
|
2491
2231
|
[getUserSettings, getCurrentUser, getGlobalSettings, getDevicesById],
|
|
2492
|
-
({ reports }, { id: currentUserId }, globalSettings, devicesById) => {
|
|
2493
|
-
return reports || globalSettings[`${currentUserId}-reports`] || (Object.keys(devicesById).length ? defaultReports : []);
|
|
2494
|
-
}
|
|
2232
|
+
({ reports }, { id: currentUserId }, globalSettings, devicesById) => reports || globalSettings[`${currentUserId}-reports`] || (Object.keys(devicesById).length ? defaultReports : [])
|
|
2495
2233
|
);
|
|
2496
2234
|
var listTypeDeviceIdMap = {
|
|
2497
2235
|
deviceList: getListedDevices,
|
|
@@ -2515,14 +2253,14 @@ var getAuditlogDevice = (0, import_toolkit15.createSelector)([getAuditLogEntry,
|
|
|
2515
2253
|
var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
|
|
2516
2254
|
if (service_provider) {
|
|
2517
2255
|
return roles.reduce((accu, role) => {
|
|
2518
|
-
if (rolesById[role.value]) {
|
|
2256
|
+
if (import_constants4.rolesById[role.value]) {
|
|
2519
2257
|
return accu;
|
|
2520
2258
|
}
|
|
2521
2259
|
accu.push(role);
|
|
2522
2260
|
return accu;
|
|
2523
|
-
}, Object.values(serviceProviderRolesById));
|
|
2261
|
+
}, Object.values(import_constants4.serviceProviderRolesById));
|
|
2524
2262
|
}
|
|
2525
|
-
return Object.keys(rolesById).reverse().reduce((accu, key) => {
|
|
2263
|
+
return Object.keys(import_constants4.rolesById).reverse().reduce((accu, key) => {
|
|
2526
2264
|
const index = accu.findIndex(({ value }) => value === key);
|
|
2527
2265
|
accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
|
|
2528
2266
|
return accu;
|
|
@@ -2531,17 +2269,18 @@ var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, ge
|
|
|
2531
2269
|
|
|
2532
2270
|
// src/store.ts
|
|
2533
2271
|
var import_react_redux = require("react-redux");
|
|
2534
|
-
var
|
|
2272
|
+
var import_helpers7 = require("@northern.tech/utils/helpers");
|
|
2535
2273
|
var import_toolkit16 = require("@reduxjs/toolkit");
|
|
2274
|
+
var import_react = require("@sentry/react");
|
|
2536
2275
|
var { setSnackbar, uploadProgress } = actions_default;
|
|
2537
2276
|
var keys = ["sessionDeploymentChecker", settingsKeys.initialized];
|
|
2538
2277
|
var resetEnvironment = () => keys.forEach((key) => window.sessionStorage.removeItem(key));
|
|
2539
2278
|
resetEnvironment();
|
|
2540
2279
|
var commonErrorFallback = "Please check your connection.";
|
|
2541
2280
|
var commonErrorHandler = (err, errorContext, dispatch, fallback, mightBeAuthRelated = false) => {
|
|
2542
|
-
const errMsg = (0,
|
|
2281
|
+
const errMsg = (0, import_helpers7.extractErrorMessage)(err, fallback);
|
|
2543
2282
|
if (mightBeAuthRelated || getToken()) {
|
|
2544
|
-
dispatch(setSnackbar({ message: (0,
|
|
2283
|
+
dispatch(setSnackbar({ message: (0, import_helpers7.preformatWithRequestID)(err.response, `${errorContext} ${errMsg}`), action: "Copy to clipboard" }));
|
|
2545
2284
|
}
|
|
2546
2285
|
return Promise.reject(err);
|
|
2547
2286
|
};
|
|
@@ -2569,20 +2308,50 @@ var rejectionLoggerMiddleware = () => (next) => (action) => {
|
|
|
2569
2308
|
}
|
|
2570
2309
|
return next(action);
|
|
2571
2310
|
};
|
|
2311
|
+
var tracingActionIgnoreList = [actions8.successfullyLoggedIn.type, "users/loginUser/pending", "users/loginUser/fulfilled", "users/loginUser/rejected"];
|
|
2312
|
+
var sentryReduxEnhancer = (0, import_react.createReduxEnhancer)({
|
|
2313
|
+
actionTransformer: (action) => {
|
|
2314
|
+
if (tracingActionIgnoreList.includes(action.type)) {
|
|
2315
|
+
return null;
|
|
2316
|
+
}
|
|
2317
|
+
return action;
|
|
2318
|
+
},
|
|
2319
|
+
// Transform the state to remove sensitive information
|
|
2320
|
+
stateTransformer: (state) => {
|
|
2321
|
+
const transformedState = {
|
|
2322
|
+
...state,
|
|
2323
|
+
users: { ...state.users, currentSession: null },
|
|
2324
|
+
organization: {
|
|
2325
|
+
...state.organization,
|
|
2326
|
+
organization: {
|
|
2327
|
+
...state.organization.organization,
|
|
2328
|
+
tenant_token: null
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
};
|
|
2332
|
+
return transformedState;
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2572
2335
|
var getConfiguredStore = (options = {}) => {
|
|
2573
2336
|
const { preloadedState = {}, ...config } = options;
|
|
2574
2337
|
return (0, import_toolkit16.configureStore)({
|
|
2575
2338
|
...config,
|
|
2576
2339
|
preloadedState,
|
|
2340
|
+
enhancers: (getDefaultEnhancers) => {
|
|
2341
|
+
if (window.mender_environment?.sentry?.isReduxEnabled) {
|
|
2342
|
+
return getDefaultEnhancers().concat(sentryReduxEnhancer);
|
|
2343
|
+
}
|
|
2344
|
+
return getDefaultEnhancers();
|
|
2345
|
+
},
|
|
2577
2346
|
reducer: sessionReducer,
|
|
2578
2347
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
2579
2348
|
immutableCheck: {
|
|
2580
2349
|
ignoredPaths: ["app.uploadsById"]
|
|
2581
2350
|
},
|
|
2582
2351
|
serializableCheck: {
|
|
2583
|
-
ignoredActions: [
|
|
2584
|
-
ignoredActionPaths: ["uploads", "
|
|
2585
|
-
ignoredPaths: ["app.uploadsById", "
|
|
2352
|
+
ignoredActions: [actions7.receiveExternalDeviceIntegrations.name, uploadProgress.name],
|
|
2353
|
+
ignoredActionPaths: ["uploads", /payload\..*$/, "meta.arg.file", "meta.arg.integration.configHint"],
|
|
2354
|
+
ignoredPaths: ["app.uploadsById", "organization.externalDeviceIntegrations"]
|
|
2586
2355
|
}
|
|
2587
2356
|
}).concat(rejectionLoggerMiddleware)
|
|
2588
2357
|
});
|
|
@@ -2590,18 +2359,14 @@ var getConfiguredStore = (options = {}) => {
|
|
|
2590
2359
|
var store = getConfiguredStore({
|
|
2591
2360
|
preloadedState: {}
|
|
2592
2361
|
});
|
|
2362
|
+
var createAppAsyncThunk = import_toolkit16.createAsyncThunk.withTypes();
|
|
2593
2363
|
|
|
2594
2364
|
// src/releasesSlice/thunks.ts
|
|
2595
|
-
var import_helpers7 = require("@northern.tech/utils/helpers");
|
|
2596
|
-
var import_locationutils = require("@northern.tech/utils/locationutils");
|
|
2597
|
-
var import_toolkit17 = require("@reduxjs/toolkit");
|
|
2598
|
-
var import_axios2 = require("axios");
|
|
2599
|
-
var import_uuid = require("uuid");
|
|
2600
2365
|
var { setSnackbar: setSnackbar2, initUpload, uploadProgress: uploadProgress2, cleanUpUpload } = actions_default;
|
|
2601
|
-
var { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
|
|
2602
|
-
var sortingDefaults = { direction: SORTING_OPTIONS.desc, key: "modified" };
|
|
2366
|
+
var { page: defaultPage, perPage: defaultPerPage } = import_constants4.DEVICE_LIST_DEFAULTS;
|
|
2367
|
+
var sortingDefaults = { direction: import_constants4.SORTING_OPTIONS.desc, key: "modified" };
|
|
2603
2368
|
var flattenRelease = (release, stateRelease) => {
|
|
2604
|
-
const updatedArtifacts = release.artifacts?.sort((0,
|
|
2369
|
+
const updatedArtifacts = release.artifacts?.sort((0, import_helpers8.customSort)(true, "modified")) || [];
|
|
2605
2370
|
const { artifacts, deviceTypes, modified } = updatedArtifacts.reduce(
|
|
2606
2371
|
(accu, item) => {
|
|
2607
2372
|
accu.deviceTypes.push(...item.device_types_compatible);
|
|
@@ -2615,7 +2380,7 @@ var flattenRelease = (release, stateRelease) => {
|
|
|
2615
2380
|
},
|
|
2616
2381
|
{ artifacts: [], deviceTypes: [], modified: void 0 }
|
|
2617
2382
|
);
|
|
2618
|
-
return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(
|
|
2383
|
+
return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(import_helpers8.duplicateFilter), modified };
|
|
2619
2384
|
};
|
|
2620
2385
|
var reduceReceivedReleases = (releases, stateReleasesById) => releases.reduce((accu, release) => {
|
|
2621
2386
|
const stateRelease = stateReleasesById[release.name] || {};
|
|
@@ -2624,7 +2389,7 @@ var reduceReceivedReleases = (releases, stateReleasesById) => releases.reduce((a
|
|
|
2624
2389
|
}, {});
|
|
2625
2390
|
var findArtifactIndexInRelease = (releases, id) => Object.values(releases).reduce(
|
|
2626
2391
|
(accu, item) => {
|
|
2627
|
-
|
|
2392
|
+
const index = item.artifacts.findIndex((releaseArtifact) => releaseArtifact.id === id);
|
|
2628
2393
|
if (index > -1) {
|
|
2629
2394
|
accu = { release: item, index };
|
|
2630
2395
|
}
|
|
@@ -2632,14 +2397,14 @@ var findArtifactIndexInRelease = (releases, id) => Object.values(releases).reduc
|
|
|
2632
2397
|
},
|
|
2633
2398
|
{ release: null, index: -1 }
|
|
2634
2399
|
);
|
|
2635
|
-
var getArtifactInstallCount = (
|
|
2636
|
-
|
|
2400
|
+
var getArtifactInstallCount = createAppAsyncThunk(`${sliceName}/getArtifactInstallCount`, (id, { dispatch, getState }) => {
|
|
2401
|
+
const { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);
|
|
2637
2402
|
if (!release || index === -1) {
|
|
2638
2403
|
return;
|
|
2639
2404
|
}
|
|
2640
2405
|
const releaseArtifacts = [...release.artifacts];
|
|
2641
2406
|
const artifact = releaseArtifacts[index];
|
|
2642
|
-
const { key, name, version } = (0,
|
|
2407
|
+
const { key, name, version } = (0, import_helpers8.extractSoftwareItem)(artifact.artifact_provides) ?? {};
|
|
2643
2408
|
const attribute = `${key}${name ? `.${name}` : ""}.version`;
|
|
2644
2409
|
const { filterTerms } = convertDeviceListStateToFilters({
|
|
2645
2410
|
filters: [{ ...emptyFilter, key: attribute, value: version, scope: "inventory" }]
|
|
@@ -2650,24 +2415,28 @@ var getArtifactInstallCount = (0, import_toolkit17.createAsyncThunk)(`${sliceNam
|
|
|
2650
2415
|
filters: filterTerms,
|
|
2651
2416
|
attributes: [{ scope: "identity", attribute: "status" }]
|
|
2652
2417
|
}).catch((err) => commonErrorHandler(err, `Retrieving artifact installation count failed:`, dispatch, commonErrorFallback)).then(({ headers }) => {
|
|
2653
|
-
|
|
2418
|
+
const foundRelease = findArtifactIndexInRelease(getReleasesById(getState()), id);
|
|
2419
|
+
const index2 = foundRelease.index;
|
|
2420
|
+
let release2 = foundRelease.release;
|
|
2654
2421
|
if (!release2 || index2 === -1) {
|
|
2655
2422
|
return;
|
|
2656
2423
|
}
|
|
2657
|
-
const installCount = Number(headers[headerNames.total]);
|
|
2424
|
+
const installCount = Number(headers[import_constants4.headerNames.total]);
|
|
2658
2425
|
const releaseArtifacts2 = [...release2.artifacts];
|
|
2659
2426
|
releaseArtifacts2[index2] = { ...releaseArtifacts2[index2], installCount };
|
|
2660
2427
|
release2 = {
|
|
2661
2428
|
...release2,
|
|
2662
2429
|
artifacts: releaseArtifacts2
|
|
2663
2430
|
};
|
|
2664
|
-
return dispatch(
|
|
2431
|
+
return dispatch(actions.receiveRelease(release2));
|
|
2665
2432
|
});
|
|
2666
2433
|
});
|
|
2667
|
-
var getArtifactUrl = (
|
|
2668
|
-
`${
|
|
2669
|
-
(id, { dispatch, getState }) => general_api_default.get(`${deploymentsApiUrl}/artifacts/${id}/download`).then((response) => {
|
|
2670
|
-
|
|
2434
|
+
var getArtifactUrl = createAppAsyncThunk(
|
|
2435
|
+
`${sliceName}/getArtifactUrl`,
|
|
2436
|
+
(id, { dispatch, getState }) => general_api_default.get(`${import_constants4.deploymentsApiUrl}/artifacts/${id}/download`).then((response) => {
|
|
2437
|
+
const foundRelease = findArtifactIndexInRelease(getReleasesById(getState()), id);
|
|
2438
|
+
const index = foundRelease.index;
|
|
2439
|
+
let release = foundRelease.release;
|
|
2671
2440
|
if (!release || index === -1) {
|
|
2672
2441
|
return dispatch(getReleases());
|
|
2673
2442
|
}
|
|
@@ -2680,11 +2449,11 @@ var getArtifactUrl = (0, import_toolkit17.createAsyncThunk)(
|
|
|
2680
2449
|
...release,
|
|
2681
2450
|
artifacts: releaseArtifacts
|
|
2682
2451
|
};
|
|
2683
|
-
return dispatch(
|
|
2452
|
+
return dispatch(actions.receiveRelease(release));
|
|
2684
2453
|
})
|
|
2685
2454
|
);
|
|
2686
|
-
var createArtifact = (
|
|
2687
|
-
|
|
2455
|
+
var createArtifact = createAppAsyncThunk(`${sliceName}/createArtifact`, ({ file, meta }, { dispatch }) => {
|
|
2456
|
+
const formData = Object.entries(meta).reduce((accu, [key, value]) => {
|
|
2688
2457
|
if (Array.isArray(value)) {
|
|
2689
2458
|
accu.append(key, value.join(","));
|
|
2690
2459
|
} else if (value instanceof Object) {
|
|
@@ -2700,9 +2469,9 @@ var createArtifact = (0, import_toolkit17.createAsyncThunk)(`${sliceName7}/creat
|
|
|
2700
2469
|
const cancelSource = new AbortController();
|
|
2701
2470
|
return Promise.all([
|
|
2702
2471
|
dispatch(setSnackbar2("Generating artifact")),
|
|
2703
|
-
dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size,
|
|
2472
|
+
dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size, progress: 0, cancelSource } })),
|
|
2704
2473
|
general_api_default.upload(
|
|
2705
|
-
`${deploymentsApiUrl}/artifacts/generate`,
|
|
2474
|
+
`${import_constants4.deploymentsApiUrl}/artifacts/generate`,
|
|
2706
2475
|
formData,
|
|
2707
2476
|
(e) => dispatch(uploadProgress2({ id: uploadId, progress: progress(e) })),
|
|
2708
2477
|
cancelSource.signal
|
|
@@ -2712,75 +2481,86 @@ var createArtifact = (0, import_toolkit17.createAsyncThunk)(`${sliceName7}/creat
|
|
|
2712
2481
|
dispatch(getReleases());
|
|
2713
2482
|
dispatch(selectRelease(file.name));
|
|
2714
2483
|
}, TIMEOUTS.oneSecond);
|
|
2715
|
-
return Promise.resolve(dispatch(setSnackbar2("Upload successful", TIMEOUTS.fiveSeconds)));
|
|
2484
|
+
return Promise.resolve(dispatch(setSnackbar2({ message: "Upload successful", autoHideDuration: TIMEOUTS.fiveSeconds })));
|
|
2716
2485
|
}).catch((err) => {
|
|
2717
2486
|
if ((0, import_axios2.isCancel)(err)) {
|
|
2718
|
-
return dispatch(setSnackbar2("The artifact generation has been cancelled", TIMEOUTS.fiveSeconds));
|
|
2487
|
+
return dispatch(setSnackbar2({ message: "The artifact generation has been cancelled", autoHideDuration: TIMEOUTS.fiveSeconds }));
|
|
2719
2488
|
}
|
|
2720
2489
|
return commonErrorHandler(err, `Artifact couldn't be generated.`, dispatch);
|
|
2721
2490
|
}).finally(() => dispatch(cleanUpUpload(uploadId)));
|
|
2722
2491
|
});
|
|
2723
|
-
var uploadArtifact = (
|
|
2724
|
-
|
|
2725
|
-
formData.append("size", file.size);
|
|
2492
|
+
var uploadArtifact = createAppAsyncThunk(`${sliceName}/uploadArtifact`, ({ file, meta }, { dispatch }) => {
|
|
2493
|
+
const formData = new FormData();
|
|
2494
|
+
formData.append("size", file.size.toString());
|
|
2726
2495
|
formData.append("description", meta.description);
|
|
2727
2496
|
formData.append("artifact", file);
|
|
2728
2497
|
const uploadId = (0, import_uuid.v4)();
|
|
2729
2498
|
const cancelSource = new AbortController();
|
|
2730
2499
|
return Promise.all([
|
|
2731
2500
|
dispatch(setSnackbar2("Uploading artifact")),
|
|
2732
|
-
dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size,
|
|
2733
|
-
general_api_default.upload(
|
|
2501
|
+
dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size, progress: 0, cancelSource } })),
|
|
2502
|
+
general_api_default.upload(
|
|
2503
|
+
`${import_constants4.deploymentsApiUrl}/artifacts`,
|
|
2504
|
+
formData,
|
|
2505
|
+
(e) => dispatch(uploadProgress2({ id: uploadId, progress: progress(e) })),
|
|
2506
|
+
cancelSource.signal
|
|
2507
|
+
)
|
|
2734
2508
|
]).then(() => {
|
|
2735
|
-
const tasks = [
|
|
2509
|
+
const tasks = [
|
|
2510
|
+
dispatch(setSnackbar2({ message: "Upload successful", autoHideDuration: TIMEOUTS.fiveSeconds })),
|
|
2511
|
+
dispatch(getReleases())
|
|
2512
|
+
];
|
|
2736
2513
|
if (meta.name) {
|
|
2737
2514
|
tasks.push(dispatch(selectRelease(meta.name)));
|
|
2738
2515
|
}
|
|
2739
2516
|
return Promise.all(tasks);
|
|
2740
2517
|
}).catch((err) => {
|
|
2741
2518
|
if ((0, import_axios2.isCancel)(err)) {
|
|
2742
|
-
return dispatch(setSnackbar2("The upload has been cancelled", TIMEOUTS.fiveSeconds));
|
|
2519
|
+
return dispatch(setSnackbar2({ message: "The upload has been cancelled", autoHideDuration: TIMEOUTS.fiveSeconds }));
|
|
2743
2520
|
}
|
|
2744
2521
|
return commonErrorHandler(err, `Artifact couldn't be uploaded.`, dispatch);
|
|
2745
2522
|
}).finally(() => dispatch(cleanUpUpload(uploadId)));
|
|
2746
2523
|
});
|
|
2747
|
-
var cancelFileUpload = (
|
|
2524
|
+
var cancelFileUpload = createAppAsyncThunk(`${sliceName}/cancelFileUpload`, (id, { dispatch, getState }) => {
|
|
2748
2525
|
const { [id]: current } = getState().app.uploadsById;
|
|
2749
2526
|
current.cancelSource.abort();
|
|
2750
2527
|
return Promise.resolve(dispatch(cleanUpUpload(id)));
|
|
2751
2528
|
});
|
|
2752
|
-
var editArtifact = (
|
|
2753
|
-
`${
|
|
2754
|
-
({ id, body }, { dispatch, getState }) => general_api_default.put(`${deploymentsApiUrl}/artifacts/${id}`, body).catch((err) => commonErrorHandler(err, `Artifact details couldn't be updated.`, dispatch)).then(() => {
|
|
2529
|
+
var editArtifact = createAppAsyncThunk(
|
|
2530
|
+
`${sliceName}/editArtifact`,
|
|
2531
|
+
({ id, body }, { dispatch, getState }) => general_api_default.put(`${import_constants4.deploymentsApiUrl}/artifacts/${id}`, body).catch((err) => commonErrorHandler(err, `Artifact details couldn't be updated.`, dispatch)).then(() => {
|
|
2755
2532
|
const state = getState();
|
|
2756
|
-
|
|
2533
|
+
const { release, index } = findArtifactIndexInRelease(getReleasesById(state), id);
|
|
2757
2534
|
if (!release || index === -1) {
|
|
2758
2535
|
return dispatch(getReleases());
|
|
2759
2536
|
}
|
|
2760
2537
|
const updatedRelease = {
|
|
2761
2538
|
...release,
|
|
2762
|
-
artifacts: release.artifacts.map((artifact, i) => i === index ? { ...artifact, description: body.description } : artifact)
|
|
2539
|
+
artifacts: release.artifacts.map((artifact, i) => i === index ? { ...artifact, description: body.description || "" } : artifact)
|
|
2763
2540
|
};
|
|
2764
2541
|
return Promise.all([
|
|
2765
|
-
dispatch(
|
|
2766
|
-
dispatch(setSnackbar2("Artifact details were updated successfully.", TIMEOUTS.fiveSeconds, "")),
|
|
2542
|
+
dispatch(actions.receiveRelease(updatedRelease)),
|
|
2543
|
+
dispatch(setSnackbar2({ message: "Artifact details were updated successfully.", autoHideDuration: TIMEOUTS.fiveSeconds, action: "" })),
|
|
2767
2544
|
dispatch(getRelease(release.name)),
|
|
2768
2545
|
dispatch(selectRelease(release.name))
|
|
2769
2546
|
]);
|
|
2770
2547
|
})
|
|
2771
2548
|
);
|
|
2772
|
-
var removeArtifact = (
|
|
2773
|
-
`${
|
|
2774
|
-
(id, { dispatch, getState }) => general_api_default.delete(`${deploymentsApiUrl}/artifacts/${id}`).then(() => {
|
|
2549
|
+
var removeArtifact = createAppAsyncThunk(
|
|
2550
|
+
`${sliceName}/removeArtifact`,
|
|
2551
|
+
(id, { dispatch, getState }) => general_api_default.delete(`${import_constants4.deploymentsApiUrl}/artifacts/${id}`).then(() => {
|
|
2775
2552
|
const state = getState();
|
|
2776
|
-
|
|
2553
|
+
const { release, index } = findArtifactIndexInRelease(getReleasesById(state), id);
|
|
2554
|
+
if (!release || index === -1) {
|
|
2555
|
+
return dispatch(getReleases());
|
|
2556
|
+
}
|
|
2777
2557
|
const releaseArtifacts = [...release.artifacts];
|
|
2778
2558
|
releaseArtifacts.splice(index, 1);
|
|
2779
2559
|
if (!releaseArtifacts.length) {
|
|
2780
2560
|
const { releasesList } = state.releases;
|
|
2781
2561
|
const releaseIds = releasesList.releaseIds.filter((id2) => release.name !== id2);
|
|
2782
2562
|
return Promise.all([
|
|
2783
|
-
dispatch(
|
|
2563
|
+
dispatch(actions.removeRelease(release.name)),
|
|
2784
2564
|
dispatch(
|
|
2785
2565
|
setReleasesListState({
|
|
2786
2566
|
releaseIds,
|
|
@@ -2790,52 +2570,66 @@ var removeArtifact = (0, import_toolkit17.createAsyncThunk)(
|
|
|
2790
2570
|
)
|
|
2791
2571
|
]);
|
|
2792
2572
|
}
|
|
2793
|
-
return Promise.all([
|
|
2573
|
+
return Promise.all([
|
|
2574
|
+
dispatch(setSnackbar2({ message: "Artifact was removed", autoHideDuration: TIMEOUTS.fiveSeconds, action: "" })),
|
|
2575
|
+
dispatch(actions.receiveRelease(release))
|
|
2576
|
+
]);
|
|
2794
2577
|
}).catch((err) => commonErrorHandler(err, `Error removing artifact:`, dispatch))
|
|
2795
2578
|
);
|
|
2796
|
-
var removeRelease = (
|
|
2797
|
-
`${
|
|
2798
|
-
(releaseId, { dispatch, getState }) => Promise.all(getReleasesById(getState())[releaseId].artifacts.map(({ id }) => dispatch(removeArtifact(id)))).then(() => dispatch(selectRelease()))
|
|
2579
|
+
var removeRelease = createAppAsyncThunk(
|
|
2580
|
+
`${sliceName}/removeRelease`,
|
|
2581
|
+
(releaseId, { dispatch, getState }) => Promise.all(getReleasesById(getState())[releaseId].artifacts.map(({ id }) => dispatch(removeArtifact(id)))).then(() => dispatch(selectRelease(null)))
|
|
2799
2582
|
);
|
|
2800
|
-
var
|
|
2801
|
-
const
|
|
2802
|
-
|
|
2583
|
+
var removeReleases = createAppAsyncThunk(`${sliceName}/removeReleases`, (releaseIds, { dispatch, getState }) => {
|
|
2584
|
+
const deleteRequests = releaseIds.reduce((accu, releaseId) => {
|
|
2585
|
+
const releaseArtifacts = getReleasesById(getState())[releaseId].artifacts;
|
|
2586
|
+
accu.push(releaseArtifacts.map(({ id }) => dispatch(removeArtifact(id))));
|
|
2587
|
+
return accu;
|
|
2588
|
+
}, []);
|
|
2589
|
+
return Promise.all(deleteRequests);
|
|
2590
|
+
});
|
|
2591
|
+
var selectRelease = createAppAsyncThunk(`${sliceName}/selectRelease`, (release, { dispatch }) => {
|
|
2592
|
+
const name = (release && typeof release === "object" ? release.name : release) || null;
|
|
2593
|
+
const tasks = [dispatch(actions.selectedRelease(name))];
|
|
2803
2594
|
if (name) {
|
|
2804
2595
|
tasks.push(dispatch(getRelease(name)));
|
|
2805
2596
|
}
|
|
2806
2597
|
return Promise.all(tasks);
|
|
2807
2598
|
});
|
|
2808
|
-
var setReleasesListState = (
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2599
|
+
var setReleasesListState = createAppAsyncThunk(
|
|
2600
|
+
`${sliceName}/setReleasesListState`,
|
|
2601
|
+
(selectionState, { dispatch, getState }) => {
|
|
2602
|
+
const currentState = getState().releases.releasesList;
|
|
2603
|
+
const nextState = {
|
|
2604
|
+
...currentState,
|
|
2605
|
+
...selectionState,
|
|
2606
|
+
sort: { ...currentState.sort, ...selectionState.sort }
|
|
2607
|
+
};
|
|
2608
|
+
const tasks = [];
|
|
2609
|
+
const { isLoading: currentLoading, ...currentRequestState } = currentState;
|
|
2610
|
+
const { isLoading: selectionLoading, ...selectionRequestState } = nextState;
|
|
2611
|
+
if (!(0, import_helpers8.deepCompare)(currentRequestState, selectionRequestState)) {
|
|
2612
|
+
nextState.isLoading = true;
|
|
2613
|
+
tasks.push(dispatch(getReleases(nextState)).finally(() => dispatch(setReleasesListState({ isLoading: false }))));
|
|
2614
|
+
}
|
|
2615
|
+
tasks.push(dispatch(actions.setReleaseListState(nextState)));
|
|
2616
|
+
return Promise.all(tasks);
|
|
2821
2617
|
}
|
|
2822
|
-
|
|
2823
|
-
return Promise.all(tasks);
|
|
2824
|
-
});
|
|
2618
|
+
);
|
|
2825
2619
|
var releaseListRetrieval = (config) => {
|
|
2826
2620
|
const { searchTerm = "", page = defaultPage, perPage = defaultPerPage, sort = sortingDefaults, selectedTags = [], type = "" } = config;
|
|
2827
2621
|
const { key: attribute, direction } = sort;
|
|
2828
|
-
const filterQuery =
|
|
2622
|
+
const filterQuery = formatReleases({ pageState: { searchTerm, selectedTags } });
|
|
2829
2623
|
const updateType = type ? `update_type=${type}` : "";
|
|
2830
2624
|
const sorting = attribute ? `sort=${attribute}:${direction}`.toLowerCase() : "";
|
|
2831
2625
|
return general_api_default.get(
|
|
2832
|
-
`${deploymentsApiUrlV2}/deployments/releases?${[`page=${page}`, `per_page=${perPage}`, filterQuery, updateType, sorting].filter((i) => i).join("&")}`
|
|
2626
|
+
`${import_constants4.deploymentsApiUrlV2}/deployments/releases?${[`page=${page}`, `per_page=${perPage}`, filterQuery, updateType, sorting].filter((i) => i).join("&")}`
|
|
2833
2627
|
);
|
|
2834
2628
|
};
|
|
2835
2629
|
var deductSearchState = (receivedReleases, config, total, state) => {
|
|
2836
2630
|
let releaseListState = { ...state.releasesList };
|
|
2837
2631
|
const { searchTerm, searchOnly, sort = {}, selectedTags = [], type } = config;
|
|
2838
|
-
const flattenedReleases = Object.values(receivedReleases).sort((0,
|
|
2632
|
+
const flattenedReleases = Object.values(receivedReleases).sort((0, import_helpers8.customSort)(sort.direction === import_constants4.SORTING_OPTIONS.desc, sort.key));
|
|
2839
2633
|
const releaseIds = flattenedReleases.map((item) => item.name);
|
|
2840
2634
|
const isFiltering = !!(selectedTags.length || type || searchTerm);
|
|
2841
2635
|
if (searchOnly) {
|
|
@@ -2850,53 +2644,66 @@ var deductSearchState = (receivedReleases, config, total, state) => {
|
|
|
2850
2644
|
}
|
|
2851
2645
|
return releaseListState;
|
|
2852
2646
|
};
|
|
2853
|
-
var getReleases = (
|
|
2647
|
+
var getReleases = createAppAsyncThunk(`${sliceName}/getReleases`, (passedConfig = {}, { dispatch, getState }) => {
|
|
2854
2648
|
const config = { ...getState().releases.releasesList, ...passedConfig };
|
|
2855
2649
|
return releaseListRetrieval(config).then(({ data: receivedReleases = [], headers = {} }) => {
|
|
2856
|
-
const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;
|
|
2650
|
+
const total = headers[import_constants4.headerNames.total] ? Number(headers[import_constants4.headerNames.total]) : 0;
|
|
2857
2651
|
const state = getState().releases;
|
|
2858
2652
|
const flatReleases = reduceReceivedReleases(receivedReleases, state.byId);
|
|
2859
2653
|
const combinedReleases = { ...state.byId, ...flatReleases };
|
|
2860
|
-
|
|
2654
|
+
const tasks = [dispatch(actions.receiveReleases(combinedReleases))];
|
|
2861
2655
|
const releaseListState = deductSearchState(receivedReleases, config, total, state);
|
|
2862
|
-
tasks.push(dispatch(
|
|
2656
|
+
tasks.push(dispatch(actions.setReleaseListState(releaseListState)));
|
|
2863
2657
|
return Promise.all(tasks);
|
|
2864
2658
|
}).catch((err) => commonErrorHandler(err, `Please check your connection`, dispatch));
|
|
2865
2659
|
});
|
|
2866
|
-
var getRelease = (
|
|
2867
|
-
const releaseResponse = await general_api_default.get(`${deploymentsApiUrlV2}/deployments/releases/${name}`);
|
|
2660
|
+
var getRelease = createAppAsyncThunk(`${sliceName}/getReleases`, async (name, { dispatch, getState }) => {
|
|
2661
|
+
const releaseResponse = await general_api_default.get(`${import_constants4.deploymentsApiUrlV2}/deployments/releases/${name}`);
|
|
2868
2662
|
const { data: release } = releaseResponse;
|
|
2869
2663
|
if (release) {
|
|
2870
2664
|
const stateRelease = getReleasesById(getState())[release.name] || {};
|
|
2871
|
-
await dispatch(
|
|
2665
|
+
await dispatch(actions.receiveRelease(flattenRelease(release, stateRelease)));
|
|
2872
2666
|
}
|
|
2873
2667
|
return Promise.resolve(null);
|
|
2874
2668
|
});
|
|
2875
|
-
var updateReleaseInfo = (
|
|
2876
|
-
`${
|
|
2877
|
-
({ name, info }, { dispatch, getState }) => general_api_default.patch(`${deploymentsApiUrlV2}/deployments/releases/${name}`, info).catch((err) => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch)).then(
|
|
2878
|
-
|
|
2879
|
-
dispatch(
|
|
2880
|
-
dispatch(setSnackbar2("Release details were updated successfully.", TIMEOUTS.fiveSeconds, ""))
|
|
2881
|
-
])
|
|
2882
|
-
|
|
2669
|
+
var updateReleaseInfo = createAppAsyncThunk(
|
|
2670
|
+
`${sliceName}/updateReleaseInfo`,
|
|
2671
|
+
({ name, info }, { dispatch, getState }) => general_api_default.patch(`${import_constants4.deploymentsApiUrlV2}/deployments/releases/${name}`, info).catch((err) => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch)).then(
|
|
2672
|
+
() => Promise.all([
|
|
2673
|
+
dispatch(actions.receiveRelease({ ...getReleasesById(getState())[name], ...info, name })),
|
|
2674
|
+
dispatch(setSnackbar2({ message: "Release details were updated successfully.", autoHideDuration: TIMEOUTS.fiveSeconds, action: "" }))
|
|
2675
|
+
])
|
|
2676
|
+
)
|
|
2883
2677
|
);
|
|
2884
|
-
var
|
|
2885
|
-
`${
|
|
2886
|
-
({ name, tags
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
}
|
|
2678
|
+
var setSingleReleaseTags = createAppAsyncThunk(
|
|
2679
|
+
`${sliceName}/setSingleReleaseTags`,
|
|
2680
|
+
({ name, tags }, { dispatch, getState }) => general_api_default.put(`${import_constants4.deploymentsApiUrlV2}/deployments/releases/${name}/tags`, tags).then(
|
|
2681
|
+
() => Promise.resolve(dispatch(actions.receiveRelease({ ...getReleasesById(getState())[name], name, tags })))
|
|
2682
|
+
)
|
|
2683
|
+
);
|
|
2684
|
+
var setReleaseTags = createAppAsyncThunk(
|
|
2685
|
+
`${sliceName}/setReleaseTags`,
|
|
2686
|
+
({ name, tags = [] }, { dispatch }) => dispatch(setSingleReleaseTags({ name, tags })).catch((err) => commonErrorHandler(err, `Release tags couldn't be set.`, dispatch)).then(() => Promise.resolve(dispatch(setSnackbar2({ message: "Release tags were set successfully.", autoHideDuration: TIMEOUTS.fiveSeconds, action: "" }))))
|
|
2687
|
+
);
|
|
2688
|
+
var setReleasesTags = createAppAsyncThunk(
|
|
2689
|
+
`${sliceName}/setReleasesTags`,
|
|
2690
|
+
({ releases, tags = [] }, { dispatch }) => {
|
|
2691
|
+
const addRequests = releases.reduce((accu, release) => {
|
|
2692
|
+
accu.push(dispatch(setSingleReleaseTags({ name: release.name, tags: [.../* @__PURE__ */ new Set([...release.tags ? release.tags : [], ...tags])] })));
|
|
2693
|
+
return accu;
|
|
2694
|
+
}, []);
|
|
2695
|
+
return Promise.all(addRequests).catch((err) => commonErrorHandler(err, `Releases couldn't be tagged.`, dispatch)).then(
|
|
2696
|
+
() => Promise.resolve(dispatch(setSnackbar2({ message: "Releases were tagged successfully.", autoHideDuration: TIMEOUTS.fiveSeconds, action: "" })))
|
|
2697
|
+
);
|
|
2698
|
+
}
|
|
2892
2699
|
);
|
|
2893
|
-
var getExistingReleaseTags = (
|
|
2894
|
-
`${
|
|
2895
|
-
(_, { dispatch }) => general_api_default.get(`${deploymentsApiUrlV2}/releases/all/tags`).catch((err) => commonErrorHandler(err, `Existing release tags couldn't be retrieved.`, dispatch)).then(({ data: tags }) => Promise.resolve(dispatch(
|
|
2700
|
+
var getExistingReleaseTags = createAppAsyncThunk(
|
|
2701
|
+
`${sliceName}/getReleaseTags`,
|
|
2702
|
+
(_, { dispatch }) => general_api_default.get(`${import_constants4.deploymentsApiUrlV2}/releases/all/tags`).catch((err) => commonErrorHandler(err, `Existing release tags couldn't be retrieved.`, dispatch)).then(({ data: tags }) => Promise.resolve(dispatch(actions.receiveReleaseTags(tags))))
|
|
2896
2703
|
);
|
|
2897
|
-
var getUpdateTypes = (
|
|
2898
|
-
`${
|
|
2899
|
-
(_, { dispatch }) => general_api_default.get(`${deploymentsApiUrlV2}/releases/all/types`).catch((err) => commonErrorHandler(err, `Existing update types couldn't be retrieved.`, dispatch)).then(({ data: types }) => Promise.resolve(dispatch(
|
|
2704
|
+
var getUpdateTypes = createAppAsyncThunk(
|
|
2705
|
+
`${sliceName}/getReleaseTypes`,
|
|
2706
|
+
(_, { dispatch }) => general_api_default.get(`${import_constants4.deploymentsApiUrlV2}/releases/all/types`).catch((err) => commonErrorHandler(err, `Existing update types couldn't be retrieved.`, dispatch)).then(({ data: types }) => Promise.resolve(dispatch(actions.receiveReleaseTypes(types))))
|
|
2900
2707
|
);
|
|
2901
2708
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2902
2709
|
0 && (module.exports = {
|
|
@@ -2911,9 +2718,12 @@ var getUpdateTypes = (0, import_toolkit17.createAsyncThunk)(
|
|
|
2911
2718
|
getUpdateTypes,
|
|
2912
2719
|
removeArtifact,
|
|
2913
2720
|
removeRelease,
|
|
2721
|
+
removeReleases,
|
|
2914
2722
|
selectRelease,
|
|
2915
2723
|
setReleaseTags,
|
|
2916
2724
|
setReleasesListState,
|
|
2725
|
+
setReleasesTags,
|
|
2726
|
+
setSingleReleaseTags,
|
|
2917
2727
|
updateReleaseInfo,
|
|
2918
2728
|
uploadArtifact
|
|
2919
2729
|
});
|