@northern.tech/store 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.cjs +20 -17
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.js +8 -8
- package/dist/api/general-api.js +2 -2
- package/dist/api/types/Tenant.ts +17 -12
- package/dist/api/users-api.js +2 -2
- 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.js +2 -2
- package/dist/appSlice/thunks.cjs +140 -96
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +19 -19
- package/dist/auth.js +2 -2
- package/dist/{chunk-Q6M5TTDQ.js → chunk-2CYOM4BK.js} +1 -1
- package/dist/chunk-2CYOM4BK.js.map +1 -0
- package/dist/{chunk-APHL4JZP.js → chunk-2JHFUQ6B.js} +141 -102
- package/dist/chunk-2JHFUQ6B.js.map +1 -0
- package/dist/{chunk-YETZPQFR.js → chunk-4XJMRVFI.js} +12 -11
- package/dist/chunk-4XJMRVFI.js.map +1 -0
- package/dist/{chunk-RX55KAKX.js → chunk-7JKWI5FK.js} +2 -2
- package/dist/{chunk-A6CT6GTI.js → chunk-C5NEDBJI.js} +17 -11
- package/dist/chunk-C5NEDBJI.js.map +1 -0
- package/dist/{chunk-NNADGHSL.js → chunk-DAPAXWA5.js} +8 -8
- package/dist/{chunk-ANB5BM5J.js → chunk-DCK2DBOA.js} +27 -20
- package/dist/chunk-DCK2DBOA.js.map +1 -0
- package/dist/{chunk-E5LEU5PF.js → chunk-HPBE6KYY.js} +2 -2
- package/dist/{chunk-2RJIDREZ.js → chunk-LEMVXAYP.js} +25 -16
- package/dist/chunk-LEMVXAYP.js.map +1 -0
- package/dist/{chunk-NI4SZOCF.js → chunk-LGNOTPUG.js} +9 -9
- package/dist/{chunk-MDC7Y3EX.js → chunk-LTKOV26W.js} +22 -20
- package/dist/chunk-LTKOV26W.js.map +1 -0
- package/dist/{chunk-YTQUNAZP.js → chunk-QRGTG4YB.js} +2 -2
- package/dist/{chunk-XTRPX7JZ.js → chunk-TI2RL5P2.js} +2 -2
- package/dist/chunk-TI2RL5P2.js.map +1 -0
- package/dist/{chunk-YGBFDXXA.js → chunk-TUACATJA.js} +2 -2
- package/dist/{chunk-25AKG5HH.js → chunk-UWMYZNUB.js} +19 -11
- package/dist/chunk-UWMYZNUB.js.map +1 -0
- package/dist/{chunk-UEP36GCI.js → chunk-VMNMD6KF.js} +2 -2
- package/dist/{chunk-KAQJH2YL.js → chunk-WXL7PVI5.js} +12 -4
- package/dist/chunk-WXL7PVI5.js.map +1 -0
- package/dist/{chunk-VOCOFE4I.js → chunk-X7IEZBM4.js} +2 -2
- package/dist/{chunk-XXHONFSQ.js → chunk-YDS36ALB.js} +3 -3
- package/dist/{chunk-XXHONFSQ.js.map → chunk-YDS36ALB.js.map} +1 -1
- package/dist/commonSelectors.cjs +40 -18
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +54 -46
- package/dist/commonSelectors.d.ts +54 -46
- package/dist/commonSelectors.js +9 -9
- 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 +6 -2
- package/dist/deploymentdevicehook.cjs +146 -101
- 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 +24 -22
- 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 +2 -2
- package/dist/deploymentsSlice/index.cjs +8 -8
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.js +3 -3
- package/dist/deploymentsSlice/selectors.cjs +8 -8
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.js +3 -3
- package/dist/deploymentsSlice/thunks.cjs +140 -96
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +19 -19
- 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 +4 -2
- package/dist/devicesSlice/index.cjs +8 -8
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.js +3 -3
- package/dist/devicesSlice/selectors.cjs +9 -9
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.js +3 -3
- package/dist/devicesSlice/thunks.cjs +142 -96
- 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 +21 -19
- package/dist/flag-eu-5477R2P4.svg +130 -0
- package/dist/flag-us-HNQAF66I.svg +63 -0
- package/dist/monitorSlice/constants.cjs +8 -8
- package/dist/monitorSlice/constants.cjs.map +1 -1
- package/dist/monitorSlice/constants.js +2 -2
- package/dist/monitorSlice/index.cjs +8 -8
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.js +3 -3
- package/dist/monitorSlice/thunks.cjs +59 -37
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +17 -17
- package/dist/onboardingSlice/thunks.cjs +149 -102
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +1 -32
- package/dist/onboardingSlice/thunks.d.ts +1 -32
- package/dist/onboardingSlice/thunks.js +19 -19
- 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 +4 -2
- package/dist/organizationSlice/index.cjs +18 -15
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +26 -1012
- package/dist/organizationSlice/index.d.ts +26 -1012
- package/dist/organizationSlice/index.js +3 -3
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +9 -1
- package/dist/organizationSlice/selectors.d.ts +9 -1
- package/dist/organizationSlice/selectors.js +3 -3
- package/dist/organizationSlice/thunks.cjs +1608 -1540
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +61 -36
- package/dist/organizationSlice/thunks.d.ts +61 -36
- package/dist/organizationSlice/thunks.js +19 -19
- package/dist/organizationSlice/types.cjs +19 -0
- package/dist/organizationSlice/types.cjs.map +1 -0
- package/dist/organizationSlice/types.d.cts +114 -0
- package/dist/organizationSlice/types.d.ts +114 -0
- package/dist/organizationSlice/types.js +1 -0
- package/dist/organizationSlice/types.js.map +1 -0
- package/dist/releasesSlice/index.js +2 -2
- package/dist/releasesSlice/selectors.cjs +11 -0
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.js +4 -4
- package/dist/releasesSlice/thunks.cjs +73 -49
- 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 +17 -17
- package/dist/selectors.cjs +46 -18
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +9 -1
- package/dist/selectors.d.ts +9 -1
- package/dist/selectors.js +36 -30
- package/dist/store.cjs +36 -23
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +12 -231
- package/dist/store.d.ts +12 -231
- package/dist/store.js +13 -11
- package/dist/storehooks.cjs +222 -141
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +36 -24
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +199 -126
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +5 -1
- package/dist/thunks.d.ts +5 -1
- package/dist/thunks.js +21 -19
- package/dist/usersSlice/constants.cjs +10 -10
- package/dist/usersSlice/constants.cjs.map +1 -1
- package/dist/usersSlice/constants.js +2 -2
- package/dist/usersSlice/index.cjs +10 -10
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.js +3 -3
- 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 +12 -6
- package/dist/usersSlice/thunks.cjs +138 -96
- 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 +19 -19
- package/dist/utils.cjs +17 -16
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +3 -3
- package/package.json +7 -7
- package/dist/chunk-25AKG5HH.js.map +0 -1
- package/dist/chunk-2RJIDREZ.js.map +0 -1
- package/dist/chunk-A6CT6GTI.js.map +0 -1
- package/dist/chunk-ANB5BM5J.js.map +0 -1
- package/dist/chunk-APHL4JZP.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-RX55KAKX.js.map → chunk-7JKWI5FK.js.map} +0 -0
- /package/dist/{chunk-NNADGHSL.js.map → chunk-DAPAXWA5.js.map} +0 -0
- /package/dist/{chunk-E5LEU5PF.js.map → chunk-HPBE6KYY.js.map} +0 -0
- /package/dist/{chunk-NI4SZOCF.js.map → chunk-LGNOTPUG.js.map} +0 -0
- /package/dist/{chunk-YTQUNAZP.js.map → chunk-QRGTG4YB.js.map} +0 -0
- /package/dist/{chunk-YGBFDXXA.js.map → chunk-TUACATJA.js.map} +0 -0
- /package/dist/{chunk-UEP36GCI.js.map → chunk-VMNMD6KF.js.map} +0 -0
- /package/dist/{chunk-VOCOFE4I.js.map → chunk-X7IEZBM4.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/monitorSlice/index.ts","../../src/commonConstants.tsx","../../src/appSlice/constants.ts","../../src/monitorSlice/constants.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","// 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","// Copyright 2019 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 { BarChart as BarChartIcon, PieChartOutline as PieChartIcon } from '@mui/icons-material';\n\nconst startingDeviceCount = {\n os: 'for first 50 devices',\n professional: 'for first 250 devices'\n};\n\nexport const apiRoot = '/api/management';\nexport const apiUrl = {\n v1: `${apiRoot}/v1`,\n v2: `${apiRoot}/v2`\n};\n\nexport const headerNames = {\n link: 'link',\n location: 'location',\n total: 'x-total-count'\n};\n\nexport const chartTypes = {\n bar: { key: 'bar', Icon: BarChartIcon },\n pie: { key: 'pie', Icon: PieChartIcon }\n};\nexport const emptyChartSelection = { software: '', group: '', chartType: chartTypes.bar.key, attribute: 'artifact_name' };\nexport const defaultReportType = 'distribution';\nexport const defaultReports = [{ ...emptyChartSelection, group: null, attribute: 'artifact_name', type: defaultReportType }];\n\nexport const BEGINNING_OF_TIME = '2016-01-01T00:00:00.000Z';\n\nexport const locations = {\n eu: { key: 'eu', title: 'EU', location: 'eu.hosted.mender.io' },\n us: { key: 'us', title: 'US', location: 'hosted.mender.io' }\n};\n\nexport const PLANS = {\n os: {\n id: 'os',\n name: 'Basic',\n offer: true,\n price: '$32/month',\n deviceCount: startingDeviceCount.os,\n offerprice: '$23/month for first 50 devices',\n price2: 'for first 6 months;\\n$29/month thereafter',\n features: ['Basic OTA features']\n },\n professional: {\n id: 'professional',\n name: 'Professional',\n offer: true,\n price: '$269/month',\n deviceCount: startingDeviceCount.professional,\n offerprice: '$200/month for first 50 devices',\n price2: 'for first 6 months;\\n$249/month thereafter',\n features: ['+ Advanced OTA features', '+ Standard support']\n },\n enterprise: {\n id: 'enterprise',\n name: 'Enterprise',\n price: 'Custom pricing',\n deviceCount: 'unlimited devices',\n features: ['+ Enterprise-grade OTA features', '+ Premium support']\n }\n};\n// the needs names need to be aligned with the name of the features in the appReducer, as they will be checked in the addonselection\nexport const ADDONS = {\n configure: {\n id: 'configure',\n title: 'Configure',\n description: 'Expand your plan with device configuration features',\n needs: ['hasDeviceConfig'],\n os: {\n price: '$11/month',\n deviceCount: startingDeviceCount.os\n },\n professional: {\n price: '$65/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['os', 'professional', 'enterprise']\n },\n troubleshoot: {\n id: 'troubleshoot',\n title: 'Troubleshoot',\n description: 'Expand your plan with device troubleshooting features',\n needs: ['hasDeviceConnect'],\n os: {\n price: '$27/month',\n deviceCount: startingDeviceCount.os\n },\n professional: {\n price: '$72/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['os', 'professional', 'enterprise']\n },\n monitor: {\n id: 'monitor',\n title: 'Monitor',\n description: 'Expand your plan with device monitoring features',\n needs: ['hasMonitor'],\n os: {\n price: '-',\n deviceCount: '-'\n },\n professional: {\n price: '$86/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['professional', 'enterprise']\n }\n};\n\nexport const BENEFITS = {\n auditlog: { id: 'auditlog', benefit: 'trace change across your devices and access troubleshooting session replay', requiredPlan: PLANS.professional.id },\n dashboard: { id: 'dashboard', benefit: 'actionable insights into the devices you are updating with Mender', requiredPlan: PLANS.enterprise.id },\n deltaGeneration: {\n id: 'deltaGeneration',\n benefit: 'automatic delta artifacts generation to minimize data transfer and improve the update delivery',\n requiredPlan: PLANS.enterprise.id\n },\n deviceConfiguration: { id: 'deviceConfiguration', benefit: 'device configuration features', requiredAddon: ADDONS.configure.id },\n deviceMonitor: { id: 'deviceMonitor', benefit: 'device monitoring features', requiredAddon: ADDONS.monitor.id, requiredPlan: PLANS.professional.id },\n deviceTroubleshoot: { id: 'deviceTroubleshoot', benefit: 'device troubleshooting features', requiredAddon: ADDONS.troubleshoot.id },\n dynamicGroups: { id: 'dynamicGroups', benefit: 'create dynamic groups to ease device management', requiredPlan: PLANS.enterprise.id },\n fullFiltering: { id: 'fullFiltering', benefit: 'filtering by multiple attributes to improve the device overview', requiredPlan: PLANS.professional.id },\n gateway: { id: 'gateway', benefit: 'see devices connected to your gateway device for easy access', requiredPlans: PLANS.professional.id },\n pausedDeployments: {\n id: 'pausedDeployments',\n benefit: 'granular control about update rollout to allow synchronization across your fleet',\n requiredPlan: PLANS.enterprise.id\n },\n phasedDeployments: { id: 'phasedDeployments', benefit: 'choose to roll out deployments in multiple phases', requiredPlan: PLANS.enterprise.id },\n rbac: { id: 'rbac', benefit: 'granular role based access control', requiredPlan: PLANS.enterprise.id },\n retryDeployments: { id: 'retryDeployments', benefit: 'optional retries for failed rollout attempts', requiredPlan: PLANS.professional.id },\n scheduledDeployments: {\n id: 'scheduledDeployments',\n benefit: 'scheduled deployments to steer the distribution of your updates.',\n requiredPlan: PLANS.professional.id\n },\n webhookEvents: {\n id: 'webhookEvents',\n benefit: 'receive inventory events and select which type(s) of events the webhook will receive',\n requiredPlan: PLANS.professional.id\n },\n\n default: { id: 'default', benefit: 'gain access to this feature', requiredPlan: PLANS.enterprise.id }\n};\n\nexport const yes = () => true;\nexport const canAccess = yes;\n\nexport const DARK_MODE = 'dark';\nexport const LIGHT_MODE = 'light';\n\nexport const APPLICATION_JSON_CONTENT_TYPE = 'application/json';\nexport const APPLICATION_JWT_CONTENT_TYPE = 'application/jwt';\n","// 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\nimport { apiUrl } from '@northern.tech/store/constants';\n\n// limitations under the License.\nexport const alertChannels = { email: 'email' };\nexport const monitorApiUrlv1 = `${apiUrl.v1}/devicemonitor`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBA,gBAA0D;AAwL1C;AAtLT,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,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;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,KAAK;AAAA,I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AAO;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":["AWS","Azure","BarChartIcon","PieChartIcon"]}
|
|
1
|
+
{"version":3,"sources":["../../src/monitorSlice/index.ts","../../src/commonConstants.tsx","../../src/appSlice/constants.ts","../../src/monitorSlice/constants.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","// 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","// Copyright 2019 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 { BarChart as BarChartIcon, PieChartOutline as PieChartIcon } from '@mui/icons-material';\n\nimport FlagEU from '../../../../assets/img/flag-eu.svg';\nimport FlagUS from '../../../../assets/img/flag-us.svg';\n\nconst startingDeviceCount = {\n os: 'for first 50 devices',\n professional: 'for first 250 devices'\n};\n\nexport const apiRoot = '/api/management';\nexport const apiUrl = {\n v1: `${apiRoot}/v1`,\n v2: `${apiRoot}/v2`\n};\n\nexport const headerNames = {\n link: 'link',\n location: 'location',\n total: 'x-total-count'\n};\n\nexport const chartTypes = {\n bar: { key: 'bar', Icon: BarChartIcon },\n pie: { key: 'pie', Icon: PieChartIcon }\n};\nexport const emptyChartSelection = { software: '', group: '', chartType: chartTypes.bar.key, attribute: 'artifact_name' };\nexport const defaultReportType = 'distribution';\nexport const defaultReports = [{ ...emptyChartSelection, group: null, attribute: 'artifact_name', type: defaultReportType }];\n\nexport const BEGINNING_OF_TIME = '2016-01-01T00:00:00.000Z';\n\nexport const locations = {\n eu: { key: 'eu', title: 'EU', location: 'eu.hosted.mender.io', icon: FlagEU },\n us: { key: 'us', title: 'US', location: 'hosted.mender.io', icon: FlagUS }\n};\nexport type AvailablePlans = 'os' | 'professional' | 'enterprise';\n\nexport type Plan = {\n id: AvailablePlans;\n name: string;\n offer?: boolean;\n price: string;\n deviceCount: string;\n offerprice?: string;\n price2?: string;\n features: string[];\n};\n\nexport type AvailableAddon = 'configure' | 'troubleshoot' | 'monitor';\n\nexport const PLANS: { [key in AvailablePlans]: Plan } = {\n os: {\n id: 'os',\n name: 'Basic',\n offer: true,\n price: '$32 / month',\n deviceCount: startingDeviceCount.os,\n offerprice: '$23 / month for first 50 devices',\n price2: 'for first 6 months;\\n$29/month thereafter',\n features: ['Access to core features of Mender', 'Basic support']\n },\n professional: {\n id: 'professional',\n name: 'Professional',\n offer: true,\n price: '$269 / month',\n deviceCount: startingDeviceCount.professional,\n offerprice: '$200 / month for first 50 devices',\n price2: 'for first 6 months;\\n$249/month thereafter',\n features: ['Advanced OTA features', 'Higher priority support']\n },\n enterprise: {\n id: 'enterprise',\n name: 'Enterprise',\n price: 'Custom pricing',\n deviceCount: 'Unlimited devices',\n features: ['All Mender features', 'Advanced security features', 'SLA-backed support']\n }\n};\nexport type Addon = {\n id: string;\n title: string;\n description: string;\n needs: string[];\n eligible: AvailablePlans[];\n} & {\n [key in Exclude<AvailablePlans, 'enterprise'>]: {\n price: string;\n deviceCount: string;\n };\n};\n\nexport type AddonId = keyof typeof ADDONS;\n\n// the needs names need to be aligned with the name of the features in the appReducer, as they will be checked in the addonselection\nexport const ADDONS: { [key in AvailableAddon]: Addon } = {\n configure: {\n id: 'configure',\n title: 'Configure',\n description: 'Expand your plan with device configuration features',\n needs: ['hasDeviceConfig'],\n os: {\n price: '$11/month',\n deviceCount: startingDeviceCount.os\n },\n professional: {\n price: '$65/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['os', 'professional', 'enterprise']\n },\n troubleshoot: {\n id: 'troubleshoot',\n title: 'Troubleshoot',\n description: 'Expand your plan with device troubleshooting features',\n needs: ['hasDeviceConnect'],\n os: {\n price: '$27/month',\n deviceCount: startingDeviceCount.os\n },\n professional: {\n price: '$72/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['os', 'professional', 'enterprise']\n },\n monitor: {\n id: 'monitor',\n title: 'Monitor',\n description: 'Expand your plan with device monitoring features',\n needs: ['hasMonitor'],\n os: {\n price: '-',\n deviceCount: '-'\n },\n professional: {\n price: '$86/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['professional', 'enterprise']\n }\n};\n\nexport const BENEFITS = {\n auditlog: { id: 'auditlog', benefit: 'trace change across your devices and access troubleshooting session replay', requiredPlan: PLANS.professional.id },\n dashboard: { id: 'dashboard', benefit: 'actionable insights into the devices you are updating with Mender', requiredPlan: PLANS.enterprise.id },\n deltaGeneration: {\n id: 'deltaGeneration',\n benefit: 'automatic delta artifacts generation to minimize data transfer and improve the update delivery',\n requiredPlan: PLANS.enterprise.id\n },\n deviceConfiguration: { id: 'deviceConfiguration', benefit: 'device configuration features', requiredAddon: ADDONS.configure.id },\n deviceMonitor: { id: 'deviceMonitor', benefit: 'device monitoring features', requiredAddon: ADDONS.monitor.id, requiredPlan: PLANS.professional.id },\n deviceTroubleshoot: { id: 'deviceTroubleshoot', benefit: 'device troubleshooting features', requiredAddon: ADDONS.troubleshoot.id },\n dynamicGroups: { id: 'dynamicGroups', benefit: 'create dynamic groups to ease device management', requiredPlan: PLANS.enterprise.id },\n fullFiltering: { id: 'fullFiltering', benefit: 'filtering by multiple attributes to improve the device overview', requiredPlan: PLANS.professional.id },\n gateway: { id: 'gateway', benefit: 'see devices connected to your gateway device for easy access', requiredPlans: PLANS.professional.id },\n pausedDeployments: {\n id: 'pausedDeployments',\n benefit: 'granular control about update rollout to allow synchronization across your fleet',\n requiredPlan: PLANS.enterprise.id\n },\n phasedDeployments: { id: 'phasedDeployments', benefit: 'choose to roll out deployments in multiple phases', requiredPlan: PLANS.enterprise.id },\n rbac: { id: 'rbac', benefit: 'granular role based access control', requiredPlan: PLANS.enterprise.id },\n retryDeployments: { id: 'retryDeployments', benefit: 'optional retries for failed rollout attempts', requiredPlan: PLANS.professional.id },\n scheduledDeployments: {\n id: 'scheduledDeployments',\n benefit: 'scheduled deployments to steer the distribution of your updates.',\n requiredPlan: PLANS.professional.id\n },\n webhookEvents: {\n id: 'webhookEvents',\n benefit: 'receive inventory events and select which type(s) of events the webhook will receive',\n requiredPlan: PLANS.professional.id\n },\n\n default: { id: 'default', benefit: 'gain access to this feature', requiredPlan: PLANS.enterprise.id }\n};\n\nexport const yes = () => true;\nexport const canAccess = yes;\n\nexport const DARK_MODE = 'dark';\nexport const LIGHT_MODE = 'light';\n\nexport const APPLICATION_JSON_CONTENT_TYPE = 'application/json';\nexport const APPLICATION_JWT_CONTENT_TYPE = 'application/jwt';\n","// 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\nimport { apiUrl } from '@northern.tech/store/constants';\n\n// limitations under the License.\nexport const alertChannels = { email: 'email' };\nexport const monitorApiUrlv1 = `${apiUrl.v1}/devicemonitor`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBA,gBAA0D;AAwL1C;AAtLT,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,IAAM,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I,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":["AWS","Azure","BarChartIcon","PieChartIcon"]}
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
monitorSlice,
|
|
5
5
|
monitorSlice_default,
|
|
6
6
|
sliceName
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-VMNMD6KF.js";
|
|
8
|
+
import "../chunk-C5NEDBJI.js";
|
|
9
9
|
import "../chunk-CK6YE6AN.js";
|
|
10
10
|
import "../chunk-MRCFLG45.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-UWMYZNUB.js";
|
|
12
12
|
import "../chunk-4B3IMP4I.js";
|
|
13
13
|
export {
|
|
14
14
|
actions,
|
|
@@ -66,28 +66,28 @@ var PLANS = {
|
|
|
66
66
|
id: "os",
|
|
67
67
|
name: "Basic",
|
|
68
68
|
offer: true,
|
|
69
|
-
price: "$32/month",
|
|
69
|
+
price: "$32 / month",
|
|
70
70
|
deviceCount: startingDeviceCount.os,
|
|
71
|
-
offerprice: "$23/month for first 50 devices",
|
|
71
|
+
offerprice: "$23 / month for first 50 devices",
|
|
72
72
|
price2: "for first 6 months;\n$29/month thereafter",
|
|
73
|
-
features: ["
|
|
73
|
+
features: ["Access to core features of Mender", "Basic support"]
|
|
74
74
|
},
|
|
75
75
|
professional: {
|
|
76
76
|
id: "professional",
|
|
77
77
|
name: "Professional",
|
|
78
78
|
offer: true,
|
|
79
|
-
price: "$269/month",
|
|
79
|
+
price: "$269 / month",
|
|
80
80
|
deviceCount: startingDeviceCount.professional,
|
|
81
|
-
offerprice: "$200/month for first 50 devices",
|
|
81
|
+
offerprice: "$200 / month for first 50 devices",
|
|
82
82
|
price2: "for first 6 months;\n$249/month thereafter",
|
|
83
|
-
features: ["
|
|
83
|
+
features: ["Advanced OTA features", "Higher priority support"]
|
|
84
84
|
},
|
|
85
85
|
enterprise: {
|
|
86
86
|
id: "enterprise",
|
|
87
87
|
name: "Enterprise",
|
|
88
88
|
price: "Custom pricing",
|
|
89
|
-
deviceCount: "
|
|
90
|
-
features: ["
|
|
89
|
+
deviceCount: "Unlimited devices",
|
|
90
|
+
features: ["All Mender features", "Advanced security features", "SLA-backed support"]
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
var ADDONS = {
|
|
@@ -601,13 +601,16 @@ var auditLogsApiUrl = `${apiUrl.v1}/auditlogs`;
|
|
|
601
601
|
var tenantadmApiUrlv1 = `${apiUrl.v1}/tenantadm`;
|
|
602
602
|
var tenantadmApiUrlv2 = `${apiUrl.v2}/tenantadm`;
|
|
603
603
|
var ssoIdpApiUrlv1 = `${apiUrl.v1}/useradm/sso/idp/metadata`;
|
|
604
|
-
var
|
|
605
|
-
{ title: "Artifact", queryParameter: "object_type", value: "artifact" },
|
|
606
|
-
{ title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
|
|
607
|
-
{ title: "Device", queryParameter: "object_id", value: "device" },
|
|
608
|
-
{ title: "
|
|
609
|
-
|
|
610
|
-
|
|
604
|
+
var auditlogTypes = {
|
|
605
|
+
artifact: { title: "Artifact", queryParameter: "object_type", value: "artifact" },
|
|
606
|
+
deployment: { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
|
|
607
|
+
device: { title: "Device", queryParameter: "object_id", value: "device" },
|
|
608
|
+
user_access_token: { title: "Personal Access Token", queryParameter: "user_access_token", value: "user_access_token" },
|
|
609
|
+
user: { title: "User", queryParameter: "object_id", value: "user" },
|
|
610
|
+
tenant: { title: "Tenant", queryParameter: "object_id", value: "tenant" }
|
|
611
|
+
};
|
|
612
|
+
var AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];
|
|
613
|
+
var SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
|
|
611
614
|
var emptyWebhook = {
|
|
612
615
|
description: "",
|
|
613
616
|
enabled: true,
|
|
@@ -736,7 +739,7 @@ var uiPermissionsByArea = {
|
|
|
736
739
|
explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
|
|
737
740
|
key: "auditlog",
|
|
738
741
|
uiPermissions: [uiPermissionsById.read],
|
|
739
|
-
title: "System
|
|
742
|
+
title: "System Audit Log"
|
|
740
743
|
},
|
|
741
744
|
deployments: {
|
|
742
745
|
endpoints: [
|
|
@@ -886,7 +889,7 @@ var serviceProviderRolesById = {
|
|
|
886
889
|
},
|
|
887
890
|
readOnly: {
|
|
888
891
|
name: "Read access",
|
|
889
|
-
value: staticRolesByName.
|
|
892
|
+
value: staticRolesByName.readOnly,
|
|
890
893
|
description: "This role can see all linked organizations but cannot make any changes",
|
|
891
894
|
permissions: [],
|
|
892
895
|
uiPermissions: {
|
|
@@ -2088,7 +2091,7 @@ var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsByI
|
|
|
2088
2091
|
(accu, [groupname, group]) => {
|
|
2089
2092
|
const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
|
|
2090
2093
|
const groupItem = { ...group, groupId: name, name: groupname };
|
|
2091
|
-
if (group.filters
|
|
2094
|
+
if (group.filters?.length > 0) {
|
|
2092
2095
|
if (groupname !== UNGROUPED_GROUP.id) {
|
|
2093
2096
|
accu.dynamic.push(groupItem);
|
|
2094
2097
|
} else {
|
|
@@ -2161,14 +2164,15 @@ var getAuditLogEntry = (0, import_toolkit12.createSelector)([getAuditLog, getAud
|
|
|
2161
2164
|
// src/utils.ts
|
|
2162
2165
|
var import_helpers4 = require("@northern.tech/utils/helpers");
|
|
2163
2166
|
var filterProcessors = {
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2167
|
+
[DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
|
|
2168
|
+
[DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
|
|
2169
|
+
[DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
|
|
2170
|
+
[DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
|
|
2171
|
+
[DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
|
|
2172
|
+
[DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
2173
|
+
[DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
|
|
2174
|
+
[DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers4.yes,
|
|
2175
|
+
[DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
|
|
2172
2176
|
};
|
|
2173
2177
|
var filterAliases = {
|
|
2174
2178
|
$nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
|
|
@@ -2259,8 +2263,13 @@ var getTooltipsById = (state) => state.users.tooltips.byId;
|
|
|
2259
2263
|
var getGlobalSettings = (state) => state.users.globalSettings;
|
|
2260
2264
|
var getCurrentUserId = (state) => state.users.currentUser;
|
|
2261
2265
|
var getUsersById = (state) => state.users.byId;
|
|
2266
|
+
var getUsersList = (0, import_toolkit14.createSelector)([getUsersById], (usersById) => Object.values(usersById));
|
|
2262
2267
|
var getCurrentUser = (0, import_toolkit14.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
|
|
2263
2268
|
var getUserSettings = (state) => state.users.userSettings;
|
|
2269
|
+
var getSelectedDeviceAttribute = (0, import_toolkit14.createSelector)(
|
|
2270
|
+
[getUserSettings],
|
|
2271
|
+
({ columnSelection }) => columnSelection.map((attribute) => ({ attribute: attribute.key, scope: attribute.scope }))
|
|
2272
|
+
);
|
|
2264
2273
|
var getIsDarkMode = (0, import_toolkit14.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
|
|
2265
2274
|
var getShowHelptips = (0, import_toolkit14.createSelector)(
|
|
2266
2275
|
[getTooltipsById],
|
|
@@ -2285,7 +2294,7 @@ var getOfflineThresholdSettings = (0, import_toolkit14.createSelector)([getGloba
|
|
|
2285
2294
|
interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
|
|
2286
2295
|
intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
|
|
2287
2296
|
}));
|
|
2288
|
-
var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([
|
|
2297
|
+
var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([value, role]) => ({ value, ...role })));
|
|
2289
2298
|
|
|
2290
2299
|
// src/commonSelectors.ts
|
|
2291
2300
|
var getIsEnterprise = (0, import_toolkit15.createSelector)(
|
|
@@ -2346,12 +2355,18 @@ var getUserCapabilities = (0, import_toolkit15.createSelector)([getUserRoles, ge
|
|
|
2346
2355
|
});
|
|
2347
2356
|
var getTenantCapabilities = (0, import_toolkit15.createSelector)(
|
|
2348
2357
|
[getFeatures, getOrganization, getIsEnterprise],
|
|
2349
|
-
({
|
|
2358
|
+
({
|
|
2359
|
+
hasAuditlogs: isAuditlogEnabled,
|
|
2360
|
+
hasDeviceConfig: isDeviceConfigEnabled,
|
|
2361
|
+
hasDeviceConnect: isDeviceConnectEnabled,
|
|
2362
|
+
hasMonitor: isMonitorEnabled,
|
|
2363
|
+
isHosted
|
|
2364
|
+
}, { addons = [], plan = PLANS.os.id }, isEnterprise) => {
|
|
2350
2365
|
const canDelta = isEnterprise || plan === PLANS.professional.id;
|
|
2351
2366
|
const hasAuditlogs = isAuditlogEnabled && isEnterprise;
|
|
2352
|
-
const hasDeviceConfig =
|
|
2353
|
-
const hasDeviceConnect =
|
|
2354
|
-
const hasMonitor = isMonitorEnabled && addons.some((addon) => addon.name ===
|
|
2367
|
+
const hasDeviceConfig = addons.some((addon) => addon.name === ADDONS.configure.id && addon.enabled) || isDeviceConfigEnabled && !isHosted;
|
|
2368
|
+
const hasDeviceConnect = addons.some((addon) => addon.name === ADDONS.troubleshoot.id && addon.enabled) || isDeviceConnectEnabled && !isHosted;
|
|
2369
|
+
const hasMonitor = isMonitorEnabled && addons.some((addon) => addon.name === ADDONS.monitor.id && addon.enabled);
|
|
2355
2370
|
return {
|
|
2356
2371
|
canDelta,
|
|
2357
2372
|
canRetry: canDelta,
|
|
@@ -2481,7 +2496,7 @@ var getAuditlogDevice = (0, import_toolkit15.createSelector)([getAuditLogEntry,
|
|
|
2481
2496
|
var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
|
|
2482
2497
|
if (service_provider) {
|
|
2483
2498
|
return roles.reduce((accu, role) => {
|
|
2484
|
-
if (rolesById[role.
|
|
2499
|
+
if (rolesById[role.value]) {
|
|
2485
2500
|
return accu;
|
|
2486
2501
|
}
|
|
2487
2502
|
accu.push(role);
|
|
@@ -2489,20 +2504,19 @@ var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, ge
|
|
|
2489
2504
|
}, Object.values(serviceProviderRolesById));
|
|
2490
2505
|
}
|
|
2491
2506
|
return Object.keys(rolesById).reverse().reduce((accu, key) => {
|
|
2492
|
-
const index = accu.findIndex(({
|
|
2507
|
+
const index = accu.findIndex(({ value }) => value === key);
|
|
2493
2508
|
accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
|
|
2494
2509
|
return accu;
|
|
2495
2510
|
}, roles);
|
|
2496
2511
|
});
|
|
2497
2512
|
|
|
2498
2513
|
// src/store.ts
|
|
2514
|
+
var import_react_redux = require("react-redux");
|
|
2499
2515
|
var import_helpers6 = require("@northern.tech/utils/helpers");
|
|
2500
2516
|
var import_toolkit16 = require("@reduxjs/toolkit");
|
|
2501
2517
|
var { setSnackbar, uploadProgress } = actions_default;
|
|
2502
2518
|
var keys = ["sessionDeploymentChecker", settingsKeys.initialized];
|
|
2503
|
-
var resetEnvironment = () =>
|
|
2504
|
-
keys.map((key) => window.sessionStorage.removeItem(key));
|
|
2505
|
-
};
|
|
2519
|
+
var resetEnvironment = () => keys.forEach((key) => window.sessionStorage.removeItem(key));
|
|
2506
2520
|
resetEnvironment();
|
|
2507
2521
|
var commonErrorFallback = "Please check your connection.";
|
|
2508
2522
|
var commonErrorHandler = (err, errorContext, dispatch, fallback, mightBeAuthRelated = false) => {
|
|
@@ -2528,6 +2542,14 @@ var sessionReducer = (state, action) => {
|
|
|
2528
2542
|
}
|
|
2529
2543
|
return rootReducer(state, action);
|
|
2530
2544
|
};
|
|
2545
|
+
var rejectionLoggerMiddleware = () => (next) => (action) => {
|
|
2546
|
+
if (action.type.endsWith("/rejected")) {
|
|
2547
|
+
const { error } = action;
|
|
2548
|
+
console.error("Rejection in action:", action);
|
|
2549
|
+
console.error(error.stack);
|
|
2550
|
+
}
|
|
2551
|
+
return next(action);
|
|
2552
|
+
};
|
|
2531
2553
|
var getConfiguredStore = (options = {}) => {
|
|
2532
2554
|
const { preloadedState = {}, ...config } = options;
|
|
2533
2555
|
return (0, import_toolkit16.configureStore)({
|
|
@@ -2543,7 +2565,7 @@ var getConfiguredStore = (options = {}) => {
|
|
|
2543
2565
|
ignoredActionPaths: ["uploads", "snackbar", /payload\..*$/],
|
|
2544
2566
|
ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
|
|
2545
2567
|
}
|
|
2546
|
-
})
|
|
2568
|
+
}).concat(rejectionLoggerMiddleware)
|
|
2547
2569
|
});
|
|
2548
2570
|
};
|
|
2549
2571
|
var store = getConfiguredStore({
|