@iobroker/adapter-react-v5 3.1.27 → 3.1.30
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/Components/IconPicker.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCustom.js +4 -3
- package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +1 -1
- package/Components/JsonConfigComponent/ConfigGeneric.js +9 -7
- package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigLanguage.js +1 -1
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigNumber.js +33 -11
- package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPanel.js +1 -0
- package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +3 -3
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSendto.js +85 -24
- package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +1 -1
- package/Components/JsonConfigComponent/ConfigStaticText.js +45 -4
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTable.js +36 -25
- package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigText.js +15 -12
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
- package/Components/JsonConfigComponent/index.js +4 -6
- package/Components/JsonConfigComponent/index.js.map +1 -1
- package/Components/ObjectBrowser.js +86 -15
- package/Components/ObjectBrowser.js.map +1 -1
- package/Connection.d.ts +5 -0
- package/Connection.js +78 -16
- package/Connection.js.map +1 -1
- package/Dialogs/FileSelect.js +2 -1
- package/Dialogs/FileSelect.js.map +1 -1
- package/Dialogs/SelectID.js.map +1 -1
- package/README.md +4 -0
- package/i18n/de.json +2 -1
- package/i18n/en.json +2 -1
- package/i18n/es.json +2 -1
- package/i18n/fr.json +2 -1
- package/i18n/it.json +2 -1
- package/i18n/nl.json +2 -1
- package/i18n/pl.json +2 -1
- package/i18n/pt.json +2 -1
- package/i18n/ru.json +2 -1
- package/i18n/zh-cn.json +2 -1
- package/package.json +1 -1
package/Connection.d.ts
CHANGED
|
@@ -716,8 +716,13 @@ declare class Connection {
|
|
|
716
716
|
*/
|
|
717
717
|
getCurrentInstance(): Promise<string>;
|
|
718
718
|
getCompactAdapters(update: any): Promise<any>;
|
|
719
|
+
getAdaptersResetCache(adapter: any): void;
|
|
719
720
|
getCompactInstances(update: any): Promise<any>;
|
|
721
|
+
getAdapternInstancesResetCache(adapter: any): void;
|
|
720
722
|
getCompactInstalled(host: any, update: any, cmdTimeout: any): any;
|
|
723
|
+
getCompactSystemRepositories(update: any, cmdTimeout: any): Promise<any>;
|
|
724
|
+
getInstalledResetCache(host: any): void;
|
|
725
|
+
getInstalledResetCache(host: any): void;
|
|
721
726
|
getCompactSystemConfig(update: any): Promise<any>;
|
|
722
727
|
/**
|
|
723
728
|
* Get the repository in compact form (only version and icon).
|
package/Connection.js
CHANGED
|
@@ -3146,6 +3146,13 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3146
3146
|
});
|
|
3147
3147
|
});
|
|
3148
3148
|
return this._promises.compactAdapters;
|
|
3149
|
+
}
|
|
3150
|
+
}, {
|
|
3151
|
+
key: "getAdaptersResetCache",
|
|
3152
|
+
value: function getAdaptersResetCache(adapter) {
|
|
3153
|
+
adapter = adapter || '';
|
|
3154
|
+
this._promises.compactAdapters = null;
|
|
3155
|
+
this._promises['adapter_' + adapter] = null;
|
|
3149
3156
|
} // returns very optimized information for adapters to minimize connection load
|
|
3150
3157
|
|
|
3151
3158
|
}, {
|
|
@@ -3171,6 +3178,13 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3171
3178
|
});
|
|
3172
3179
|
});
|
|
3173
3180
|
return this._promises.compactInstances;
|
|
3181
|
+
}
|
|
3182
|
+
}, {
|
|
3183
|
+
key: "getAdapternInstancesResetCache",
|
|
3184
|
+
value: function getAdapternInstancesResetCache(adapter) {
|
|
3185
|
+
adapter = adapter || '';
|
|
3186
|
+
this._promises.compactInstances = null;
|
|
3187
|
+
this._promises['instances_' + adapter] = null;
|
|
3174
3188
|
} // returns very optimized information for adapters to minimize connection load
|
|
3175
3189
|
// reads only version of installed adapter
|
|
3176
3190
|
|
|
@@ -3222,12 +3236,66 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3222
3236
|
});
|
|
3223
3237
|
return this._promises.installedCompact[host];
|
|
3224
3238
|
} // returns very optimized information for adapters to minimize connection load
|
|
3239
|
+
// reads only version of installed adapter
|
|
3225
3240
|
|
|
3226
3241
|
}, {
|
|
3227
|
-
key: "
|
|
3228
|
-
value: function
|
|
3242
|
+
key: "getCompactSystemRepositories",
|
|
3243
|
+
value: function getCompactSystemRepositories(update, cmdTimeout) {
|
|
3229
3244
|
var _this73 = this;
|
|
3230
3245
|
|
|
3246
|
+
if (Connection.isWeb()) {
|
|
3247
|
+
return Promise.reject('Allowed only in admin');
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
this._promises.installedCompact = this._promises.installedCompact || {};
|
|
3251
|
+
|
|
3252
|
+
if (!this.connected) {
|
|
3253
|
+
return Promise.reject(NOT_CONNECTED);
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
this._promises.getCompactSystemRepositories = new Promise(function (resolve, reject) {
|
|
3257
|
+
var timeout = setTimeout(function () {
|
|
3258
|
+
if (timeout) {
|
|
3259
|
+
timeout = null;
|
|
3260
|
+
reject('getCompactSystemRepositories timeout');
|
|
3261
|
+
}
|
|
3262
|
+
}, cmdTimeout || _this73.props.cmdTimeout);
|
|
3263
|
+
|
|
3264
|
+
_this73._socket.emit('getCompactSystemRepositories', function (data) {
|
|
3265
|
+
if (timeout) {
|
|
3266
|
+
clearTimeout(timeout);
|
|
3267
|
+
timeout = null;
|
|
3268
|
+
|
|
3269
|
+
if (data === PERMISSION_ERROR) {
|
|
3270
|
+
reject('May not read "getCompactSystemRepositories"');
|
|
3271
|
+
} else if (!data) {
|
|
3272
|
+
reject('Cannot read "getCompactSystemRepositories"');
|
|
3273
|
+
} else {
|
|
3274
|
+
resolve(data);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
});
|
|
3278
|
+
});
|
|
3279
|
+
return this._promises.getCompactSystemRepositories;
|
|
3280
|
+
}
|
|
3281
|
+
}, {
|
|
3282
|
+
key: "getInstalledResetCache",
|
|
3283
|
+
value: function getInstalledResetCache(host) {
|
|
3284
|
+
this._promises.repoCompact = null;
|
|
3285
|
+
this._promises.repo = null;
|
|
3286
|
+
}
|
|
3287
|
+
/**
|
|
3288
|
+
* Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)
|
|
3289
|
+
* @param {boolean} [update] Force update.
|
|
3290
|
+
* @returns {Promise<ioBroker.Object[]>}
|
|
3291
|
+
*/
|
|
3292
|
+
|
|
3293
|
+
}, {
|
|
3294
|
+
key: "getCompactSystemConfig",
|
|
3295
|
+
value: // returns very optimized information for adapters to minimize connection load
|
|
3296
|
+
function getCompactSystemConfig(update) {
|
|
3297
|
+
var _this74 = this;
|
|
3298
|
+
|
|
3231
3299
|
if (!update && this._promises.systemConfigCommon) {
|
|
3232
3300
|
return this._promises.systemConfigCommon;
|
|
3233
3301
|
}
|
|
@@ -3237,7 +3305,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3237
3305
|
}
|
|
3238
3306
|
|
|
3239
3307
|
this._promises.systemConfigCommon = new Promise(function (resolve, reject) {
|
|
3240
|
-
return
|
|
3308
|
+
return _this74._socket.emit('getCompactSystemConfig', function (err, systemConfig) {
|
|
3241
3309
|
return err ? reject(err) : resolve(systemConfig);
|
|
3242
3310
|
});
|
|
3243
3311
|
});
|
|
@@ -3254,7 +3322,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3254
3322
|
}, {
|
|
3255
3323
|
key: "getCompactRepository",
|
|
3256
3324
|
value: function getCompactRepository(host, update, timeoutMs) {
|
|
3257
|
-
var
|
|
3325
|
+
var _this75 = this;
|
|
3258
3326
|
|
|
3259
3327
|
if (Connection.isWeb()) {
|
|
3260
3328
|
return Promise.reject('Allowed only in admin');
|
|
@@ -3278,9 +3346,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3278
3346
|
timeout = null;
|
|
3279
3347
|
reject('getCompactRepository timeout');
|
|
3280
3348
|
}
|
|
3281
|
-
}, timeoutMs ||
|
|
3349
|
+
}, timeoutMs || _this75.props.cmdTimeout);
|
|
3282
3350
|
|
|
3283
|
-
|
|
3351
|
+
_this75._socket.emit('getCompactRepository', host, function (data) {
|
|
3284
3352
|
if (timeout) {
|
|
3285
3353
|
clearTimeout(timeout);
|
|
3286
3354
|
timeout = null;
|
|
@@ -3297,16 +3365,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3297
3365
|
});
|
|
3298
3366
|
return this._promises.repoCompact;
|
|
3299
3367
|
}
|
|
3300
|
-
/**
|
|
3301
|
-
* Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)
|
|
3302
|
-
* @param {boolean} [update] Force update.
|
|
3303
|
-
* @returns {Promise<ioBroker.Object[]>}
|
|
3304
|
-
*/
|
|
3305
|
-
|
|
3306
3368
|
}, {
|
|
3307
3369
|
key: "getCompactHosts",
|
|
3308
3370
|
value: function getCompactHosts(update) {
|
|
3309
|
-
var
|
|
3371
|
+
var _this76 = this;
|
|
3310
3372
|
|
|
3311
3373
|
if (Connection.isWeb()) {
|
|
3312
3374
|
return Promise.reject('Allowed only in admin');
|
|
@@ -3321,7 +3383,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3321
3383
|
}
|
|
3322
3384
|
|
|
3323
3385
|
this._promises.hostsCompact = new Promise(function (resolve, reject) {
|
|
3324
|
-
return
|
|
3386
|
+
return _this76._socket.emit('getCompactHosts', function (err, hosts) {
|
|
3325
3387
|
return err ? reject(err) : resolve(hosts);
|
|
3326
3388
|
});
|
|
3327
3389
|
});
|
|
@@ -3371,14 +3433,14 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3371
3433
|
}, {
|
|
3372
3434
|
key: "logout",
|
|
3373
3435
|
value: function logout() {
|
|
3374
|
-
var
|
|
3436
|
+
var _this77 = this;
|
|
3375
3437
|
|
|
3376
3438
|
if (!this.connected) {
|
|
3377
3439
|
return Promise.reject(NOT_CONNECTED);
|
|
3378
3440
|
}
|
|
3379
3441
|
|
|
3380
3442
|
return new Promise(function (resolve, reject) {
|
|
3381
|
-
return
|
|
3443
|
+
return _this77._socket.emit('logout', function (err) {
|
|
3382
3444
|
return err ? reject(err) : resolve(null);
|
|
3383
3445
|
});
|
|
3384
3446
|
});
|