@northern.tech/store 0.3.2 → 0.3.4
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/BillingProfile-ChP2_Sqw.d.cts +45 -0
- package/dist/BillingProfile-ChP2_Sqw.d.ts +45 -0
- package/dist/actions.cjs +22 -23
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.js +12 -12
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +5 -5
- package/dist/api/types/Tenant.ts +17 -12
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.js +6 -6
- package/dist/appSlice/constants.cjs +18 -10
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +41 -84
- package/dist/appSlice/constants.d.ts +41 -84
- package/dist/appSlice/constants.js +1 -1
- package/dist/appSlice/index.cjs +1 -3
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.js +4 -4
- package/dist/appSlice/thunks.cjs +153 -120
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +28 -27
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +4 -4
- package/dist/{chunk-NI4SZOCF.js → chunk-4RWZR3BN.js} +23 -25
- package/dist/{chunk-NI4SZOCF.js.map → chunk-4RWZR3BN.js.map} +1 -1
- package/dist/{chunk-YGBFDXXA.js → chunk-7YZCUAXZ.js} +2 -2
- package/dist/{chunk-7PVGDMNM.js → chunk-AFICTIVU.js} +3 -5
- package/dist/{chunk-7PVGDMNM.js.map → chunk-AFICTIVU.js.map} +1 -1
- package/dist/{chunk-YT73QWCN.js → chunk-AUBJUUP3.js} +3 -3
- package/dist/{chunk-UEP36GCI.js → chunk-AVX7VVOK.js} +3 -3
- package/dist/{chunk-4B3IMP4I.js → chunk-BSN2TOQC.js} +1 -1
- package/dist/{chunk-4B3IMP4I.js.map → chunk-BSN2TOQC.js.map} +1 -1
- package/dist/{chunk-VOCOFE4I.js → chunk-DCEKU6UV.js} +2 -2
- package/dist/{chunk-E5LEU5PF.js → chunk-DGQKXSRI.js} +3 -3
- package/dist/{chunk-74OJIKXF.js → chunk-EQLHIPPR.js} +182 -142
- package/dist/chunk-EQLHIPPR.js.map +1 -0
- package/dist/{chunk-MDC7Y3EX.js → chunk-EYCORLYU.js} +44 -40
- package/dist/chunk-EYCORLYU.js.map +1 -0
- package/dist/{chunk-KAQJH2YL.js → chunk-FQDSV3NK.js} +13 -5
- package/dist/chunk-FQDSV3NK.js.map +1 -0
- package/dist/{chunk-XTRPX7JZ.js → chunk-FRSA2YB5.js} +3 -3
- package/dist/chunk-FRSA2YB5.js.map +1 -0
- package/dist/{chunk-ANB5BM5J.js → chunk-FVCYB5OP.js} +37 -32
- package/dist/chunk-FVCYB5OP.js.map +1 -0
- package/dist/{chunk-AMGWP7A4.js → chunk-GAI4VYRZ.js} +2 -2
- package/dist/{chunk-YETZPQFR.js → chunk-GWJIY56H.js} +19 -20
- package/dist/chunk-GWJIY56H.js.map +1 -0
- package/dist/{chunk-Q6M5TTDQ.js → chunk-JO33IORF.js} +2 -2
- package/dist/chunk-JO33IORF.js.map +1 -0
- package/dist/chunk-K4MMUDYT.js +391 -0
- package/dist/chunk-K4MMUDYT.js.map +1 -0
- package/dist/{chunk-XXHONFSQ.js → chunk-L3SY3J5M.js} +4 -4
- package/dist/{chunk-XXHONFSQ.js.map → chunk-L3SY3J5M.js.map} +1 -1
- package/dist/{chunk-JAROCU6M.js → chunk-NCSKCF2S.js} +3 -3
- package/dist/{chunk-CYV6632F.js → chunk-NOQR3TE7.js} +2 -2
- package/dist/{chunk-A6CT6GTI.js → chunk-OEP2D6QL.js} +18 -12
- package/dist/chunk-OEP2D6QL.js.map +1 -0
- package/dist/{chunk-2RJIDREZ.js → chunk-PAIB5V27.js} +32 -23
- package/dist/chunk-PAIB5V27.js.map +1 -0
- package/dist/{chunk-FGKMJS3B.js → chunk-RX32WLVJ.js} +2 -4
- package/dist/chunk-RX32WLVJ.js.map +1 -0
- package/dist/{chunk-YTQUNAZP.js → chunk-X3GZILYD.js} +3 -3
- package/dist/{chunk-25AKG5HH.js → chunk-Y575RZHR.js} +19 -11
- package/dist/chunk-Y575RZHR.js.map +1 -0
- package/dist/{chunk-RX55KAKX.js → chunk-ZWOAFHAR.js} +2 -2
- package/dist/{chunk-NNADGHSL.js → chunk-ZZMFXRQK.js} +14 -14
- package/dist/commonConstants.cjs.map +1 -1
- package/dist/commonConstants.d.cts +1 -1
- package/dist/commonConstants.d.ts +1 -1
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +47 -29
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +55 -46
- package/dist/commonSelectors.d.ts +55 -46
- package/dist/commonSelectors.js +11 -11
- package/dist/constants.cjs +35 -19
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +7 -3
- package/dist/deploymentdevicehook.cjs +159 -125
- package/dist/deploymentdevicehook.cjs.map +1 -1
- package/dist/deploymentdevicehook.d.cts +1 -1
- package/dist/deploymentdevicehook.d.ts +1 -1
- package/dist/deploymentdevicehook.js +34 -31
- package/dist/deploymentdevicehook.js.map +1 -1
- package/dist/deploymentsSlice/constants.cjs +8 -8
- package/dist/deploymentsSlice/constants.cjs.map +1 -1
- package/dist/deploymentsSlice/constants.js +3 -3
- package/dist/deploymentsSlice/index.cjs +8 -8
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.js +4 -4
- package/dist/deploymentsSlice/selectors.cjs +8 -8
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.js +4 -4
- package/dist/deploymentsSlice/thunks.cjs +153 -120
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +28 -27
- package/dist/devicesSlice/constants.cjs +11 -8
- package/dist/devicesSlice/constants.cjs.map +1 -1
- package/dist/devicesSlice/constants.d.cts +2 -1
- package/dist/devicesSlice/constants.d.ts +2 -1
- package/dist/devicesSlice/constants.js +5 -3
- package/dist/devicesSlice/index.cjs +8 -8
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.js +4 -4
- package/dist/devicesSlice/selectors.cjs +9 -9
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.js +4 -4
- package/dist/devicesSlice/thunks.cjs +155 -120
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +12 -2
- package/dist/devicesSlice/thunks.d.ts +12 -2
- package/dist/devicesSlice/thunks.js +30 -27
- package/dist/flag-eu-5477R2P4.svg +130 -0
- package/dist/flag-us-HNQAF66I.svg +63 -0
- package/dist/liststatehook.cjs +971 -0
- package/dist/liststatehook.cjs.map +1 -0
- package/dist/liststatehook.d.cts +246 -0
- package/dist/liststatehook.d.ts +246 -0
- package/dist/liststatehook.js +88 -0
- package/dist/liststatehook.js.map +1 -0
- package/dist/locationutils.cjs +942 -0
- package/dist/locationutils.cjs.map +1 -0
- package/dist/locationutils.d.cts +113 -0
- package/dist/locationutils.d.ts +113 -0
- package/dist/locationutils.js +46 -0
- package/dist/locationutils.js.map +1 -0
- package/dist/monitorSlice/constants.cjs +8 -8
- package/dist/monitorSlice/constants.cjs.map +1 -1
- package/dist/monitorSlice/constants.js +3 -3
- package/dist/monitorSlice/index.cjs +8 -8
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.js +4 -4
- package/dist/monitorSlice/thunks.cjs +74 -62
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +24 -24
- package/dist/onboardingSlice/index.cjs +1 -3
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.js +1 -1
- package/dist/onboardingSlice/thunks.cjs +157 -124
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +2 -34
- package/dist/onboardingSlice/thunks.d.ts +2 -34
- package/dist/onboardingSlice/thunks.js +28 -29
- package/dist/organizationSlice/constants.cjs +22 -17
- package/dist/organizationSlice/constants.cjs.map +1 -1
- package/dist/organizationSlice/constants.d.cts +33 -1
- package/dist/organizationSlice/constants.d.ts +33 -1
- package/dist/organizationSlice/constants.js +5 -3
- package/dist/organizationSlice/index.cjs +18 -15
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +27 -1012
- package/dist/organizationSlice/index.d.ts +27 -1012
- package/dist/organizationSlice/index.js +4 -4
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +10 -1
- package/dist/organizationSlice/selectors.d.ts +10 -1
- package/dist/organizationSlice/selectors.js +4 -4
- package/dist/organizationSlice/thunks.cjs +1619 -1559
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +62 -37
- package/dist/organizationSlice/thunks.d.ts +62 -37
- package/dist/organizationSlice/thunks.js +28 -27
- package/dist/organizationSlice/types.cjs +19 -0
- package/dist/organizationSlice/types.cjs.map +1 -0
- package/dist/organizationSlice/types.d.cts +5 -0
- package/dist/organizationSlice/types.d.ts +5 -0
- package/dist/organizationSlice/types.js +1 -0
- package/dist/organizationSlice/types.js.map +1 -0
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.js +4 -4
- package/dist/releasesSlice/selectors.cjs +17 -8
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.js +5 -5
- package/dist/releasesSlice/thunks.cjs +123 -94
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +1 -4
- package/dist/releasesSlice/thunks.d.ts +1 -4
- package/dist/releasesSlice/thunks.js +25 -24
- package/dist/selectors.cjs +53 -29
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +10 -1
- package/dist/selectors.d.ts +10 -1
- package/dist/selectors.js +49 -43
- package/dist/sockethook.cjs +529 -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 +141 -0
- package/dist/sockethook.js.map +1 -0
- package/dist/store.cjs +38 -29
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +13 -231
- package/dist/store.d.ts +13 -231
- package/dist/store.js +18 -16
- package/dist/storehooks.cjs +273 -198
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +38 -37
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +259 -184
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +6 -2
- package/dist/thunks.d.ts +6 -2
- package/dist/thunks.js +30 -29
- package/dist/types-DBj17FZO.d.cts +135 -0
- package/dist/types-DnfZa6xd.d.ts +135 -0
- package/dist/usersSlice/constants.cjs +10 -10
- package/dist/usersSlice/constants.cjs.map +1 -1
- package/dist/usersSlice/constants.d.cts +6 -6
- package/dist/usersSlice/constants.d.ts +6 -6
- package/dist/usersSlice/constants.js +3 -3
- package/dist/usersSlice/index.cjs +10 -10
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.js +4 -4
- package/dist/usersSlice/selectors.cjs +35 -13
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +44 -1
- package/dist/usersSlice/selectors.d.ts +44 -1
- package/dist/usersSlice/selectors.js +13 -7
- package/dist/usersSlice/thunks.cjs +151 -120
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.d.cts +10 -9
- package/dist/usersSlice/thunks.d.ts +10 -9
- package/dist/usersSlice/thunks.js +28 -27
- package/dist/utils.cjs +23 -24
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +4 -4
- package/package.json +7 -6
- package/dist/chunk-25AKG5HH.js.map +0 -1
- package/dist/chunk-2RJIDREZ.js.map +0 -1
- package/dist/chunk-74OJIKXF.js.map +0 -1
- package/dist/chunk-A6CT6GTI.js.map +0 -1
- package/dist/chunk-ANB5BM5J.js.map +0 -1
- package/dist/chunk-FGKMJS3B.js.map +0 -1
- package/dist/chunk-KAQJH2YL.js.map +0 -1
- package/dist/chunk-MDC7Y3EX.js.map +0 -1
- package/dist/chunk-Q6M5TTDQ.js.map +0 -1
- package/dist/chunk-XTRPX7JZ.js.map +0 -1
- package/dist/chunk-YETZPQFR.js.map +0 -1
- /package/dist/{chunk-YGBFDXXA.js.map → chunk-7YZCUAXZ.js.map} +0 -0
- /package/dist/{chunk-YT73QWCN.js.map → chunk-AUBJUUP3.js.map} +0 -0
- /package/dist/{chunk-UEP36GCI.js.map → chunk-AVX7VVOK.js.map} +0 -0
- /package/dist/{chunk-VOCOFE4I.js.map → chunk-DCEKU6UV.js.map} +0 -0
- /package/dist/{chunk-E5LEU5PF.js.map → chunk-DGQKXSRI.js.map} +0 -0
- /package/dist/{chunk-AMGWP7A4.js.map → chunk-GAI4VYRZ.js.map} +0 -0
- /package/dist/{chunk-JAROCU6M.js.map → chunk-NCSKCF2S.js.map} +0 -0
- /package/dist/{chunk-CYV6632F.js.map → chunk-NOQR3TE7.js.map} +0 -0
- /package/dist/{chunk-YTQUNAZP.js.map → chunk-X3GZILYD.js.map} +0 -0
- /package/dist/{chunk-RX55KAKX.js.map → chunk-ZWOAFHAR.js.map} +0 -0
- /package/dist/{chunk-NNADGHSL.js.map → chunk-ZZMFXRQK.js.map} +0 -0
package/dist/appSlice/thunks.js
CHANGED
|
@@ -3,38 +3,39 @@ import {
|
|
|
3
3
|
setFirstLoginAfterSignup,
|
|
4
4
|
setOfflineThreshold,
|
|
5
5
|
setSearchState
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-EQLHIPPR.js";
|
|
7
|
+
import "../chunk-EYCORLYU.js";
|
|
8
|
+
import "../chunk-4RWZR3BN.js";
|
|
9
|
+
import "../chunk-NCSKCF2S.js";
|
|
10
|
+
import "../chunk-AUBJUUP3.js";
|
|
11
11
|
import "../chunk-NMAXZ3ZY.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-PAIB5V27.js";
|
|
13
|
+
import "../chunk-ZZMFXRQK.js";
|
|
14
|
+
import "../chunk-DGQKXSRI.js";
|
|
15
|
+
import "../chunk-7YZCUAXZ.js";
|
|
16
|
+
import "../chunk-FRSA2YB5.js";
|
|
17
|
+
import "../chunk-NOQR3TE7.js";
|
|
18
|
+
import "../chunk-AVX7VVOK.js";
|
|
19
|
+
import "../chunk-RX32WLVJ.js";
|
|
20
|
+
import "../chunk-X3GZILYD.js";
|
|
21
|
+
import "../chunk-AFICTIVU.js";
|
|
22
|
+
import "../chunk-GAI4VYRZ.js";
|
|
23
|
+
import "../chunk-FVCYB5OP.js";
|
|
24
|
+
import "../chunk-ZWOAFHAR.js";
|
|
25
|
+
import "../chunk-FQDSV3NK.js";
|
|
26
|
+
import "../chunk-JO33IORF.js";
|
|
27
|
+
import "../chunk-DCEKU6UV.js";
|
|
19
28
|
import "../chunk-YO22XLHI.js";
|
|
20
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-JIS4PA3R.js";
|
|
21
30
|
import "../chunk-LIJIIRON.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-E5LEU5PF.js";
|
|
27
|
-
import "../chunk-FGKMJS3B.js";
|
|
28
|
-
import "../chunk-XTRPX7JZ.js";
|
|
29
|
-
import "../chunk-YTQUNAZP.js";
|
|
30
|
-
import "../chunk-UEP36GCI.js";
|
|
31
|
-
import "../chunk-7PVGDMNM.js";
|
|
32
|
-
import "../chunk-AMGWP7A4.js";
|
|
33
|
-
import "../chunk-A6CT6GTI.js";
|
|
31
|
+
import "../chunk-L3SY3J5M.js";
|
|
32
|
+
import "../chunk-GWJIY56H.js";
|
|
33
|
+
import "../chunk-K4MMUDYT.js";
|
|
34
|
+
import "../chunk-OEP2D6QL.js";
|
|
34
35
|
import "../chunk-CK6YE6AN.js";
|
|
35
36
|
import "../chunk-MRCFLG45.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-Y575RZHR.js";
|
|
38
|
+
import "../chunk-BSN2TOQC.js";
|
|
38
39
|
export {
|
|
39
40
|
getLatestReleaseInfo,
|
|
40
41
|
setFirstLoginAfterSignup,
|
package/dist/auth.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/auth.ts","../src/commonConstants.tsx"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS } from './constants';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', exiresAt: undefined });\n\nlet tokenCache = '';\n\nexport const getSessionInfo = () => {\n let sessionInfo = { ...emptySession };\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n if (!sessionInfo.token) {\n let jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie, undefined });\n sessionInfo.token = jwtTokenFromCookie;\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n }\n }\n sessionInfo.token = sessionInfo.token || undefined;\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n};\n\nexport const maxSessionAge = 900;\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport React from 'react';\n\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\n\nexport const DEVICE_LIST_DEFAULTS = {\n page: 1,\n perPage: 20\n};\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const ALL_DEVICES = 'All devices';\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport const DEVICE_FILTERING_OPTIONS = {\n $eq: { key: '$eq', title: 'equals', shortform: '=' },\n $ne: { key: '$ne', title: 'not equal', shortform: '!=' },\n $gt: {\n key: '$gt',\n title: '>',\n shortform: '>',\n 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.'\n },\n $gte: {\n title: '>=',\n shortform: '>=',\n 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.'\n },\n $lt: {\n key: '$lt',\n title: '<',\n shortform: '<',\n 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.'\n },\n $lte: {\n title: '<=',\n shortform: '<=',\n 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.'\n },\n $ltne: {\n key: '$ltne',\n title: '$ltne',\n shortform: 'ltne',\n 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.'\n },\n $in: {\n key: '$in',\n title: 'in',\n shortform: 'in',\n 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.'\n },\n $nin: {\n key: '$nin',\n title: 'not in',\n shortform: 'not in',\n 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.`\n },\n $exists: {\n key: '$exists',\n title: 'exists',\n shortform: 'exists',\n value: true,\n help: `The \"exists\" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`\n },\n $nexists: {\n key: '$nexists',\n title: `doesn't exist`,\n shortform: `doesn't exist`,\n value: true,\n 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.`\n },\n $regex: {\n key: '$regex',\n title: `matches regular expression`,\n shortform: `matches`,\n 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.`\n }\n};\n\nexport const DEVICE_ISSUE_OPTIONS = {\n issues: {\n isCategory: true,\n key: 'issues',\n title: 'Devices with issues',\n filterRule: {}\n },\n offline: {\n issueCategory: 'issues',\n key: 'offline',\n needsFullFiltering: true,\n needsMonitor: false,\n needsReporting: false,\n filterRule: {\n scope: 'system',\n key: 'check_in_time',\n operator: DEVICE_FILTERING_OPTIONS.$ltne.key,\n value: ({ offlineThreshold }) => offlineThreshold\n },\n title: 'Offline devices'\n },\n failedLastUpdate: {\n issueCategory: 'issues',\n key: 'failedLastUpdate',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'failed_last_update', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Deployment failed'\n },\n monitoring: {\n issueCategory: 'issues',\n key: 'monitoring',\n needsFullFiltering: false,\n needsMonitor: true,\n needsReporting: false,\n filterRule: { scope: 'monitor', key: 'alerts', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Monitoring alert'\n },\n authRequests: {\n key: 'authRequests',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'auth_requests', operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },\n title: 'Devices with new authentication requests'\n },\n gatewayDevices: {\n key: 'gatewayDevices',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'inventory', key: 'mender_is_gateway', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: 'true' },\n title: 'Gateway devices'\n }\n};\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const SORTING_OPTIONS = {\n asc: 'asc',\n desc: 'desc'\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport const ATTRIBUTE_SCOPES = {\n inventory: 'inventory',\n identity: 'identity',\n monitor: 'monitor',\n system: 'system',\n tags: 'tags'\n};\n\nexport const defaultIdAttribute = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nconst credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n};\nexport const MAX_PAGE_SIZE = 500;\n\nexport const ALL_RELEASES = 'All releases';\n\nexport type UiPermissionsDefinition = Readonly<{\n auditlog: string[];\n deployments?: string[]; // deployments are so far only covered indirectly through releases + device group permissions\n groups: Record<string, string[]>;\n releases: Record<string, string[]>;\n tenantManagement: string[];\n userManagement: string[];\n}>;\n\nexport type UiRoleDefinition = {\n name: string;\n description: string;\n editable?: boolean;\n isCustom?: boolean;\n permissions?: object[];\n uiPermissions: UiPermissionsDefinition;\n};\n\nexport const emptyUiPermissions: UiPermissionsDefinition = Object.freeze({\n auditlog: [],\n deployments: [],\n groups: Object.freeze({}),\n releases: Object.freeze({}),\n tenantManagement: [],\n userManagement: []\n});\n\nexport const emptyRole: UiRoleDefinition = Object.freeze({\n name: undefined,\n description: '',\n permissions: [],\n uiPermissions: Object.freeze({ ...emptyUiPermissions })\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,8BAAoB;;;ACEpB,gBAA0D;AAwL1C;AAjLT,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT;AAOO,IAAM,2BAA2B;AAAA,EACtC,KAAK,EAAE,KAAK,OAAO,OAAO,UAAU,WAAW,IAAI;AAAA,EACnD,KAAK,EAAE,KAAK,OAAO,OAAO,aAAa,WAAW,KAAK;AAAA,EACvD,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,W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AS;AACnD,sBAAkB,mBAAmB;AACrC,QAAI,iBAAiB;AACnB,aAAO,aAAa,WAAW,OAAO;AAAA,IACxC;AAAA,EACF;AACA,MAAI,SAAS,cAAc,CAAC,mBAAmB,kBAAkB;AAC/D,UAAM,aAAa,oBAAI,KAAK;AAC5B,eAAW,WAAW,WAAW,WAAW,IAAI,aAAa;AAC7D,mBAAe,EAAE,OAAO,WAAW,WAAW,YAAY,EAAE,CAAC;AAAA,EAC/D;AACF;","names":["AWS","Azure","Cookies"]}
|
|
1
|
+
{"version":3,"sources":["../src/auth.ts","../src/commonConstants.tsx"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS } from './constants';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', exiresAt: undefined });\n\nlet tokenCache = '';\n\nexport const getSessionInfo = () => {\n let sessionInfo = { ...emptySession };\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n if (!sessionInfo.token) {\n let jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie, undefined });\n sessionInfo.token = jwtTokenFromCookie;\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n }\n }\n sessionInfo.token = sessionInfo.token || undefined;\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n};\n\nexport const maxSessionAge = 900;\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport React from 'react';\n\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\n\nexport const DEVICE_LIST_DEFAULTS = {\n page: 1,\n perPage: 20\n};\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const ALL_DEVICES = 'All devices';\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport const DEVICE_FILTERING_OPTIONS = {\n $eq: { key: '$eq', title: 'equals', shortform: '=' },\n $ne: { key: '$ne', title: 'not equal', shortform: '!=' },\n $gt: {\n key: '$gt',\n title: '>',\n shortform: '>',\n 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.'\n },\n $gte: {\n title: '>=',\n shortform: '>=',\n 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.'\n },\n $lt: {\n key: '$lt',\n title: '<',\n shortform: '<',\n 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.'\n },\n $lte: {\n title: '<=',\n shortform: '<=',\n 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.'\n },\n $ltne: {\n key: '$ltne',\n title: '$ltne',\n shortform: 'ltne',\n 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.'\n },\n $in: {\n key: '$in',\n title: 'in',\n shortform: 'in',\n 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.'\n },\n $nin: {\n key: '$nin',\n title: 'not in',\n shortform: 'not in',\n 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.`\n },\n $exists: {\n key: '$exists',\n title: 'exists',\n shortform: 'exists',\n value: true,\n help: `The \"exists\" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`\n },\n $nexists: {\n key: '$nexists',\n title: `doesn't exist`,\n shortform: `doesn't exist`,\n value: true,\n 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.`\n },\n $regex: {\n key: '$regex',\n title: `matches regular expression`,\n shortform: `matches`,\n 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.`\n }\n};\n\nexport const DEVICE_ISSUE_OPTIONS = {\n issues: {\n isCategory: true,\n key: 'issues',\n title: 'Devices with issues',\n filterRule: {}\n },\n offline: {\n issueCategory: 'issues',\n key: 'offline',\n needsFullFiltering: true,\n needsMonitor: false,\n needsReporting: false,\n filterRule: {\n scope: 'system',\n key: 'check_in_time',\n operator: DEVICE_FILTERING_OPTIONS.$ltne.key,\n value: ({ offlineThreshold }) => offlineThreshold\n },\n title: 'Offline devices'\n },\n failedLastUpdate: {\n issueCategory: 'issues',\n key: 'failedLastUpdate',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'failed_last_update', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Deployment failed'\n },\n monitoring: {\n issueCategory: 'issues',\n key: 'monitoring',\n needsFullFiltering: false,\n needsMonitor: true,\n needsReporting: false,\n filterRule: { scope: 'monitor', key: 'alerts', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Monitoring alert'\n },\n authRequests: {\n key: 'authRequests',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'auth_requests', operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },\n title: 'Devices with new authentication requests'\n },\n gatewayDevices: {\n key: 'gatewayDevices',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'inventory', key: 'mender_is_gateway', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: 'true' },\n title: 'Gateway devices'\n }\n};\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const SORTING_OPTIONS = {\n asc: 'asc',\n desc: 'desc'\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport const ATTRIBUTE_SCOPES = {\n inventory: 'inventory',\n identity: 'identity',\n monitor: 'monitor',\n system: 'system',\n tags: 'tags'\n};\n\nexport const defaultIdAttribute = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nconst credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n};\nexport const MAX_PAGE_SIZE = 500;\n\nexport const ALL_RELEASES = 'All releases';\n\nexport type UiPermissionsDefinition = Readonly<{\n auditlog: string[];\n deployments?: string[]; // deployments are so far only covered indirectly through releases + device group permissions\n groups: Record<string, string[]>;\n releases: Record<string, string[]>;\n tenantManagement: string[];\n userManagement: string[];\n}>;\n\nexport type UiRoleDefinition = {\n description: string;\n editable?: boolean;\n isCustom?: boolean;\n name: string;\n permissions?: object[];\n uiPermissions: UiPermissionsDefinition;\n};\n\nexport const emptyUiPermissions: UiPermissionsDefinition = Object.freeze({\n auditlog: [],\n deployments: [],\n groups: Object.freeze({}),\n releases: Object.freeze({}),\n tenantManagement: [],\n userManagement: []\n});\n\nexport const emptyRole: UiRoleDefinition = Object.freeze({\n name: undefined,\n description: '',\n permissions: [],\n uiPermissions: Object.freeze({ ...emptyUiPermissions })\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,8BAAoB;;;ACEpB,gBAA0D;AAwL1C;AAjLT,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT;AAOO,IAAM,2BAA2B;AAAA,EACtC,KAAK,EAAE,KAAK,OAAO,OAAO,UAAU,WAAW,IAAI;AAAA,EACnD,KAAK,EAAE,KAAK,OAAO,OAAO,aAAa,WAAW,KAAK;AAAA,EACvD,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAA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AAAA,EAC/D;AACF;","names":["AWS","Azure","Cookies"]}
|
package/dist/auth.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
maxSessionAge,
|
|
6
6
|
setSessionInfo,
|
|
7
7
|
updateMaxAge
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-GAI4VYRZ.js";
|
|
9
|
+
import "./chunk-OEP2D6QL.js";
|
|
10
10
|
import "./chunk-CK6YE6AN.js";
|
|
11
11
|
import "./chunk-MRCFLG45.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-Y575RZHR.js";
|
|
13
|
+
import "./chunk-BSN2TOQC.js";
|
|
14
14
|
export {
|
|
15
15
|
cleanUp,
|
|
16
16
|
getSessionInfo,
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
general_api_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
getSearchEndpoint
|
|
6
|
-
} from "./chunk-ANB5BM5J.js";
|
|
7
|
-
import {
|
|
8
|
-
getDeviceFilters
|
|
9
|
-
} from "./chunk-XXHONFSQ.js";
|
|
10
|
-
import {
|
|
11
|
-
convertDeviceListStateToFilters
|
|
12
|
-
} from "./chunk-YETZPQFR.js";
|
|
3
|
+
} from "./chunk-AUBJUUP3.js";
|
|
13
4
|
import {
|
|
14
5
|
commonErrorFallback,
|
|
15
6
|
commonErrorHandler
|
|
16
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PAIB5V27.js";
|
|
17
8
|
import {
|
|
18
9
|
actions_default
|
|
19
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZZMFXRQK.js";
|
|
20
11
|
import {
|
|
21
12
|
actions,
|
|
22
13
|
sliceName
|
|
23
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AVX7VVOK.js";
|
|
15
|
+
import {
|
|
16
|
+
getSearchEndpoint
|
|
17
|
+
} from "./chunk-FVCYB5OP.js";
|
|
18
|
+
import {
|
|
19
|
+
getDeviceFilters
|
|
20
|
+
} from "./chunk-L3SY3J5M.js";
|
|
21
|
+
import {
|
|
22
|
+
convertDeviceListStateToFilters
|
|
23
|
+
} from "./chunk-GWJIY56H.js";
|
|
24
24
|
import {
|
|
25
25
|
alertChannels,
|
|
26
26
|
monitorApiUrlv1
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OEP2D6QL.js";
|
|
28
28
|
import {
|
|
29
29
|
headerNames
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-Y575RZHR.js";
|
|
31
31
|
import {
|
|
32
32
|
DEVICE_LIST_DEFAULTS,
|
|
33
33
|
TIMEOUTS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BSN2TOQC.js";
|
|
35
35
|
|
|
36
36
|
// src/monitorSlice/thunks.ts
|
|
37
37
|
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
@@ -86,14 +86,12 @@ var getDeviceMonitorConfig = createAsyncThunk(
|
|
|
86
86
|
);
|
|
87
87
|
var changeNotificationSetting = createAsyncThunk(
|
|
88
88
|
`${sliceName}/changeNotificationSetting`,
|
|
89
|
-
({ enabled, channel = alertChannels.email }, { dispatch }) => {
|
|
90
|
-
|
|
91
|
-
(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
);
|
|
96
|
-
}
|
|
89
|
+
({ enabled, channel = alertChannels.email }, { dispatch }) => general_api_default.put(`${monitorApiUrlv1}/settings/global/channel/alerts/${channel}/status`, { enabled }).catch((err) => commonErrorHandler(err, `${enabled ? "En" : "Dis"}abling ${channel} alerts failed:`, dispatch)).then(
|
|
90
|
+
() => Promise.all([
|
|
91
|
+
dispatch(actions.changeAlertChannel({ channel, enabled })),
|
|
92
|
+
dispatch(actions_default.setSnackbar(`Successfully ${enabled ? "en" : "dis"}abled ${channel} alerts`, TIMEOUTS.fiveSeconds))
|
|
93
|
+
])
|
|
94
|
+
)
|
|
97
95
|
);
|
|
98
96
|
|
|
99
97
|
export {
|
|
@@ -103,4 +101,4 @@ export {
|
|
|
103
101
|
getDeviceMonitorConfig,
|
|
104
102
|
changeNotificationSetting
|
|
105
103
|
};
|
|
106
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-4RWZR3BN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/monitorSlice/thunks.ts"],"sourcesContent":["// Copyright 2021 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport storeActions from '@northern.tech/store/actions';\nimport Api from '@northern.tech/store/api/general-api';\nimport { DEVICE_LIST_DEFAULTS, TIMEOUTS, alertChannels, headerNames } from '@northern.tech/store/constants';\nimport { getDeviceFilters, getSearchEndpoint } from '@northern.tech/store/selectors';\nimport { commonErrorFallback, commonErrorHandler } from '@northern.tech/store/store';\nimport { convertDeviceListStateToFilters } from '@northern.tech/store/utils';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\n\nimport { actions, sliceName } from '.';\nimport { monitorApiUrlv1 } from './constants';\n\nconst { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;\n\nconst cutoffLength = 75;\nconst ellipsis = '...';\nconst longTextTrimmer = text => (text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text);\n\nconst sanitizeDeviceAlerts = alerts => alerts.map(alert => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name) }));\n\nexport const getDeviceAlerts = createAsyncThunk(`${sliceName}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {\n const { page = defaultPage, perPage = defaultPerPage, issuedBefore, issuedAfter, sortAscending = false } = config;\n const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : '';\n const issued_before = issuedBefore ? `&issued_before=${issuedBefore}` : '';\n return Api.get(`${monitorApiUrlv1}/devices/${id}/alerts?page=${page}&per_page=${perPage}${issued_after}${issued_before}&sort_ascending=${sortAscending}`)\n .catch(err => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch))\n .then(res =>\n Promise.all([\n dispatch(actions.receiveDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) })),\n dispatch(actions.setAlertListState({ total: Number(res.headers[headerNames.total]) }))\n ])\n );\n});\n\nexport const getLatestDeviceAlerts = createAsyncThunk(`${sliceName}/getLatestDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {\n const { page = defaultPage, perPage = 10 } = config;\n return Api.get(`${monitorApiUrlv1}/devices/${id}/alerts/latest?page=${page}&per_page=${perPage}`)\n .catch(err => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch))\n .then(res => Promise.resolve(dispatch(actions.receiveLatestDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) }))));\n});\n\nexport const getIssueCountsByType = createAsyncThunk(`${sliceName}/getIssueCountsByType`, ({ type, options = {} }, { dispatch, getState }) => {\n const state = getState();\n const { filters = getDeviceFilters(state), group, status, ...remainder } = options;\n const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({\n ...remainder,\n filters,\n group,\n offlineThreshold: state.app.offlineThreshold,\n selectedIssues: [type],\n status\n });\n return Api.post(getSearchEndpoint(getState()), {\n page: 1,\n per_page: 1,\n filters: filterTerms,\n attributes: [{ scope: 'identity', attribute: 'status' }]\n })\n .catch(err => commonErrorHandler(err, `Retrieving issue counts failed:`, dispatch, commonErrorFallback))\n .then(res => {\n const total = nonMonitorFilters.length ? state.monitor.issueCounts.byType[type].total : Number(res.headers[headerNames.total]);\n const filtered = nonMonitorFilters.length ? Number(res.headers[headerNames.total]) : total;\n if (total === state.monitor.issueCounts.byType[type].total && filtered === state.monitor.issueCounts.byType[type].filtered) {\n return Promise.resolve();\n }\n return Promise.resolve(dispatch(actions.receiveDeviceIssueCounts({ counts: { filtered, total }, issueType: type })));\n });\n});\n\nexport const getDeviceMonitorConfig = createAsyncThunk(`${sliceName}/getDeviceMonitorConfig`, (id, { dispatch }) =>\n Api.get(`${monitorApiUrlv1}/devices/${id}/config`)\n .catch(err => commonErrorHandler(err, `Retrieving device monitor config for device ${id} failed:`, dispatch))\n .then(({ data }) => Promise.all([dispatch(storeActions.receivedDevice({ id, monitors: data }), Promise.resolve(data))]))\n);\n\nexport const changeNotificationSetting = createAsyncThunk(\n `${sliceName}/changeNotificationSetting`,\n ({ enabled, channel = alertChannels.email }, { dispatch })
|
|
1
|
+
{"version":3,"sources":["../src/monitorSlice/thunks.ts"],"sourcesContent":["// Copyright 2021 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport storeActions from '@northern.tech/store/actions';\nimport Api from '@northern.tech/store/api/general-api';\nimport { DEVICE_LIST_DEFAULTS, TIMEOUTS, alertChannels, headerNames } from '@northern.tech/store/constants';\nimport { getDeviceFilters, getSearchEndpoint } from '@northern.tech/store/selectors';\nimport { commonErrorFallback, commonErrorHandler } from '@northern.tech/store/store';\nimport { convertDeviceListStateToFilters } from '@northern.tech/store/utils';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\n\nimport { actions, sliceName } from '.';\nimport { monitorApiUrlv1 } from './constants';\n\nconst { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;\n\nconst cutoffLength = 75;\nconst ellipsis = '...';\nconst longTextTrimmer = text => (text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text);\n\nconst sanitizeDeviceAlerts = alerts => alerts.map(alert => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name) }));\n\nexport const getDeviceAlerts = createAsyncThunk(`${sliceName}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {\n const { page = defaultPage, perPage = defaultPerPage, issuedBefore, issuedAfter, sortAscending = false } = config;\n const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : '';\n const issued_before = issuedBefore ? `&issued_before=${issuedBefore}` : '';\n return Api.get(`${monitorApiUrlv1}/devices/${id}/alerts?page=${page}&per_page=${perPage}${issued_after}${issued_before}&sort_ascending=${sortAscending}`)\n .catch(err => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch))\n .then(res =>\n Promise.all([\n dispatch(actions.receiveDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) })),\n dispatch(actions.setAlertListState({ total: Number(res.headers[headerNames.total]) }))\n ])\n );\n});\n\nexport const getLatestDeviceAlerts = createAsyncThunk(`${sliceName}/getLatestDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {\n const { page = defaultPage, perPage = 10 } = config;\n return Api.get(`${monitorApiUrlv1}/devices/${id}/alerts/latest?page=${page}&per_page=${perPage}`)\n .catch(err => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch))\n .then(res => Promise.resolve(dispatch(actions.receiveLatestDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) }))));\n});\n\nexport const getIssueCountsByType = createAsyncThunk(`${sliceName}/getIssueCountsByType`, ({ type, options = {} }, { dispatch, getState }) => {\n const state = getState();\n const { filters = getDeviceFilters(state), group, status, ...remainder } = options;\n const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({\n ...remainder,\n filters,\n group,\n offlineThreshold: state.app.offlineThreshold,\n selectedIssues: [type],\n status\n });\n return Api.post(getSearchEndpoint(getState()), {\n page: 1,\n per_page: 1,\n filters: filterTerms,\n attributes: [{ scope: 'identity', attribute: 'status' }]\n })\n .catch(err => commonErrorHandler(err, `Retrieving issue counts failed:`, dispatch, commonErrorFallback))\n .then(res => {\n const total = nonMonitorFilters.length ? state.monitor.issueCounts.byType[type].total : Number(res.headers[headerNames.total]);\n const filtered = nonMonitorFilters.length ? Number(res.headers[headerNames.total]) : total;\n if (total === state.monitor.issueCounts.byType[type].total && filtered === state.monitor.issueCounts.byType[type].filtered) {\n return Promise.resolve();\n }\n return Promise.resolve(dispatch(actions.receiveDeviceIssueCounts({ counts: { filtered, total }, issueType: type })));\n });\n});\n\nexport const getDeviceMonitorConfig = createAsyncThunk(`${sliceName}/getDeviceMonitorConfig`, (id, { dispatch }) =>\n Api.get(`${monitorApiUrlv1}/devices/${id}/config`)\n .catch(err => commonErrorHandler(err, `Retrieving device monitor config for device ${id} failed:`, dispatch))\n .then(({ data }) => Promise.all([dispatch(storeActions.receivedDevice({ id, monitors: data }), Promise.resolve(data))]))\n);\n\nexport const changeNotificationSetting = createAsyncThunk(\n `${sliceName}/changeNotificationSetting`,\n ({ enabled, channel = alertChannels.email }, { dispatch }) =>\n Api.put(`${monitorApiUrlv1}/settings/global/channel/alerts/${channel}/status`, { enabled })\n .catch(err => commonErrorHandler(err, `${enabled ? 'En' : 'Dis'}abling ${channel} alerts failed:`, dispatch))\n .then(() =>\n Promise.all([\n dispatch(actions.changeAlertChannel({ channel, enabled })),\n dispatch(storeActions.setSnackbar(`Successfully ${enabled ? 'en' : 'dis'}abled ${channel} alerts`, TIMEOUTS.fiveSeconds))\n ])\n )\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,wBAA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-OEP2D6QL.js";
|
|
6
6
|
|
|
7
7
|
// src/usersSlice/index.ts
|
|
8
8
|
import { createSlice } from "@reduxjs/toolkit";
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
actions,
|
|
142
142
|
usersSlice_default
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=chunk-
|
|
144
|
+
//# sourceMappingURL=chunk-7YZCUAXZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SORTING_OPTIONS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BSN2TOQC.js";
|
|
4
4
|
|
|
5
5
|
// src/appSlice/index.ts
|
|
6
6
|
import { createSlice } from "@reduxjs/toolkit";
|
|
@@ -134,9 +134,7 @@ var appSlice = createSlice({
|
|
|
134
134
|
...action.payload
|
|
135
135
|
};
|
|
136
136
|
},
|
|
137
|
-
setEnvironmentData: (state, action) => {
|
|
138
|
-
return { ...state, ...action.payload };
|
|
139
|
-
}
|
|
137
|
+
setEnvironmentData: (state, action) => ({ ...state, ...action.payload })
|
|
140
138
|
}
|
|
141
139
|
});
|
|
142
140
|
var actions = appSlice.actions;
|
|
@@ -149,4 +147,4 @@ export {
|
|
|
149
147
|
actions,
|
|
150
148
|
appSlice_default
|
|
151
149
|
};
|
|
152
|
-
//# sourceMappingURL=chunk-
|
|
150
|
+
//# sourceMappingURL=chunk-AFICTIVU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/appSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { SORTING_OPTIONS } from '@northern.tech/store/constants';\nimport { createSlice } from '@reduxjs/toolkit';\n\nexport const sliceName = 'app';\n\nconst getYesterday = () => {\n const today = new Date();\n today.setDate(today.getDate() - 1);\n return today.toISOString();\n};\n\nexport const initialState = {\n cancelSource: undefined,\n demoArtifactLink: 'https://dgsbl4vditpls.cloudfront.net/mender-demo-artifact.mender',\n hostAddress: null,\n snackbar: {\n open: false,\n message: '',\n maxWidth: 900,\n autoHideDuration: undefined,\n action: undefined,\n children: undefined,\n onClick: undefined,\n onClose: undefined\n },\n // return boolean rather than organization details\n features: {\n hasAuditlogs: false,\n hasDeltaProgress: false,\n hasMultitenancy: false,\n hasDeviceConfig: false,\n hasDeviceConnect: false,\n hasFeedbackEnabled: false,\n hasMonitor: false,\n hasReporting: false,\n isDemoMode: false,\n isHosted: false,\n isEnterprise: false\n },\n feedbackProbability: 0.3,\n firstLoginAfterSignup: false,\n hostedAnnouncement: '',\n docsVersion: '',\n recaptchaSiteKey: '',\n searchState: {\n deviceIds: [],\n searchTerm: '',\n searchTotal: 0,\n sort: {\n direction: SORTING_OPTIONS.desc\n // key: null,\n // scope: null\n }\n },\n stripeAPIKey: '',\n trackerCode: '',\n uploadsById: {\n // id: { uploading: false, uploadProgress: 0, cancelSource: undefined }\n },\n newThreshold: getYesterday(),\n offlineThreshold: getYesterday(),\n versionInformation: {\n Integration: '',\n 'Mender-Client': '',\n 'Mender-Artifact': '',\n 'Meta-Mender': '',\n Deployments: '',\n Deviceauth: '',\n Inventory: '',\n GUI: 'latest'\n },\n yesterday: undefined\n};\n\nexport const appSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n setFeatures: (state, action) => {\n state.features = {\n ...state.features,\n ...action.payload\n };\n },\n setSnackbar: (state, { payload }) => {\n let { message, autoHideDuration, action, children, onClick, onClose } = payload;\n if (typeof payload === 'string' || payload instanceof String) {\n message = payload;\n }\n state.snackbar = {\n open: message ? true : false,\n message,\n maxWidth: 900,\n autoHideDuration,\n action,\n children,\n onClick,\n onClose\n };\n },\n setFirstLoginAfterSignup: (state, action) => {\n state.firstLoginAfterSignup = action.payload;\n },\n setAnnouncement: (state, action) => {\n state.hostedAnnouncement = action.payload;\n },\n setSearchState: (state, action) => {\n state.searchState = {\n ...state.searchState,\n ...action.payload\n };\n },\n setOfflineThreshold: (state, action) => {\n state.offlineThreshold = action.payload;\n },\n initUpload: (state, action) => {\n const { id, upload } = action.payload;\n state.uploadsById[id] = upload;\n },\n uploadProgress: (state, action) => {\n const { id, progress } = action.payload;\n state.uploadsById[id] = {\n ...state.uploadsById[id],\n progress\n };\n },\n cleanUpUpload: (state, action) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: current, ...remainder } = state.uploadsById;\n state.uploadsById = remainder;\n },\n setVersionInformation: (state, action) => {\n state.versionInformation = {\n ...state.versionInformation,\n ...action.payload\n };\n },\n setEnvironmentData: (state, action) => {
|
|
1
|
+
{"version":3,"sources":["../src/appSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { SORTING_OPTIONS } from '@northern.tech/store/constants';\nimport { createSlice } from '@reduxjs/toolkit';\n\nexport const sliceName = 'app';\n\nconst getYesterday = () => {\n const today = new Date();\n today.setDate(today.getDate() - 1);\n return today.toISOString();\n};\n\nexport const initialState = {\n cancelSource: undefined,\n demoArtifactLink: 'https://dgsbl4vditpls.cloudfront.net/mender-demo-artifact.mender',\n hostAddress: null,\n snackbar: {\n open: false,\n message: '',\n maxWidth: 900,\n autoHideDuration: undefined,\n action: undefined,\n children: undefined,\n onClick: undefined,\n onClose: undefined\n },\n // return boolean rather than organization details\n features: {\n hasAuditlogs: false,\n hasDeltaProgress: false,\n hasMultitenancy: false,\n hasDeviceConfig: false,\n hasDeviceConnect: false,\n hasFeedbackEnabled: false,\n hasMonitor: false,\n hasReporting: false,\n isDemoMode: false,\n isHosted: false,\n isEnterprise: false\n },\n feedbackProbability: 0.3,\n firstLoginAfterSignup: false,\n hostedAnnouncement: '',\n docsVersion: '',\n recaptchaSiteKey: '',\n searchState: {\n deviceIds: [],\n searchTerm: '',\n searchTotal: 0,\n sort: {\n direction: SORTING_OPTIONS.desc\n // key: null,\n // scope: null\n }\n },\n stripeAPIKey: '',\n trackerCode: '',\n uploadsById: {\n // id: { uploading: false, uploadProgress: 0, cancelSource: undefined }\n },\n newThreshold: getYesterday(),\n offlineThreshold: getYesterday(),\n versionInformation: {\n Integration: '',\n 'Mender-Client': '',\n 'Mender-Artifact': '',\n 'Meta-Mender': '',\n Deployments: '',\n Deviceauth: '',\n Inventory: '',\n GUI: 'latest'\n },\n yesterday: undefined\n};\n\nexport const appSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n setFeatures: (state, action) => {\n state.features = {\n ...state.features,\n ...action.payload\n };\n },\n setSnackbar: (state, { payload }) => {\n let { message, autoHideDuration, action, children, onClick, onClose } = payload;\n if (typeof payload === 'string' || payload instanceof String) {\n message = payload;\n }\n state.snackbar = {\n open: message ? true : false,\n message,\n maxWidth: 900,\n autoHideDuration,\n action,\n children,\n onClick,\n onClose\n };\n },\n setFirstLoginAfterSignup: (state, action) => {\n state.firstLoginAfterSignup = action.payload;\n },\n setAnnouncement: (state, action) => {\n state.hostedAnnouncement = action.payload;\n },\n setSearchState: (state, action) => {\n state.searchState = {\n ...state.searchState,\n ...action.payload\n };\n },\n setOfflineThreshold: (state, action) => {\n state.offlineThreshold = action.payload;\n },\n initUpload: (state, action) => {\n const { id, upload } = action.payload;\n state.uploadsById[id] = upload;\n },\n uploadProgress: (state, action) => {\n const { id, progress } = action.payload;\n state.uploadsById[id] = {\n ...state.uploadsById[id],\n progress\n };\n },\n cleanUpUpload: (state, action) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: current, ...remainder } = state.uploadsById;\n state.uploadsById = remainder;\n },\n setVersionInformation: (state, action) => {\n state.versionInformation = {\n ...state.versionInformation,\n ...action.payload\n };\n },\n setEnvironmentData: (state, action) => ({ ...state, ...action.payload })\n }\n});\n\nexport const actions = appSlice.actions;\nexport default appSlice.reducer;\n"],"mappings":";;;;;AAeA,SAAS,mBAAmB;AAErB,IAAM,YAAY;AAEzB,IAAM,eAAe,MAAM;AACzB,QAAM,QAAQ,oBAAI,KAAK;AACvB,QAAM,QAAQ,MAAM,QAAQ,IAAI,CAAC;AACjC,SAAO,MAAM,YAAY;AAC3B;AAEO,IAAM,eAAe;AAAA,EAC1B,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,UAAU;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA;AAAA,EAEA,UAAU;AAAA,IACR,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,aAAa;AAAA,IACX,WAAW,CAAC;AAAA,IACZ,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,MAAM;AAAA,MACJ,WAAW,gB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AA,IAClC;AAAA,IACA,YAAY,CAAC,OAAO,WAAW;AAC7B,YAAM,EAAE,IAAI,OAAO,IAAI,OAAO;AAC9B,YAAM,YAAY,EAAE,IAAI;AAAA,IAC1B;AAAA,IACA,gBAAgB,CAAC,OAAO,WAAW;AACjC,YAAM,EAAE,IAAI,SAAS,IAAI,OAAO;AAChC,YAAM,YAAY,EAAE,IAAI;AAAA,QACtB,GAAG,MAAM,YAAY,EAAE;AAAA,QACvB;AAAA,MACF;AAAA,IACF;AAAA,IACA,eAAe,CAAC,OAAO,WAAW;AAEhC,YAAM,EAAE,CAAC,OAAO,OAAO,GAAG,SAAS,GAAG,UAAU,IAAI,MAAM;AAC1D,YAAM,cAAc;AAAA,IACtB;AAAA,IACA,uBAAuB,CAAC,OAAO,WAAW;AACxC,YAAM,qBAAqB;AAAA,QACzB,GAAG,MAAM;AAAA,QACT,GAAG,OAAO;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,OAAO,YAAY,EAAE,GAAG,OAAO,GAAG,OAAO,QAAQ;AAAA,EACxE;AACF,CAAC;AAEM,IAAM,UAAU,SAAS;AAChC,IAAO,mBAAQ,SAAS;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanUp,
|
|
3
3
|
getToken
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GAI4VYRZ.js";
|
|
5
5
|
import {
|
|
6
6
|
TIMEOUTS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BSN2TOQC.js";
|
|
8
8
|
|
|
9
9
|
// src/api/general-api.ts
|
|
10
10
|
import axios, { isCancel } from "axios";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
authenticatedRequest,
|
|
50
50
|
general_api_default
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-AUBJUUP3.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
alertChannels
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OEP2D6QL.js";
|
|
4
4
|
import {
|
|
5
5
|
DEVICE_ISSUE_OPTIONS,
|
|
6
6
|
DEVICE_LIST_DEFAULTS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BSN2TOQC.js";
|
|
8
8
|
|
|
9
9
|
// src/monitorSlice/index.ts
|
|
10
10
|
import { createSlice } from "@reduxjs/toolkit";
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
actions,
|
|
61
61
|
monitorSlice_default
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-AVX7VVOK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commonConstants.tsx"],"sourcesContent":["// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport React from 'react';\n\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\n\nexport const DEVICE_LIST_DEFAULTS = {\n page: 1,\n perPage: 20\n};\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const ALL_DEVICES = 'All devices';\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport const DEVICE_FILTERING_OPTIONS = {\n $eq: { key: '$eq', title: 'equals', shortform: '=' },\n $ne: { key: '$ne', title: 'not equal', shortform: '!=' },\n $gt: {\n key: '$gt',\n title: '>',\n shortform: '>',\n 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.'\n },\n $gte: {\n title: '>=',\n shortform: '>=',\n 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.'\n },\n $lt: {\n key: '$lt',\n title: '<',\n shortform: '<',\n 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.'\n },\n $lte: {\n title: '<=',\n shortform: '<=',\n 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.'\n },\n $ltne: {\n key: '$ltne',\n title: '$ltne',\n shortform: 'ltne',\n 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.'\n },\n $in: {\n key: '$in',\n title: 'in',\n shortform: 'in',\n 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.'\n },\n $nin: {\n key: '$nin',\n title: 'not in',\n shortform: 'not in',\n 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.`\n },\n $exists: {\n key: '$exists',\n title: 'exists',\n shortform: 'exists',\n value: true,\n help: `The \"exists\" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`\n },\n $nexists: {\n key: '$nexists',\n title: `doesn't exist`,\n shortform: `doesn't exist`,\n value: true,\n 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.`\n },\n $regex: {\n key: '$regex',\n title: `matches regular expression`,\n shortform: `matches`,\n 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.`\n }\n};\n\nexport const DEVICE_ISSUE_OPTIONS = {\n issues: {\n isCategory: true,\n key: 'issues',\n title: 'Devices with issues',\n filterRule: {}\n },\n offline: {\n issueCategory: 'issues',\n key: 'offline',\n needsFullFiltering: true,\n needsMonitor: false,\n needsReporting: false,\n filterRule: {\n scope: 'system',\n key: 'check_in_time',\n operator: DEVICE_FILTERING_OPTIONS.$ltne.key,\n value: ({ offlineThreshold }) => offlineThreshold\n },\n title: 'Offline devices'\n },\n failedLastUpdate: {\n issueCategory: 'issues',\n key: 'failedLastUpdate',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'failed_last_update', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Deployment failed'\n },\n monitoring: {\n issueCategory: 'issues',\n key: 'monitoring',\n needsFullFiltering: false,\n needsMonitor: true,\n needsReporting: false,\n filterRule: { scope: 'monitor', key: 'alerts', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Monitoring alert'\n },\n authRequests: {\n key: 'authRequests',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'auth_requests', operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },\n title: 'Devices with new authentication requests'\n },\n gatewayDevices: {\n key: 'gatewayDevices',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'inventory', key: 'mender_is_gateway', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: 'true' },\n title: 'Gateway devices'\n }\n};\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const SORTING_OPTIONS = {\n asc: 'asc',\n desc: 'desc'\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport const ATTRIBUTE_SCOPES = {\n inventory: 'inventory',\n identity: 'identity',\n monitor: 'monitor',\n system: 'system',\n tags: 'tags'\n};\n\nexport const defaultIdAttribute = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nconst credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n};\nexport const MAX_PAGE_SIZE = 500;\n\nexport const ALL_RELEASES = 'All releases';\n\nexport type UiPermissionsDefinition = Readonly<{\n auditlog: string[];\n deployments?: string[]; // deployments are so far only covered indirectly through releases + device group permissions\n groups: Record<string, string[]>;\n releases: Record<string, string[]>;\n tenantManagement: string[];\n userManagement: string[];\n}>;\n\nexport type UiRoleDefinition = {\n name: string;\n description: string;\n editable?: boolean;\n isCustom?: boolean;\n permissions?: object[];\n uiPermissions: UiPermissionsDefinition;\n};\n\nexport const emptyUiPermissions: UiPermissionsDefinition = Object.freeze({\n auditlog: [],\n deployments: [],\n groups: Object.freeze({}),\n releases: Object.freeze({}),\n tenantManagement: [],\n userManagement: []\n});\n\nexport const emptyRole: UiRoleDefinition = Object.freeze({\n name: undefined,\n description: '',\n permissions: [],\n uiPermissions: Object.freeze({ ...emptyUiPermissions })\n});\n"],"mappings":";AAgBA,SAAS,UAAU,KAAK,qBAAqB,aAAa;AAwL1C,wBAWV,YAXU;AAtLT,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT;AAEO,IAAM,cAAc;AACpB,IAAM,kBAAkB,EAAE,IAAI,mBAAmB,MAAM,aAAa;AAEpE,IAAM,6BAA6B;AAEnC,IAAM,2BAA2B;AAAA,EACtC,KAAK,EAAE,KAAK,OAAO,OAAO,UAAU,WAAW,IAAI;AAAA,EACnD,KAAK,EAAE,KAAK,OAAO,OAAO,aAAa,WAAW,KAAK;AAAA,EACvD,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,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EACtG;AAAA,EACA,WAAW;AAAA,IACT,iBAAiB,gBAAgB;AAAA,IACjC,MAAM;AAAA,IACN,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,YACE,qBAAC,UAAK;AAAA;AAAA,MACwI;AAAA,MAE1I;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,KAAI;AAAA,UACL;AAAA;AAAA,MAED;AAAA,MACD;AAAA,OAEH;AAAA,EAEJ;AAAA,EACA,SAAS;AAAA,IACP,iBAAiB,gBAAgB;AAAA,IACjC,YAAY;AAAA;AAAA,IAEZ,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AACF;AACO,IAAM,gBAAgB;AAEtB,IAAM,eAAe;AAoBrB,IAAM,qBAA8C,OAAO,OAAO;AAAA,EACvE,UAAU,CAAC;AAAA,EACX,aAAa,CAAC;AAAA,EACd,QAAQ,OAAO,OAAO,CAAC,CAAC;AAAA,EACxB,UAAU,OAAO,OAAO,CAAC,CAAC;AAAA,EAC1B,kBAAkB,CAAC;AAAA,EACnB,gBAAgB,CAAC;AACnB,CAAC;AAEM,IAAM,YAA8B,OAAO,OAAO;AAAA,EACvD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa,CAAC;AAAA,EACd,eAAe,OAAO,OAAO,EAAE,GAAG,mBAAmB,CAAC;AACxD,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/commonConstants.tsx"],"sourcesContent":["// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport React from 'react';\n\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\n\nexport const DEVICE_LIST_DEFAULTS = {\n page: 1,\n perPage: 20\n};\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const ALL_DEVICES = 'All devices';\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport const DEVICE_FILTERING_OPTIONS = {\n $eq: { key: '$eq', title: 'equals', shortform: '=' },\n $ne: { key: '$ne', title: 'not equal', shortform: '!=' },\n $gt: {\n key: '$gt',\n title: '>',\n shortform: '>',\n 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.'\n },\n $gte: {\n title: '>=',\n shortform: '>=',\n 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.'\n },\n $lt: {\n key: '$lt',\n title: '<',\n shortform: '<',\n 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.'\n },\n $lte: {\n title: '<=',\n shortform: '<=',\n 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.'\n },\n $ltne: {\n key: '$ltne',\n title: '$ltne',\n shortform: 'ltne',\n 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.'\n },\n $in: {\n key: '$in',\n title: 'in',\n shortform: 'in',\n 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.'\n },\n $nin: {\n key: '$nin',\n title: 'not in',\n shortform: 'not in',\n 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.`\n },\n $exists: {\n key: '$exists',\n title: 'exists',\n shortform: 'exists',\n value: true,\n help: `The \"exists\" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`\n },\n $nexists: {\n key: '$nexists',\n title: `doesn't exist`,\n shortform: `doesn't exist`,\n value: true,\n 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.`\n },\n $regex: {\n key: '$regex',\n title: `matches regular expression`,\n shortform: `matches`,\n 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.`\n }\n};\n\nexport const DEVICE_ISSUE_OPTIONS = {\n issues: {\n isCategory: true,\n key: 'issues',\n title: 'Devices with issues',\n filterRule: {}\n },\n offline: {\n issueCategory: 'issues',\n key: 'offline',\n needsFullFiltering: true,\n needsMonitor: false,\n needsReporting: false,\n filterRule: {\n scope: 'system',\n key: 'check_in_time',\n operator: DEVICE_FILTERING_OPTIONS.$ltne.key,\n value: ({ offlineThreshold }) => offlineThreshold\n },\n title: 'Offline devices'\n },\n failedLastUpdate: {\n issueCategory: 'issues',\n key: 'failedLastUpdate',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'failed_last_update', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Deployment failed'\n },\n monitoring: {\n issueCategory: 'issues',\n key: 'monitoring',\n needsFullFiltering: false,\n needsMonitor: true,\n needsReporting: false,\n filterRule: { scope: 'monitor', key: 'alerts', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Monitoring alert'\n },\n authRequests: {\n key: 'authRequests',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'auth_requests', operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },\n title: 'Devices with new authentication requests'\n },\n gatewayDevices: {\n key: 'gatewayDevices',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'inventory', key: 'mender_is_gateway', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: 'true' },\n title: 'Gateway devices'\n }\n};\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const SORTING_OPTIONS = {\n asc: 'asc',\n desc: 'desc'\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport const ATTRIBUTE_SCOPES = {\n inventory: 'inventory',\n identity: 'identity',\n monitor: 'monitor',\n system: 'system',\n tags: 'tags'\n};\n\nexport const defaultIdAttribute = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nconst credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n};\nexport const MAX_PAGE_SIZE = 500;\n\nexport const ALL_RELEASES = 'All releases';\n\nexport type UiPermissionsDefinition = Readonly<{\n auditlog: string[];\n deployments?: string[]; // deployments are so far only covered indirectly through releases + device group permissions\n groups: Record<string, string[]>;\n releases: Record<string, string[]>;\n tenantManagement: string[];\n userManagement: string[];\n}>;\n\nexport type UiRoleDefinition = {\n description: string;\n editable?: boolean;\n isCustom?: boolean;\n name: string;\n permissions?: object[];\n uiPermissions: UiPermissionsDefinition;\n};\n\nexport const emptyUiPermissions: UiPermissionsDefinition = Object.freeze({\n auditlog: [],\n deployments: [],\n groups: Object.freeze({}),\n releases: Object.freeze({}),\n tenantManagement: [],\n userManagement: []\n});\n\nexport const emptyRole: UiRoleDefinition = Object.freeze({\n name: undefined,\n description: '',\n permissions: [],\n uiPermissions: Object.freeze({ ...emptyUiPermissions })\n});\n"],"mappings":";AAgBA,SAAS,UAAU,KAAK,qBAAqB,aAAa;AAwL1C,wBAWV,YAXU;AAtLT,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT;AAEO,IAAM,cAAc;AACpB,IAAM,kBAAkB,EAAE,IAAI,mBAAmB,MAAM,aAAa;AAEpE,IAAM,6BAA6B;AAEnC,IAAM,2BAA2B;AAAA,EACtC,KAAK,EAAE,KAAK,OAAO,OAAO,UAAU,WAAW,IAAI;AAAA,EACnD,KAAK,EAAE,KAAK,OAAO,OAAO,aAAa,WAAW,KAAK;AAAA,EACvD,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL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A,EACd,eAAe,OAAO,OAAO,EAAE,GAAG,mBAAmB,CAAC;AACxD,CAAC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listItemMapper
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GWJIY56H.js";
|
|
4
4
|
|
|
5
5
|
// src/releasesSlice/selectors.ts
|
|
6
6
|
import { createSelector } from "@reduxjs/toolkit";
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
getHasReleases,
|
|
30
30
|
getSelectedRelease
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-DCEKU6UV.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
DEPLOYMENT_STATES,
|
|
5
5
|
deploymentPrototype,
|
|
6
6
|
limitDefault
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OEP2D6QL.js";
|
|
8
8
|
import {
|
|
9
9
|
DEVICE_LIST_DEFAULTS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BSN2TOQC.js";
|
|
11
11
|
|
|
12
12
|
// src/deploymentsSlice/index.ts
|
|
13
13
|
import { createSlice } from "@reduxjs/toolkit";
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
actions,
|
|
142
142
|
deploymentsSlice_default
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=chunk-
|
|
144
|
+
//# sourceMappingURL=chunk-DGQKXSRI.js.map
|