@northern.tech/store 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.js +183 -129
- package/dist/actions.js.map +1 -1
- package/dist/actions.mjs +13 -13
- package/dist/api/general-api.js +42 -55
- package/dist/api/general-api.js.map +1 -1
- package/dist/api/general-api.mjs +6 -6
- package/dist/api/users-api.js +44 -70
- package/dist/api/users-api.js.map +1 -1
- package/dist/api/users-api.mjs +7 -7
- package/dist/appSlice/constants.js +1 -39
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/constants.mjs +2 -2
- package/dist/appSlice/index.js +51 -68
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/index.mjs +5 -5
- package/dist/appSlice/selectors.js +1 -43
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/selectors.mjs +2 -2
- package/dist/appSlice/thunks.js +563 -544
- package/dist/appSlice/thunks.js.map +1 -1
- package/dist/appSlice/thunks.mjs +28 -28
- package/dist/auth.js +39 -55
- package/dist/auth.js.map +1 -1
- package/dist/auth.mjs +5 -5
- package/dist/{chunk-C2YZYTJ6.mjs → chunk-2Z3RFYW4.mjs} +2 -11
- package/dist/{chunk-C2YZYTJ6.mjs.map → chunk-2Z3RFYW4.mjs.map} +1 -1
- package/dist/{chunk-OWHFMKTA.mjs → chunk-3ORTTLIB.mjs} +19 -16
- package/dist/{chunk-OWHFMKTA.mjs.map → chunk-3ORTTLIB.mjs.map} +1 -1
- package/dist/{chunk-NCI6JV5R.mjs → chunk-4SDUITD4.mjs} +6 -12
- package/dist/{chunk-NCI6JV5R.mjs.map → chunk-4SDUITD4.mjs.map} +1 -1
- package/dist/{chunk-BOSBROA3.mjs → chunk-5VNQCCAQ.mjs} +2 -7
- package/dist/{chunk-BOSBROA3.mjs.map → chunk-5VNQCCAQ.mjs.map} +1 -1
- package/dist/{chunk-2P4VECEE.mjs → chunk-65YIOCCD.mjs} +6 -11
- package/dist/{chunk-2P4VECEE.mjs.map → chunk-65YIOCCD.mjs.map} +1 -1
- package/dist/{chunk-QG4PT5WK.mjs → chunk-6CSGHZ3E.mjs} +9 -21
- package/dist/{chunk-QG4PT5WK.mjs.map → chunk-6CSGHZ3E.mjs.map} +1 -1
- package/dist/{chunk-X65NMDPS.mjs → chunk-AZRVRNXT.mjs} +40 -30
- package/dist/{chunk-X65NMDPS.mjs.map → chunk-AZRVRNXT.mjs.map} +1 -1
- package/dist/{chunk-M4U5R7A4.mjs → chunk-B42NUKMZ.mjs} +2 -6
- package/dist/{chunk-M4U5R7A4.mjs.map → chunk-B42NUKMZ.mjs.map} +1 -1
- package/dist/{chunk-BWFTQHNM.mjs → chunk-CHUCIHMY.mjs} +3 -4
- package/dist/{chunk-BWFTQHNM.mjs.map → chunk-CHUCIHMY.mjs.map} +1 -1
- package/dist/{chunk-UPMSYTWW.mjs → chunk-DIZJVB6M.mjs} +306 -291
- package/dist/{chunk-UPMSYTWW.mjs.map → chunk-DIZJVB6M.mjs.map} +1 -1
- package/dist/chunk-H5UCKQWK.mjs +41 -0
- package/dist/{chunk-ENLZPHTQ.mjs.map → chunk-H5UCKQWK.mjs.map} +1 -1
- package/dist/{chunk-MQIKQKSW.mjs → chunk-IFWKT27G.mjs} +37 -33
- package/dist/{chunk-MQIKQKSW.mjs.map → chunk-IFWKT27G.mjs.map} +1 -1
- package/dist/{chunk-EM2HUGUY.mjs → chunk-JA27QXVB.mjs} +37 -28
- package/dist/{chunk-EM2HUGUY.mjs.map → chunk-JA27QXVB.mjs.map} +1 -1
- package/dist/{chunk-2HCZYULZ.mjs → chunk-K2NZL5V4.mjs} +3 -6
- package/dist/{chunk-2HCZYULZ.mjs.map → chunk-K2NZL5V4.mjs.map} +1 -1
- package/dist/{chunk-Y47SYXII.mjs → chunk-KJAZNKV2.mjs} +43 -52
- package/dist/{chunk-Y47SYXII.mjs.map → chunk-KJAZNKV2.mjs.map} +1 -1
- package/dist/{chunk-U6YTBIDT.mjs → chunk-KPPU6OWF.mjs} +27 -39
- package/dist/{chunk-U6YTBIDT.mjs.map → chunk-KPPU6OWF.mjs.map} +1 -1
- package/dist/{chunk-EFHEROXZ.mjs → chunk-KZSTW27Q.mjs} +30 -18
- package/dist/{chunk-EFHEROXZ.mjs.map → chunk-KZSTW27Q.mjs.map} +1 -1
- package/dist/chunk-LZOMFHX3.mjs +38 -0
- package/dist/{chunk-RWYS5MKN.mjs → chunk-NJNSCJEY.mjs} +22 -26
- package/dist/{chunk-RWYS5MKN.mjs.map → chunk-NJNSCJEY.mjs.map} +1 -1
- package/dist/{chunk-ZLRZO4EY.mjs → chunk-O6TYYKSD.mjs} +62 -60
- package/dist/chunk-O6TYYKSD.mjs.map +1 -0
- package/dist/{chunk-OGAMVFPS.mjs → chunk-QQBUNZHA.mjs} +2 -6
- package/dist/{chunk-OGAMVFPS.mjs.map → chunk-QQBUNZHA.mjs.map} +1 -1
- package/dist/{chunk-WS3YYLTJ.mjs → chunk-R7LXL3KJ.mjs} +14 -13
- package/dist/{chunk-WS3YYLTJ.mjs.map → chunk-R7LXL3KJ.mjs.map} +1 -1
- package/dist/{chunk-MJW4632R.mjs → chunk-WCUGLHYM.mjs} +16 -20
- package/dist/{chunk-MJW4632R.mjs.map → chunk-WCUGLHYM.mjs.map} +1 -1
- package/dist/chunk-WYHJFSMQ.mjs +25 -0
- package/dist/{chunk-L4HIW3KB.mjs.map → chunk-WYHJFSMQ.mjs.map} +1 -1
- package/dist/{chunk-XJNI62IP.mjs → chunk-XC5UXEIB.mjs} +4 -11
- package/dist/{chunk-XJNI62IP.mjs.map → chunk-XC5UXEIB.mjs.map} +1 -1
- package/dist/{chunk-4U4X4KAC.mjs → chunk-XD7INCM4.mjs} +11 -17
- package/dist/{chunk-4U4X4KAC.mjs.map → chunk-XD7INCM4.mjs.map} +1 -1
- package/dist/{chunk-ZZ6VIQ3U.mjs → chunk-ZE7R2XXE.mjs} +10 -12
- package/dist/{chunk-ZZ6VIQ3U.mjs.map → chunk-ZE7R2XXE.mjs.map} +1 -1
- package/dist/{chunk-4C6IY46N.mjs → chunk-ZK4W5T53.mjs} +7 -11
- package/dist/{chunk-4C6IY46N.mjs.map → chunk-ZK4W5T53.mjs.map} +1 -1
- package/dist/commonConstants.js +1 -35
- package/dist/commonConstants.js.map +1 -1
- package/dist/commonConstants.mjs +2 -2
- package/dist/commonSelectors.js +73 -135
- package/dist/commonSelectors.js.map +1 -1
- package/dist/commonSelectors.mjs +12 -12
- package/dist/constants.js +36 -153
- package/dist/constants.js.map +1 -1
- package/dist/constants.mjs +14 -14
- package/dist/deploymentsSlice/constants.js +34 -59
- package/dist/deploymentsSlice/constants.js.map +1 -1
- package/dist/deploymentsSlice/constants.mjs +4 -4
- package/dist/deploymentsSlice/index.js +68 -79
- package/dist/deploymentsSlice/index.js.map +1 -1
- package/dist/deploymentsSlice/index.mjs +5 -5
- package/dist/deploymentsSlice/selectors.js +35 -52
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/selectors.mjs +5 -5
- package/dist/deploymentsSlice/thunks.js +563 -553
- package/dist/deploymentsSlice/thunks.js.map +1 -1
- package/dist/deploymentsSlice/thunks.mjs +28 -28
- package/dist/devicesSlice/constants.js +34 -58
- package/dist/devicesSlice/constants.js.map +1 -1
- package/dist/devicesSlice/constants.mjs +4 -4
- package/dist/devicesSlice/index.js +71 -81
- package/dist/devicesSlice/index.js.map +1 -1
- package/dist/devicesSlice/index.mjs +5 -5
- package/dist/devicesSlice/selectors.js +40 -89
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/selectors.mjs +5 -5
- package/dist/devicesSlice/thunks.js +563 -589
- package/dist/devicesSlice/thunks.js.map +1 -1
- package/dist/devicesSlice/thunks.mjs +28 -28
- package/dist/monitorSlice/constants.js +34 -45
- package/dist/monitorSlice/constants.js.map +1 -1
- package/dist/monitorSlice/constants.mjs +4 -4
- package/dist/monitorSlice/index.js +41 -52
- package/dist/monitorSlice/index.js.map +1 -1
- package/dist/monitorSlice/index.mjs +5 -5
- package/dist/monitorSlice/selectors.js +0 -4
- package/dist/monitorSlice/selectors.mjs +1 -1
- package/dist/monitorSlice/thunks.js +249 -232
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/monitorSlice/thunks.mjs +25 -25
- package/dist/onboardingSlice/constants.js +0 -5
- package/dist/onboardingSlice/constants.mjs +1 -1
- package/dist/onboardingSlice/index.js +1 -22
- package/dist/onboardingSlice/index.js.map +1 -1
- package/dist/onboardingSlice/index.mjs +2 -2
- package/dist/onboardingSlice/selectors.js +0 -4
- package/dist/onboardingSlice/selectors.mjs +1 -1
- package/dist/onboardingSlice/thunks.js +563 -547
- package/dist/onboardingSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/thunks.mjs +28 -28
- package/dist/organizationSlice/constants.js +34 -56
- package/dist/organizationSlice/constants.js.map +1 -1
- package/dist/organizationSlice/constants.mjs +4 -4
- package/dist/organizationSlice/index.js +45 -53
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/index.mjs +5 -5
- package/dist/organizationSlice/selectors.js +35 -61
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/selectors.mjs +5 -5
- package/dist/organizationSlice/thunks.js +563 -572
- package/dist/organizationSlice/thunks.js.map +1 -1
- package/dist/organizationSlice/thunks.mjs +28 -28
- package/dist/releasesSlice/constants.js +0 -7
- package/dist/releasesSlice/constants.mjs +1 -1
- package/dist/releasesSlice/index.js +38 -64
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/index.mjs +5 -5
- package/dist/releasesSlice/selectors.js +37 -57
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/selectors.mjs +6 -6
- package/dist/releasesSlice/thunks.js +293 -281
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/releasesSlice/thunks.mjs +25 -25
- package/dist/selectors.js +73 -207
- package/dist/selectors.js.map +1 -1
- package/dist/selectors.mjs +43 -43
- package/dist/store.js +194 -151
- package/dist/store.js.map +1 -1
- package/dist/store.mjs +16 -16
- package/dist/storehooks.js +568 -547
- package/dist/storehooks.js.map +1 -1
- package/dist/storehooks.mjs +38 -41
- package/dist/storehooks.mjs.map +1 -1
- package/dist/thunks.js +563 -702
- package/dist/thunks.js.map +1 -1
- package/dist/thunks.mjs +28 -28
- package/dist/usersSlice/constants.js +36 -66
- package/dist/usersSlice/constants.js.map +1 -1
- package/dist/usersSlice/constants.mjs +4 -4
- package/dist/usersSlice/index.js +62 -71
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/index.mjs +5 -5
- package/dist/usersSlice/selectors.js +41 -66
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/selectors.mjs +6 -6
- package/dist/usersSlice/thunks.js +563 -576
- package/dist/usersSlice/thunks.js.map +1 -1
- package/dist/usersSlice/thunks.mjs +28 -28
- package/dist/utils.js +57 -93
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +5 -5
- package/package.json +66 -1
- package/dist/chunk-ENLZPHTQ.mjs +0 -35
- package/dist/chunk-L4HIW3KB.mjs +0 -36
- package/dist/chunk-XWBD7VOK.mjs +0 -93
- package/dist/chunk-ZLRZO4EY.mjs.map +0 -1
- /package/dist/{chunk-XWBD7VOK.mjs.map → chunk-LZOMFHX3.mjs.map} +0 -0
|
@@ -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 }) => {\n return 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);\n"],"mappings":"
|
|
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 return 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);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,wBAAwB;AAKjC,IAAM,EAAE,MAAM,aAAa,SAAS,eAAe,IAAI;AAEvD,IAAM,eAAe;AACrB,IAAM,WAAW;AACjB,IAAM,kBAAkB,UAAS,KAAK,UAAU,eAAe,SAAS,SAAS,GAAG,KAAK,UAAU,GAAG,eAAe,SAAS,MAAM,CAAC,GAAG,QAAQ,KAAK;AAErJ,IAAM,uBAAuB,YAAU,OAAO,IAAI,YAAU,EAAE,GAAG,OAAO,UAAU,MAAM,MAAM,MAAM,gBAAgB,MAAM,I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AI,GAAG,eAAe,YAAY,EAAE,SAAS,EAC9C,MAAM,SAAO,mBAAmB,KAAK,+CAA+C,EAAE,YAAY,QAAQ,CAAC,EAC3G,KAAK,CAAC,EAAE,KAAK,MAAM,QAAQ,IAAI,CAAC,SAAS,gBAAa,eAAe,EAAE,IAAI,UAAU,KAAK,CAAC,GAAG,QAAQ,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3H;AAEO,IAAM,4BAA4B;AAAA,EACvC,GAAG,SAAS;AAAA,EACZ,CAAC,EAAE,SAAS,UAAU,cAAc,MAAM,GAAG,EAAE,SAAS,MAAM;AAC5D,WAAO,oBAAI,IAAI,GAAG,eAAe,mCAAmC,OAAO,WAAW,EAAE,QAAQ,CAAC,EAC9F,MAAM,SAAO,mBAAmB,KAAK,GAAG,UAAU,OAAO,KAAK,WAAW,OAAO,mBAAmB,QAAQ,CAAC,EAC5G;AAAA,MAAK,MACJ,QAAQ,IAAI;AAAA,QACV,SAAS,QAAQ,mBAAmB,EAAE,SAAS,QAAQ,CAAC,CAAC;AAAA,QACzD,SAAS,gBAAa,YAAY,gBAAgB,UAAU,OAAO,KAAK,SAAS,OAAO,WAAW,SAAS,WAAW,CAAC;AAAA,MAC1H,CAAC;AAAA,IACH;AAAA,EACJ;AACF;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
commonRequestConfig
|
|
3
|
+
} from "./chunk-65YIOCCD.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getToken
|
|
6
|
+
} from "./chunk-ZK4W5T53.mjs";
|
|
7
|
+
|
|
8
|
+
// src/api/users-api.ts
|
|
9
|
+
import axios from "axios";
|
|
10
|
+
var Api = {
|
|
11
|
+
postLogin: (url, { email: username, password, ...body }) => axios.post(url, body, { ...commonRequestConfig, auth: { username, password } }).then((res) => ({ text: res.data, code: res.status, contentType: res.headers?.["content-type"] })),
|
|
12
|
+
putVerifyTFA: (url, userData) => {
|
|
13
|
+
let body = {};
|
|
14
|
+
if (userData.hasOwnProperty("token2fa")) {
|
|
15
|
+
body = { token2fa: userData.token2fa };
|
|
16
|
+
}
|
|
17
|
+
return axios.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var users_api_default = Api;
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
users_api_default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-WYHJFSMQ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/users-api.ts"],"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 axios from 'axios';\n\nimport { getToken } from '../auth';\nimport { commonRequestConfig } from './general-api';\n\nconst Api = {\n postLogin: (url, { email: username, password, ...body }) =>\n axios\n .post(url, body, { ...commonRequestConfig, auth: { username, password } })\n .then(res => ({ text: res.data, code: res.status, contentType: res.headers?.['content-type'] })),\n putVerifyTFA: (url, userData) => {\n let body = {};\n if (userData.hasOwnProperty('token2fa')) {\n body = { token2fa: userData.token2fa };\n }\n return axios.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });\n }\n};\n\nexport default Api;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/api/users-api.ts"],"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 axios from 'axios';\n\nimport { getToken } from '../auth';\nimport { commonRequestConfig } from './general-api';\n\nconst Api = {\n postLogin: (url, { email: username, password, ...body }) =>\n axios\n .post(url, body, { ...commonRequestConfig, auth: { username, password } })\n .then(res => ({ text: res.data, code: res.status, contentType: res.headers?.['content-type'] })),\n putVerifyTFA: (url, userData) => {\n let body = {};\n if (userData.hasOwnProperty('token2fa')) {\n body = { token2fa: userData.token2fa };\n }\n return axios.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });\n }\n};\n\nexport default Api;\n"],"mappings":";;;;;;;;AAcA,OAAO,WAAW;AAKlB,IAAM,MAAM;AAAA,EACV,WAAW,CAAC,KAAK,EAAE,OAAO,UAAU,UAAU,GAAG,KAAK,MACpD,MACG,KAAK,KAAK,MAAM,EAAE,GAAG,qBAAqB,MAAM,EAAE,UAAU,SAAS,EAAE,CAAC,EACxE,KAAK,UAAQ,EAAE,MAAM,IAAI,MAAM,MAAM,IAAI,QAAQ,aAAa,IAAI,UAAU,cAAc,EAAE,EAAE;AAAA,EACnG,cAAc,CAAC,KAAK,aAAa;AAC/B,QAAI,OAAO,CAAC;AACZ,QAAI,SAAS,eAAe,UAAU,GAAG;AACvC,aAAO,EAAE,UAAU,SAAS,SAAS;AAAA,IACvC;AACA,WAAO,MAAM,IAAI,KAAK,MAAM,EAAE,GAAG,qBAAqB,SAAS,EAAE,GAAG,oBAAoB,SAAS,eAAe,UAAU,SAAS,CAAC,GAAG,EAAE,CAAC;AAAA,EAC5I;AACF;AAEA,IAAO,oBAAQ;","names":[]}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listItemMapper
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
__spreadProps,
|
|
6
|
-
__spreadValues
|
|
7
|
-
} from "./chunk-XWBD7VOK.mjs";
|
|
3
|
+
} from "./chunk-KPPU6OWF.mjs";
|
|
8
4
|
|
|
9
5
|
// src/releasesSlice/selectors.ts
|
|
10
6
|
import { createSelector } from "@reduxjs/toolkit";
|
|
@@ -16,15 +12,12 @@ var getListedReleases = (state) => state.releases.releasesList.releaseIds;
|
|
|
16
12
|
var getUpdateTypes = (state) => state.releases.updateTypes;
|
|
17
13
|
var getReleaseMappingDefaults = () => ({});
|
|
18
14
|
var getReleasesList = createSelector([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
|
|
19
|
-
var getReleaseTagsById = createSelector([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) =>
|
|
15
|
+
var getReleaseTagsById = createSelector([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
|
|
20
16
|
var getHasReleases = createSelector(
|
|
21
17
|
[getReleaseListState, getReleasesById],
|
|
22
18
|
({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
|
|
23
19
|
);
|
|
24
|
-
var getSelectedRelease = createSelector([getReleasesById, getSelectedReleaseId], (byId, id) => {
|
|
25
|
-
var _a;
|
|
26
|
-
return (_a = byId[id]) != null ? _a : {};
|
|
27
|
-
});
|
|
20
|
+
var getSelectedRelease = createSelector([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});
|
|
28
21
|
|
|
29
22
|
export {
|
|
30
23
|
getReleasesById,
|
|
@@ -36,4 +29,4 @@ export {
|
|
|
36
29
|
getHasReleases,
|
|
37
30
|
getSelectedRelease
|
|
38
31
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-XC5UXEIB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/releasesSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { listItemMapper } from '@northern.tech/store/utils';\nimport { createSelector } from '@reduxjs/toolkit';\n\nconst getSelectedReleaseId = state => state.releases.selectedRelease;\nexport const getReleasesById = state => state.releases.byId;\nexport const getReleaseTags = state => state.releases.tags;\nexport const getReleaseListState = state => state.releases.releasesList;\nconst getListedReleases = state => state.releases.releasesList.releaseIds;\nexport const getUpdateTypes = state => state.releases.updateTypes;\n\nconst getReleaseMappingDefaults = () => ({});\nexport const getReleasesList = createSelector([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);\n\nexport const getReleaseTagsById = createSelector([getReleaseTags], releaseTags => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));\nexport const getHasReleases = createSelector(\n [getReleaseListState, getReleasesById],\n ({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)\n);\n\nexport const getSelectedRelease = createSelector([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/releasesSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { listItemMapper } from '@northern.tech/store/utils';\nimport { createSelector } from '@reduxjs/toolkit';\n\nconst getSelectedReleaseId = state => state.releases.selectedRelease;\nexport const getReleasesById = state => state.releases.byId;\nexport const getReleaseTags = state => state.releases.tags;\nexport const getReleaseListState = state => state.releases.releasesList;\nconst getListedReleases = state => state.releases.releasesList.releaseIds;\nexport const getUpdateTypes = state => state.releases.updateTypes;\n\nconst getReleaseMappingDefaults = () => ({});\nexport const getReleasesList = createSelector([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);\n\nexport const getReleaseTagsById = createSelector([getReleaseTags], releaseTags => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));\nexport const getHasReleases = createSelector(\n [getReleaseListState, getReleasesById],\n ({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)\n);\n\nexport const getSelectedRelease = createSelector([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});\n"],"mappings":";;;;;AAcA,SAAS,sBAAsB;AAE/B,IAAM,uBAAuB,WAAS,MAAM,SAAS;AAC9C,IAAM,kBAAkB,WAAS,MAAM,SAAS;AAChD,IAAM,iBAAiB,WAAS,MAAM,SAAS;AAC/C,IAAM,sBAAsB,WAAS,MAAM,SAAS;AAC3D,IAAM,oBAAoB,WAAS,MAAM,SAAS,aAAa;AACxD,IAAM,iBAAiB,WAAS,MAAM,SAAS;AAEtD,IAAM,4BAA4B,OAAO,CAAC;AACnC,IAAM,kBAAkB,eAAe,CAAC,iBAAiB,mBAAmB,yBAAyB,GAAG,cAAc;AAEtH,IAAM,qBAAqB,eAAe,CAAC,cAAc,GAAG,iBAAe,YAAY,OAAO,CAAC,MAAM,SAAS,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC;AAC3I,IAAM,iBAAiB;AAAA,EAC5B,CAAC,qBAAqB,eAAe;AAAA,EACrC,CAAC,EAAE,aAAa,MAAM,GAAG,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,EAAE,UAAU,SAAS;AAC5E;AAEO,IAAM,qBAAqB,eAAe,CAAC,iBAAiB,oBAAoB,GAAG,CAAC,MAAM,OAAO,KAAK,EAAE,KAAK,CAAC,CAAC;","names":[]}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isDarkMode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KPPU6OWF.mjs";
|
|
4
4
|
import {
|
|
5
5
|
READ_STATES,
|
|
6
6
|
twoFAStates
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IFWKT27G.mjs";
|
|
8
8
|
import {
|
|
9
9
|
DEVICE_ONLINE_CUTOFF,
|
|
10
10
|
defaultIdAttribute
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
__spreadValues
|
|
14
|
-
} from "./chunk-XWBD7VOK.mjs";
|
|
11
|
+
} from "./chunk-QQBUNZHA.mjs";
|
|
15
12
|
|
|
16
13
|
// src/usersSlice/selectors.ts
|
|
17
14
|
import { createSelector } from "@reduxjs/toolkit";
|
|
@@ -20,10 +17,7 @@ var getTooltipsById = (state) => state.users.tooltips.byId;
|
|
|
20
17
|
var getGlobalSettings = (state) => state.users.globalSettings;
|
|
21
18
|
var getCurrentUserId = (state) => state.users.currentUser;
|
|
22
19
|
var getUsersById = (state) => state.users.byId;
|
|
23
|
-
var getCurrentUser = createSelector([getUsersById, getCurrentUserId], (usersById, userId) => {
|
|
24
|
-
var _a;
|
|
25
|
-
return (_a = usersById[userId]) != null ? _a : {};
|
|
26
|
-
});
|
|
20
|
+
var getCurrentUser = createSelector([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
|
|
27
21
|
var getUserSettings = (state) => state.users.userSettings;
|
|
28
22
|
var getIsDarkMode = createSelector([getUserSettings], ({ mode }) => isDarkMode(mode));
|
|
29
23
|
var getShowHelptips = createSelector(
|
|
@@ -34,22 +28,22 @@ var getTooltipsState = createSelector(
|
|
|
34
28
|
[getTooltipsById, getUserSettings],
|
|
35
29
|
(byId, { tooltips = {} }) => Object.entries(byId).reduce(
|
|
36
30
|
(accu, [id, value]) => {
|
|
37
|
-
accu[id] =
|
|
31
|
+
accu[id] = { ...accu[id], ...value };
|
|
38
32
|
return accu;
|
|
39
33
|
},
|
|
40
|
-
|
|
34
|
+
{ ...tooltips }
|
|
41
35
|
)
|
|
42
36
|
);
|
|
43
37
|
var getHas2FA = createSelector(
|
|
44
38
|
[getCurrentUser],
|
|
45
39
|
(currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === twoFAStates.enabled
|
|
46
40
|
);
|
|
47
|
-
var getIdAttribute = createSelector([getGlobalSettings], ({ id_attribute =
|
|
41
|
+
var getIdAttribute = createSelector([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
|
|
48
42
|
var getOfflineThresholdSettings = createSelector([getGlobalSettings], ({ offlineThreshold }) => ({
|
|
49
|
-
interval:
|
|
50
|
-
intervalUnit:
|
|
43
|
+
interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
|
|
44
|
+
intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
|
|
51
45
|
}));
|
|
52
|
-
var getRolesList = createSelector([getRolesById], (rolesById) => Object.entries(rolesById).map(([id, role]) =>
|
|
46
|
+
var getRolesList = createSelector([getRolesById], (rolesById) => Object.entries(rolesById).map(([id, role]) => ({ id, ...role })));
|
|
53
47
|
var getCurrentSession = (state) => state.users.currentSession;
|
|
54
48
|
|
|
55
49
|
export {
|
|
@@ -67,4 +61,4 @@ export {
|
|
|
67
61
|
getRolesList,
|
|
68
62
|
getCurrentSession
|
|
69
63
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-XD7INCM4.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/usersSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { DEVICE_ONLINE_CUTOFF, defaultIdAttribute } from '@northern.tech/store/constants';\nimport { isDarkMode } from '@northern.tech/store/utils';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { READ_STATES, twoFAStates } from './constants';\n\nexport const getRolesById = state => state.users.rolesById;\nexport const getTooltipsById = state => state.users.tooltips.byId;\nexport const getGlobalSettings = state => state.users.globalSettings;\n\nconst getCurrentUserId = state => state.users.currentUser;\nconst getUsersById = state => state.users.byId;\nexport const getCurrentUser = createSelector([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});\nexport const getUserSettings = state => state.users.userSettings;\n\nexport const getIsDarkMode = createSelector([getUserSettings], ({ mode }) => isDarkMode(mode));\n\nexport const getShowHelptips = createSelector([getTooltipsById], tooltips =>\n Object.values(tooltips).reduce((accu, { readState }) => accu || readState === READ_STATES.unread, false)\n);\n\nexport const getTooltipsState = createSelector([getTooltipsById, getUserSettings], (byId, { tooltips = {} }) =>\n Object.entries(byId).reduce(\n (accu, [id, value]) => {\n accu[id] = { ...accu[id], ...value };\n return accu;\n },\n { ...tooltips }\n )\n);\n\nexport const getHas2FA = createSelector(\n [getCurrentUser],\n currentUser => currentUser.hasOwnProperty('tfa_status') && currentUser.tfa_status === twoFAStates.enabled\n);\n\nexport const getIdAttribute = createSelector([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);\n\nexport const getOfflineThresholdSettings = createSelector([getGlobalSettings], ({ offlineThreshold }) => ({\n interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,\n intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName\n}));\n\nexport const getRolesList = createSelector([getRolesById], rolesById => Object.entries(rolesById).map(([id, role]) => ({ id, ...role })));\n\nexport const getCurrentSession = state => state.users.currentSession;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/usersSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { DEVICE_ONLINE_CUTOFF, defaultIdAttribute } from '@northern.tech/store/constants';\nimport { isDarkMode } from '@northern.tech/store/utils';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { READ_STATES, twoFAStates } from './constants';\n\nexport const getRolesById = state => state.users.rolesById;\nexport const getTooltipsById = state => state.users.tooltips.byId;\nexport const getGlobalSettings = state => state.users.globalSettings;\n\nconst getCurrentUserId = state => state.users.currentUser;\nconst getUsersById = state => state.users.byId;\nexport const getCurrentUser = createSelector([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});\nexport const getUserSettings = state => state.users.userSettings;\n\nexport const getIsDarkMode = createSelector([getUserSettings], ({ mode }) => isDarkMode(mode));\n\nexport const getShowHelptips = createSelector([getTooltipsById], tooltips =>\n Object.values(tooltips).reduce((accu, { readState }) => accu || readState === READ_STATES.unread, false)\n);\n\nexport const getTooltipsState = createSelector([getTooltipsById, getUserSettings], (byId, { tooltips = {} }) =>\n Object.entries(byId).reduce(\n (accu, [id, value]) => {\n accu[id] = { ...accu[id], ...value };\n return accu;\n },\n { ...tooltips }\n )\n);\n\nexport const getHas2FA = createSelector(\n [getCurrentUser],\n currentUser => currentUser.hasOwnProperty('tfa_status') && currentUser.tfa_status === twoFAStates.enabled\n);\n\nexport const getIdAttribute = createSelector([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);\n\nexport const getOfflineThresholdSettings = createSelector([getGlobalSettings], ({ offlineThreshold }) => ({\n interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,\n intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName\n}));\n\nexport const getRolesList = createSelector([getRolesById], rolesById => Object.entries(rolesById).map(([id, role]) => ({ id, ...role })));\n\nexport const getCurrentSession = state => state.users.currentSession;\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAS,sBAAsB;AAIxB,IAAM,eAAe,WAAS,MAAM,MAAM;AAC1C,IAAM,kBAAkB,WAAS,MAAM,MAAM,SAAS;AACtD,IAAM,oBAAoB,WAAS,MAAM,MAAM;AAEtD,IAAM,mBAAmB,WAAS,MAAM,MAAM;AAC9C,IAAM,eAAe,WAAS,MAAM,MAAM;AACnC,IAAM,iBAAiB,eAAe,CAAC,cAAc,gBAAgB,GAAG,CAAC,WAAW,WAAW,UAAU,MAAM,KAAK,CAAC,CAAC;AACtH,IAAM,kBAAkB,WAAS,MAAM,MAAM;AAE7C,IAAM,gBAAgB,eAAe,CAAC,eAAe,GAAG,CAAC,EAAE,KAAK,MAAM,WAAW,IAAI,CAAC;AAEtF,IAAM,kBAAkB;AAAA,EAAe,CAAC,eAAe;AAAA,EAAG,cAC/D,OAAO,OAAO,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,MAAM,QAAQ,cAAc,YAAY,QAAQ,KAAK;AACzG;AAEO,IAAM,mBAAmB;AAAA,EAAe,CAAC,iBAAiB,eAAe;AAAA,EAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,MACxG,OAAO,QAAQ,IAAI,EAAE;AAAA,IACnB,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;AACrB,WAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,GAAG,MAAM;AACnC,aAAO;AAAA,IACT;AAAA,IACA,EAAE,GAAG,SAAS;AAAA,EAChB;AACF;AAEO,IAAM,YAAY;AAAA,EACvB,CAAC,cAAc;AAAA,EACf,iBAAe,YAAY,eAAe,YAAY,KAAK,YAAY,eAAe,YAAY;AACpG;AAEO,IAAM,iBAAiB,eAAe,CAAC,iBAAiB,GAAG,CAAC,EAAE,eAAe,EAAE,GAAG,mBAAmB,EAAE,MAAM,YAAY;AAEzH,IAAM,8BAA8B,eAAe,CAAC,iBAAiB,GAAG,CAAC,EAAE,iBAAiB,OAAO;AAAA,EACxG,UAAU,kBAAkB,YAAY,qBAAqB;AAAA,EAC7D,cAAc,kBAAkB,gBAAgB,qBAAqB;AACvE,EAAE;AAEK,IAAM,eAAe,eAAe,CAAC,YAAY,GAAG,eAAa,OAAO,QAAQ,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,IAAI,OAAO,EAAE,IAAI,GAAG,KAAK,EAAE,CAAC;AAEjI,IAAM,oBAAoB,WAAS,MAAM,MAAM;","names":[]}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
alertChannels
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IFWKT27G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEVICE_ISSUE_OPTIONS,
|
|
6
6
|
DEVICE_LIST_DEFAULTS
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
__spreadProps,
|
|
10
|
-
__spreadValues
|
|
11
|
-
} from "./chunk-XWBD7VOK.mjs";
|
|
7
|
+
} from "./chunk-QQBUNZHA.mjs";
|
|
12
8
|
|
|
13
9
|
// src/monitorSlice/index.ts
|
|
14
10
|
import { createSlice } from "@reduxjs/toolkit";
|
|
15
11
|
var sliceName = "monitor";
|
|
16
12
|
var initialState = {
|
|
17
13
|
alerts: {
|
|
18
|
-
alertList:
|
|
14
|
+
alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },
|
|
19
15
|
byDeviceId: {}
|
|
20
16
|
},
|
|
21
17
|
issueCounts: {
|
|
22
|
-
byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) =>
|
|
18
|
+
byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
|
|
23
19
|
},
|
|
24
20
|
settings: {
|
|
25
21
|
global: {
|
|
26
|
-
channels:
|
|
22
|
+
channels: {
|
|
23
|
+
...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
|
|
24
|
+
}
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
};
|
|
@@ -41,14 +39,14 @@ var monitorSlice = createSlice({
|
|
|
41
39
|
},
|
|
42
40
|
receiveLatestDeviceAlerts: (state, action) => {
|
|
43
41
|
const { deviceId, alerts } = action.payload;
|
|
44
|
-
state.alerts.byDeviceId[deviceId] =
|
|
42
|
+
state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };
|
|
45
43
|
},
|
|
46
44
|
receiveDeviceIssueCounts: (state, action) => {
|
|
47
45
|
const { issueType, counts } = action.payload;
|
|
48
46
|
state.issueCounts.byType[issueType] = counts;
|
|
49
47
|
},
|
|
50
48
|
setAlertListState: (state, action) => {
|
|
51
|
-
state.alerts.alertList =
|
|
49
|
+
state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
});
|
|
@@ -62,4 +60,4 @@ export {
|
|
|
62
60
|
actions,
|
|
63
61
|
monitorSlice_default
|
|
64
62
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-ZE7R2XXE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/monitorSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS } from '@northern.tech/store/commonConstants';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport { alertChannels } from './constants';\n\nexport const sliceName = 'monitor';\n\nexport const initialState = {\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {}\n },\n issueCounts: {\n byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})\n },\n settings: {\n global: {\n channels: {\n ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})\n }\n }\n }\n};\n\nexport const monitorSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n changeAlertChannel: (state, action) => {\n const { channel, enabled } = action.payload;\n state.settings.global.channels[channel] = { enabled };\n },\n receiveDeviceAlerts: (state, action) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { alerts };\n },\n receiveLatestDeviceAlerts: (state, action) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };\n },\n receiveDeviceIssueCounts: (state, action) => {\n const { issueType, counts } = action.payload;\n state.issueCounts.byType[issueType] = counts;\n },\n setAlertListState: (state, action) => {\n state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };\n }\n }\n});\n\nexport const actions = monitorSlice.actions;\nexport default monitorSlice.reducer;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/monitorSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS } from '@northern.tech/store/commonConstants';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport { alertChannels } from './constants';\n\nexport const sliceName = 'monitor';\n\nexport const initialState = {\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {}\n },\n issueCounts: {\n byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})\n },\n settings: {\n global: {\n channels: {\n ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})\n }\n }\n }\n};\n\nexport const monitorSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n changeAlertChannel: (state, action) => {\n const { channel, enabled } = action.payload;\n state.settings.global.channels[channel] = { enabled };\n },\n receiveDeviceAlerts: (state, action) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { alerts };\n },\n receiveLatestDeviceAlerts: (state, action) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };\n },\n receiveDeviceIssueCounts: (state, action) => {\n const { issueType, counts } = action.payload;\n state.issueCounts.byType[issueType] = counts;\n },\n setAlertListState: (state, action) => {\n state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };\n }\n }\n});\n\nexport const actions = monitorSlice.actions;\nexport default monitorSlice.reducer;\n"],"mappings":";;;;;;;;;AAcA,SAAS,mBAAmB;AAIrB,IAAM,YAAY;AAElB,IAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,IACN,WAAW,EAAE,GAAG,sBAAsB,OAAO,EAAE;AAAA,IAC/C,YAAY,CAAC;AAAA,EACf;AAAA,EACA,aAAa;AAAA,IACX,QAAQ,OAAO,OAAO,oBAAoB,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,OAAO,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;AAAA,EAC3H;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,UAAU;AAAA,QACR,GAAG,OAAO,KAAK,aAAa,EAAE,OAAO,CAAC,MAAM,UAAU,EAAE,GAAG,MAAM,CAAC,IAAI,GAAG,EAAE,SAAS,KAAK,EAAE,IAAI,CAAC,CAAC;AAAA,MACnG;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,eAAe,YAAY;AAAA,EACtC,MAAM;AAAA,EACN;AAAA,EACA,UAAU;AAAA,IACR,oBAAoB,CAAC,OAAO,WAAW;AACrC,YAAM,EAAE,SAAS,QAAQ,IAAI,OAAO;AACpC,YAAM,SAAS,OAAO,SAAS,OAAO,IAAI,EAAE,QAAQ;AAAA,IACtD;AAAA,IACA,qBAAqB,CAAC,OAAO,WAAW;AACtC,YAAM,EAAE,UAAU,OAAO,IAAI,OAAO;AACpC,YAAM,OAAO,WAAW,QAAQ,IAAI,EAAE,OAAO;AAAA,IAC/C;AAAA,IACA,2BAA2B,CAAC,OAAO,WAAW;AAC5C,YAAM,EAAE,UAAU,OAAO,IAAI,OAAO;AACpC,YAAM,OAAO,WAAW,QAAQ,IAAI,EAAE,GAAG,MAAM,OAAO,WAAW,QAAQ,GAAG,QAAQ,OAAO;AAAA,IAC7F;AAAA,IACA,0BAA0B,CAAC,OAAO,WAAW;AAC3C,YAAM,EAAE,WAAW,OAAO,IAAI,OAAO;AACrC,YAAM,YAAY,OAAO,SAAS,IAAI;AAAA,IACxC;AAAA,IACA,mBAAmB,CAAC,OAAO,WAAW;AACpC,YAAM,OAAO,YAAY,EAAE,GAAG,MAAM,OAAO,WAAW,GAAG,OAAO,QAAQ;AAAA,IAC1E;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,aAAa;AACpC,IAAO,uBAAQ,aAAa;","names":[]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TIMEOUTS
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
__spreadValues
|
|
6
|
-
} from "./chunk-XWBD7VOK.mjs";
|
|
3
|
+
} from "./chunk-QQBUNZHA.mjs";
|
|
7
4
|
|
|
8
5
|
// src/auth.ts
|
|
9
6
|
import Cookies from "universal-cookie";
|
|
@@ -11,18 +8,17 @@ var cookies = new Cookies();
|
|
|
11
8
|
var emptySession = Object.freeze({ token: "", exiresAt: void 0 });
|
|
12
9
|
var tokenCache = "";
|
|
13
10
|
var getSessionInfo = () => {
|
|
14
|
-
|
|
15
|
-
let sessionInfo = __spreadValues({}, emptySession);
|
|
11
|
+
let sessionInfo = { ...emptySession };
|
|
16
12
|
try {
|
|
17
|
-
sessionInfo = JSON.parse(
|
|
18
|
-
} catch
|
|
13
|
+
sessionInfo = JSON.parse(window.localStorage.getItem("JWT") ?? "");
|
|
14
|
+
} catch {
|
|
19
15
|
}
|
|
20
16
|
if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
21
17
|
cleanUp();
|
|
22
|
-
return
|
|
18
|
+
return { ...emptySession };
|
|
23
19
|
}
|
|
24
20
|
if (!sessionInfo.token) {
|
|
25
|
-
let jwtTokenFromCookie =
|
|
21
|
+
let jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
26
22
|
if (jwtTokenFromCookie) {
|
|
27
23
|
setSessionInfo({ token: jwtTokenFromCookie, undefined: void 0 });
|
|
28
24
|
sessionInfo.token = jwtTokenFromCookie;
|
|
@@ -72,4 +68,4 @@ export {
|
|
|
72
68
|
maxSessionAge,
|
|
73
69
|
updateMaxAge
|
|
74
70
|
};
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-ZK4W5T53.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/auth.ts"],"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"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/auth.ts"],"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"],"mappings":";;;;;AAcA,OAAO,aAAa;AAIpB,IAAM,UAAU,IAAI,QAAQ;AAE5B,IAAM,eAAe,OAAO,OAAO,EAAE,OAAO,IAAI,UAAU,OAAU,CAAC;AAErE,IAAI,aAAa;AAEV,IAAM,iBAAiB,MAAM;AAClC,MAAI,cAAc,EAAE,GAAG,aAAa;AACpC,MAAI;AACF,kBAAc,KAAK,MAAM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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":[]}
|
package/dist/commonConstants.js
CHANGED
|
@@ -3,22 +3,8 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
8
|
var __export = (target, all) => {
|
|
23
9
|
for (var name in all)
|
|
24
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -279,26 +265,6 @@ var emptyRole = Object.freeze({
|
|
|
279
265
|
name: void 0,
|
|
280
266
|
description: "",
|
|
281
267
|
permissions: [],
|
|
282
|
-
uiPermissions: Object.freeze(
|
|
283
|
-
});
|
|
284
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
285
|
-
0 && (module.exports = {
|
|
286
|
-
ALL_DEVICES,
|
|
287
|
-
ALL_RELEASES,
|
|
288
|
-
ATTRIBUTE_SCOPES,
|
|
289
|
-
DEVICE_FILTERING_OPTIONS,
|
|
290
|
-
DEVICE_ISSUE_OPTIONS,
|
|
291
|
-
DEVICE_LIST_DEFAULTS,
|
|
292
|
-
DEVICE_LIST_MAXIMUM_LENGTH,
|
|
293
|
-
DEVICE_ONLINE_CUTOFF,
|
|
294
|
-
EXTERNAL_PROVIDER,
|
|
295
|
-
MAX_PAGE_SIZE,
|
|
296
|
-
SORTING_OPTIONS,
|
|
297
|
-
TIMEOUTS,
|
|
298
|
-
UNGROUPED_GROUP,
|
|
299
|
-
defaultIdAttribute,
|
|
300
|
-
emptyRole,
|
|
301
|
-
emptyUiPermissions,
|
|
302
|
-
timeUnits
|
|
268
|
+
uiPermissions: Object.freeze({ ...emptyUiPermissions })
|
|
303
269
|
});
|
|
304
270
|
//# sourceMappingURL=commonConstants.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,mBAAkB;AAElB,gBAA0D;AAEnD,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,WAA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WS","React","Azure"]}
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,mBAAkB;AAElB,gBAA0D;AAEnD,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAA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