@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,40 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __restKey = (key) => typeof key === "symbol" ? key : key + "";
|
|
26
|
-
var __objRest = (source, exclude) => {
|
|
27
|
-
var target = {};
|
|
28
|
-
for (var prop in source)
|
|
29
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
-
target[prop] = source[prop];
|
|
31
|
-
if (source != null && __getOwnPropSymbols)
|
|
32
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
}
|
|
36
|
-
return target;
|
|
37
|
-
};
|
|
38
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
39
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
40
10
|
};
|
|
@@ -59,33 +29,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
59
29
|
mod
|
|
60
30
|
));
|
|
61
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
62
|
-
var __async = (__this, __arguments, generator) => {
|
|
63
|
-
return new Promise((resolve, reject) => {
|
|
64
|
-
var fulfilled = (value) => {
|
|
65
|
-
try {
|
|
66
|
-
step(generator.next(value));
|
|
67
|
-
} catch (e) {
|
|
68
|
-
reject(e);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var rejected = (value) => {
|
|
72
|
-
try {
|
|
73
|
-
step(generator.throw(value));
|
|
74
|
-
} catch (e) {
|
|
75
|
-
reject(e);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
79
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
32
|
|
|
83
33
|
// ../../node_modules/pluralize/pluralize.js
|
|
84
34
|
var require_pluralize = __commonJS({
|
|
85
|
-
"../../node_modules/pluralize/pluralize.js"(
|
|
35
|
+
"../../node_modules/pluralize/pluralize.js"(exports, module2) {
|
|
86
36
|
"use strict";
|
|
87
37
|
(function(root, pluralize2) {
|
|
88
|
-
if (typeof require === "function" && typeof
|
|
38
|
+
if (typeof require === "function" && typeof exports === "object" && typeof module2 === "object") {
|
|
89
39
|
module2.exports = pluralize2();
|
|
90
40
|
} else if (typeof define === "function" && define.amd) {
|
|
91
41
|
define(function() {
|
|
@@ -94,7 +44,7 @@ var require_pluralize = __commonJS({
|
|
|
94
44
|
} else {
|
|
95
45
|
root.pluralize = pluralize2();
|
|
96
46
|
}
|
|
97
|
-
})(
|
|
47
|
+
})(exports, function() {
|
|
98
48
|
var pluralRules = [];
|
|
99
49
|
var singularRules = [];
|
|
100
50
|
var uncountables = {};
|
|
@@ -511,7 +461,7 @@ var chartTypes = {
|
|
|
511
461
|
};
|
|
512
462
|
var emptyChartSelection = { software: "", group: "", chartType: chartTypes.bar.key, attribute: "artifact_name" };
|
|
513
463
|
var defaultReportType = "distribution";
|
|
514
|
-
var defaultReports = [
|
|
464
|
+
var defaultReports = [{ ...emptyChartSelection, group: null, attribute: "artifact_name", type: defaultReportType }];
|
|
515
465
|
var locations = {};
|
|
516
466
|
var PLANS = {
|
|
517
467
|
os: {
|
|
@@ -844,7 +794,7 @@ var emptyRole = Object.freeze({
|
|
|
844
794
|
name: void 0,
|
|
845
795
|
description: "",
|
|
846
796
|
permissions: [],
|
|
847
|
-
uiPermissions: Object.freeze(
|
|
797
|
+
uiPermissions: Object.freeze({ ...emptyUiPermissions })
|
|
848
798
|
});
|
|
849
799
|
|
|
850
800
|
// src/deploymentsSlice/constants.ts
|
|
@@ -873,11 +823,12 @@ var deploymentStatesToSubstates = {
|
|
|
873
823
|
pending: [deploymentSubstates.pending],
|
|
874
824
|
successes: [deploymentSubstates.success, deploymentSubstates.alreadyInstalled, deploymentSubstates.noartifact]
|
|
875
825
|
};
|
|
876
|
-
var deploymentStatesToSubstatesWithSkipped =
|
|
826
|
+
var deploymentStatesToSubstatesWithSkipped = {
|
|
827
|
+
...deploymentStatesToSubstates,
|
|
877
828
|
failures: [deploymentSubstates.failure],
|
|
878
829
|
skipped: [deploymentSubstates.aborted, deploymentSubstates.noartifact, deploymentSubstates.alreadyInstalled, deploymentSubstates.decommissioned],
|
|
879
830
|
successes: [deploymentSubstates.success]
|
|
880
|
-
}
|
|
831
|
+
};
|
|
881
832
|
var installationSubstatesMap = {
|
|
882
833
|
download: {
|
|
883
834
|
title: "download",
|
|
@@ -922,8 +873,8 @@ var DEPLOYMENT_STATES = {
|
|
|
922
873
|
var listDefaultsByState = {
|
|
923
874
|
[DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
|
|
924
875
|
[DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
|
|
925
|
-
[DEPLOYMENT_STATES.scheduled]:
|
|
926
|
-
[DEPLOYMENT_STATES.finished]:
|
|
876
|
+
[DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },
|
|
877
|
+
[DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
|
|
927
878
|
sort: { direction: SORTING_OPTIONS.desc }
|
|
928
879
|
};
|
|
929
880
|
var DEFAULT_PENDING_INPROGRESS_COUNT = 10;
|
|
@@ -1298,7 +1249,7 @@ var uiPermissionsByArea = {
|
|
|
1298
1249
|
}
|
|
1299
1250
|
};
|
|
1300
1251
|
var permissionMapper = (permission) => permission.value;
|
|
1301
|
-
var itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ?
|
|
1252
|
+
var itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ? { ...accu, [item]: uiPermissions } : accu;
|
|
1302
1253
|
var rolesById = Object.freeze({
|
|
1303
1254
|
[staticRolesByName.admin]: {
|
|
1304
1255
|
name: "Admin",
|
|
@@ -1306,54 +1257,59 @@ var rolesById = Object.freeze({
|
|
|
1306
1257
|
description: "Full access",
|
|
1307
1258
|
permissions: [],
|
|
1308
1259
|
// permissions refers to the values returned from the backend
|
|
1309
|
-
uiPermissions:
|
|
1260
|
+
uiPermissions: {
|
|
1261
|
+
...emptyUiPermissions,
|
|
1310
1262
|
auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
|
|
1311
1263
|
deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
|
|
1312
1264
|
groups: { [ALL_DEVICES]: uiPermissionsByArea.groups.uiPermissions.map(permissionMapper) },
|
|
1313
1265
|
releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) },
|
|
1314
1266
|
userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper)
|
|
1315
|
-
}
|
|
1267
|
+
}
|
|
1316
1268
|
},
|
|
1317
1269
|
[staticRolesByName.readOnly]: {
|
|
1318
1270
|
name: "Read Access",
|
|
1319
1271
|
value: staticRolesByName.readOnly,
|
|
1320
1272
|
description: "",
|
|
1321
1273
|
permissions: [],
|
|
1322
|
-
uiPermissions:
|
|
1274
|
+
uiPermissions: {
|
|
1275
|
+
...emptyUiPermissions,
|
|
1323
1276
|
deployments: [uiPermissionsById.read.value],
|
|
1324
1277
|
groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] },
|
|
1325
1278
|
releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] },
|
|
1326
1279
|
userManagement: [uiPermissionsById.read.value]
|
|
1327
|
-
}
|
|
1280
|
+
}
|
|
1328
1281
|
},
|
|
1329
1282
|
[staticRolesByName.ci]: {
|
|
1330
1283
|
name: "Releases Manager",
|
|
1331
1284
|
value: staticRolesByName.ci,
|
|
1332
1285
|
description: "",
|
|
1333
1286
|
permissions: [],
|
|
1334
|
-
uiPermissions:
|
|
1287
|
+
uiPermissions: {
|
|
1288
|
+
...emptyUiPermissions,
|
|
1335
1289
|
releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) }
|
|
1336
|
-
}
|
|
1290
|
+
}
|
|
1337
1291
|
},
|
|
1338
1292
|
[staticRolesByName.deploymentsManager]: {
|
|
1339
1293
|
name: "Deployments Manager",
|
|
1340
1294
|
value: staticRolesByName.deploymentsManager,
|
|
1341
1295
|
description: "",
|
|
1342
1296
|
permissions: [],
|
|
1343
|
-
uiPermissions:
|
|
1297
|
+
uiPermissions: {
|
|
1298
|
+
...emptyUiPermissions,
|
|
1344
1299
|
deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
|
|
1345
1300
|
groups: { [ALL_DEVICES]: [uiPermissionsById.deploy.value, uiPermissionsById.read.value] },
|
|
1346
1301
|
releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
|
|
1347
|
-
}
|
|
1302
|
+
}
|
|
1348
1303
|
},
|
|
1349
1304
|
[staticRolesByName.terminalAccess]: {
|
|
1350
1305
|
name: "Troubleshooting",
|
|
1351
1306
|
value: staticRolesByName.terminalAccess,
|
|
1352
1307
|
description: "Access to the troubleshooting features: Remote Terminal, File Transfer, Port Forwarding",
|
|
1353
1308
|
permissions: [],
|
|
1354
|
-
uiPermissions:
|
|
1309
|
+
uiPermissions: {
|
|
1310
|
+
...emptyUiPermissions,
|
|
1355
1311
|
groups: { [ALL_DEVICES]: [uiPermissionsById.connect.value] }
|
|
1356
|
-
}
|
|
1312
|
+
}
|
|
1357
1313
|
}
|
|
1358
1314
|
});
|
|
1359
1315
|
var serviceProviderRolesById = {
|
|
@@ -1362,22 +1318,24 @@ var serviceProviderRolesById = {
|
|
|
1362
1318
|
value: staticRolesByName.admin,
|
|
1363
1319
|
description: "Full access",
|
|
1364
1320
|
permissions: [],
|
|
1365
|
-
uiPermissions:
|
|
1321
|
+
uiPermissions: {
|
|
1322
|
+
...emptyUiPermissions,
|
|
1366
1323
|
auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
|
|
1367
1324
|
userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper),
|
|
1368
1325
|
tenantManagement: uiPermissionsByArea.tenantManagement.uiPermissions.map(permissionMapper)
|
|
1369
|
-
}
|
|
1326
|
+
}
|
|
1370
1327
|
},
|
|
1371
1328
|
readOnly: {
|
|
1372
1329
|
name: "Read access",
|
|
1373
1330
|
value: staticRolesByName.admin,
|
|
1374
1331
|
description: "This role can see all linked organizations but cannot make any changes",
|
|
1375
1332
|
permissions: [],
|
|
1376
|
-
uiPermissions:
|
|
1333
|
+
uiPermissions: {
|
|
1334
|
+
...emptyUiPermissions,
|
|
1377
1335
|
auditlog: [uiPermissionsById.read.value],
|
|
1378
1336
|
userManagement: [uiPermissionsById.read.value],
|
|
1379
1337
|
tenantManagement: [uiPermissionsById.read.value]
|
|
1380
|
-
}
|
|
1338
|
+
}
|
|
1381
1339
|
}
|
|
1382
1340
|
};
|
|
1383
1341
|
var defaultPermissionSets = {
|
|
@@ -1390,7 +1348,9 @@ var defaultPermissionSets = {
|
|
|
1390
1348
|
},
|
|
1391
1349
|
[permissionSetIds.SuperUser]: {
|
|
1392
1350
|
name: permissionSetIds.SuperUser,
|
|
1393
|
-
result:
|
|
1351
|
+
result: {
|
|
1352
|
+
...rolesById[staticRolesByName.admin].uiPermissions
|
|
1353
|
+
}
|
|
1394
1354
|
},
|
|
1395
1355
|
[permissionSetIds.ManageUsers]: {
|
|
1396
1356
|
name: permissionSetIds.ManageUsers,
|
|
@@ -1475,11 +1435,12 @@ var defaultPermissionSets = {
|
|
|
1475
1435
|
};
|
|
1476
1436
|
var USER_LOGOUT = "USER_LOGOUT";
|
|
1477
1437
|
var OWN_USER_ID = "me";
|
|
1478
|
-
var rolesByName =
|
|
1438
|
+
var rolesByName = {
|
|
1439
|
+
...staticRolesByName,
|
|
1479
1440
|
deploymentCreation: { action: "CREATE_DEPLOYMENT", object: { type: "DEVICE_GROUP", value: void 0 } },
|
|
1480
1441
|
groupAccess: { action: "VIEW_DEVICE", object: { type: "DEVICE_GROUP", value: void 0 } },
|
|
1481
1442
|
userManagement: { action: "http", object: { type: "any", value: `${useradmApiUrlv1}/.*` } }
|
|
1482
|
-
}
|
|
1443
|
+
};
|
|
1483
1444
|
var twoFAStates = {
|
|
1484
1445
|
enabled: "enabled",
|
|
1485
1446
|
disabled: "disabled",
|
|
@@ -1567,7 +1528,10 @@ var appSlice = (0, import_toolkit.createSlice)({
|
|
|
1567
1528
|
initialState,
|
|
1568
1529
|
reducers: {
|
|
1569
1530
|
setFeatures: (state, action) => {
|
|
1570
|
-
state.features =
|
|
1531
|
+
state.features = {
|
|
1532
|
+
...state.features,
|
|
1533
|
+
...action.payload
|
|
1534
|
+
};
|
|
1571
1535
|
},
|
|
1572
1536
|
setSnackbar: (state, { payload }) => {
|
|
1573
1537
|
let { message, autoHideDuration, action, children, onClick, onClose } = payload;
|
|
@@ -1592,7 +1556,10 @@ var appSlice = (0, import_toolkit.createSlice)({
|
|
|
1592
1556
|
state.hostedAnnouncement = action.payload;
|
|
1593
1557
|
},
|
|
1594
1558
|
setSearchState: (state, action) => {
|
|
1595
|
-
state.searchState =
|
|
1559
|
+
state.searchState = {
|
|
1560
|
+
...state.searchState,
|
|
1561
|
+
...action.payload
|
|
1562
|
+
};
|
|
1596
1563
|
},
|
|
1597
1564
|
setOfflineThreshold: (state, action) => {
|
|
1598
1565
|
state.offlineThreshold = action.payload;
|
|
@@ -1603,20 +1570,23 @@ var appSlice = (0, import_toolkit.createSlice)({
|
|
|
1603
1570
|
},
|
|
1604
1571
|
uploadProgress: (state, action) => {
|
|
1605
1572
|
const { id, progress: progress2 } = action.payload;
|
|
1606
|
-
state.uploadsById[id] =
|
|
1573
|
+
state.uploadsById[id] = {
|
|
1574
|
+
...state.uploadsById[id],
|
|
1607
1575
|
progress: progress2
|
|
1608
|
-
}
|
|
1576
|
+
};
|
|
1609
1577
|
},
|
|
1610
1578
|
cleanUpUpload: (state, action) => {
|
|
1611
|
-
|
|
1612
|
-
const _b2 = state.uploadsById, { [_a = action.payload]: current } = _b2, remainder = __objRest(_b2, [__restKey(_a)]);
|
|
1579
|
+
const { [action.payload]: current, ...remainder } = state.uploadsById;
|
|
1613
1580
|
state.uploadsById = remainder;
|
|
1614
1581
|
},
|
|
1615
1582
|
setVersionInformation: (state, action) => {
|
|
1616
|
-
state.versionInformation =
|
|
1583
|
+
state.versionInformation = {
|
|
1584
|
+
...state.versionInformation,
|
|
1585
|
+
...action.payload
|
|
1586
|
+
};
|
|
1617
1587
|
},
|
|
1618
1588
|
setEnvironmentData: (state, action) => {
|
|
1619
|
-
return
|
|
1589
|
+
return { ...state, ...action.payload };
|
|
1620
1590
|
}
|
|
1621
1591
|
}
|
|
1622
1592
|
});
|
|
@@ -1648,7 +1618,7 @@ var initialState2 = {
|
|
|
1648
1618
|
sourceWindow: -1
|
|
1649
1619
|
},
|
|
1650
1620
|
binaryDeltaLimits: {
|
|
1651
|
-
timeout:
|
|
1621
|
+
timeout: { ...limitDefault, default: 60, max: 3600, min: 60 },
|
|
1652
1622
|
sourceWindow: limitDefault,
|
|
1653
1623
|
inputWindow: limitDefault,
|
|
1654
1624
|
duplicatesWindow: limitDefault,
|
|
@@ -1658,10 +1628,10 @@ var initialState2 = {
|
|
|
1658
1628
|
deploymentDeviceLimit: 5e3,
|
|
1659
1629
|
selectedDeviceIds: [],
|
|
1660
1630
|
selectionState: {
|
|
1661
|
-
finished:
|
|
1662
|
-
inprogress:
|
|
1663
|
-
pending:
|
|
1664
|
-
scheduled:
|
|
1631
|
+
finished: { ...DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
|
|
1632
|
+
inprogress: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
|
|
1633
|
+
pending: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
|
|
1634
|
+
scheduled: { ...DEVICE_LIST_DEFAULTS, selection: [] },
|
|
1665
1635
|
general: {
|
|
1666
1636
|
state: DEPLOYMENT_ROUTES.active.key,
|
|
1667
1637
|
showCreationDialog: false,
|
|
@@ -1677,40 +1647,55 @@ var deploymentsSlice = (0, import_toolkit2.createSlice)({
|
|
|
1677
1647
|
initialState: initialState2,
|
|
1678
1648
|
reducers: {
|
|
1679
1649
|
createdDeployment: (state, action) => {
|
|
1680
|
-
state.byId[action.payload.id] =
|
|
1650
|
+
state.byId[action.payload.id] = {
|
|
1651
|
+
...deploymentPrototype,
|
|
1652
|
+
...action.payload
|
|
1653
|
+
};
|
|
1681
1654
|
state.byStatus[DEPLOYMENT_STATES.pending].total = state.byStatus[DEPLOYMENT_STATES.pending].total + 1;
|
|
1682
1655
|
state.byStatus[DEPLOYMENT_STATES.pending].deploymentIds = [...state.byStatus.pending.deploymentIds, action.payload.id];
|
|
1683
1656
|
state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection], state.selectionState[DEPLOYMENT_STATES.pending].total = state.selectionState[DEPLOYMENT_STATES.pending].total + 1;
|
|
1684
1657
|
},
|
|
1685
1658
|
removedDeployment: (state, action) => {
|
|
1686
|
-
|
|
1687
|
-
const _b2 = state.byId, { [_a = action.payload]: removedDeployment } = _b2, remainder = __objRest(_b2, [__restKey(_a)]);
|
|
1659
|
+
const { [action.payload]: removedDeployment, ...remainder } = state.byId;
|
|
1688
1660
|
state.byId = remainder;
|
|
1689
1661
|
},
|
|
1690
1662
|
receivedDeployment: (state, action) => {
|
|
1691
|
-
state.byId[action.payload.id] =
|
|
1663
|
+
state.byId[action.payload.id] = {
|
|
1664
|
+
...state.byId[action.payload.id] || {},
|
|
1665
|
+
...action.payload
|
|
1666
|
+
};
|
|
1692
1667
|
},
|
|
1693
1668
|
receivedDeploymentDeviceLog: (state, action) => {
|
|
1694
1669
|
const { id, deviceId, log } = action.payload;
|
|
1695
|
-
const deployment =
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1670
|
+
const deployment = {
|
|
1671
|
+
...deploymentPrototype,
|
|
1672
|
+
...state.byId[id]
|
|
1673
|
+
};
|
|
1674
|
+
state.byId[id] = {
|
|
1675
|
+
...deployment,
|
|
1676
|
+
devices: {
|
|
1677
|
+
...deployment.devices,
|
|
1678
|
+
[deviceId]: {
|
|
1679
|
+
...deployment.devices[deviceId],
|
|
1699
1680
|
log
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
};
|
|
1703
1684
|
},
|
|
1704
1685
|
receivedDeploymentDevices: (state, action) => {
|
|
1705
1686
|
const { id, devices, selectedDeviceIds, totalDeviceCount } = action.payload;
|
|
1706
|
-
state.byId[id] =
|
|
1687
|
+
state.byId[id] = {
|
|
1688
|
+
...state.byId[id],
|
|
1707
1689
|
devices,
|
|
1708
1690
|
totalDeviceCount
|
|
1709
|
-
}
|
|
1691
|
+
};
|
|
1710
1692
|
state.selectedDeviceIds = selectedDeviceIds;
|
|
1711
1693
|
},
|
|
1712
1694
|
receivedDeployments: (state, action) => {
|
|
1713
|
-
state.byId =
|
|
1695
|
+
state.byId = {
|
|
1696
|
+
...state.byId,
|
|
1697
|
+
...action.payload
|
|
1698
|
+
};
|
|
1714
1699
|
},
|
|
1715
1700
|
receivedDeploymentsForStatus: (state, action) => {
|
|
1716
1701
|
const { status, deploymentIds, total } = action.payload;
|
|
@@ -1752,9 +1737,9 @@ var initialState3 = {
|
|
|
1752
1737
|
[DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
|
|
1753
1738
|
[DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
|
|
1754
1739
|
},
|
|
1755
|
-
deviceList:
|
|
1756
|
-
deviceIds: []
|
|
1757
|
-
|
|
1740
|
+
deviceList: {
|
|
1741
|
+
deviceIds: [],
|
|
1742
|
+
...DEVICE_LIST_DEFAULTS,
|
|
1758
1743
|
selectedAttributes: [],
|
|
1759
1744
|
selectedIssues: [],
|
|
1760
1745
|
selection: [],
|
|
@@ -1765,7 +1750,7 @@ var initialState3 = {
|
|
|
1765
1750
|
},
|
|
1766
1751
|
state: DEVICE_STATES.accepted,
|
|
1767
1752
|
total: 0
|
|
1768
|
-
}
|
|
1753
|
+
},
|
|
1769
1754
|
filters: [
|
|
1770
1755
|
// { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }
|
|
1771
1756
|
],
|
|
@@ -1800,49 +1785,59 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
|
|
|
1800
1785
|
},
|
|
1801
1786
|
addToGroup: (state, action) => {
|
|
1802
1787
|
const { group, deviceIds } = action.payload;
|
|
1803
|
-
const maybeExistingGroup =
|
|
1788
|
+
const maybeExistingGroup = {
|
|
1804
1789
|
filters: [],
|
|
1805
|
-
deviceIds: []
|
|
1806
|
-
|
|
1807
|
-
|
|
1790
|
+
deviceIds: [],
|
|
1791
|
+
...state.groups.byId[group]
|
|
1792
|
+
};
|
|
1793
|
+
state.groups.byId[group] = {
|
|
1794
|
+
...maybeExistingGroup,
|
|
1808
1795
|
deviceIds: [...maybeExistingGroup.deviceIds, ...deviceIds].filter(import_helpers.duplicateFilter),
|
|
1809
1796
|
total: (maybeExistingGroup.total || 0) + 1
|
|
1810
|
-
}
|
|
1797
|
+
};
|
|
1811
1798
|
},
|
|
1812
1799
|
removeFromGroup: (state, action) => {
|
|
1813
1800
|
const { group, deviceIds: removedIds } = action.payload;
|
|
1814
|
-
const
|
|
1815
|
-
const changedGroup =
|
|
1801
|
+
const { deviceIds = [], total = 0, ...maybeExistingGroup } = state.groups.byId[group] || {};
|
|
1802
|
+
const changedGroup = {
|
|
1803
|
+
...maybeExistingGroup,
|
|
1816
1804
|
deviceIds: deviceIds.filter((id) => !removedIds.includes(id)),
|
|
1817
1805
|
total: Math.max(total - removedIds.length, 0)
|
|
1818
|
-
}
|
|
1806
|
+
};
|
|
1819
1807
|
if (changedGroup.total || changedGroup.deviceIds.length) {
|
|
1820
1808
|
state.groups.byId[group] = changedGroup;
|
|
1821
1809
|
return;
|
|
1822
1810
|
} else if (state.groups.selectedGroup === group) {
|
|
1823
1811
|
state.groups.selectedGroup = void 0;
|
|
1824
1812
|
}
|
|
1825
|
-
const
|
|
1813
|
+
const { [group]: removal, ...remainingById } = state.groups.byId;
|
|
1826
1814
|
state.groups.byId = remainingById;
|
|
1827
1815
|
},
|
|
1828
1816
|
addGroup: (state, action) => {
|
|
1829
1817
|
const { groupName, group } = action.payload;
|
|
1830
|
-
state.groups.byId[groupName] =
|
|
1818
|
+
state.groups.byId[groupName] = {
|
|
1819
|
+
...state.groups.byId[groupName],
|
|
1820
|
+
...group
|
|
1821
|
+
};
|
|
1831
1822
|
},
|
|
1832
1823
|
selectGroup: (state, { payload: group }) => {
|
|
1833
1824
|
state.deviceList.deviceIds = state.groups.byId[group] && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
|
|
1834
1825
|
state.groups.selectedGroup = group;
|
|
1835
1826
|
},
|
|
1836
1827
|
removeGroup: (state, action) => {
|
|
1837
|
-
|
|
1838
|
-
const _b2 = state.groups.byId, { [_a = action.payload]: removal } = _b2, remainingById = __objRest(_b2, [__restKey(_a)]);
|
|
1828
|
+
const { [action.payload]: removal, ...remainingById } = state.groups.byId;
|
|
1839
1829
|
state.groups.byId = remainingById;
|
|
1840
1830
|
state.groups.selectedGroup = state.groups.selectedGroup === action.payload ? void 0 : state.groups.selectedGroup;
|
|
1841
1831
|
},
|
|
1842
1832
|
setDeviceListState: (state, action) => {
|
|
1843
|
-
state.deviceList =
|
|
1844
|
-
|
|
1845
|
-
|
|
1833
|
+
state.deviceList = {
|
|
1834
|
+
...state.deviceList,
|
|
1835
|
+
...action.payload,
|
|
1836
|
+
sort: {
|
|
1837
|
+
...state.deviceList.sort,
|
|
1838
|
+
...action.payload.sort
|
|
1839
|
+
}
|
|
1840
|
+
};
|
|
1846
1841
|
},
|
|
1847
1842
|
setFilterAttributes: (state, action) => {
|
|
1848
1843
|
state.filteringAttributes = action.payload;
|
|
@@ -1851,7 +1846,10 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
|
|
|
1851
1846
|
state.filteringAttributesConfig = action.payload;
|
|
1852
1847
|
},
|
|
1853
1848
|
receivedDevices: (state, action) => {
|
|
1854
|
-
state.byId =
|
|
1849
|
+
state.byId = {
|
|
1850
|
+
...state.byId,
|
|
1851
|
+
...action.payload
|
|
1852
|
+
};
|
|
1855
1853
|
},
|
|
1856
1854
|
setDeviceFilters: (state, action) => {
|
|
1857
1855
|
if ((0, import_helpers.deepCompare)(action.payload, state.filters)) {
|
|
@@ -1882,7 +1880,10 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
|
|
|
1882
1880
|
state.limit = action.payload;
|
|
1883
1881
|
},
|
|
1884
1882
|
receivedDevice: (state, action) => {
|
|
1885
|
-
state.byId[action.payload.id] =
|
|
1883
|
+
state.byId[action.payload.id] = {
|
|
1884
|
+
...state.byId[action.payload.id],
|
|
1885
|
+
...action.payload
|
|
1886
|
+
};
|
|
1886
1887
|
},
|
|
1887
1888
|
maybeUpdateDevicesByStatus: (state, action) => {
|
|
1888
1889
|
const { deviceId, authId } = action.payload;
|
|
@@ -1903,15 +1904,17 @@ var import_toolkit4 = require("@reduxjs/toolkit");
|
|
|
1903
1904
|
var sliceName4 = "monitor";
|
|
1904
1905
|
var initialState4 = {
|
|
1905
1906
|
alerts: {
|
|
1906
|
-
alertList:
|
|
1907
|
+
alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },
|
|
1907
1908
|
byDeviceId: {}
|
|
1908
1909
|
},
|
|
1909
1910
|
issueCounts: {
|
|
1910
|
-
byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) =>
|
|
1911
|
+
byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
|
|
1911
1912
|
},
|
|
1912
1913
|
settings: {
|
|
1913
1914
|
global: {
|
|
1914
|
-
channels:
|
|
1915
|
+
channels: {
|
|
1916
|
+
...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
|
|
1917
|
+
}
|
|
1915
1918
|
}
|
|
1916
1919
|
}
|
|
1917
1920
|
};
|
|
@@ -1929,14 +1932,14 @@ var monitorSlice = (0, import_toolkit4.createSlice)({
|
|
|
1929
1932
|
},
|
|
1930
1933
|
receiveLatestDeviceAlerts: (state, action) => {
|
|
1931
1934
|
const { deviceId, alerts } = action.payload;
|
|
1932
|
-
state.alerts.byDeviceId[deviceId] =
|
|
1935
|
+
state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };
|
|
1933
1936
|
},
|
|
1934
1937
|
receiveDeviceIssueCounts: (state, action) => {
|
|
1935
1938
|
const { issueType, counts } = action.payload;
|
|
1936
1939
|
state.issueCounts.byType[issueType] = counts;
|
|
1937
1940
|
},
|
|
1938
1941
|
setAlertListState: (state, action) => {
|
|
1939
|
-
state.alerts.alertList =
|
|
1942
|
+
state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };
|
|
1940
1943
|
}
|
|
1941
1944
|
}
|
|
1942
1945
|
});
|
|
@@ -1960,7 +1963,7 @@ var onboardingSlice = (0, import_toolkit5.createSlice)({
|
|
|
1960
1963
|
initialState: initialState5,
|
|
1961
1964
|
reducers: {
|
|
1962
1965
|
setOnboardingState: (state, action) => {
|
|
1963
|
-
return
|
|
1966
|
+
return { ...state, ...action.payload };
|
|
1964
1967
|
},
|
|
1965
1968
|
setDemoArtifactPort: (state, action) => {
|
|
1966
1969
|
state.demoArtifactPort = action.payload;
|
|
@@ -1998,7 +2001,8 @@ var initialState6 = {
|
|
|
1998
2001
|
brand: ""
|
|
1999
2002
|
},
|
|
2000
2003
|
intentId: null,
|
|
2001
|
-
tenantList:
|
|
2004
|
+
tenantList: {
|
|
2005
|
+
...TENANT_LIST_DEFAULT,
|
|
2002
2006
|
total: 0,
|
|
2003
2007
|
tenants: [],
|
|
2004
2008
|
selectedTenant: null,
|
|
@@ -2006,13 +2010,14 @@ var initialState6 = {
|
|
|
2006
2010
|
direction: SORTING_OPTIONS.desc,
|
|
2007
2011
|
key: "name"
|
|
2008
2012
|
}
|
|
2009
|
-
}
|
|
2013
|
+
},
|
|
2010
2014
|
organization: {
|
|
2011
2015
|
// id, name, status, tenant_token, plan
|
|
2012
2016
|
},
|
|
2013
2017
|
auditlog: {
|
|
2014
2018
|
events: [],
|
|
2015
|
-
selectionState:
|
|
2019
|
+
selectionState: {
|
|
2020
|
+
...DEVICE_LIST_DEFAULTS,
|
|
2016
2021
|
detail: void 0,
|
|
2017
2022
|
endDate: void 0,
|
|
2018
2023
|
selectedIssue: void 0,
|
|
@@ -2021,7 +2026,7 @@ var initialState6 = {
|
|
|
2021
2026
|
total: 0,
|
|
2022
2027
|
type: void 0,
|
|
2023
2028
|
user: void 0
|
|
2024
|
-
}
|
|
2029
|
+
}
|
|
2025
2030
|
},
|
|
2026
2031
|
externalDeviceIntegrations: [
|
|
2027
2032
|
// { <connection_string|x509|...>, id, provider }
|
|
@@ -2044,7 +2049,10 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
|
|
|
2044
2049
|
state.auditlog.selectionState.total = total;
|
|
2045
2050
|
},
|
|
2046
2051
|
setAuditLogState: (state, action) => {
|
|
2047
|
-
state.auditlog.selectionState =
|
|
2052
|
+
state.auditlog.selectionState = {
|
|
2053
|
+
...state.auditlog.selectionState,
|
|
2054
|
+
...action.payload
|
|
2055
|
+
};
|
|
2048
2056
|
},
|
|
2049
2057
|
receiveCurrentCard: (state, action) => {
|
|
2050
2058
|
state.card = action.payload;
|
|
@@ -2053,7 +2061,7 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
|
|
|
2053
2061
|
state.intentId = action.payload;
|
|
2054
2062
|
},
|
|
2055
2063
|
setOrganization: (state, action) => {
|
|
2056
|
-
state.organization =
|
|
2064
|
+
state.organization = { ...state.organization, ...action.payload };
|
|
2057
2065
|
},
|
|
2058
2066
|
setTenantListState: (state, action) => {
|
|
2059
2067
|
state.tenantList = action.payload;
|
|
@@ -2116,7 +2124,8 @@ var initialState7 = {
|
|
|
2116
2124
|
}
|
|
2117
2125
|
*/
|
|
2118
2126
|
},
|
|
2119
|
-
releasesList:
|
|
2127
|
+
releasesList: {
|
|
2128
|
+
...DEVICE_LIST_DEFAULTS,
|
|
2120
2129
|
searchedIds: [],
|
|
2121
2130
|
releaseIds: [],
|
|
2122
2131
|
selection: [],
|
|
@@ -2130,7 +2139,7 @@ var initialState7 = {
|
|
|
2130
2139
|
selectedTags: [],
|
|
2131
2140
|
total: 0,
|
|
2132
2141
|
type: ""
|
|
2133
|
-
}
|
|
2142
|
+
},
|
|
2134
2143
|
tags: [],
|
|
2135
2144
|
updateTypes: [],
|
|
2136
2145
|
/*
|
|
@@ -2156,8 +2165,7 @@ var releaseSlice = (0, import_toolkit7.createSlice)({
|
|
|
2156
2165
|
state.updateTypes = action.payload;
|
|
2157
2166
|
},
|
|
2158
2167
|
removeRelease: (state, action) => {
|
|
2159
|
-
|
|
2160
|
-
const _b2 = state.byId, { [_a = action.payload]: toBeRemoved } = _b2, byId = __objRest(_b2, [__restKey(_a)]);
|
|
2168
|
+
const { [action.payload]: toBeRemoved, ...byId } = state.byId;
|
|
2161
2169
|
state.byId = byId;
|
|
2162
2170
|
state.selectedRelease = action.payload === state.selectedRelease ? null : state.selectedRelease;
|
|
2163
2171
|
},
|
|
@@ -2190,8 +2198,12 @@ var initialState8 = {
|
|
|
2190
2198
|
previousPhases: [],
|
|
2191
2199
|
retries: 0
|
|
2192
2200
|
},
|
|
2193
|
-
permissionSetsById:
|
|
2194
|
-
|
|
2201
|
+
permissionSetsById: {
|
|
2202
|
+
...defaultPermissionSets
|
|
2203
|
+
},
|
|
2204
|
+
rolesById: {
|
|
2205
|
+
...rolesById
|
|
2206
|
+
},
|
|
2195
2207
|
settingsInitialized: false,
|
|
2196
2208
|
showConnectDeviceDialog: false,
|
|
2197
2209
|
showFeedbackDialog: false,
|
|
@@ -2231,13 +2243,15 @@ var usersSlice = (0, import_toolkit8.createSlice)({
|
|
|
2231
2243
|
state.byId[0] = action.payload;
|
|
2232
2244
|
},
|
|
2233
2245
|
removedUser: (state, action) => {
|
|
2234
|
-
|
|
2235
|
-
const _b2 = state.byId, { [_a = action.payload]: removedUser } = _b2, byId = __objRest(_b2, [__restKey(_a)]);
|
|
2246
|
+
const { [action.payload]: removedUser, ...byId } = state.byId;
|
|
2236
2247
|
state.byId = byId;
|
|
2237
2248
|
state.currentUser = state.currentUser === action.payload ? null : state.currentUser;
|
|
2238
2249
|
},
|
|
2239
2250
|
updatedUser: (state, action) => {
|
|
2240
|
-
state.byId[action.payload.id] =
|
|
2251
|
+
state.byId[action.payload.id] = {
|
|
2252
|
+
...state.byId[action.payload.id],
|
|
2253
|
+
...action.payload
|
|
2254
|
+
};
|
|
2241
2255
|
},
|
|
2242
2256
|
receivedPermissionSets: (state, action) => {
|
|
2243
2257
|
state.permissionSetsById = action.payload;
|
|
@@ -2246,11 +2260,13 @@ var usersSlice = (0, import_toolkit8.createSlice)({
|
|
|
2246
2260
|
state.rolesById = action.payload;
|
|
2247
2261
|
},
|
|
2248
2262
|
createdRole: (state, action) => {
|
|
2249
|
-
state.rolesById[action.payload.name] =
|
|
2263
|
+
state.rolesById[action.payload.name] = {
|
|
2264
|
+
...state.rolesById[action.payload.name],
|
|
2265
|
+
...action.payload
|
|
2266
|
+
};
|
|
2250
2267
|
},
|
|
2251
2268
|
removedRole: (state, action) => {
|
|
2252
|
-
|
|
2253
|
-
const _b2 = state.rolesById, { [_a = action.payload]: toBeRemoved } = _b2, rolesById2 = __objRest(_b2, [__restKey(_a)]);
|
|
2269
|
+
const { [action.payload]: toBeRemoved, ...rolesById2 } = state.rolesById;
|
|
2254
2270
|
state.rolesById = rolesById2;
|
|
2255
2271
|
},
|
|
2256
2272
|
setCustomColumns: (state, action) => {
|
|
@@ -2258,18 +2274,27 @@ var usersSlice = (0, import_toolkit8.createSlice)({
|
|
|
2258
2274
|
},
|
|
2259
2275
|
setGlobalSettings: (state, action) => {
|
|
2260
2276
|
state.settingsInitialized = true;
|
|
2261
|
-
state.globalSettings =
|
|
2277
|
+
state.globalSettings = {
|
|
2278
|
+
...state.globalSettings,
|
|
2279
|
+
...action.payload
|
|
2280
|
+
};
|
|
2262
2281
|
},
|
|
2263
2282
|
setUserSettings: (state, action) => {
|
|
2264
2283
|
state.userSettingsInitialized = true;
|
|
2265
|
-
state.userSettings =
|
|
2284
|
+
state.userSettings = {
|
|
2285
|
+
...state.userSettings,
|
|
2286
|
+
...action.payload
|
|
2287
|
+
};
|
|
2266
2288
|
},
|
|
2267
2289
|
setTooltipState: (state, action) => {
|
|
2268
2290
|
const { id, readState = READ_STATES.read } = action.payload;
|
|
2269
2291
|
state.tooltips.byId[id].readState = readState;
|
|
2270
2292
|
},
|
|
2271
2293
|
setTooltipsState: (state, action) => {
|
|
2272
|
-
state.tooltips.byId =
|
|
2294
|
+
state.tooltips.byId = {
|
|
2295
|
+
...state.tooltips.byId,
|
|
2296
|
+
...action.payload
|
|
2297
|
+
};
|
|
2273
2298
|
},
|
|
2274
2299
|
setShowFeedbackDialog: (state, action) => {
|
|
2275
2300
|
state.showFeedbackDialog = action.payload;
|
|
@@ -2286,7 +2311,16 @@ var actions8 = usersSlice.actions;
|
|
|
2286
2311
|
var usersSlice_default = usersSlice.reducer;
|
|
2287
2312
|
|
|
2288
2313
|
// src/actions.ts
|
|
2289
|
-
var actions_default =
|
|
2314
|
+
var actions_default = {
|
|
2315
|
+
...actions,
|
|
2316
|
+
...actions2,
|
|
2317
|
+
...actions3,
|
|
2318
|
+
...actions4,
|
|
2319
|
+
...actions5,
|
|
2320
|
+
...actions6,
|
|
2321
|
+
...actions7,
|
|
2322
|
+
...actions8
|
|
2323
|
+
};
|
|
2290
2324
|
|
|
2291
2325
|
// src/api/general-api.ts
|
|
2292
2326
|
var import_axios = __toESM(require("axios"));
|
|
@@ -2297,18 +2331,17 @@ var cookies = new import_universal_cookie.default();
|
|
|
2297
2331
|
var emptySession = Object.freeze({ token: "", exiresAt: void 0 });
|
|
2298
2332
|
var tokenCache = "";
|
|
2299
2333
|
var getSessionInfo = () => {
|
|
2300
|
-
|
|
2301
|
-
let sessionInfo = __spreadValues({}, emptySession);
|
|
2334
|
+
let sessionInfo = { ...emptySession };
|
|
2302
2335
|
try {
|
|
2303
|
-
sessionInfo = JSON.parse(
|
|
2304
|
-
} catch
|
|
2336
|
+
sessionInfo = JSON.parse(window.localStorage.getItem("JWT") ?? "");
|
|
2337
|
+
} catch {
|
|
2305
2338
|
}
|
|
2306
2339
|
if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
2307
2340
|
cleanUp();
|
|
2308
|
-
return
|
|
2341
|
+
return { ...emptySession };
|
|
2309
2342
|
}
|
|
2310
2343
|
if (!sessionInfo.token) {
|
|
2311
|
-
let jwtTokenFromCookie =
|
|
2344
|
+
let jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
2312
2345
|
if (jwtTokenFromCookie) {
|
|
2313
2346
|
setSessionInfo({ token: jwtTokenFromCookie, undefined: void 0 });
|
|
2314
2347
|
sessionInfo.token = jwtTokenFromCookie;
|
|
@@ -2336,8 +2369,7 @@ var maxSessionAge = 900;
|
|
|
2336
2369
|
|
|
2337
2370
|
// src/api/general-api.ts
|
|
2338
2371
|
var unauthorizedRedirect = (error) => {
|
|
2339
|
-
|
|
2340
|
-
if (!(0, import_axios.isCancel)(error) && ((_a = error.response) == null ? void 0 : _a.status) === 401 && getToken()) {
|
|
2372
|
+
if (!(0, import_axios.isCancel)(error) && error.response?.status === 401 && getToken()) {
|
|
2341
2373
|
cleanUp();
|
|
2342
2374
|
window.location.replace("/ui/");
|
|
2343
2375
|
}
|
|
@@ -2347,7 +2379,7 @@ var commonRequestConfig = { timeout: TIMEOUTS.refreshDefault, headers: { "Conten
|
|
|
2347
2379
|
var authenticatedRequest = import_axios.default.create(commonRequestConfig);
|
|
2348
2380
|
authenticatedRequest.interceptors.response.use((res) => res, unauthorizedRedirect);
|
|
2349
2381
|
authenticatedRequest.interceptors.request.use(
|
|
2350
|
-
(config) =>
|
|
2382
|
+
(config) => ({ ...config, headers: { ...config.headers, Authorization: `Bearer ${getToken()}` } }),
|
|
2351
2383
|
(error) => Promise.reject(error)
|
|
2352
2384
|
);
|
|
2353
2385
|
var Api = {
|
|
@@ -2355,7 +2387,7 @@ var Api = {
|
|
|
2355
2387
|
delete: (url, data) => authenticatedRequest.request({ method: "delete", url, data }),
|
|
2356
2388
|
patch: authenticatedRequest.patch,
|
|
2357
2389
|
post: authenticatedRequest.post,
|
|
2358
|
-
postUnauthorized: (url, data, config = {}) => import_axios.default.post(url, data,
|
|
2390
|
+
postUnauthorized: (url, data, config = {}) => import_axios.default.post(url, data, { ...commonRequestConfig, ...config }),
|
|
2359
2391
|
put: authenticatedRequest.put,
|
|
2360
2392
|
upload: (url, formData, progress2, cancelSignal) => authenticatedRequest.post(url, formData, {
|
|
2361
2393
|
headers: { "Content-Type": "multipart/form-data" },
|
|
@@ -2386,10 +2418,7 @@ var getSearchState = (state) => state.app.searchState;
|
|
|
2386
2418
|
var getSearchedDevices = (0, import_toolkit9.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
|
|
2387
2419
|
var getVersionInformation = (0, import_toolkit9.createSelector)(
|
|
2388
2420
|
[getFullVersionInformation, getFeatures],
|
|
2389
|
-
(
|
|
2390
|
-
var _b2 = _a, { Integration } = _b2, remainder = __objRest(_b2, ["Integration"]);
|
|
2391
|
-
return isHosted && Integration !== "next" ? remainder : __spreadProps(__spreadValues({}, remainder), { Integration });
|
|
2392
|
-
}
|
|
2421
|
+
({ Integration, ...remainder }, { isHosted }) => isHosted && Integration !== "next" ? remainder : { ...remainder, Integration }
|
|
2393
2422
|
);
|
|
2394
2423
|
var getIsPreview = (0, import_toolkit9.createSelector)([getFullVersionInformation], ({ Integration }) => (0, import_helpers2.versionCompare)(Integration, "next") > -1);
|
|
2395
2424
|
|
|
@@ -2406,8 +2435,7 @@ var getDeploymentsSelectionState = (state) => state.deployments.selectionState;
|
|
|
2406
2435
|
var getMappedDeploymentSelection = (0, import_toolkit10.createSelector)(
|
|
2407
2436
|
[getDeploymentsSelectionState, (_, deploymentsState) => deploymentsState, getDeploymentsById],
|
|
2408
2437
|
(selectionState, deploymentsState, deploymentsById) => {
|
|
2409
|
-
|
|
2410
|
-
const { selection = [] } = (_a = selectionState[deploymentsState]) != null ? _a : {};
|
|
2438
|
+
const { selection = [] } = selectionState[deploymentsState] ?? {};
|
|
2411
2439
|
return selection.reduce((accu, id) => {
|
|
2412
2440
|
if (deploymentsById[id]) {
|
|
2413
2441
|
accu.push(deploymentsById[id]);
|
|
@@ -2451,7 +2479,8 @@ var getListedDevices = (state) => state.devices.deviceList.deviceIds;
|
|
|
2451
2479
|
var getFilteringAttributes = (state) => state.devices.filteringAttributes;
|
|
2452
2480
|
var getDeviceFilters = (state) => state.devices.filters || [];
|
|
2453
2481
|
var getFilteringAttributesFromConfig = (state) => state.devices.filteringAttributesConfig.attributes;
|
|
2454
|
-
var getSortedFilteringAttributes = (0, import_toolkit11.createSelector)([getFilteringAttributes], (filteringAttributes) =>
|
|
2482
|
+
var getSortedFilteringAttributes = (0, import_toolkit11.createSelector)([getFilteringAttributes], (filteringAttributes) => ({
|
|
2483
|
+
...filteringAttributes,
|
|
2455
2484
|
identityAttributes: [...filteringAttributes.identityAttributes, "id"]
|
|
2456
2485
|
}));
|
|
2457
2486
|
var getDeviceLimit = (state) => state.devices.limit;
|
|
@@ -2479,10 +2508,7 @@ var getDeviceCountsByStatus = (0, import_toolkit11.createSelector)(
|
|
|
2479
2508
|
return accu;
|
|
2480
2509
|
}, {})
|
|
2481
2510
|
);
|
|
2482
|
-
var getDeviceById = (0, import_toolkit11.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => {
|
|
2483
|
-
var _a;
|
|
2484
|
-
return (_a = devicesById[deviceId]) != null ? _a : {};
|
|
2485
|
-
});
|
|
2511
|
+
var getDeviceById = (0, import_toolkit11.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => devicesById[deviceId] ?? {});
|
|
2486
2512
|
var getSelectedGroupInfo = (0, import_toolkit11.createSelector)(
|
|
2487
2513
|
[getAcceptedDevices, getGroupsById, getSelectedGroup],
|
|
2488
2514
|
({ total: acceptedDeviceTotal }, groupsById, selectedGroup) => {
|
|
@@ -2499,17 +2525,13 @@ var getLimitMaxed = (0, import_toolkit11.createSelector)(
|
|
|
2499
2525
|
[getAcceptedDevices, getDeviceLimit],
|
|
2500
2526
|
({ total: acceptedDevices = 0 }, deviceLimit) => Boolean(deviceLimit && deviceLimit <= acceptedDevices)
|
|
2501
2527
|
);
|
|
2502
|
-
var
|
|
2503
|
-
var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], (_a) => {
|
|
2504
|
-
var _c = _a, { [_b = UNGROUPED_GROUP.id]: ungrouped } = _c, groups = __objRest(_c, [__restKey(_b)]);
|
|
2505
|
-
return groups;
|
|
2506
|
-
});
|
|
2528
|
+
var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
|
|
2507
2529
|
var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsById) => {
|
|
2508
2530
|
const groupNames = Object.keys(groupsById).sort();
|
|
2509
2531
|
const groupedGroups = Object.entries(groupsById).sort((a, b) => a[0].localeCompare(b[0])).reduce(
|
|
2510
2532
|
(accu, [groupname, group]) => {
|
|
2511
2533
|
const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
|
|
2512
|
-
const groupItem =
|
|
2534
|
+
const groupItem = { ...group, groupId: name, name: groupname };
|
|
2513
2535
|
if (group.filters.length > 0) {
|
|
2514
2536
|
if (groupname !== UNGROUPED_GROUP.id) {
|
|
2515
2537
|
accu.dynamic.push(groupItem);
|
|
@@ -2523,7 +2545,7 @@ var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsByI
|
|
|
2523
2545
|
},
|
|
2524
2546
|
{ dynamic: [], static: [], ungrouped: [] }
|
|
2525
2547
|
);
|
|
2526
|
-
return
|
|
2548
|
+
return { groupNames, ...groupedGroups };
|
|
2527
2549
|
});
|
|
2528
2550
|
var getAttributesList = (0, import_toolkit11.createSelector)(
|
|
2529
2551
|
[getFilteringAttributes, getFilteringAttributesFromConfig],
|
|
@@ -2563,10 +2585,7 @@ var getWebhookEvents = (state) => state.organization.webhooks.events;
|
|
|
2563
2585
|
var getWebhookEventTotal = (state) => state.organization.webhooks.eventTotal;
|
|
2564
2586
|
var getDeviceTwinIntegrations = (0, import_toolkit12.createSelector)(
|
|
2565
2587
|
[getExternalIntegrations],
|
|
2566
|
-
(integrations) => integrations.filter((integration) =>
|
|
2567
|
-
var _a;
|
|
2568
|
-
return integration.id && ((_a = EXTERNAL_PROVIDER[integration.provider]) == null ? void 0 : _a.deviceTwin);
|
|
2569
|
-
})
|
|
2588
|
+
(integrations) => integrations.filter((integration) => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)
|
|
2570
2589
|
);
|
|
2571
2590
|
var getIsServiceProvider = (state) => state.organization.organization.service_provider;
|
|
2572
2591
|
var getWebhooks = (0, import_toolkit12.createSelector)(
|
|
@@ -2600,15 +2619,12 @@ var filterProcessors = {
|
|
|
2600
2619
|
var filterAliases = {
|
|
2601
2620
|
$nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
|
|
2602
2621
|
};
|
|
2603
|
-
var mapFiltersToTerms = (filters) => filters.map((filter) => {
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
|
|
2610
|
-
};
|
|
2611
|
-
});
|
|
2622
|
+
var mapFiltersToTerms = (filters) => filters.map((filter) => ({
|
|
2623
|
+
scope: filter.scope,
|
|
2624
|
+
attribute: filter.key,
|
|
2625
|
+
type: filterAliases[filter.operator]?.alias || filter.operator,
|
|
2626
|
+
value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
|
|
2627
|
+
}));
|
|
2612
2628
|
var mapTermsToFilters = (terms) => terms.map((term) => {
|
|
2613
2629
|
const aliasedFilter = Object.entries(filterAliases).find(
|
|
2614
2630
|
(aliasDefinition) => aliasDefinition[1].alias === term.type && aliasDefinition[1].value === term.value
|
|
@@ -2618,14 +2634,13 @@ var mapTermsToFilters = (terms) => terms.map((term) => {
|
|
|
2618
2634
|
});
|
|
2619
2635
|
var convertIssueOptionsToFilters = (issuesSelection, filtersState = {}) => issuesSelection.map((item) => {
|
|
2620
2636
|
if (typeof DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
|
|
2621
|
-
return
|
|
2637
|
+
return { ...DEVICE_ISSUE_OPTIONS[item].filterRule, value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
|
|
2622
2638
|
}
|
|
2623
2639
|
return DEVICE_ISSUE_OPTIONS[item].filterRule;
|
|
2624
2640
|
});
|
|
2625
2641
|
var convertDeviceListStateToFilters = ({ filters = [], group, groups = { byId: {} }, offlineThreshold, selectedIssues = [], status }) => {
|
|
2626
|
-
var _a;
|
|
2627
2642
|
let applicableFilters = [...filters];
|
|
2628
|
-
if (typeof group === "string" && !(
|
|
2643
|
+
if (typeof group === "string" && !(groups.byId[group]?.filters || applicableFilters).length) {
|
|
2629
2644
|
applicableFilters.push({ key: "group", value: group, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
|
|
2630
2645
|
}
|
|
2631
2646
|
const nonMonitorFilters = applicableFilters.filter(
|
|
@@ -2646,12 +2661,12 @@ var filtersFilter = (item, index, array) => {
|
|
|
2646
2661
|
var listItemMapper = (byId, ids, { defaultObject = {}, cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH }) => {
|
|
2647
2662
|
return ids.slice(0, cutOffSize).reduce((accu, id) => {
|
|
2648
2663
|
if (id && byId[id]) {
|
|
2649
|
-
accu.push(
|
|
2664
|
+
accu.push({ ...defaultObject, ...byId[id] });
|
|
2650
2665
|
}
|
|
2651
2666
|
return accu;
|
|
2652
2667
|
}, []);
|
|
2653
2668
|
};
|
|
2654
|
-
var mergePermissions = (existingPermissions =
|
|
2669
|
+
var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
|
|
2655
2670
|
(accu, [key, value]) => {
|
|
2656
2671
|
let values;
|
|
2657
2672
|
if (!accu[key]) {
|
|
@@ -2661,12 +2676,12 @@ var mergePermissions = (existingPermissions = __spreadValues({}, emptyUiPermissi
|
|
|
2661
2676
|
if (Array.isArray(value)) {
|
|
2662
2677
|
values = [...value, ...accu[key]].filter(import_helpers4.duplicateFilter);
|
|
2663
2678
|
} else {
|
|
2664
|
-
values = mergePermissions(accu[key],
|
|
2679
|
+
values = mergePermissions(accu[key], { ...value });
|
|
2665
2680
|
}
|
|
2666
2681
|
accu[key] = values;
|
|
2667
2682
|
return accu;
|
|
2668
2683
|
},
|
|
2669
|
-
|
|
2684
|
+
{ ...addedPermissions }
|
|
2670
2685
|
);
|
|
2671
2686
|
var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
|
|
2672
2687
|
(accu, roleId) => {
|
|
@@ -2675,20 +2690,17 @@ var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
|
|
|
2675
2690
|
}
|
|
2676
2691
|
return mergePermissions(accu, roles[roleId].uiPermissions);
|
|
2677
2692
|
},
|
|
2678
|
-
|
|
2693
|
+
{ ...emptyUiPermissions }
|
|
2679
2694
|
);
|
|
2680
2695
|
var progress = ({ loaded, total }) => {
|
|
2681
2696
|
let uploadProgress4 = loaded / total * 100;
|
|
2682
2697
|
return uploadProgress4 = uploadProgress4 < 50 ? Math.ceil(uploadProgress4) : Math.round(uploadProgress4);
|
|
2683
2698
|
};
|
|
2684
|
-
var extractErrorMessage = (err, fallback = "") =>
|
|
2685
|
-
var _a, _b2, _c, _d, _e;
|
|
2686
|
-
return ((_c = (_b2 = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b2.error) == null ? void 0 : _c.message) || ((_e = (_d = err.response) == null ? void 0 : _d.data) == null ? void 0 : _e.error) || err.error || err.message || fallback;
|
|
2687
|
-
};
|
|
2699
|
+
var extractErrorMessage = (err, fallback = "") => err.response?.data?.error?.message || err.response?.data?.error || err.error || err.message || fallback;
|
|
2688
2700
|
var preformatWithRequestID = (res, failMsg) => {
|
|
2689
2701
|
if (failMsg.length > 100) failMsg = `${failMsg.substring(0, 220)}...`;
|
|
2690
2702
|
try {
|
|
2691
|
-
if (
|
|
2703
|
+
if (res?.data && Object.keys(res.data).includes("request_id")) {
|
|
2692
2704
|
let shortRequestUUID = res.data["request_id"].substring(0, 8);
|
|
2693
2705
|
return `${failMsg} [Request ID: ${shortRequestUUID}]`;
|
|
2694
2706
|
}
|
|
@@ -2703,9 +2715,10 @@ var mapDeviceAttributes = (attributes = []) => attributes.reduce(
|
|
|
2703
2715
|
if (!(attribute.value && attribute.name) && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
|
|
2704
2716
|
return accu;
|
|
2705
2717
|
}
|
|
2706
|
-
accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] =
|
|
2718
|
+
accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = {
|
|
2719
|
+
...accu[attribute.scope || ATTRIBUTE_SCOPES.inventory],
|
|
2707
2720
|
[attribute.name]: attribute.value
|
|
2708
|
-
}
|
|
2721
|
+
};
|
|
2709
2722
|
if (attribute.name === "device_type" && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
|
|
2710
2723
|
accu.inventory.device_type = [].concat(attribute.value);
|
|
2711
2724
|
}
|
|
@@ -2724,15 +2737,12 @@ var getReleaseListState = (state) => state.releases.releasesList;
|
|
|
2724
2737
|
var getListedReleases = (state) => state.releases.releasesList.releaseIds;
|
|
2725
2738
|
var getReleaseMappingDefaults = () => ({});
|
|
2726
2739
|
var getReleasesList = (0, import_toolkit13.createSelector)([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
|
|
2727
|
-
var getReleaseTagsById = (0, import_toolkit13.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) =>
|
|
2740
|
+
var getReleaseTagsById = (0, import_toolkit13.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
|
|
2728
2741
|
var getHasReleases = (0, import_toolkit13.createSelector)(
|
|
2729
2742
|
[getReleaseListState, getReleasesById],
|
|
2730
2743
|
({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
|
|
2731
2744
|
);
|
|
2732
|
-
var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => {
|
|
2733
|
-
var _a;
|
|
2734
|
-
return (_a = byId[id]) != null ? _a : {};
|
|
2735
|
-
});
|
|
2745
|
+
var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});
|
|
2736
2746
|
|
|
2737
2747
|
// src/usersSlice/selectors.ts
|
|
2738
2748
|
var import_toolkit14 = require("@reduxjs/toolkit");
|
|
@@ -2741,10 +2751,7 @@ var getTooltipsById = (state) => state.users.tooltips.byId;
|
|
|
2741
2751
|
var getGlobalSettings = (state) => state.users.globalSettings;
|
|
2742
2752
|
var getCurrentUserId = (state) => state.users.currentUser;
|
|
2743
2753
|
var getUsersById = (state) => state.users.byId;
|
|
2744
|
-
var getCurrentUser = (0, import_toolkit14.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => {
|
|
2745
|
-
var _a;
|
|
2746
|
-
return (_a = usersById[userId]) != null ? _a : {};
|
|
2747
|
-
});
|
|
2754
|
+
var getCurrentUser = (0, import_toolkit14.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
|
|
2748
2755
|
var getUserSettings = (state) => state.users.userSettings;
|
|
2749
2756
|
var getIsDarkMode = (0, import_toolkit14.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
|
|
2750
2757
|
var getShowHelptips = (0, import_toolkit14.createSelector)(
|
|
@@ -2755,22 +2762,22 @@ var getTooltipsState = (0, import_toolkit14.createSelector)(
|
|
|
2755
2762
|
[getTooltipsById, getUserSettings],
|
|
2756
2763
|
(byId, { tooltips = {} }) => Object.entries(byId).reduce(
|
|
2757
2764
|
(accu, [id, value]) => {
|
|
2758
|
-
accu[id] =
|
|
2765
|
+
accu[id] = { ...accu[id], ...value };
|
|
2759
2766
|
return accu;
|
|
2760
2767
|
},
|
|
2761
|
-
|
|
2768
|
+
{ ...tooltips }
|
|
2762
2769
|
)
|
|
2763
2770
|
);
|
|
2764
2771
|
var getHas2FA = (0, import_toolkit14.createSelector)(
|
|
2765
2772
|
[getCurrentUser],
|
|
2766
2773
|
(currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === twoFAStates.enabled
|
|
2767
2774
|
);
|
|
2768
|
-
var getIdAttribute = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ id_attribute =
|
|
2775
|
+
var getIdAttribute = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
|
|
2769
2776
|
var getOfflineThresholdSettings = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ offlineThreshold }) => ({
|
|
2770
|
-
interval:
|
|
2771
|
-
intervalUnit:
|
|
2777
|
+
interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
|
|
2778
|
+
intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
|
|
2772
2779
|
}));
|
|
2773
|
-
var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) =>
|
|
2780
|
+
var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) => ({ id, ...role })));
|
|
2774
2781
|
var getCurrentSession = (state) => state.users.currentSession;
|
|
2775
2782
|
|
|
2776
2783
|
// src/commonSelectors.ts
|
|
@@ -2789,8 +2796,7 @@ var getSearchEndpoint = (0, import_toolkit15.createSelector)(
|
|
|
2789
2796
|
var getUserRoles = (0, import_toolkit15.createSelector)(
|
|
2790
2797
|
[getCurrentUser, getRolesById, getIsEnterprise, getFeatures, getOrganization],
|
|
2791
2798
|
(currentUser, rolesById2, isEnterprise, { isHosted, hasMultitenancy }, { plan = PLANS.os.id }) => {
|
|
2792
|
-
|
|
2793
|
-
const isAdmin = ((_a = currentUser.roles) == null ? void 0 : _a.length) ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
|
|
2799
|
+
const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
|
|
2794
2800
|
const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
|
|
2795
2801
|
return { isAdmin, uiPermissions };
|
|
2796
2802
|
}
|
|
@@ -2859,10 +2865,11 @@ var getFilterAttributes = (0, import_toolkit15.createSelector)(
|
|
|
2859
2865
|
const deviceNameAttribute = { key: "name", value: "Name", scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 1 };
|
|
2860
2866
|
const deviceIdAttribute = { key: "id", value: "Device ID", scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 };
|
|
2861
2867
|
const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
2862
|
-
const updateAttribute =
|
|
2868
|
+
const updateAttribute = { ...checkInAttribute, key: "updated_ts", value: "Last inventory update" };
|
|
2863
2869
|
const firstRequestAttribute = { key: "created_ts", value: "First request", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
|
|
2864
2870
|
const attributes = [
|
|
2865
|
-
...previousFilters.map((item) =>
|
|
2871
|
+
...previousFilters.map((item) => ({
|
|
2872
|
+
...item,
|
|
2866
2873
|
value: deviceIdAttribute.key === item.key ? deviceIdAttribute.value : item.key,
|
|
2867
2874
|
category: "recently used",
|
|
2868
2875
|
priority: 0
|
|
@@ -2880,14 +2887,13 @@ var getFilterAttributes = (0, import_toolkit15.createSelector)(
|
|
|
2880
2887
|
return (0, import_helpers5.attributeDuplicateFilter)(attributes, "key");
|
|
2881
2888
|
}
|
|
2882
2889
|
);
|
|
2883
|
-
var getOnboardingState = (0, import_toolkit15.createSelector)([getOnboarding, getUserSettings], (
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
});
|
|
2890
|
+
var getOnboardingState = (0, import_toolkit15.createSelector)([getOnboarding, getUserSettings], ({ complete, progress: progress2, showTips, ...remainder }, { onboarding = {} }) => ({
|
|
2891
|
+
...remainder,
|
|
2892
|
+
...onboarding,
|
|
2893
|
+
complete: onboarding.complete || complete,
|
|
2894
|
+
progress: Object.keys(onboardingSteps).findIndex((step) => step === progress2) > Object.keys(onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress2 : onboarding.progress,
|
|
2895
|
+
showTips: !onboarding.showTips ? onboarding.showTips : showTips
|
|
2896
|
+
}));
|
|
2891
2897
|
var getDemoDeviceAddress = (0, import_toolkit15.createSelector)([getDevicesById, getOnboarding], (devicesById, { approach, demoArtifactPort }) => {
|
|
2892
2898
|
const demoDeviceAddress = `http://${(0, import_helpers5.getDemoDeviceAddress)(Object.values(devicesById), approach)}`;
|
|
2893
2899
|
return demoArtifactPort ? `${demoDeviceAddress}:${demoArtifactPort}` : demoDeviceAddress;
|
|
@@ -2908,12 +2914,11 @@ var getDeploymentRelease = (0, import_toolkit15.createSelector)(
|
|
|
2908
2914
|
var getSelectedDeploymentData = (0, import_toolkit15.createSelector)(
|
|
2909
2915
|
[getDeploymentsById, getDeploymentsSelectionState, getDevicesById, getSelectedDeploymentDeviceIds],
|
|
2910
2916
|
(deploymentsById, { selectedId }, devicesById, selectedDeviceIds) => {
|
|
2911
|
-
|
|
2912
|
-
const deployment = (_a = deploymentsById[selectedId]) != null ? _a : {};
|
|
2917
|
+
const deployment = deploymentsById[selectedId] ?? {};
|
|
2913
2918
|
const { devices = {} } = deployment;
|
|
2914
2919
|
return {
|
|
2915
2920
|
deployment,
|
|
2916
|
-
selectedDevices: selectedDeviceIds.map((deviceId) =>
|
|
2921
|
+
selectedDevices: selectedDeviceIds.map((deviceId) => ({ ...devicesById[deviceId], ...devices[deviceId] }))
|
|
2917
2922
|
};
|
|
2918
2923
|
}
|
|
2919
2924
|
);
|
|
@@ -2928,8 +2933,7 @@ var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
|
|
|
2928
2933
|
}, {})
|
|
2929
2934
|
);
|
|
2930
2935
|
var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUserRoles, (_, options = {}) => options], (groupsById, { uiPermissions }, { staticOnly }) => {
|
|
2931
|
-
|
|
2932
|
-
const _b2 = groupsById, { [_a = UNGROUPED_GROUP.id]: ungrouped } = _b2, groups = __objRest(_b2, [__restKey(_a)]);
|
|
2936
|
+
const { [UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
|
|
2933
2937
|
if (staticOnly) {
|
|
2934
2938
|
return Object.keys(uiPermissions.groups).sort();
|
|
2935
2939
|
}
|
|
@@ -2963,9 +2967,9 @@ var getAuditlogDevice = (0, import_toolkit15.createSelector)([getAuditLogEntry,
|
|
|
2963
2967
|
if (auditlogEvent) {
|
|
2964
2968
|
const { object = {} } = auditlogEvent;
|
|
2965
2969
|
const { device = {}, id, type } = object;
|
|
2966
|
-
auditlogDevice = type === "device" ?
|
|
2970
|
+
auditlogDevice = type === "device" ? { id, ...device } : auditlogDevice;
|
|
2967
2971
|
}
|
|
2968
|
-
return
|
|
2972
|
+
return { ...auditlogDevice, ...devicesById[auditlogDevice.id] };
|
|
2969
2973
|
});
|
|
2970
2974
|
var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
|
|
2971
2975
|
if (service_provider) {
|
|
@@ -3017,8 +3021,9 @@ var sessionReducer = (state, action) => {
|
|
|
3017
3021
|
return rootReducer(state, action);
|
|
3018
3022
|
};
|
|
3019
3023
|
var getConfiguredStore = (options = {}) => {
|
|
3020
|
-
const
|
|
3021
|
-
return (0, import_toolkit16.configureStore)(
|
|
3024
|
+
const { preloadedState = {}, ...config } = options;
|
|
3025
|
+
return (0, import_toolkit16.configureStore)({
|
|
3026
|
+
...config,
|
|
3022
3027
|
preloadedState,
|
|
3023
3028
|
reducer: sessionReducer,
|
|
3024
3029
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
@@ -3031,7 +3036,7 @@ var getConfiguredStore = (options = {}) => {
|
|
|
3031
3036
|
ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
|
|
3032
3037
|
}
|
|
3033
3038
|
})
|
|
3034
|
-
})
|
|
3039
|
+
});
|
|
3035
3040
|
};
|
|
3036
3041
|
var store = getConfiguredStore({
|
|
3037
3042
|
preloadedState: {}
|
|
@@ -3051,17 +3056,16 @@ var dateFunctionMap = {
|
|
|
3051
3056
|
setDays: "setDate"
|
|
3052
3057
|
};
|
|
3053
3058
|
var setOfflineThreshold = (0, import_toolkit17.createAsyncThunk)(`${sliceName}/setOfflineThreshold`, (_, { dispatch, getState }) => {
|
|
3054
|
-
var _a, _b2;
|
|
3055
3059
|
const { interval, intervalUnit } = getOfflineThresholdSettings(getState());
|
|
3056
3060
|
const today = /* @__PURE__ */ new Date();
|
|
3057
3061
|
const intervalName = `${intervalUnit.charAt(0).toUpperCase()}${intervalUnit.substring(1)}`;
|
|
3058
|
-
const setter =
|
|
3059
|
-
const getter =
|
|
3062
|
+
const setter = dateFunctionMap[`set${intervalName}`] ?? `set${intervalName}`;
|
|
3063
|
+
const getter = dateFunctionMap[`get${intervalName}`] ?? `get${intervalName}`;
|
|
3060
3064
|
today[setter](today[getter]() - interval);
|
|
3061
3065
|
let value;
|
|
3062
3066
|
try {
|
|
3063
3067
|
value = today.toISOString();
|
|
3064
|
-
} catch
|
|
3068
|
+
} catch {
|
|
3065
3069
|
return Promise.resolve(dispatch(actions.setSnackbar("There was an error saving the offline threshold, please check your settings.")));
|
|
3066
3070
|
}
|
|
3067
3071
|
return Promise.resolve(dispatch(actions.setOfflineThreshold(value)));
|
|
@@ -3102,37 +3106,43 @@ var getLatestReleaseInfo = (0, import_toolkit17.createAsyncThunk)(`${sliceName}/
|
|
|
3102
3106
|
accu.latestRepos[item.name] = getComparisonCompatibleVersion(item.version);
|
|
3103
3107
|
return accu;
|
|
3104
3108
|
},
|
|
3105
|
-
{ latestVersions:
|
|
3109
|
+
{ latestVersions: { ...getState().app.versionInformation }, latestRepos: {} }
|
|
3106
3110
|
);
|
|
3107
3111
|
const info = deductSaasState(latestRelease, guiTags, saas);
|
|
3108
3112
|
return Promise.resolve(
|
|
3109
3113
|
dispatch(
|
|
3110
|
-
actions.setVersionInformation(
|
|
3114
|
+
actions.setVersionInformation({
|
|
3115
|
+
...latestVersions,
|
|
3111
3116
|
backend: info,
|
|
3112
3117
|
GUI: info,
|
|
3113
3118
|
latestRelease: {
|
|
3114
3119
|
releaseDate: latestRelease.release_date,
|
|
3115
3120
|
repos: latestRepos
|
|
3116
3121
|
}
|
|
3117
|
-
})
|
|
3122
|
+
})
|
|
3118
3123
|
)
|
|
3119
3124
|
);
|
|
3120
3125
|
});
|
|
3121
3126
|
});
|
|
3122
3127
|
var setSearchState = (0, import_toolkit17.createAsyncThunk)(`${sliceName}/setSearchState`, (searchState, { dispatch, getState }) => {
|
|
3123
3128
|
const currentState = getSearchState(getState());
|
|
3124
|
-
let nextState =
|
|
3125
|
-
|
|
3126
|
-
|
|
3129
|
+
let nextState = {
|
|
3130
|
+
...currentState,
|
|
3131
|
+
...searchState,
|
|
3132
|
+
sort: {
|
|
3133
|
+
...currentState.sort,
|
|
3134
|
+
...searchState.sort
|
|
3135
|
+
}
|
|
3136
|
+
};
|
|
3127
3137
|
let tasks = [];
|
|
3128
|
-
const
|
|
3129
|
-
const
|
|
3138
|
+
const { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal, ...currentRequestState } = currentState;
|
|
3139
|
+
const { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal, ...nextRequestState } = nextState;
|
|
3130
3140
|
if (nextRequestState.searchTerm && !(0, import_helpers6.deepCompare)(currentRequestState, nextRequestState)) {
|
|
3131
3141
|
nextState.isSearching = true;
|
|
3132
3142
|
tasks.push(
|
|
3133
3143
|
dispatch(searchDevices(nextState)).unwrap().then((results) => {
|
|
3134
3144
|
const searchResult = results[results.length - 1];
|
|
3135
|
-
return dispatch(actions.setSearchState(
|
|
3145
|
+
return dispatch(actions.setSearchState({ ...searchResult, isSearching: false }));
|
|
3136
3146
|
}).catch(() => dispatch(actions.setSearchState({ isSearching: false, searchTotal: 0 })))
|
|
3137
3147
|
);
|
|
3138
3148
|
}
|
|
@@ -3149,13 +3159,15 @@ var { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
|
|
|
3149
3159
|
var deriveDeploymentGroup = ({ filter = {}, group, groups = [], name }) => group || groups.length === 1 && !(0, import_isUUID.default)(name) ? groups[0] : filter.name;
|
|
3150
3160
|
var transformDeployments = (deployments, deploymentsById) => deployments.sort(import_helpers7.startTimeSort).reduce(
|
|
3151
3161
|
(accu, item) => {
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3162
|
+
const filter = item.filter ?? {};
|
|
3163
|
+
let deployment = {
|
|
3164
|
+
...deploymentPrototype,
|
|
3165
|
+
...deploymentsById[item.id],
|
|
3166
|
+
...item,
|
|
3167
|
+
filter: item.filter ? { ...filter, name: filter.name ?? filter.id, filters: mapTermsToFilters(filter.terms) } : void 0,
|
|
3156
3168
|
name: decodeURIComponent(item.name)
|
|
3157
|
-
}
|
|
3158
|
-
deployment =
|
|
3169
|
+
};
|
|
3170
|
+
deployment = { ...deployment, group: deriveDeploymentGroup(deployment) };
|
|
3159
3171
|
accu.deployments[item.id] = deployment;
|
|
3160
3172
|
accu.deploymentIds.push(item.id);
|
|
3161
3173
|
return accu;
|
|
@@ -3209,11 +3221,12 @@ var createDeployment = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/cre
|
|
|
3209
3221
|
return request.catch((err) => commonErrorHandler(err, "Error creating deployment.", dispatch)).then((data) => {
|
|
3210
3222
|
const lastslashindex = data.headers.location.lastIndexOf("/");
|
|
3211
3223
|
const deploymentId = data.headers.location.substring(lastslashindex + 1);
|
|
3212
|
-
const deployment =
|
|
3224
|
+
const deployment = {
|
|
3225
|
+
...newDeployment,
|
|
3213
3226
|
id: deploymentId,
|
|
3214
3227
|
devices: newDeployment.devices ? newDeployment.devices.map((id) => ({ id, status: "pending" })) : [],
|
|
3215
3228
|
statistics: { status: {} }
|
|
3216
|
-
}
|
|
3229
|
+
};
|
|
3217
3230
|
let tasks = [
|
|
3218
3231
|
dispatch(actions2.createdDeployment(deployment)),
|
|
3219
3232
|
dispatch(getSingleDeployment(deploymentId)),
|
|
@@ -3356,14 +3369,23 @@ var updateDeploymentControlMap = (0, import_toolkit18.createAsyncThunk)(
|
|
|
3356
3369
|
({ deploymentId, updateControlMap }, { dispatch }) => general_api_default.patch(`${deploymentsApiUrl}/deployments/${deploymentId}`, { update_control_map: updateControlMap }).catch((err) => commonErrorHandler(err, "There was an error while updating the deployment status:", dispatch)).then(() => Promise.resolve(dispatch(getSingleDeployment(deploymentId))))
|
|
3357
3370
|
);
|
|
3358
3371
|
var setDeploymentsState = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/setDeploymentsState`, (selection, { dispatch, getState }) => {
|
|
3359
|
-
const
|
|
3372
|
+
const { page, perPage, ...selectionState } = selection;
|
|
3360
3373
|
const currentState = getState().deployments.selectionState;
|
|
3361
|
-
let nextState =
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3374
|
+
let nextState = {
|
|
3375
|
+
...currentState,
|
|
3376
|
+
...selectionState,
|
|
3377
|
+
...Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
|
|
3378
|
+
accu[item] = {
|
|
3379
|
+
...currentState[item],
|
|
3380
|
+
...selectionState[item]
|
|
3381
|
+
};
|
|
3382
|
+
return accu;
|
|
3383
|
+
}, {}),
|
|
3384
|
+
general: {
|
|
3385
|
+
...currentState.general,
|
|
3386
|
+
...selectionState.general
|
|
3387
|
+
}
|
|
3388
|
+
};
|
|
3367
3389
|
let tasks = [dispatch(actions2.setDeploymentsState(nextState))];
|
|
3368
3390
|
if (nextState.selectedId && currentState.selectedId !== nextState.selectedId) {
|
|
3369
3391
|
tasks.push(dispatch(getSingleDeployment(nextState.selectedId)));
|
|
@@ -3393,15 +3415,20 @@ var getDeploymentsConfig = (0, import_toolkit18.createAsyncThunk)(
|
|
|
3393
3415
|
const { binary_delta = {}, binary_delta_limits = {} } = delta;
|
|
3394
3416
|
const { xdelta_args = {}, timeout: timeoutConfig = oldConfig.binaryDelta.timeout } = binary_delta;
|
|
3395
3417
|
const { xdelta_args_limits = {}, timeout: timeoutLimit = oldConfig.binaryDeltaLimits.timeout } = binary_delta_limits;
|
|
3396
|
-
const config =
|
|
3418
|
+
const config = {
|
|
3419
|
+
...oldConfig,
|
|
3397
3420
|
hasDelta: Boolean(delta.enabled),
|
|
3398
|
-
binaryDelta:
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3421
|
+
binaryDelta: {
|
|
3422
|
+
...oldConfig.binaryDelta,
|
|
3423
|
+
timeout: timeoutConfig,
|
|
3424
|
+
...mapExternalDeltaConfig(xdelta_args)
|
|
3425
|
+
},
|
|
3426
|
+
binaryDeltaLimits: {
|
|
3427
|
+
...oldConfig.binaryDeltaLimits,
|
|
3428
|
+
timeout: timeoutLimit,
|
|
3429
|
+
...mapExternalDeltaConfig(xdelta_args_limits)
|
|
3430
|
+
}
|
|
3431
|
+
};
|
|
3405
3432
|
return Promise.resolve(dispatch(actions2.setDeploymentsConfig(config)));
|
|
3406
3433
|
})
|
|
3407
3434
|
);
|
|
@@ -3411,7 +3438,7 @@ var deepClean = (source) => Object.entries(source).reduce((accu, [key, value]) =
|
|
|
3411
3438
|
if (cleanedValue === void 0 || typeof cleanedValue === "object" && (0, import_helpers7.isEmpty)(cleanedValue)) {
|
|
3412
3439
|
return accu;
|
|
3413
3440
|
}
|
|
3414
|
-
accu =
|
|
3441
|
+
accu = { ...accu ?? {}, [key]: cleanedValue };
|
|
3415
3442
|
}
|
|
3416
3443
|
return accu;
|
|
3417
3444
|
}, void 0);
|
|
@@ -3431,9 +3458,13 @@ var saveDeltaDeploymentsConfig = (0, import_toolkit18.createAsyncThunk)(`${slice
|
|
|
3431
3458
|
}
|
|
3432
3459
|
return general_api_default.put(`${deploymentsApiUrl}/config/binary_delta`, result).catch((err) => commonErrorHandler(err, "There was a problem storing your delta artifact generation configuration.", dispatch)).then(() => {
|
|
3433
3460
|
const oldConfig = getState().deployments.config;
|
|
3434
|
-
const newConfig =
|
|
3435
|
-
|
|
3436
|
-
|
|
3461
|
+
const newConfig = {
|
|
3462
|
+
...oldConfig,
|
|
3463
|
+
binaryDelta: {
|
|
3464
|
+
...oldConfig.binaryDelta,
|
|
3465
|
+
...config
|
|
3466
|
+
}
|
|
3467
|
+
};
|
|
3437
3468
|
return Promise.all([dispatch(actions2.setDeploymentsConfig(newConfig)), dispatch(setSnackbar2("Settings saved successfully"))]);
|
|
3438
3469
|
});
|
|
3439
3470
|
});
|
|
@@ -3444,7 +3475,7 @@ var { page: defaultPage2, perPage: defaultPerPage2 } = DEVICE_LIST_DEFAULTS;
|
|
|
3444
3475
|
var cutoffLength = 75;
|
|
3445
3476
|
var ellipsis = "...";
|
|
3446
3477
|
var longTextTrimmer = (text) => text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text;
|
|
3447
|
-
var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) =>
|
|
3478
|
+
var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name) }));
|
|
3448
3479
|
var getDeviceAlerts = (0, import_toolkit19.createAsyncThunk)(`${sliceName4}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {
|
|
3449
3480
|
const { page = defaultPage2, perPage = defaultPerPage2, issuedBefore, issuedAfter, sortAscending = false } = config;
|
|
3450
3481
|
const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : "";
|
|
@@ -3462,14 +3493,15 @@ var getLatestDeviceAlerts = (0, import_toolkit19.createAsyncThunk)(`${sliceName4
|
|
|
3462
3493
|
});
|
|
3463
3494
|
var getIssueCountsByType2 = (0, import_toolkit19.createAsyncThunk)(`${sliceName4}/getIssueCountsByType`, ({ type, options = {} }, { dispatch, getState }) => {
|
|
3464
3495
|
const state = getState();
|
|
3465
|
-
const
|
|
3466
|
-
const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters(
|
|
3496
|
+
const { filters = getDeviceFilters(state), group, status, ...remainder } = options;
|
|
3497
|
+
const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({
|
|
3498
|
+
...remainder,
|
|
3467
3499
|
filters,
|
|
3468
3500
|
group,
|
|
3469
3501
|
offlineThreshold: state.app.offlineThreshold,
|
|
3470
3502
|
selectedIssues: [type],
|
|
3471
3503
|
status
|
|
3472
|
-
})
|
|
3504
|
+
});
|
|
3473
3505
|
return general_api_default.post(getSearchEndpoint(getState()), {
|
|
3474
3506
|
page: 1,
|
|
3475
3507
|
per_page: 1,
|
|
@@ -3521,21 +3553,21 @@ var determineProgress = (acceptedDevices, pendingDevices, releases, pastDeployme
|
|
|
3521
3553
|
return steps[progress2];
|
|
3522
3554
|
};
|
|
3523
3555
|
var deductOnboardingState = ({ devicesById, devicesByStatus, onboardingState, pastDeployments, releases, userCapabilities, userId }) => {
|
|
3524
|
-
var _a;
|
|
3525
3556
|
const { canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases } = userCapabilities;
|
|
3526
3557
|
const userCookie = cookies3.get(`${userId}-onboarded`);
|
|
3527
3558
|
const acceptedDevices = devicesByStatus[DEVICE_STATES.accepted].deviceIds;
|
|
3528
3559
|
const pendingDevices = devicesByStatus[DEVICE_STATES.pending].deviceIds;
|
|
3529
|
-
let deviceType =
|
|
3560
|
+
let deviceType = onboardingState.deviceType ?? [];
|
|
3530
3561
|
deviceType = !deviceType.length && acceptedDevices.length && devicesById[acceptedDevices[0]].hasOwnProperty("attributes") ? devicesById[acceptedDevices[0]].attributes.device_type : deviceType;
|
|
3531
3562
|
const progress2 = applyOnboardingFallbacks(onboardingState.progress || determineProgress(acceptedDevices, pendingDevices, releases, pastDeployments));
|
|
3532
|
-
return
|
|
3563
|
+
return {
|
|
3564
|
+
...onboardingState,
|
|
3533
3565
|
complete: !!(Boolean(userCookie) || onboardingState.complete || acceptedDevices.length > 1 && pendingDevices.length > 0 && releases.length > 1 && pastDeployments.length > 1 || acceptedDevices.length >= 1 && releases.length >= 2 && pastDeployments.length > 2 || acceptedDevices.length >= 1 && pendingDevices.length > 0 && releases.length >= 2 && pastDeployments.length >= 2 || orderedOnboardingSteps.findIndex((step) => step === progress2) >= orderedOnboardingSteps.length - 1 || onboardingState.disable || ![canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases].every((i) => i)),
|
|
3534
3566
|
showTips: onboardingState.showTips != null ? onboardingState.showTips : true,
|
|
3535
3567
|
deviceType,
|
|
3536
3568
|
approach: onboardingState.approach || (deviceType.some((type) => type.startsWith("qemu")) ? "virtual" : "physical"),
|
|
3537
3569
|
progress: progress2
|
|
3538
|
-
}
|
|
3570
|
+
};
|
|
3539
3571
|
};
|
|
3540
3572
|
var getOnboardingState2 = (0, import_toolkit20.createAsyncThunk)(`${sliceName5}/getOnboardingState`, (_, { dispatch, getState }) => {
|
|
3541
3573
|
const state = getState();
|
|
@@ -3593,7 +3625,7 @@ var advanceOnboarding = (0, import_toolkit20.createAsyncThunk)(`${sliceName5}/ad
|
|
|
3593
3625
|
return;
|
|
3594
3626
|
}
|
|
3595
3627
|
const madeProgress = steps[stepIndex + 1];
|
|
3596
|
-
const state =
|
|
3628
|
+
const state = { ...getOnboardingState(getState()), progress: madeProgress };
|
|
3597
3629
|
state.complete = stepIndex + 1 >= steps.findIndex((step) => step === onboardingSteps.DEPLOYMENTS_PAST_COMPLETED_FAILURE) ? true : state.complete;
|
|
3598
3630
|
return Promise.all([dispatch(actions5.setOnboardingProgress(madeProgress)), dispatch(saveUserSettings({ onboarding: state }))]);
|
|
3599
3631
|
});
|
|
@@ -3676,8 +3708,8 @@ var completeUpgrade = (0, import_toolkit21.createAsyncThunk)(
|
|
|
3676
3708
|
({ tenantId, plan }, { dispatch }) => general_api_default.post(`${tenantadmApiUrlv2}/tenants/${tenantId}/upgrade/complete`, { plan }).catch((err) => commonErrorHandler(err, `There was an error upgrading your account:`, dispatch)).then(() => Promise.resolve(dispatch(getUserOrganization())))
|
|
3677
3709
|
);
|
|
3678
3710
|
var prepareAuditlogQuery = ({ startDate, endDate, user: userFilter, type, detail: detailFilter, sort = {} }) => {
|
|
3679
|
-
const userId =
|
|
3680
|
-
const detail =
|
|
3711
|
+
const userId = userFilter?.id || userFilter;
|
|
3712
|
+
const detail = detailFilter?.id || detailFilter;
|
|
3681
3713
|
const createdAfter = startDate ? `&created_after=${Math.round(Date.parse(startDate) / 1e3)}` : "";
|
|
3682
3714
|
const createdBefore = endDate ? `&created_before=${Math.round(Date.parse(endDate) / 1e3)}` : "";
|
|
3683
3715
|
const typeSearch = type ? `&object_type=${type.value}`.toLowerCase() : "";
|
|
@@ -3704,12 +3736,14 @@ var getAuditLogsCsvLink = (0, import_toolkit21.createAsyncThunk)(
|
|
|
3704
3736
|
);
|
|
3705
3737
|
var setAuditlogsState = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/setAuditlogsState`, (selectionState, { dispatch, getState }) => {
|
|
3706
3738
|
const currentState = getAuditlogState(getState());
|
|
3707
|
-
let nextState =
|
|
3708
|
-
|
|
3709
|
-
|
|
3739
|
+
let nextState = {
|
|
3740
|
+
...currentState,
|
|
3741
|
+
...selectionState,
|
|
3742
|
+
sort: { ...currentState.sort, ...selectionState.sort }
|
|
3743
|
+
};
|
|
3710
3744
|
let tasks = [];
|
|
3711
|
-
const
|
|
3712
|
-
const
|
|
3745
|
+
const { isLoading: currentLoading, selectedIssue: currentIssue, ...currentRequestState } = currentState;
|
|
3746
|
+
const { isLoading: selectionLoading, selectedIssue: selectionIssue, ...selectionRequestState } = nextState;
|
|
3713
3747
|
if (!(0, import_helpers9.deepCompare)(currentRequestState, selectionRequestState)) {
|
|
3714
3748
|
nextState.isLoading = true;
|
|
3715
3749
|
tasks.push(dispatch(getAuditLogs(nextState)).finally(() => dispatch(actions6.setAuditLogState({ isLoading: false }))));
|
|
@@ -3721,27 +3755,30 @@ var tenantDataDivergedMessage = "The system detected there is a change in your p
|
|
|
3721
3755
|
var addTenant = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/createTenant`, (selectionState, { dispatch }) => {
|
|
3722
3756
|
return general_api_default.post(`${tenantadmApiUrlv2}/tenants`, selectionState).then(() => Promise.all([dispatch(getTenants()), dispatch(setSnackbar3("Tenant was created successfully."))])).catch((err) => commonErrorHandler(err, "There was an error creating tenant", dispatch, commonErrorFallback));
|
|
3723
3757
|
});
|
|
3724
|
-
var tenantListRetrieval = (config) =>
|
|
3758
|
+
var tenantListRetrieval = async (config) => {
|
|
3725
3759
|
const { page, perPage } = config;
|
|
3726
3760
|
const params = new URLSearchParams({ page, per_page: perPage }).toString();
|
|
3727
|
-
const tenantList =
|
|
3761
|
+
const tenantList = await general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
|
|
3728
3762
|
const totalCount = tenantList.headers[headerNames.total] || TENANT_LIST_DEFAULT.perPage;
|
|
3729
3763
|
return [tenantList.data, Number(totalCount)];
|
|
3730
|
-
}
|
|
3731
|
-
var getTenants = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/getTenants`,
|
|
3764
|
+
};
|
|
3765
|
+
var getTenants = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/getTenants`, async (_, { dispatch, getState }) => {
|
|
3732
3766
|
const currentState = getTenantsList(getState());
|
|
3733
|
-
const [tenants, pageCount] =
|
|
3734
|
-
dispatch(actions6.setTenantListState(
|
|
3735
|
-
})
|
|
3736
|
-
var setTenantsListState = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/setTenantsListState`,
|
|
3767
|
+
const [tenants, pageCount] = await tenantListRetrieval(currentState);
|
|
3768
|
+
dispatch(actions6.setTenantListState({ ...currentState, total: pageCount, tenants }));
|
|
3769
|
+
});
|
|
3770
|
+
var setTenantsListState = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/setTenantsListState`, async (selectionState, { dispatch, getState }) => {
|
|
3737
3771
|
const currentState = getTenantsList(getState());
|
|
3738
|
-
const nextState =
|
|
3772
|
+
const nextState = {
|
|
3773
|
+
...currentState,
|
|
3774
|
+
...selectionState
|
|
3775
|
+
};
|
|
3739
3776
|
if (!(0, import_helpers9.deepCompare)(currentState, selectionState)) {
|
|
3740
|
-
const [tenants, pageCount] =
|
|
3741
|
-
return dispatch(actions6.setTenantListState(
|
|
3777
|
+
const [tenants, pageCount] = await tenantListRetrieval(nextState);
|
|
3778
|
+
return dispatch(actions6.setTenantListState({ ...nextState, tenants, total: pageCount }));
|
|
3742
3779
|
}
|
|
3743
|
-
return dispatch(actions6.setTenantListState(
|
|
3744
|
-
})
|
|
3780
|
+
return dispatch(actions6.setTenantListState({ ...nextState }));
|
|
3781
|
+
});
|
|
3745
3782
|
var editTenantDeviceLimit = (0, import_toolkit21.createAsyncThunk)(`${sliceName6}/editDeviceLimit`, ({ newLimit, id, name }, { dispatch }) => {
|
|
3746
3783
|
return general_api_default.put(`${tenantadmApiUrlv2}/tenants/${id}/child`, { device_limit: newLimit, name }).catch((err) => commonErrorHandler(err, `Device Limit cannot be changed`, dispatch)).then(() => {
|
|
3747
3784
|
const tasks = [Promise.resolve(dispatch(setSnackbar3("Device Limit was changed successfully")))];
|
|
@@ -3784,10 +3821,7 @@ var downloadLicenseReport = (0, import_toolkit21.createAsyncThunk)(
|
|
|
3784
3821
|
);
|
|
3785
3822
|
var createIntegration = (0, import_toolkit21.createAsyncThunk)(
|
|
3786
3823
|
`${sliceName6}/createIntegration`,
|
|
3787
|
-
(
|
|
3788
|
-
var _b2 = _a, { id } = _b2, integration = __objRest(_b2, ["id"]);
|
|
3789
|
-
return general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar3("The integration was set up successfully")), dispatch(getIntegrations())]));
|
|
3790
|
-
}
|
|
3824
|
+
({ id, ...integration }, { dispatch }) => general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar3("The integration was set up successfully")), dispatch(getIntegrations())]))
|
|
3791
3825
|
);
|
|
3792
3826
|
var changeIntegration = (0, import_toolkit21.createAsyncThunk)(
|
|
3793
3827
|
`${sliceName6}/changeIntegration`,
|
|
@@ -3808,9 +3842,8 @@ var getIntegrations = (0, import_toolkit21.createAsyncThunk)(
|
|
|
3808
3842
|
(_, { dispatch, getState }) => general_api_default.get(`${iotManagerBaseURL}/integrations`).catch((err) => commonErrorHandler(err, "There was an error retrieving the integration", dispatch, commonErrorFallback)).then(({ data }) => {
|
|
3809
3843
|
const existingIntegrations = getState().organization.externalDeviceIntegrations;
|
|
3810
3844
|
const integrations = data.reduce((accu, item) => {
|
|
3811
|
-
|
|
3812
|
-
const
|
|
3813
|
-
const integration = __spreadValues(__spreadValues({}, existingIntegration), item);
|
|
3845
|
+
const existingIntegration = existingIntegrations.find((integration2) => item.id === integration2.id) ?? {};
|
|
3846
|
+
const integration = { ...existingIntegration, ...item };
|
|
3814
3847
|
accu.push(integration);
|
|
3815
3848
|
return accu;
|
|
3816
3849
|
}, []);
|
|
@@ -3862,7 +3895,7 @@ var getSsoConfigById = (0, import_toolkit21.createAsyncThunk)(
|
|
|
3862
3895
|
`${sliceName6}/getSsoConfigById`,
|
|
3863
3896
|
(config, { dispatch }) => general_api_default.get(`${ssoIdpApiUrlv1}/${config.id}`).catch((err) => dispatch(ssoConfigActionErrorHandler(err, "read"))).then(({ data, headers }) => {
|
|
3864
3897
|
const sso = Object.values(SSO_TYPES).find(({ contentType }) => contentType === headers["content-type"]);
|
|
3865
|
-
return sso ? Promise.resolve(
|
|
3898
|
+
return sso ? Promise.resolve({ ...config, config: data, type: sso.id }) : Promise.reject("Unsupported SSO config content type.");
|
|
3866
3899
|
})
|
|
3867
3900
|
);
|
|
3868
3901
|
var getSsoConfigs = (0, import_toolkit21.createAsyncThunk)(
|
|
@@ -3878,19 +3911,20 @@ var import_locationutils = require("@northern.tech/utils/locationutils");
|
|
|
3878
3911
|
var import_toolkit22 = require("@reduxjs/toolkit");
|
|
3879
3912
|
var import_axios2 = require("axios");
|
|
3880
3913
|
|
|
3881
|
-
// ../../node_modules/uuid/dist/esm-
|
|
3882
|
-
var
|
|
3883
|
-
var
|
|
3884
|
-
var poolPtr = rnds8Pool.length;
|
|
3914
|
+
// ../../node_modules/uuid/dist/esm-browser/rng.js
|
|
3915
|
+
var getRandomValues;
|
|
3916
|
+
var rnds8 = new Uint8Array(16);
|
|
3885
3917
|
function rng() {
|
|
3886
|
-
if (
|
|
3887
|
-
|
|
3888
|
-
|
|
3918
|
+
if (!getRandomValues) {
|
|
3919
|
+
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
3920
|
+
if (!getRandomValues) {
|
|
3921
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3922
|
+
}
|
|
3889
3923
|
}
|
|
3890
|
-
return
|
|
3924
|
+
return getRandomValues(rnds8);
|
|
3891
3925
|
}
|
|
3892
3926
|
|
|
3893
|
-
// ../../node_modules/uuid/dist/esm-
|
|
3927
|
+
// ../../node_modules/uuid/dist/esm-browser/stringify.js
|
|
3894
3928
|
var byteToHex = [];
|
|
3895
3929
|
for (let i = 0; i < 256; ++i) {
|
|
3896
3930
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
@@ -3899,13 +3933,13 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
3899
3933
|
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
3900
3934
|
}
|
|
3901
3935
|
|
|
3902
|
-
// ../../node_modules/uuid/dist/esm-
|
|
3903
|
-
var
|
|
3936
|
+
// ../../node_modules/uuid/dist/esm-browser/native.js
|
|
3937
|
+
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3904
3938
|
var native_default = {
|
|
3905
|
-
randomUUID
|
|
3939
|
+
randomUUID
|
|
3906
3940
|
};
|
|
3907
3941
|
|
|
3908
|
-
// ../../node_modules/uuid/dist/esm-
|
|
3942
|
+
// ../../node_modules/uuid/dist/esm-browser/v4.js
|
|
3909
3943
|
function v4(options, buf, offset) {
|
|
3910
3944
|
if (native_default.randomUUID && !buf && !options) {
|
|
3911
3945
|
return native_default.randomUUID();
|
|
@@ -3930,20 +3964,21 @@ var { setSnackbar: setSnackbar4, initUpload, uploadProgress: uploadProgress2, cl
|
|
|
3930
3964
|
var { page: defaultPage4, perPage: defaultPerPage4 } = DEVICE_LIST_DEFAULTS;
|
|
3931
3965
|
var sortingDefaults = { direction: SORTING_OPTIONS.desc, key: "modified" };
|
|
3932
3966
|
var flattenRelease = (release, stateRelease) => {
|
|
3933
|
-
|
|
3934
|
-
const updatedArtifacts = ((_a = release.artifacts) == null ? void 0 : _a.sort((0, import_helpers10.customSort)(1, "modified"))) || [];
|
|
3967
|
+
const updatedArtifacts = release.artifacts?.sort((0, import_helpers10.customSort)(1, "modified")) || [];
|
|
3935
3968
|
const { artifacts, deviceTypes, modified } = updatedArtifacts.reduce(
|
|
3936
3969
|
(accu, item) => {
|
|
3937
|
-
var _a2;
|
|
3938
3970
|
accu.deviceTypes.push(...item.device_types_compatible);
|
|
3939
|
-
const stateArtifact =
|
|
3971
|
+
const stateArtifact = stateRelease.artifacts?.find((releaseArtifact) => releaseArtifact.id === item.id) || {};
|
|
3940
3972
|
accu.modified = accu.modified ? accu.modified : item.modified;
|
|
3941
|
-
accu.artifacts.push(
|
|
3973
|
+
accu.artifacts.push({
|
|
3974
|
+
...stateArtifact,
|
|
3975
|
+
...item
|
|
3976
|
+
});
|
|
3942
3977
|
return accu;
|
|
3943
3978
|
},
|
|
3944
3979
|
{ artifacts: [], deviceTypes: [], modified: void 0 }
|
|
3945
3980
|
);
|
|
3946
|
-
return
|
|
3981
|
+
return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(import_helpers10.duplicateFilter), modified };
|
|
3947
3982
|
};
|
|
3948
3983
|
var reduceReceivedReleases = (releases, stateReleasesById) => releases.reduce((accu, release) => {
|
|
3949
3984
|
const stateRelease = stateReleasesById[release.name] || {};
|
|
@@ -3961,17 +3996,16 @@ var findArtifactIndexInRelease = (releases, id) => Object.values(releases).reduc
|
|
|
3961
3996
|
{ release: null, index: -1 }
|
|
3962
3997
|
);
|
|
3963
3998
|
var getArtifactInstallCount = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/getArtifactInstallCount`, (id, { dispatch, getState }) => {
|
|
3964
|
-
var _a;
|
|
3965
3999
|
let { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);
|
|
3966
4000
|
if (!release || index === -1) {
|
|
3967
4001
|
return;
|
|
3968
4002
|
}
|
|
3969
4003
|
const releaseArtifacts = [...release.artifacts];
|
|
3970
4004
|
const artifact = releaseArtifacts[index];
|
|
3971
|
-
const { key, name, version } = (
|
|
4005
|
+
const { key, name, version } = (0, import_helpers10.extractSoftwareItem)(artifact.artifact_provides) ?? {};
|
|
3972
4006
|
const attribute = `${key}${name ? `.${name}` : ""}.version`;
|
|
3973
4007
|
const { filterTerms } = convertDeviceListStateToFilters({
|
|
3974
|
-
filters: [
|
|
4008
|
+
filters: [{ ...emptyFilter, key: attribute, value: version, scope: "inventory" }]
|
|
3975
4009
|
});
|
|
3976
4010
|
return general_api_default.post(getSearchEndpoint(getState()), {
|
|
3977
4011
|
page: 1,
|
|
@@ -3985,10 +4019,11 @@ var getArtifactInstallCount = (0, import_toolkit22.createAsyncThunk)(`${sliceNam
|
|
|
3985
4019
|
}
|
|
3986
4020
|
const installCount = Number(headers[headerNames.total]);
|
|
3987
4021
|
const releaseArtifacts2 = [...release2.artifacts];
|
|
3988
|
-
releaseArtifacts2[index2] =
|
|
3989
|
-
release2 =
|
|
4022
|
+
releaseArtifacts2[index2] = { ...releaseArtifacts2[index2], installCount };
|
|
4023
|
+
release2 = {
|
|
4024
|
+
...release2,
|
|
3990
4025
|
artifacts: releaseArtifacts2
|
|
3991
|
-
}
|
|
4026
|
+
};
|
|
3992
4027
|
return dispatch(actions7.receiveRelease(release2));
|
|
3993
4028
|
});
|
|
3994
4029
|
});
|
|
@@ -4000,12 +4035,14 @@ var getArtifactUrl = (0, import_toolkit22.createAsyncThunk)(
|
|
|
4000
4035
|
return dispatch(getReleases());
|
|
4001
4036
|
}
|
|
4002
4037
|
const releaseArtifacts = [...release.artifacts];
|
|
4003
|
-
releaseArtifacts[index] =
|
|
4038
|
+
releaseArtifacts[index] = {
|
|
4039
|
+
...releaseArtifacts[index],
|
|
4004
4040
|
url: response.data.uri
|
|
4005
|
-
}
|
|
4006
|
-
release =
|
|
4041
|
+
};
|
|
4042
|
+
release = {
|
|
4043
|
+
...release,
|
|
4007
4044
|
artifacts: releaseArtifacts
|
|
4008
|
-
}
|
|
4045
|
+
};
|
|
4009
4046
|
return dispatch(actions7.receiveRelease(release));
|
|
4010
4047
|
})
|
|
4011
4048
|
);
|
|
@@ -4130,12 +4167,14 @@ var selectRelease = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/select
|
|
|
4130
4167
|
});
|
|
4131
4168
|
var setReleasesListState = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/setReleasesListState`, (selectionState, { dispatch, getState }) => {
|
|
4132
4169
|
const currentState = getState().releases.releasesList;
|
|
4133
|
-
let nextState =
|
|
4134
|
-
|
|
4135
|
-
|
|
4170
|
+
let nextState = {
|
|
4171
|
+
...currentState,
|
|
4172
|
+
...selectionState,
|
|
4173
|
+
sort: { ...currentState.sort, ...selectionState.sort }
|
|
4174
|
+
};
|
|
4136
4175
|
let tasks = [];
|
|
4137
|
-
const
|
|
4138
|
-
const
|
|
4176
|
+
const { isLoading: currentLoading, ...currentRequestState } = currentState;
|
|
4177
|
+
const { isLoading: selectionLoading, ...selectionRequestState } = nextState;
|
|
4139
4178
|
if (!(0, import_helpers10.deepCompare)(currentRequestState, selectionRequestState)) {
|
|
4140
4179
|
nextState.isLoading = true;
|
|
4141
4180
|
tasks.push(dispatch(getReleases(nextState)).finally(() => dispatch(setReleasesListState({ isLoading: false }))));
|
|
@@ -4154,29 +4193,30 @@ var releaseListRetrieval = (config) => {
|
|
|
4154
4193
|
);
|
|
4155
4194
|
};
|
|
4156
4195
|
var deductSearchState = (receivedReleases, config, total, state) => {
|
|
4157
|
-
let releaseListState =
|
|
4196
|
+
let releaseListState = { ...state.releasesList };
|
|
4158
4197
|
const { searchTerm, searchOnly, sort = {}, selectedTags = [], type } = config;
|
|
4159
4198
|
const flattenedReleases = Object.values(receivedReleases).sort((0, import_helpers10.customSort)(sort.direction === SORTING_OPTIONS.desc, sort.key));
|
|
4160
4199
|
const releaseIds = flattenedReleases.map((item) => item.name);
|
|
4161
4200
|
const isFiltering = !!(selectedTags.length || type || searchTerm);
|
|
4162
4201
|
if (searchOnly) {
|
|
4163
|
-
releaseListState =
|
|
4202
|
+
releaseListState = { ...releaseListState, searchedIds: releaseIds };
|
|
4164
4203
|
} else {
|
|
4165
|
-
releaseListState =
|
|
4204
|
+
releaseListState = {
|
|
4205
|
+
...releaseListState,
|
|
4166
4206
|
releaseIds,
|
|
4167
4207
|
searchTotal: isFiltering ? total : state.releasesList.searchTotal,
|
|
4168
4208
|
total: !isFiltering ? total : state.releasesList.total
|
|
4169
|
-
}
|
|
4209
|
+
};
|
|
4170
4210
|
}
|
|
4171
4211
|
return releaseListState;
|
|
4172
4212
|
};
|
|
4173
4213
|
var getReleases = (0, import_toolkit22.createAsyncThunk)(`${sliceName7}/getReleases`, (passedConfig = {}, { dispatch, getState }) => {
|
|
4174
|
-
const config =
|
|
4214
|
+
const config = { ...getState().releases.releasesList, ...passedConfig };
|
|
4175
4215
|
return releaseListRetrieval(config).then(({ data: receivedReleases = [], headers = {} }) => {
|
|
4176
4216
|
const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;
|
|
4177
4217
|
const state = getState().releases;
|
|
4178
4218
|
const flatReleases = reduceReceivedReleases(receivedReleases, state.byId);
|
|
4179
|
-
const combinedReleases =
|
|
4219
|
+
const combinedReleases = { ...state.byId, ...flatReleases };
|
|
4180
4220
|
let tasks = [dispatch(actions7.receiveReleases(combinedReleases))];
|
|
4181
4221
|
const releaseListState = deductSearchState(receivedReleases, config, total, state);
|
|
4182
4222
|
tasks.push(dispatch(actions7.setReleaseListState(releaseListState)));
|
|
@@ -4197,7 +4237,7 @@ var updateReleaseInfo = (0, import_toolkit22.createAsyncThunk)(
|
|
|
4197
4237
|
`${sliceName7}/updateReleaseInfo`,
|
|
4198
4238
|
({ name, info }, { dispatch, getState }) => general_api_default.patch(`${deploymentsApiUrlV2}/deployments/releases/${name}`, info).catch((err) => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch)).then(() => {
|
|
4199
4239
|
return Promise.all([
|
|
4200
|
-
dispatch(actions7.receiveRelease(
|
|
4240
|
+
dispatch(actions7.receiveRelease({ ...getReleasesById(getState())[name], ...info, name })),
|
|
4201
4241
|
dispatch(setSnackbar4("Release details were updated successfully.", TIMEOUTS.fiveSeconds, ""))
|
|
4202
4242
|
]);
|
|
4203
4243
|
})
|
|
@@ -4206,7 +4246,7 @@ var setReleaseTags = (0, import_toolkit22.createAsyncThunk)(
|
|
|
4206
4246
|
`${sliceName7}/setReleaseTags`,
|
|
4207
4247
|
({ name, tags = [] }, { dispatch, getState }) => general_api_default.put(`${deploymentsApiUrlV2}/deployments/releases/${name}/tags`, tags).catch((err) => commonErrorHandler(err, `Release tags couldn't be set.`, dispatch)).then(() => {
|
|
4208
4248
|
return Promise.all([
|
|
4209
|
-
dispatch(actions7.receiveRelease(
|
|
4249
|
+
dispatch(actions7.receiveRelease({ ...getReleasesById(getState())[name], name, tags })),
|
|
4210
4250
|
dispatch(setSnackbar4("Release tags were set successfully.", TIMEOUTS.fiveSeconds, ""))
|
|
4211
4251
|
]);
|
|
4212
4252
|
})
|
|
@@ -4223,19 +4263,13 @@ var getUpdateTypes = (0, import_toolkit22.createAsyncThunk)(
|
|
|
4223
4263
|
// src/api/users-api.ts
|
|
4224
4264
|
var import_axios3 = __toESM(require("axios"));
|
|
4225
4265
|
var Api2 = {
|
|
4226
|
-
postLogin: (url,
|
|
4227
|
-
var _b2 = _a, { email: username, password } = _b2, body = __objRest(_b2, ["email", "password"]);
|
|
4228
|
-
return import_axios3.default.post(url, body, __spreadProps(__spreadValues({}, commonRequestConfig), { auth: { username, password } })).then((res) => {
|
|
4229
|
-
var _a2;
|
|
4230
|
-
return { text: res.data, code: res.status, contentType: (_a2 = res.headers) == null ? void 0 : _a2["content-type"] };
|
|
4231
|
-
});
|
|
4232
|
-
},
|
|
4266
|
+
postLogin: (url, { email: username, password, ...body }) => import_axios3.default.post(url, body, { ...commonRequestConfig, auth: { username, password } }).then((res) => ({ text: res.data, code: res.status, contentType: res.headers?.["content-type"] })),
|
|
4233
4267
|
putVerifyTFA: (url, userData) => {
|
|
4234
4268
|
let body = {};
|
|
4235
4269
|
if (userData.hasOwnProperty("token2fa")) {
|
|
4236
4270
|
body = { token2fa: userData.token2fa };
|
|
4237
4271
|
}
|
|
4238
|
-
return import_axios3.default.put(url, body,
|
|
4272
|
+
return import_axios3.default.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });
|
|
4239
4273
|
}
|
|
4240
4274
|
};
|
|
4241
4275
|
var users_api_default = Api2;
|
|
@@ -4263,43 +4297,40 @@ var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) =>
|
|
|
4263
4297
|
};
|
|
4264
4298
|
var loginUser = (0, import_toolkit23.createAsyncThunk)(
|
|
4265
4299
|
`${sliceName8}/loginUser`,
|
|
4266
|
-
(
|
|
4267
|
-
|
|
4268
|
-
return
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
Promise.
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
window.
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
);
|
|
4301
|
-
});
|
|
4302
|
-
}
|
|
4300
|
+
({ stayLoggedIn, ...userData }, { dispatch, rejectWithValue }) => users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, { ...userData, no_expiry: stayLoggedIn }).catch((err) => {
|
|
4301
|
+
cleanUp();
|
|
4302
|
+
return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
|
|
4303
|
+
}).then(({ text: response, contentType }) => {
|
|
4304
|
+
if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
|
|
4305
|
+
const { id, kind } = response;
|
|
4306
|
+
const type = kind.split("/")[1];
|
|
4307
|
+
const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
|
|
4308
|
+
window.location.replace(ssoLoginUrl);
|
|
4309
|
+
return;
|
|
4310
|
+
}
|
|
4311
|
+
const token = response;
|
|
4312
|
+
if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
|
|
4313
|
+
return;
|
|
4314
|
+
}
|
|
4315
|
+
let now = /* @__PURE__ */ new Date();
|
|
4316
|
+
now.setSeconds(now.getSeconds() + maxSessionAge);
|
|
4317
|
+
const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
|
|
4318
|
+
setSessionInfo({ token, expiresAt });
|
|
4319
|
+
cookies5.remove("JWT", { path: "/" });
|
|
4320
|
+
return (
|
|
4321
|
+
// @ts-ignore
|
|
4322
|
+
Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
|
|
4323
|
+
cleanUp();
|
|
4324
|
+
return Promise.reject(dispatch(setSnackbar5(extractErrorMessage(e))));
|
|
4325
|
+
}).then(() => {
|
|
4326
|
+
window.sessionStorage.removeItem("pendings-redirect");
|
|
4327
|
+
if (window.location.pathname !== "/ui/") {
|
|
4328
|
+
window.location.replace("/ui/");
|
|
4329
|
+
}
|
|
4330
|
+
return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
|
|
4331
|
+
})
|
|
4332
|
+
);
|
|
4333
|
+
})
|
|
4303
4334
|
);
|
|
4304
4335
|
var logoutUser = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/logoutUser`, (_, { dispatch, getState }) => {
|
|
4305
4336
|
if (Object.keys(getState().app.uploadsById).length) {
|
|
@@ -4316,7 +4347,7 @@ var switchUserOrganization = (0, import_toolkit23.createAsyncThunk)(`${sliceName
|
|
|
4316
4347
|
return Promise.reject();
|
|
4317
4348
|
}
|
|
4318
4349
|
return general_api_default.get(`${useradmApiUrlv1}/users/tenants/${tenantId}/token`).then(({ data: token }) => {
|
|
4319
|
-
setSessionInfo(
|
|
4350
|
+
setSessionInfo({ ...getSessionInfo(), token });
|
|
4320
4351
|
window.location.reload();
|
|
4321
4352
|
});
|
|
4322
4353
|
});
|
|
@@ -4379,13 +4410,13 @@ var getUser = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4379
4410
|
);
|
|
4380
4411
|
var initializeSelf = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/initializeSelf`, (_, { dispatch }) => dispatch(getUser(OWN_USER_ID)));
|
|
4381
4412
|
var updateUserColumnSettings = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/updateUserColumnSettings`, ({ columns, currentUserId }, { dispatch, getState }) => {
|
|
4382
|
-
const userId = currentUserId
|
|
4413
|
+
const userId = currentUserId ?? getCurrentUser(getState()).id;
|
|
4383
4414
|
const storageKey = `${userId}-column-widths`;
|
|
4384
4415
|
let customColumns = [];
|
|
4385
4416
|
if (!columns) {
|
|
4386
4417
|
try {
|
|
4387
4418
|
customColumns = JSON.parse(window.localStorage.getItem(storageKey)) || customColumns;
|
|
4388
|
-
} catch
|
|
4419
|
+
} catch {
|
|
4389
4420
|
}
|
|
4390
4421
|
} else {
|
|
4391
4422
|
customColumns = columns;
|
|
@@ -4414,10 +4445,7 @@ var userActions = {
|
|
|
4414
4445
|
var userActionErrorHandler = (err, type, dispatch) => commonErrorHandler(err, `There was an error ${userActions[type].errorMessage} the user.`, dispatch);
|
|
4415
4446
|
var createUser = (0, import_toolkit23.createAsyncThunk)(
|
|
4416
4447
|
`${sliceName8}/createUser`,
|
|
4417
|
-
(
|
|
4418
|
-
var _b2 = _a, { shouldResetPassword } = _b2, userData = __objRest(_b2, ["shouldResetPassword"]);
|
|
4419
|
-
return general_api_default.post(`${useradmApiUrlv1}/users`, __spreadProps(__spreadValues({}, userData), { send_reset_password: shouldResetPassword })).then(() => Promise.all([dispatch(actions8.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar5(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch));
|
|
4420
|
-
}
|
|
4448
|
+
({ shouldResetPassword, ...userData }, { dispatch }) => general_api_default.post(`${useradmApiUrlv1}/users`, { ...userData, send_reset_password: shouldResetPassword }).then(() => Promise.all([dispatch(actions8.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar5(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch))
|
|
4421
4449
|
);
|
|
4422
4450
|
var removeUser = (0, import_toolkit23.createAsyncThunk)(
|
|
4423
4451
|
`${sliceName8}/removeUser`,
|
|
@@ -4428,15 +4456,12 @@ var removeUser = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4428
4456
|
);
|
|
4429
4457
|
var editUser = (0, import_toolkit23.createAsyncThunk)(
|
|
4430
4458
|
`${sliceName8}/editUser`,
|
|
4431
|
-
(
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
()
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
])
|
|
4438
|
-
);
|
|
4439
|
-
}
|
|
4459
|
+
({ id, ...userData }, { dispatch, getState }) => general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
|
|
4460
|
+
() => Promise.all([
|
|
4461
|
+
dispatch(actions8.updatedUser({ ...userData, id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id })),
|
|
4462
|
+
dispatch(setSnackbar5(userActions.edit.successMessage))
|
|
4463
|
+
])
|
|
4464
|
+
)
|
|
4440
4465
|
);
|
|
4441
4466
|
var addUserToCurrentTenant = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/addUserToTenant`, (userId, { dispatch, getState }) => {
|
|
4442
4467
|
const { id } = getOrganization(getState());
|
|
@@ -4471,7 +4496,7 @@ var mapHttpPermission = (permission) => Object.entries(uiPermissionsByArea).redu
|
|
|
4471
4496
|
}
|
|
4472
4497
|
return accu;
|
|
4473
4498
|
},
|
|
4474
|
-
|
|
4499
|
+
{ ...emptyUiPermissions }
|
|
4475
4500
|
);
|
|
4476
4501
|
var permissionActionTypes = {
|
|
4477
4502
|
any: mapHttpPermission,
|
|
@@ -4494,20 +4519,21 @@ var combinePermissions = (existingPermissions, additionalPermissions = {}) => Ob
|
|
|
4494
4519
|
}, existingPermissions);
|
|
4495
4520
|
var tryParseCustomPermission = (permission) => {
|
|
4496
4521
|
const uiPermissions = permissionActionTypes[permission.action](permission.object);
|
|
4497
|
-
const result = mergePermissions(
|
|
4522
|
+
const result = mergePermissions({ ...emptyUiPermissions }, uiPermissions);
|
|
4498
4523
|
return { isCustom: true, permission, result };
|
|
4499
4524
|
};
|
|
4500
4525
|
var customPermissionHandler = (accu, permission) => {
|
|
4501
4526
|
let processor = tryParseCustomPermission(permission);
|
|
4502
|
-
return
|
|
4527
|
+
return {
|
|
4528
|
+
...accu,
|
|
4503
4529
|
isCustom: accu.isCustom || processor.isCustom,
|
|
4504
4530
|
uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
|
|
4505
|
-
}
|
|
4531
|
+
};
|
|
4506
4532
|
};
|
|
4507
4533
|
var mapPermissionSet = (permissionSetName, names, scope, existingGroupsPermissions = {}) => {
|
|
4508
4534
|
const permission = Object.values(uiPermissionsById).find((permission2) => permission2.permissionSets[scope] === permissionSetName).value;
|
|
4509
4535
|
const scopedPermissions = names.reduce((accu, name) => combinePermissions(accu, { [name]: [permission] }), existingGroupsPermissions);
|
|
4510
|
-
return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) =>
|
|
4536
|
+
return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => ({ ...accu, [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
|
|
4511
4537
|
};
|
|
4512
4538
|
var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).reduce((accu, permissions) => {
|
|
4513
4539
|
if (Array.isArray(permissions)) {
|
|
@@ -4522,60 +4548,59 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
|
|
|
4522
4548
|
if (!processor) {
|
|
4523
4549
|
return accu;
|
|
4524
4550
|
}
|
|
4525
|
-
const scope = Object.keys(scopedPermissionAreas).find((scope2) =>
|
|
4526
|
-
var _a;
|
|
4527
|
-
return uiPermissionsByArea[scope2].scope === ((_a = permissionSet.scope) == null ? void 0 : _a.type);
|
|
4528
|
-
});
|
|
4551
|
+
const scope = Object.keys(scopedPermissionAreas).find((scope2) => uiPermissionsByArea[scope2].scope === permissionSet.scope?.type);
|
|
4529
4552
|
if (scope) {
|
|
4530
4553
|
const result = mapPermissionSet(permissionSet.name, permissionSet.scope.value, scope, accu.uiPermissions[scope]);
|
|
4531
|
-
return
|
|
4554
|
+
return { ...accu, uiPermissions: { ...accu.uiPermissions, [scope]: result } };
|
|
4532
4555
|
} else if (isEmptyPermissionSet(processor.result)) {
|
|
4533
4556
|
return processor.permissions.reduce(customPermissionHandler, accu);
|
|
4534
4557
|
}
|
|
4535
|
-
return
|
|
4558
|
+
return {
|
|
4559
|
+
...accu,
|
|
4536
4560
|
isCustom: accu.isCustom || processor.isCustom,
|
|
4537
4561
|
uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
|
|
4538
|
-
}
|
|
4562
|
+
};
|
|
4539
4563
|
},
|
|
4540
|
-
{ isCustom: false, uiPermissions:
|
|
4564
|
+
{ isCustom: false, uiPermissions: { ...emptyUiPermissions, groups: {}, releases: {} } }
|
|
4541
4565
|
);
|
|
4542
4566
|
return permissions.reduce(customPermissionHandler, preliminaryResult);
|
|
4543
4567
|
};
|
|
4544
4568
|
var normalizeRbacRoles = (roles, rolesById2, permissionSets) => roles.reduce(
|
|
4545
4569
|
(accu, role) => {
|
|
4546
|
-
var _a;
|
|
4547
4570
|
let normalizedPermissions;
|
|
4548
4571
|
let isCustom = false;
|
|
4549
4572
|
if (rolesById2[role.name]) {
|
|
4550
|
-
normalizedPermissions =
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4573
|
+
normalizedPermissions = {
|
|
4574
|
+
...rolesById2[role.name].uiPermissions,
|
|
4575
|
+
groups: { ...rolesById2[role.name].uiPermissions.groups },
|
|
4576
|
+
releases: { ...rolesById2[role.name].uiPermissions.releases }
|
|
4577
|
+
};
|
|
4554
4578
|
} else {
|
|
4555
4579
|
const result = parseRolePermissions(role, permissionSets);
|
|
4556
4580
|
normalizedPermissions = result.uiPermissions;
|
|
4557
4581
|
isCustom = result.isCustom;
|
|
4558
4582
|
}
|
|
4559
|
-
const roleState =
|
|
4560
|
-
accu[role.name] =
|
|
4583
|
+
const roleState = accu[role.name] ?? { ...emptyRole };
|
|
4584
|
+
accu[role.name] = {
|
|
4585
|
+
...roleState,
|
|
4586
|
+
...role,
|
|
4561
4587
|
description: roleState.description ? roleState.description : role.description,
|
|
4562
4588
|
editable: !rolesById[role.name] && !isCustom && (typeof roleState.editable !== "undefined" ? roleState.editable : true),
|
|
4563
4589
|
isCustom,
|
|
4564
4590
|
name: roleState.name ? roleState.name : role.name,
|
|
4565
4591
|
uiPermissions: normalizedPermissions
|
|
4566
|
-
}
|
|
4592
|
+
};
|
|
4567
4593
|
return accu;
|
|
4568
4594
|
},
|
|
4569
|
-
|
|
4595
|
+
{ ...rolesById2 }
|
|
4570
4596
|
);
|
|
4571
4597
|
var getPermissionSets = (0, import_toolkit23.createAsyncThunk)(
|
|
4572
4598
|
`${sliceName8}/getPermissionSets`,
|
|
4573
4599
|
(_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv2}/permission_sets?per_page=500`).then(({ data }) => {
|
|
4574
4600
|
const permissionSets = data.reduce(
|
|
4575
4601
|
(accu, permissionSet) => {
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
let permissionSetObject = __spreadValues(__spreadValues({}, permissionSetState), permissionSet);
|
|
4602
|
+
const permissionSetState = accu[permissionSet.name] ?? {};
|
|
4603
|
+
let permissionSetObject = { ...permissionSetState, ...permissionSet };
|
|
4579
4604
|
permissionSetObject.result = Object.values(uiPermissionsById).reduce(
|
|
4580
4605
|
(accu2, item) => Object.entries(item.permissionSets).reduce((collector, [area, permissionSet2]) => {
|
|
4581
4606
|
if (scopedPermissionAreas[area]) {
|
|
@@ -4586,11 +4611,10 @@ var getPermissionSets = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4586
4611
|
}
|
|
4587
4612
|
return collector;
|
|
4588
4613
|
}, accu2),
|
|
4589
|
-
|
|
4614
|
+
{ ...emptyUiPermissions, ...permissionSetObject.result ?? {} }
|
|
4590
4615
|
);
|
|
4591
4616
|
const scopes = Object.values(scopedPermissionAreas).reduce((accu2, { key, scopeType }) => {
|
|
4592
|
-
|
|
4593
|
-
if (((_a2 = permissionSetObject.supported_scope_types) == null ? void 0 : _a2.includes(key)) || ((_b3 = permissionSetObject.supported_scope_types) == null ? void 0 : _b3.includes(scopeType))) {
|
|
4617
|
+
if (permissionSetObject.supported_scope_types?.includes(key) || permissionSetObject.supported_scope_types?.includes(scopeType)) {
|
|
4594
4618
|
accu2.push(key);
|
|
4595
4619
|
}
|
|
4596
4620
|
return accu2;
|
|
@@ -4603,7 +4627,7 @@ var getPermissionSets = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4603
4627
|
return accu;
|
|
4604
4628
|
},
|
|
4605
4629
|
// @ts-ignore
|
|
4606
|
-
|
|
4630
|
+
{ ...getState().users.permissionSetsById }
|
|
4607
4631
|
);
|
|
4608
4632
|
return Promise.all([dispatch(actions8.receivedPermissionSets(permissionSets)), permissionSets]);
|
|
4609
4633
|
}).catch(() => console.log("Permission set retrieval failed - likely accessing a non-RBAC backend"))
|
|
@@ -4636,28 +4660,27 @@ var transformAreaRoleDataToScopedPermissionsSets = (area, areaPermissions, exces
|
|
|
4636
4660
|
const skipPermissions = scopedPermissionAreas.releases.key === area && item !== ALL_RELEASES ? [uiPermissionsById.upload.value] : [];
|
|
4637
4661
|
const impliedPermissions = deriveImpliedAreaPermissions(area, uiPermissions, skipPermissions);
|
|
4638
4662
|
accu = impliedPermissions.reduce((itemPermissionAccu, impliedPermission) => {
|
|
4639
|
-
|
|
4640
|
-
const permissionSetState = (_a = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]]) != null ? _a : {
|
|
4663
|
+
const permissionSetState = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] ?? {
|
|
4641
4664
|
type: uiPermissionsByArea[area].scope,
|
|
4642
4665
|
value: []
|
|
4643
4666
|
};
|
|
4644
|
-
itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] =
|
|
4667
|
+
itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = {
|
|
4668
|
+
...permissionSetState,
|
|
4645
4669
|
value: [...permissionSetState.value, item]
|
|
4646
|
-
}
|
|
4670
|
+
};
|
|
4647
4671
|
return itemPermissionAccu;
|
|
4648
4672
|
}, accu);
|
|
4649
4673
|
return accu;
|
|
4650
4674
|
}, {});
|
|
4651
|
-
return Object.entries(permissionSetObject).map((
|
|
4652
|
-
var [name, _b2] = _a, _c = _b2, { value } = _c, scope = __objRest(_c, ["value"]);
|
|
4675
|
+
return Object.entries(permissionSetObject).map(([name, { value, ...scope }]) => {
|
|
4653
4676
|
if (value.includes(excessiveAccessSelector)) {
|
|
4654
4677
|
return { name };
|
|
4655
4678
|
}
|
|
4656
|
-
return { name, scope:
|
|
4679
|
+
return { name, scope: { ...scope, value: value.filter(import_helpers11.duplicateFilter) } };
|
|
4657
4680
|
});
|
|
4658
4681
|
};
|
|
4659
4682
|
var transformRoleDataToRole = (roleData, roleState = {}) => {
|
|
4660
|
-
const role =
|
|
4683
|
+
const role = { ...roleState, ...roleData };
|
|
4661
4684
|
const { description = "", name, uiPermissions = emptyUiPermissions } = role;
|
|
4662
4685
|
const { maybeUiPermissions, remainderKeys } = Object.entries(emptyUiPermissions).reduce(
|
|
4663
4686
|
(accu, [key, emptyPermissions]) => {
|
|
@@ -4693,12 +4716,17 @@ var transformRoleDataToRole = (roleData, roleState = {}) => {
|
|
|
4693
4716
|
}, []);
|
|
4694
4717
|
return {
|
|
4695
4718
|
permissionSetsWithScope: [...permissionSetsWithScope, ...scopedPermissionSets],
|
|
4696
|
-
role:
|
|
4719
|
+
role: {
|
|
4720
|
+
...emptyRole,
|
|
4697
4721
|
name,
|
|
4698
4722
|
// @ts-ignore
|
|
4699
4723
|
description: description ? description : roleState.description,
|
|
4700
|
-
uiPermissions:
|
|
4701
|
-
|
|
4724
|
+
uiPermissions: {
|
|
4725
|
+
...emptyUiPermissions,
|
|
4726
|
+
...roleUiPermissions,
|
|
4727
|
+
...maybeUiPermissions
|
|
4728
|
+
}
|
|
4729
|
+
}
|
|
4702
4730
|
};
|
|
4703
4731
|
};
|
|
4704
4732
|
var roleActions = {
|
|
@@ -4749,13 +4777,12 @@ var getGlobalSettings2 = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4749
4777
|
var saveGlobalSettings = (0, import_toolkit23.createAsyncThunk)(
|
|
4750
4778
|
`${sliceName8}/saveGlobalSettings`,
|
|
4751
4779
|
// @ts-ignore
|
|
4752
|
-
(
|
|
4753
|
-
var _b2 = _a, { beOptimistic = false, notify = false } = _b2, settings = __objRest(_b2, ["beOptimistic", "notify"]);
|
|
4780
|
+
({ beOptimistic = false, notify = false, ...settings }, { dispatch, getState }) => {
|
|
4754
4781
|
if (!window.sessionStorage.getItem(settingsKeys.initialized) && !beOptimistic) {
|
|
4755
4782
|
return;
|
|
4756
4783
|
}
|
|
4757
4784
|
return dispatch(getGlobalSettings2()).unwrap().then((result) => {
|
|
4758
|
-
let updatedSettings =
|
|
4785
|
+
let updatedSettings = { ...getState().users.globalSettings, ...settings };
|
|
4759
4786
|
if (getCurrentUser(getState()).verified) {
|
|
4760
4787
|
updatedSettings["2fa"] = twoFAStates.enabled;
|
|
4761
4788
|
} else {
|
|
@@ -4793,10 +4820,17 @@ var saveUserSettings = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/sav
|
|
|
4793
4820
|
const userSettings = getUserSettings(getState());
|
|
4794
4821
|
const onboardingState = getOnboardingState(getState());
|
|
4795
4822
|
const tooltipState = getTooltipsState(getState());
|
|
4796
|
-
const updatedSettings =
|
|
4797
|
-
|
|
4823
|
+
const updatedSettings = {
|
|
4824
|
+
...userSettings,
|
|
4825
|
+
// @ts-ignore
|
|
4826
|
+
...settings,
|
|
4827
|
+
onboarding: {
|
|
4828
|
+
...onboardingState,
|
|
4829
|
+
// @ts-ignore
|
|
4830
|
+
...settings.onboarding
|
|
4831
|
+
},
|
|
4798
4832
|
tooltips: tooltipState
|
|
4799
|
-
}
|
|
4833
|
+
};
|
|
4800
4834
|
const headers = result[result.length - 1] ? { "If-Match": result[result.length - 1] } : {};
|
|
4801
4835
|
return Promise.all([
|
|
4802
4836
|
Promise.resolve(dispatch(actions8.setUserSettings(updatedSettings))),
|
|
@@ -4822,9 +4856,10 @@ var getTokens = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4822
4856
|
`${sliceName8}/getTokens`,
|
|
4823
4857
|
(_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv1}/settings/tokens`).then(({ data: tokens }) => {
|
|
4824
4858
|
const user = getCurrentUser(getState());
|
|
4825
|
-
const updatedUser =
|
|
4859
|
+
const updatedUser = {
|
|
4860
|
+
...user,
|
|
4826
4861
|
tokens
|
|
4827
|
-
}
|
|
4862
|
+
};
|
|
4828
4863
|
return Promise.resolve(dispatch(actions8.updatedUser(updatedUser)));
|
|
4829
4864
|
})
|
|
4830
4865
|
);
|
|
@@ -4840,8 +4875,7 @@ var revokeToken = (0, import_toolkit23.createAsyncThunk)(
|
|
|
4840
4875
|
general_api_default.delete(`${useradmApiUrlv1}/settings/tokens/${token.id}`).then(() => Promise.resolve(dispatch(getTokens())))
|
|
4841
4876
|
)
|
|
4842
4877
|
);
|
|
4843
|
-
var setTooltipReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, (
|
|
4844
|
-
var _b2 = _a, { persist } = _b2, remainder = __objRest(_b2, ["persist"]);
|
|
4878
|
+
var setTooltipReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, ({ persist, ...remainder }, { dispatch }) => {
|
|
4845
4879
|
let tasks = [dispatch(actions8.setTooltipState(remainder))];
|
|
4846
4880
|
if (persist) {
|
|
4847
4881
|
tasks.push(dispatch(saveUserSettings()));
|
|
@@ -4849,14 +4883,13 @@ var setTooltipReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/
|
|
|
4849
4883
|
return Promise.all(tasks);
|
|
4850
4884
|
});
|
|
4851
4885
|
var setAllTooltipsReadState = (0, import_toolkit23.createAsyncThunk)(`${sliceName8}/toggleHelptips`, ({ readState = READ_STATES.read, tooltips }, { dispatch }) => {
|
|
4852
|
-
const updatedTips = tooltips.reduce((accu, id) =>
|
|
4886
|
+
const updatedTips = tooltips.reduce((accu, id) => ({ ...accu, [id]: { readState } }), {});
|
|
4853
4887
|
return Promise.resolve(dispatch(actions8.setTooltipsState(updatedTips))).then(() => dispatch(saveUserSettings()));
|
|
4854
4888
|
});
|
|
4855
4889
|
var submitFeedback = (0, import_toolkit23.createAsyncThunk)(
|
|
4856
4890
|
`${sliceName8}/submitFeedback`,
|
|
4857
4891
|
// @ts-ignore
|
|
4858
|
-
(
|
|
4859
|
-
var _b2 = _a, { satisfaction, feedback } = _b2, meta = __objRest(_b2, ["satisfaction", "feedback"]);
|
|
4892
|
+
({ satisfaction, feedback, ...meta }, { dispatch }) => {
|
|
4860
4893
|
return general_api_default.post(`${tenantadmApiUrlv2}/contact/support`, {
|
|
4861
4894
|
subject: "feedback submission",
|
|
4862
4895
|
body: JSON.stringify({ feedback, satisfaction, meta })
|
|
@@ -4894,14 +4927,13 @@ var getGroups2 = (0, import_toolkit24.createAsyncThunk)(
|
|
|
4894
4927
|
(_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrl}/groups`).then((res) => {
|
|
4895
4928
|
const state = getGroupsById(getState());
|
|
4896
4929
|
const dynamicGroups = Object.entries(state).reduce((accu, [id, group]) => {
|
|
4897
|
-
|
|
4898
|
-
if (group.id || ((_a = group.filters) == null ? void 0 : _a.length) && id !== UNGROUPED_GROUP.id) {
|
|
4930
|
+
if (group.id || group.filters?.length && id !== UNGROUPED_GROUP.id) {
|
|
4899
4931
|
accu[id] = group;
|
|
4900
4932
|
}
|
|
4901
4933
|
return accu;
|
|
4902
4934
|
}, {});
|
|
4903
4935
|
const groups = res.data.reduce((accu, group) => {
|
|
4904
|
-
accu[group] =
|
|
4936
|
+
accu[group] = { deviceIds: [], filters: [], total: 0, ...state[group] };
|
|
4905
4937
|
return accu;
|
|
4906
4938
|
}, dynamicGroups);
|
|
4907
4939
|
const filters = [{ key: "group", value: res.data, operator: DEVICE_FILTERING_OPTIONS.$nin.key, scope: "system" }];
|
|
@@ -4959,7 +4991,7 @@ var addStaticGroup = (0, import_toolkit24.createAsyncThunk)(
|
|
|
4959
4991
|
() => Promise.resolve(
|
|
4960
4992
|
dispatch(
|
|
4961
4993
|
actions3.addGroup({
|
|
4962
|
-
group:
|
|
4994
|
+
group: { deviceIds: [], total: 0, filters: [], ...getState().devices.groups.byId[group] },
|
|
4963
4995
|
groupName: group
|
|
4964
4996
|
})
|
|
4965
4997
|
)
|
|
@@ -4987,20 +5019,19 @@ var getDynamicGroups = (0, import_toolkit24.createAsyncThunk)(
|
|
|
4987
5019
|
(_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
|
|
4988
5020
|
const state = getGroupsById(getState());
|
|
4989
5021
|
const staticGroups = Object.entries(state).reduce((accu, [id, group]) => {
|
|
4990
|
-
|
|
4991
|
-
if (!(group.id || ((_a = group.filters) == null ? void 0 : _a.length))) {
|
|
5022
|
+
if (!(group.id || group.filters?.length)) {
|
|
4992
5023
|
accu[id] = group;
|
|
4993
5024
|
}
|
|
4994
5025
|
return accu;
|
|
4995
5026
|
}, {});
|
|
4996
5027
|
const groups = (filters || []).reduce((accu, filter) => {
|
|
4997
|
-
accu[filter.name] =
|
|
5028
|
+
accu[filter.name] = {
|
|
4998
5029
|
deviceIds: [],
|
|
4999
|
-
total: 0
|
|
5000
|
-
|
|
5030
|
+
total: 0,
|
|
5031
|
+
...state[filter.name],
|
|
5001
5032
|
id: filter.id,
|
|
5002
5033
|
filters: mapTermsToFilters(filter.terms)
|
|
5003
|
-
}
|
|
5034
|
+
};
|
|
5004
5035
|
return accu;
|
|
5005
5036
|
}, staticGroups);
|
|
5006
5037
|
return Promise.resolve(dispatch(actions3.receivedGroups(groups)));
|
|
@@ -5040,10 +5071,9 @@ var removeDynamicGroup = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/r
|
|
|
5040
5071
|
);
|
|
5041
5072
|
});
|
|
5042
5073
|
var getGroupFilters = (group, groupsState, filters = []) => {
|
|
5043
|
-
var _a;
|
|
5044
5074
|
const groupName = group === UNGROUPED_GROUP.id || group === UNGROUPED_GROUP.name ? UNGROUPED_GROUP.id : group;
|
|
5045
5075
|
const selectedGroup = groupsState.byId[groupName];
|
|
5046
|
-
const groupFilterLength =
|
|
5076
|
+
const groupFilterLength = selectedGroup?.filters?.length || 0;
|
|
5047
5077
|
const cleanedFilters = groupFilterLength ? [...filters, ...selectedGroup.filters].filter(filtersFilter) : filters;
|
|
5048
5078
|
return { cleanedFilters, groupName, selectedGroup, groupFilterLength };
|
|
5049
5079
|
};
|
|
@@ -5066,7 +5096,6 @@ var selectGroup = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/selectGr
|
|
|
5066
5096
|
var getEarliestTs = (dateA = "", dateB = "") => !dateA || !dateB ? dateA || dateB : dateA < dateB ? dateA : dateB;
|
|
5067
5097
|
var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
|
|
5068
5098
|
(accu, device) => {
|
|
5069
|
-
var _a, _b2, _c;
|
|
5070
5099
|
const stateDevice = getDeviceById(state, device.id);
|
|
5071
5100
|
const {
|
|
5072
5101
|
attributes: storedAttributes = {},
|
|
@@ -5076,29 +5105,29 @@ var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
|
|
|
5076
5105
|
group: storedGroup
|
|
5077
5106
|
} = stateDevice;
|
|
5078
5107
|
const { identity, inventory, monitor, system = {}, tags } = mapDeviceAttributes(device.attributes);
|
|
5079
|
-
device.tags =
|
|
5080
|
-
device.group =
|
|
5081
|
-
device.monitor =
|
|
5082
|
-
device.identity_data =
|
|
5108
|
+
device.tags = { ...storedTags, ...tags };
|
|
5109
|
+
device.group = system.group ?? storedGroup;
|
|
5110
|
+
device.monitor = { ...storedMonitor, ...monitor };
|
|
5111
|
+
device.identity_data = { ...storedIdentity, ...identity, ...device.identity_data ? device.identity_data : {} };
|
|
5083
5112
|
device.status = status ? status : device.status || identity.status;
|
|
5084
|
-
device.check_in_time_rounded =
|
|
5085
|
-
device.check_in_time_exact =
|
|
5113
|
+
device.check_in_time_rounded = system.check_in_time ?? stateDevice.check_in_time_rounded;
|
|
5114
|
+
device.check_in_time_exact = device.check_in_time ?? stateDevice.check_in_time_exact;
|
|
5086
5115
|
device.created_ts = getEarliestTs(getEarliestTs(system.created_ts, device.created_ts), stateDevice.created_ts);
|
|
5087
5116
|
device.updated_ts = device.attributes ? device.updated_ts : stateDevice.updated_ts;
|
|
5088
5117
|
device.isNew = new Date(device.created_ts) > new Date(state.app.newThreshold);
|
|
5089
5118
|
device.isOffline = new Date(device.check_in_time_rounded) < new Date(state.app.offlineThreshold) || device.check_in_time_rounded === void 0;
|
|
5090
|
-
device.attributes = device.attributes ?
|
|
5091
|
-
accu.devicesById[device.id] =
|
|
5119
|
+
device.attributes = device.attributes ? { ...storedAttributes, ...inventory } : storedAttributes;
|
|
5120
|
+
accu.devicesById[device.id] = { ...stateDevice, ...device };
|
|
5092
5121
|
accu.ids.push(device.id);
|
|
5093
5122
|
return accu;
|
|
5094
5123
|
},
|
|
5095
5124
|
{ ids, devicesById: {} }
|
|
5096
5125
|
);
|
|
5097
5126
|
var getGroupDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getGroupDevices`, (options, { dispatch, getState }) => {
|
|
5098
|
-
const
|
|
5127
|
+
const { group, shouldIncludeAllStates, ...remainder } = options;
|
|
5099
5128
|
const { cleanedFilters: filterSelection } = getGroupFilters(group, getState().devices.groups);
|
|
5100
5129
|
return Promise.resolve(
|
|
5101
|
-
dispatch(getDevicesByStatus2(
|
|
5130
|
+
dispatch(getDevicesByStatus2({ ...remainder, filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted }))
|
|
5102
5131
|
).unwrap().then((results) => {
|
|
5103
5132
|
if (!group) {
|
|
5104
5133
|
return Promise.resolve();
|
|
@@ -5112,7 +5141,7 @@ var getGroupDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getG
|
|
|
5112
5141
|
dispatch(
|
|
5113
5142
|
actions3.addGroup({
|
|
5114
5143
|
group: {
|
|
5115
|
-
deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length >
|
|
5144
|
+
deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > stateGroup?.deviceIds ? deviceAccu.ids : stateGroup.deviceIds,
|
|
5116
5145
|
total
|
|
5117
5146
|
},
|
|
5118
5147
|
groupName: group
|
|
@@ -5261,27 +5290,26 @@ var getDeviceLimit2 = (0, import_toolkit24.createAsyncThunk)(
|
|
|
5261
5290
|
);
|
|
5262
5291
|
var setDeviceListState = (0, import_toolkit24.createAsyncThunk)(
|
|
5263
5292
|
`${sliceName3}/setDeviceListState`,
|
|
5264
|
-
(
|
|
5265
|
-
var _b2 = _a, { shouldSelectDevices = true, forceRefresh, fetchAuth = true } = _b2, selectionState = __objRest(_b2, ["shouldSelectDevices", "forceRefresh", "fetchAuth"]);
|
|
5266
|
-
var _c;
|
|
5293
|
+
({ shouldSelectDevices = true, forceRefresh, fetchAuth = true, ...selectionState }, { dispatch, getState }) => {
|
|
5267
5294
|
const currentState = getDeviceListState(getState());
|
|
5268
5295
|
const refreshTrigger = forceRefresh ? !currentState.refreshTrigger : selectionState.refreshTrigger;
|
|
5269
|
-
let nextState =
|
|
5296
|
+
let nextState = {
|
|
5297
|
+
...currentState,
|
|
5270
5298
|
setOnly: false,
|
|
5271
|
-
refreshTrigger
|
|
5272
|
-
|
|
5273
|
-
sort:
|
|
5274
|
-
}
|
|
5299
|
+
refreshTrigger,
|
|
5300
|
+
...selectionState,
|
|
5301
|
+
sort: { ...currentState.sort, ...selectionState.sort }
|
|
5302
|
+
};
|
|
5275
5303
|
let tasks = [];
|
|
5276
|
-
const
|
|
5277
|
-
const
|
|
5304
|
+
const { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection, ...currentRequestState } = currentState;
|
|
5305
|
+
const { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection, ...nextRequestState } = nextState;
|
|
5278
5306
|
if (!nextState.setOnly && !(0, import_helpers12.deepCompare)(currentRequestState, nextRequestState)) {
|
|
5279
|
-
const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } =
|
|
5307
|
+
const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = nextState.sort ?? {};
|
|
5280
5308
|
const sortBy = sortCol ? [{ attribute: sortCol, order: sortDown, scope: sortScope }] : void 0;
|
|
5281
5309
|
const applicableSelectedState = nextState.state === ALL_DEVICE_STATES ? void 0 : nextState.state;
|
|
5282
5310
|
nextState.isLoading = true;
|
|
5283
5311
|
tasks.push(
|
|
5284
|
-
dispatch(getDevicesByStatus2(
|
|
5312
|
+
dispatch(getDevicesByStatus2({ ...nextState, status: applicableSelectedState, sortOptions: sortBy, fetchAuth })).unwrap().then((results) => {
|
|
5285
5313
|
const { deviceAccu, total } = results[results.length - 1];
|
|
5286
5314
|
const devicesState = shouldSelectDevices ? { deviceIds: deviceAccu.ids, total, isLoading: false } : { isLoading: false };
|
|
5287
5315
|
return Promise.resolve(dispatch(actions3.setDeviceListState(devicesState)));
|
|
@@ -5306,8 +5334,8 @@ var getDevicesByStatus2 = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/
|
|
|
5306
5334
|
} = options;
|
|
5307
5335
|
const state = getState();
|
|
5308
5336
|
const { applicableFilters, filterTerms } = convertDeviceListStateToFilters({
|
|
5309
|
-
filters: filterSelection
|
|
5310
|
-
group: group
|
|
5337
|
+
filters: filterSelection ?? getDeviceFilters(state),
|
|
5338
|
+
group: group ?? getSelectedGroup(state),
|
|
5311
5339
|
groups: state.devices.groups,
|
|
5312
5340
|
offlineThreshold: state.app.offlineThreshold,
|
|
5313
5341
|
selectedIssues,
|
|
@@ -5368,7 +5396,7 @@ var getAllDevicesByStatus = (0, import_toolkit24.createAsyncThunk)(`${sliceName3
|
|
|
5368
5396
|
});
|
|
5369
5397
|
var searchDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/searchDevices`, (passedOptions = {}, { dispatch, getState }) => {
|
|
5370
5398
|
const state = getState();
|
|
5371
|
-
let options =
|
|
5399
|
+
let options = { ...state.app.searchState, ...passedOptions };
|
|
5372
5400
|
const { page = defaultPage5, searchTerm, sortOptions = [] } = options;
|
|
5373
5401
|
const { columnSelection = [] } = getUserSettings(state);
|
|
5374
5402
|
const selectedAttributes = columnSelection.map((column) => ({ attribute: column.key, scope: column.scope }));
|
|
@@ -5503,8 +5531,7 @@ var getSessionDetails = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/ge
|
|
|
5503
5531
|
({ data: auditLogEntries }) => {
|
|
5504
5532
|
const { start, end } = auditLogEntries.reduce(
|
|
5505
5533
|
(accu, item) => {
|
|
5506
|
-
|
|
5507
|
-
if ((_b2 = (_a = item.meta) == null ? void 0 : _a.session_id) == null ? void 0 : _b2.includes(sessionId)) {
|
|
5534
|
+
if (item.meta?.session_id?.includes(sessionId)) {
|
|
5508
5535
|
accu.start = new Date(item.action.startsWith("open") ? item.time : accu.start);
|
|
5509
5536
|
accu.end = new Date(item.action.startsWith("close") ? item.time : accu.end);
|
|
5510
5537
|
}
|
|
@@ -5611,8 +5638,7 @@ var decommissionDevice = (0, import_toolkit24.createAsyncThunk)(
|
|
|
5611
5638
|
var getDeviceConfig = (0, import_toolkit24.createAsyncThunk)(
|
|
5612
5639
|
`${sliceName3}/getDeviceConfig`,
|
|
5613
5640
|
(deviceId, { dispatch }) => general_api_default.get(`${deviceConfig}/${deviceId}`).then(({ data }) => Promise.all([dispatch(actions3.receivedDevice({ id: deviceId, config: data })), Promise.resolve(data)])).catch((err) => {
|
|
5614
|
-
|
|
5615
|
-
if (((_b2 = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b2.error.status_code) !== 404) {
|
|
5641
|
+
if (err.response?.data?.error.status_code !== 404) {
|
|
5616
5642
|
return commonErrorHandler(err, `There was an error retrieving the configuration for device ${deviceId}.`, dispatch, commonErrorFallback);
|
|
5617
5643
|
}
|
|
5618
5644
|
})
|
|
@@ -5624,15 +5650,14 @@ var setDeviceConfig = (0, import_toolkit24.createAsyncThunk)(
|
|
|
5624
5650
|
var applyDeviceConfig = (0, import_toolkit24.createAsyncThunk)(
|
|
5625
5651
|
`${sliceName3}/applyDeviceConfig`,
|
|
5626
5652
|
({ deviceId, configDeploymentConfiguration, isDefault, config }, { dispatch, getState }) => general_api_default.post(`${deviceConfig}/${deviceId}/deploy`, configDeploymentConfiguration).catch((err) => commonErrorHandler(err, `There was an error deploying the configuration to device ${deviceId}.`, dispatch, commonErrorFallback)).then(({ data }) => {
|
|
5627
|
-
var _a;
|
|
5628
5653
|
const device = getDeviceById(getState(), deviceId);
|
|
5629
5654
|
const { canManageUsers } = getUserCapabilities(getState());
|
|
5630
5655
|
let tasks = [
|
|
5631
|
-
dispatch(actions3.receivedDevice(
|
|
5656
|
+
dispatch(actions3.receivedDevice({ ...device, config: { ...device.config, deployment_id: data.deployment_id } })),
|
|
5632
5657
|
new Promise((resolve) => setTimeout(() => resolve(dispatch(getSingleDeployment(data.deployment_id))), TIMEOUTS.oneSecond))
|
|
5633
5658
|
];
|
|
5634
5659
|
if (isDefault && canManageUsers) {
|
|
5635
|
-
const { previous } =
|
|
5660
|
+
const { previous } = getGlobalSettings(getState()).defaultDeviceConfig ?? {};
|
|
5636
5661
|
tasks.push(dispatch(saveGlobalSettings({ defaultDeviceConfig: { current: config, previous } })));
|
|
5637
5662
|
}
|
|
5638
5663
|
return Promise.all(tasks);
|
|
@@ -5648,21 +5673,21 @@ var setDeviceTags = (0, import_toolkit24.createAsyncThunk)(
|
|
|
5648
5673
|
`${inventoryApiUrl}/devices/${deviceId}/tags`,
|
|
5649
5674
|
Object.entries(tags).map(([name, value]) => ({ name, value })),
|
|
5650
5675
|
{ headers }
|
|
5651
|
-
).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice(
|
|
5676
|
+
).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice({ ...device, id: deviceId, tags })), dispatch(setSnackbar6("Device name changed"))]));
|
|
5652
5677
|
})
|
|
5653
5678
|
)
|
|
5654
5679
|
);
|
|
5655
5680
|
var getDeviceTwin = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getDeviceTwin`, ({ deviceId, integration }, { dispatch, getState }) => {
|
|
5656
5681
|
let providerResult = {};
|
|
5657
5682
|
return general_api_default.get(`${iotManagerBaseURL}/devices/${deviceId}/state`).then(({ data }) => {
|
|
5658
|
-
providerResult =
|
|
5683
|
+
providerResult = { ...data, twinError: "" };
|
|
5659
5684
|
}).catch((err) => {
|
|
5660
5685
|
providerResult = {
|
|
5661
5686
|
twinError: `There was an error getting the ${EXTERNAL_PROVIDER[integration.provider].twinTitle.toLowerCase()} for device ${deviceId}. ${err}`
|
|
5662
5687
|
};
|
|
5663
5688
|
}).finally(() => {
|
|
5664
5689
|
const device = getDeviceById(getState(), deviceId);
|
|
5665
|
-
Promise.resolve(dispatch(actions3.receivedDevice(
|
|
5690
|
+
Promise.resolve(dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...device.twinsByIntegration, ...providerResult } })));
|
|
5666
5691
|
});
|
|
5667
5692
|
});
|
|
5668
5693
|
var setDeviceTwin = (0, import_toolkit24.createAsyncThunk)(
|
|
@@ -5678,7 +5703,7 @@ var setDeviceTwin = (0, import_toolkit24.createAsyncThunk)(
|
|
|
5678
5703
|
const { twinsByIntegration = {} } = device;
|
|
5679
5704
|
const { [integration.id]: currentState = {} } = twinsByIntegration;
|
|
5680
5705
|
return Promise.resolve(
|
|
5681
|
-
dispatch(actions3.receivedDevice(
|
|
5706
|
+
dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...twinsByIntegration, [integration.id]: { ...currentState, desired: settings } } }))
|
|
5682
5707
|
);
|
|
5683
5708
|
})
|
|
5684
5709
|
);
|
|
@@ -5699,8 +5724,8 @@ var getSystemDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/get
|
|
|
5699
5724
|
const { attributes: deviceAttributes = {} } = getDeviceById(state, id);
|
|
5700
5725
|
const { mender_gateway_system_id = "" } = deviceAttributes;
|
|
5701
5726
|
const filters = [
|
|
5702
|
-
|
|
5703
|
-
|
|
5727
|
+
{ ...emptyFilter, key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" },
|
|
5728
|
+
{ ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
|
|
5704
5729
|
];
|
|
5705
5730
|
const { attributes, filterTerms } = prepareSearchArguments({ filters, state });
|
|
5706
5731
|
return general_api_default.post(getSearchEndpoint(getState()), {
|
|
@@ -5712,11 +5737,12 @@ var getSystemDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/get
|
|
|
5712
5737
|
}).catch((err) => commonErrorHandler(err, `There was an error getting system devices device ${id}.`, dispatch, "Please check your connection.")).then(({ data, headers }) => {
|
|
5713
5738
|
const state2 = getState();
|
|
5714
5739
|
const { devicesById, ids } = reduceReceivedDevices(data, [], state2);
|
|
5715
|
-
const device =
|
|
5740
|
+
const device = {
|
|
5741
|
+
...getDeviceById(state2, id),
|
|
5716
5742
|
systemDeviceIds: ids,
|
|
5717
5743
|
systemDeviceTotal: Number(headers[headerNames.total])
|
|
5718
|
-
}
|
|
5719
|
-
return Promise.resolve(dispatch(actions3.receivedDevices(
|
|
5744
|
+
};
|
|
5745
|
+
return Promise.resolve(dispatch(actions3.receivedDevices({ ...devicesById, [id]: device })));
|
|
5720
5746
|
});
|
|
5721
5747
|
});
|
|
5722
5748
|
var getGatewayDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/getGatewayDevices`, (deviceId, { dispatch, getState }) => {
|
|
@@ -5724,9 +5750,9 @@ var getGatewayDevices = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/ge
|
|
|
5724
5750
|
const { attributes = {} } = getDeviceById(state, deviceId);
|
|
5725
5751
|
const { mender_gateway_system_id = "" } = attributes;
|
|
5726
5752
|
const filters = [
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5753
|
+
{ ...emptyFilter, key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" },
|
|
5754
|
+
{ ...emptyFilter, key: "mender_is_gateway", value: "true", scope: "inventory" },
|
|
5755
|
+
{ ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
|
|
5730
5756
|
];
|
|
5731
5757
|
const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({ filters, state });
|
|
5732
5758
|
return general_api_default.post(getSearchEndpoint(getState()), {
|
|
@@ -5766,56 +5792,4 @@ var getDevicesInBounds = (0, import_toolkit24.createAsyncThunk)(`${sliceName3}/g
|
|
|
5766
5792
|
return Promise.resolve(dispatch(actions3.receivedDevices(devicesById)));
|
|
5767
5793
|
});
|
|
5768
5794
|
});
|
|
5769
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
5770
|
-
0 && (module.exports = {
|
|
5771
|
-
addDevicesToGroup,
|
|
5772
|
-
addDynamicGroup,
|
|
5773
|
-
addStaticGroup,
|
|
5774
|
-
applyDeviceConfig,
|
|
5775
|
-
decommissionDevice,
|
|
5776
|
-
deleteAuthset,
|
|
5777
|
-
deriveInactiveDevices,
|
|
5778
|
-
deriveReportsData,
|
|
5779
|
-
deviceFileUpload,
|
|
5780
|
-
ensureVersionString,
|
|
5781
|
-
getAllDeviceCounts,
|
|
5782
|
-
getAllDevicesByStatus,
|
|
5783
|
-
getAllDynamicGroupDevices,
|
|
5784
|
-
getAllGroupDevices,
|
|
5785
|
-
getDeviceAttributes,
|
|
5786
|
-
getDeviceAuth,
|
|
5787
|
-
getDeviceById,
|
|
5788
|
-
getDeviceConfig,
|
|
5789
|
-
getDeviceConnect,
|
|
5790
|
-
getDeviceCount,
|
|
5791
|
-
getDeviceFileDownloadLink,
|
|
5792
|
-
getDeviceInfo,
|
|
5793
|
-
getDeviceLimit,
|
|
5794
|
-
getDeviceTwin,
|
|
5795
|
-
getDevicesByStatus,
|
|
5796
|
-
getDevicesInBounds,
|
|
5797
|
-
getDevicesWithAuth,
|
|
5798
|
-
getDynamicGroups,
|
|
5799
|
-
getGatewayDevices,
|
|
5800
|
-
getGroupDevices,
|
|
5801
|
-
getGroups,
|
|
5802
|
-
getReportingLimits,
|
|
5803
|
-
getReportsData,
|
|
5804
|
-
getReportsDataWithoutBackendSupport,
|
|
5805
|
-
getSessionDetails,
|
|
5806
|
-
getSystemDevices,
|
|
5807
|
-
preauthDevice,
|
|
5808
|
-
removeDevicesFromGroup,
|
|
5809
|
-
removeDynamicGroup,
|
|
5810
|
-
removeStaticGroup,
|
|
5811
|
-
searchDevices,
|
|
5812
|
-
selectGroup,
|
|
5813
|
-
setDeviceConfig,
|
|
5814
|
-
setDeviceListState,
|
|
5815
|
-
setDeviceTags,
|
|
5816
|
-
setDeviceTwin,
|
|
5817
|
-
updateDeviceAuth,
|
|
5818
|
-
updateDevicesAuth,
|
|
5819
|
-
updateDynamicGroup
|
|
5820
|
-
});
|
|
5821
5795
|
//# sourceMappingURL=thunks.js.map
|