iobroker.admin 6.2.16 → 6.2.17
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/README.md +11 -12
- package/io-package.json +13 -13
- package/main.js +134 -134
- package/package.json +2 -2
- package/www/asset-manifest.json +11 -11
- package/www/index.html +1 -1
- package/www/lib/js/socket.io.js +45 -4
- package/www/static/js/2261.5341bfce.chunk.js +309 -0
- package/www/static/js/2261.5341bfce.chunk.js.map +1 -0
- package/www/static/js/5710.42ccb50f.chunk.js +100 -0
- package/www/static/js/5710.42ccb50f.chunk.js.map +1 -0
- package/www/static/js/{7228.c101e843.chunk.js → 7228.59a1073c.chunk.js} +2 -2
- package/www/static/js/{7228.c101e843.chunk.js.map → 7228.59a1073c.chunk.js.map} +1 -1
- package/www/static/js/{7581.9dc9640e.chunk.js → 7581.49a7cf60.chunk.js} +22 -22
- package/www/static/js/7581.49a7cf60.chunk.js.map +1 -0
- package/www/static/js/{main.74da6437.js → main.33904be8.js} +5 -5
- package/www/static/js/{main.74da6437.js.map → main.33904be8.js.map} +1 -1
- package/www/static/js/2261.814ce0be.chunk.js +0 -309
- package/www/static/js/2261.814ce0be.chunk.js.map +0 -1
- package/www/static/js/5710.18ded8f3.chunk.js +0 -100
- package/www/static/js/5710.18ded8f3.chunk.js.map +0 -1
- package/www/static/js/7581.9dc9640e.chunk.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,20 +14,20 @@ User interface for configuration and administration of ioBroker.
|
|
|
14
14
|
**This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
|
|
15
15
|
|
|
16
16
|
## Using common.localLink
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
17
|
+
- `%ip%` - ioBroker ip address (address of the admin)
|
|
18
|
+
- `%secure%` or `%protocol%` - read from `native.secure` the value and use http or https
|
|
19
|
+
- `%web_protocol%` - looking for the first instance of web (e.g. web.0) and get `native.secure` from `system.adapter.web.0`
|
|
20
|
+
- `%instance%` - instance of the adapter
|
|
21
|
+
- `%someField%` - get someField from `native` of this adapter instance
|
|
22
|
+
- `%web.0_bind%` - get native.bind from `system.adapter.web.0`
|
|
23
|
+
- `%native_someField%` - get someField from `native` of this adapter instance
|
|
24
24
|
|
|
25
25
|
## Scheduled restart
|
|
26
26
|
Some adapters are not stable or connection disappear after one or two days.
|
|
27
27
|
To fix this there is a scheduled restart setting.
|
|
28
28
|
To activate scheduled restart just define CRON condition when to restart adapter.
|
|
29
29
|
|
|
30
|
-
It is suggested to restart in the night, when no one use the adapter, e.g.
|
|
30
|
+
It is suggested to restart in the night, when no one use the adapter, e.g. `0 3 * * *` - at 3:00 every day.
|
|
31
31
|
|
|
32
32
|
## Let's Encrypt Certificates
|
|
33
33
|
Let’s Encrypt is a free, automated, and open certificate authority brought to you by the non-profit Internet Security Research Group (ISRG).
|
|
@@ -115,6 +115,9 @@ The icons may not be reused in other projects without the proper flaticon licens
|
|
|
115
115
|
-->
|
|
116
116
|
|
|
117
117
|
## Changelog
|
|
118
|
+
### 6.2.17 (2022-08-19)
|
|
119
|
+
* (bluefox) Corrected GUI bug on intro tab
|
|
120
|
+
|
|
118
121
|
### 6.2.16 (2022-08-18)
|
|
119
122
|
* (bluefox) Corrected many GUI issues
|
|
120
123
|
* (bluefox) Added `stable` flag for repositories
|
|
@@ -130,10 +133,6 @@ The icons may not be reused in other projects without the proper flaticon licens
|
|
|
130
133
|
### 6.2.12 (2022-07-31)
|
|
131
134
|
* (bluefox) Corrected the Text input field in JSON configuration
|
|
132
135
|
|
|
133
|
-
### 6.2.6 (2022-07-28)
|
|
134
|
-
* (bluefox) Implemented Oauth2 workflow for adapters
|
|
135
|
-
* (bluefox) Corrected encrypt/decrypt functions
|
|
136
|
-
|
|
137
136
|
## License
|
|
138
137
|
The MIT License (MIT)
|
|
139
138
|
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "admin",
|
|
4
|
-
"version": "6.2.
|
|
4
|
+
"version": "6.2.17",
|
|
5
5
|
"titleLang": {
|
|
6
6
|
"en": "Admin",
|
|
7
7
|
"de": "Admin",
|
|
@@ -18,6 +18,18 @@
|
|
|
18
18
|
"connectionType": "local",
|
|
19
19
|
"dataSource": "push",
|
|
20
20
|
"news": {
|
|
21
|
+
"6.2.17": {
|
|
22
|
+
"en": "Corrected GUI bug on intro tab",
|
|
23
|
+
"de": "Korrigiert GUI Bug auf Intro Tab",
|
|
24
|
+
"ru": "Исправлена ошибка GUI на вкладке intro",
|
|
25
|
+
"pt": "Bug GUI corrigido na guia intro",
|
|
26
|
+
"nl": "Vertaling:",
|
|
27
|
+
"fr": "Correction du bug GUI sur l'onglet intro",
|
|
28
|
+
"it": "Corretto bug GUI sulla scheda intro",
|
|
29
|
+
"es": "Corregido error GUI en la pestaña de entrada",
|
|
30
|
+
"pl": "Wprowadzimy błąd GUI w internecie",
|
|
31
|
+
"zh-cn": "对古伊布图的更正"
|
|
32
|
+
},
|
|
21
33
|
"6.2.16": {
|
|
22
34
|
"en": "Corrected many GUI issues\nAdded `stable` flag for repositories\nAdded reset button for repositories\nImproved `writeFile` function for socket communication",
|
|
23
35
|
"de": "Viele GUI Probleme korrigiert\nHinzugefügt stabile Flagge für Repositories\nReset-Taste für Repositories hinzugefügt\nVerbessertes Schreiben Dateifunktion für Steckdosenkommunikation",
|
|
@@ -89,18 +101,6 @@
|
|
|
89
101
|
"es": "Ajustes corregidos de yahka",
|
|
90
102
|
"pl": "Poprawiona ustawa",
|
|
91
103
|
"zh-cn": "A. 修 卫"
|
|
92
|
-
},
|
|
93
|
-
"6.2.3": {
|
|
94
|
-
"en": "Implemented AES-192 encryption and decryption in GUI",
|
|
95
|
-
"de": "AES-192 Verschlüsselung und Entschlüsselung in GUI",
|
|
96
|
-
"ru": "Реализовано шифрование AES-192 и расшифровка в GUI",
|
|
97
|
-
"pt": "Implementado criptografia AES-192 e descriptografia em GUI",
|
|
98
|
-
"nl": "Vertaling:",
|
|
99
|
-
"fr": "Mise en œuvre du chiffrement et du décryptage AES-192 dans GUI",
|
|
100
|
-
"it": "Implementato AES-192 crittografia e decrittografia in GUI",
|
|
101
|
-
"es": "Cifrado y descifrado AES-192 implementado en GUI",
|
|
102
|
-
"pl": "Poprawione szyfrowanie AES-192 oraz deszyfrowanie w GUI",
|
|
103
|
-
"zh-cn": "AES-192 加密和加密集团"
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"desc": {
|
package/main.js
CHANGED
|
@@ -423,7 +423,7 @@ function writeUpdateInfo(adapter, sources) {
|
|
|
423
423
|
if (systemRepos && systemRepos.native && systemRepos.native.repositories) {
|
|
424
424
|
activeRepo.forEach(repo => {
|
|
425
425
|
if (systemRepos.native.repositories[activeRepo]) {
|
|
426
|
-
adapter.log.warn(`Active repository "${repo} cannot be read`);
|
|
426
|
+
adapter.log.warn(`Active repository "${repo}" cannot be read`);
|
|
427
427
|
found = true;
|
|
428
428
|
}
|
|
429
429
|
});
|
|
@@ -607,13 +607,13 @@ function updateNews() {
|
|
|
607
607
|
oldEtag = state && state.val;
|
|
608
608
|
return axios.get('https://iobroker.live/repo/news-hash.json', {timeout: 13000, validateStatus: status => status < 400})
|
|
609
609
|
.then(response => response.data)
|
|
610
|
-
.catch(error => adapter.log.warn(
|
|
610
|
+
.catch(error => adapter.log.warn(`Cannot update news: ${error.response ? error.response.data : (error.message || error.code)}`));
|
|
611
611
|
}).then(etag => {
|
|
612
612
|
if (etag && etag.hash !== oldEtag) {
|
|
613
613
|
newEtag = etag.hash;
|
|
614
614
|
return axios.get('https://iobroker.live/repo/news.json', {timeout: 14000, validateStatus: status => status < 400})
|
|
615
615
|
.then(response => response.data)
|
|
616
|
-
.catch(error => adapter.log.warn(
|
|
616
|
+
.catch(error => adapter.log.warn(`Cannot update news_: ${error.response ? error.response.data : (error.message || error.code)}`));
|
|
617
617
|
} else {
|
|
618
618
|
newEtag = oldEtag;
|
|
619
619
|
return Promise.resolve([]);
|
|
@@ -824,163 +824,163 @@ async function checkNodeJsVersion() {
|
|
|
824
824
|
type: 'channel',
|
|
825
825
|
common: {
|
|
826
826
|
name: {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
827
|
+
en: 'Node.js/Npm versions',
|
|
828
|
+
de: 'Node.js/Npm Versionen',
|
|
829
|
+
ru: 'Node.js/Npm версии',
|
|
830
|
+
pt: 'Versões Node.js/Npm',
|
|
831
|
+
nl: 'Node.js/Npm versions',
|
|
832
|
+
fr: 'Node.js/Npm versions',
|
|
833
|
+
it: 'Node.js/Npm versioni',
|
|
834
|
+
es: 'Node.js/Npm versiones',
|
|
835
|
+
pl: 'Wersja node.js/Npm',
|
|
836
|
+
'zh-cn': '页: 1'
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
});
|
|
840
840
|
const states = [
|
|
841
841
|
{
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
842
|
+
_id: 'nodeCurrent',
|
|
843
|
+
type: 'state',
|
|
844
|
+
common: {
|
|
845
|
+
role: 'state',
|
|
846
|
+
value: {
|
|
847
|
+
en: 'Current node.js version',
|
|
848
|
+
de: 'Aktuelle node.js Version',
|
|
849
|
+
ru: 'Текущая версия node.js',
|
|
850
|
+
pt: 'Versão atual do node.js',
|
|
851
|
+
nl: 'Current Node',
|
|
852
|
+
fr: 'Version actuelle node.js',
|
|
853
|
+
it: 'Versione attuale node.js',
|
|
854
|
+
es: 'Versión actual node.js',
|
|
855
|
+
pl: 'Aktualna wersja.js',
|
|
856
|
+
'zh-cn': '目前没有。'
|
|
857
857
|
},
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
858
|
+
type: 'string',
|
|
859
|
+
read: true,
|
|
860
|
+
write: false,
|
|
861
|
+
def: ''
|
|
862
862
|
},
|
|
863
|
-
|
|
863
|
+
native: {}
|
|
864
864
|
},
|
|
865
865
|
{
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
866
|
+
_id: 'nodeNewest',
|
|
867
|
+
type: 'state',
|
|
868
|
+
common: {
|
|
869
|
+
role: 'state',
|
|
870
|
+
value: {
|
|
871
|
+
en: 'Newest node.js version',
|
|
872
|
+
de: 'Neueste node.js Version',
|
|
873
|
+
ru: 'Новейшая версия node.js',
|
|
874
|
+
pt: 'Mais recente versão node.js',
|
|
875
|
+
nl: 'Nieuwste node',
|
|
876
|
+
fr: 'Nouvelle version node.js',
|
|
877
|
+
it: 'Nuova versione node.js',
|
|
878
|
+
es: 'Versión más reciente node.js',
|
|
879
|
+
pl: 'Najnowsza wersja węzła.js',
|
|
880
|
+
'zh-cn': '最新版本'
|
|
881
881
|
},
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
882
|
+
type: 'string',
|
|
883
|
+
read: true,
|
|
884
|
+
write: false,
|
|
885
|
+
def: ''
|
|
886
886
|
},
|
|
887
|
-
|
|
887
|
+
native: {}
|
|
888
888
|
},
|
|
889
889
|
{
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
890
|
+
_id: 'nodeNewestNext',
|
|
891
|
+
type: 'state',
|
|
892
|
+
common: {
|
|
893
|
+
role: 'state',
|
|
894
|
+
value: {
|
|
895
|
+
en: 'Newest next major node.js version',
|
|
896
|
+
de: 'Neueste nächste große node.js Version',
|
|
897
|
+
ru: 'Новейшая следующая версия node.js',
|
|
898
|
+
pt: 'Mais nova versão principal node.js',
|
|
899
|
+
nl: 'Nieuwste volgende grote node',
|
|
900
|
+
fr: 'Nouvelle prochaine version node.js',
|
|
901
|
+
it: 'Nuova versione principale node.js',
|
|
902
|
+
es: 'Versión más reciente node.js',
|
|
903
|
+
pl: 'Najnowsza wersja węzła.js',
|
|
904
|
+
'zh-cn': '今后最新的重要内容。'
|
|
905
905
|
},
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
906
|
+
type: 'string',
|
|
907
|
+
read: true,
|
|
908
|
+
write: false,
|
|
909
|
+
def: ''
|
|
910
910
|
},
|
|
911
|
-
|
|
911
|
+
native: {}
|
|
912
912
|
},
|
|
913
913
|
{
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
914
|
+
_id: 'npmCurrent',
|
|
915
|
+
type: 'state',
|
|
916
|
+
common: {
|
|
917
|
+
role: 'state',
|
|
918
|
+
value: {
|
|
919
|
+
en: 'Current npm version',
|
|
920
|
+
de: 'Aktuelle Version',
|
|
921
|
+
ru: 'Текущая версия npm',
|
|
922
|
+
pt: 'Versão actual npm',
|
|
923
|
+
nl: 'Current Npm versie',
|
|
924
|
+
fr: 'Version actuelle npm',
|
|
925
|
+
it: 'Versione npm attuale',
|
|
926
|
+
es: 'Versión actual npm',
|
|
927
|
+
pl: 'Aktualna wersja',
|
|
928
|
+
'zh-cn': '目前的印本'
|
|
929
929
|
},
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
930
|
+
type: 'string',
|
|
931
|
+
read: true,
|
|
932
|
+
write: false,
|
|
933
|
+
def: ''
|
|
934
934
|
},
|
|
935
|
-
|
|
935
|
+
native: {}
|
|
936
936
|
},
|
|
937
937
|
{
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
938
|
+
_id: 'npmNewest',
|
|
939
|
+
type: 'state',
|
|
940
|
+
common: {
|
|
941
|
+
role: 'state',
|
|
942
|
+
value: {
|
|
943
|
+
en: 'Newest npm version',
|
|
944
|
+
de: 'Neueste Version',
|
|
945
|
+
ru: 'Новейшая версия npm',
|
|
946
|
+
pt: 'Versão mais recente npm',
|
|
947
|
+
nl: 'Newest Npm versie',
|
|
948
|
+
fr: 'Nouvelle version npm',
|
|
949
|
+
it: 'Nuova versione npm',
|
|
950
|
+
es: 'Versión más reciente npm',
|
|
951
|
+
pl: 'Wersja nowa',
|
|
952
|
+
'zh-cn': '最新版本'
|
|
953
953
|
},
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
954
|
+
type: 'string',
|
|
955
|
+
read: true,
|
|
956
|
+
write: false,
|
|
957
|
+
def: ''
|
|
958
958
|
},
|
|
959
|
-
|
|
959
|
+
native: {}
|
|
960
960
|
},
|
|
961
961
|
{
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
962
|
+
_id: 'npmNewestNext',
|
|
963
|
+
type: 'state',
|
|
964
|
+
common: {
|
|
965
|
+
role: 'state',
|
|
966
|
+
value: {
|
|
967
|
+
en: 'Newest next major NPM version',
|
|
968
|
+
de: 'Neueste nächste große NPM-Version',
|
|
969
|
+
ru: 'Новейшая следующая крупная версия NPM',
|
|
970
|
+
pt: 'Mais nova versão principal do NPM',
|
|
971
|
+
nl: 'NPM',
|
|
972
|
+
fr: 'La version la plus récente',
|
|
973
|
+
it: 'Nuova versione NPM',
|
|
974
|
+
es: 'Versión NPM más reciente',
|
|
975
|
+
pl: 'Nowa wersja NPM',
|
|
976
|
+
'zh-cn': '下一次主要国家预防计划'
|
|
977
977
|
},
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
978
|
+
type: 'string',
|
|
979
|
+
read: true,
|
|
980
|
+
write: false,
|
|
981
|
+
def: ''
|
|
982
982
|
},
|
|
983
|
-
|
|
983
|
+
native: {}
|
|
984
984
|
}
|
|
985
985
|
];
|
|
986
986
|
|
|
@@ -1092,7 +1092,7 @@ function updateIcons() {
|
|
|
1092
1092
|
if (obj.common && obj.common.icon && obj.common.icon.length > 50) {
|
|
1093
1093
|
const cObj = await adapter.getForeignObjectAsync(obj._id);
|
|
1094
1094
|
if (cObj && (!cObj.common.icon || cObj.common.icon.length < 50)) {
|
|
1095
|
-
adapter.log.debug(
|
|
1095
|
+
adapter.log.debug(`Update icon for ${cObj._id}`);
|
|
1096
1096
|
cObj.common.icon = obj.common.icon;
|
|
1097
1097
|
await adapter.setForeignObjectAsync(cObj._id, cObj);
|
|
1098
1098
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.admin",
|
|
3
3
|
"description": "The adapter opens a webserver for the ioBroker admin UI.",
|
|
4
|
-
"version": "6.2.
|
|
4
|
+
"version": "6.2.17",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"bluefox <dogafox@gmail.com>",
|
|
7
7
|
"apollon77",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@iobroker/adapter-core": "^2.6.0",
|
|
27
27
|
"@iobroker/ws-server": "^2.1.0",
|
|
28
|
-
"@iobroker/socket-classes": "^0.5.
|
|
28
|
+
"@iobroker/socket-classes": "^0.5.2",
|
|
29
29
|
"body-parser": "^1.20.0",
|
|
30
30
|
"compression": "^1.7.4",
|
|
31
31
|
"connect-flash": "^0.1.1",
|
package/www/asset-manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.js": "./static/js/main.
|
|
3
|
+
"main.js": "./static/js/main.33904be8.js",
|
|
4
4
|
"static/css/5710.41ed5ace.chunk.css": "./static/css/5710.41ed5ace.chunk.css",
|
|
5
|
-
"static/js/5710.
|
|
5
|
+
"static/js/5710.42ccb50f.chunk.js": "./static/js/5710.42ccb50f.chunk.js",
|
|
6
6
|
"static/js/6090.33cd9234.chunk.js": "./static/js/6090.33cd9234.chunk.js",
|
|
7
7
|
"static/js/9039.f44e1e89.chunk.js": "./static/js/9039.f44e1e89.chunk.js",
|
|
8
8
|
"static/js/2652.9a062c3e.chunk.js": "./static/js/2652.9a062c3e.chunk.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"static/js/3961.a98ff7ab.chunk.js": "./static/js/3961.a98ff7ab.chunk.js",
|
|
11
11
|
"static/js/4815.d1a7e288.chunk.js": "./static/js/4815.d1a7e288.chunk.js",
|
|
12
12
|
"static/js/7397.1b13afbc.chunk.js": "./static/js/7397.1b13afbc.chunk.js",
|
|
13
|
-
"static/js/2261.
|
|
13
|
+
"static/js/2261.5341bfce.chunk.js": "./static/js/2261.5341bfce.chunk.js",
|
|
14
14
|
"static/js/217.cf6e20e6.chunk.js": "./static/js/217.cf6e20e6.chunk.js",
|
|
15
15
|
"static/js/1366.043d3607.chunk.js": "./static/js/1366.043d3607.chunk.js",
|
|
16
16
|
"static/js/7412.d6cc8adb.chunk.js": "./static/js/7412.d6cc8adb.chunk.js",
|
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
"static/js/2155.7a6c75f8.chunk.js": "./static/js/2155.7a6c75f8.chunk.js",
|
|
170
170
|
"static/js/7951.abd5510b.chunk.js": "./static/js/7951.abd5510b.chunk.js",
|
|
171
171
|
"static/js/7808.bc888e96.chunk.js": "./static/js/7808.bc888e96.chunk.js",
|
|
172
|
-
"static/js/7581.
|
|
173
|
-
"static/js/7228.
|
|
172
|
+
"static/js/7581.49a7cf60.chunk.js": "./static/js/7581.49a7cf60.chunk.js",
|
|
173
|
+
"static/js/7228.59a1073c.chunk.js": "./static/js/7228.59a1073c.chunk.js",
|
|
174
174
|
"static/js/7893.5fda0ee9.chunk.js": "./static/js/7893.5fda0ee9.chunk.js",
|
|
175
175
|
"static/js/9533.71c9f0ad.chunk.js": "./static/js/9533.71c9f0ad.chunk.js",
|
|
176
176
|
"static/js/7858.d768cb91.chunk.js": "./static/js/7858.d768cb91.chunk.js",
|
|
@@ -770,9 +770,9 @@
|
|
|
770
770
|
"jsx.js": "./ffd3b83e8b5878f4785591ff54b1dfff.js",
|
|
771
771
|
"d.js": "./70074e0c785c9a808dea76c7c7d17af3.js",
|
|
772
772
|
"mode-text.js": "./25718a469574ade47e23567d8c543169.js",
|
|
773
|
-
"main.
|
|
773
|
+
"main.33904be8.js.map": "./static/js/main.33904be8.js.map",
|
|
774
774
|
"5710.41ed5ace.chunk.css.map": "./static/css/5710.41ed5ace.chunk.css.map",
|
|
775
|
-
"5710.
|
|
775
|
+
"5710.42ccb50f.chunk.js.map": "./static/js/5710.42ccb50f.chunk.js.map",
|
|
776
776
|
"6090.33cd9234.chunk.js.map": "./static/js/6090.33cd9234.chunk.js.map",
|
|
777
777
|
"9039.f44e1e89.chunk.js.map": "./static/js/9039.f44e1e89.chunk.js.map",
|
|
778
778
|
"2652.9a062c3e.chunk.js.map": "./static/js/2652.9a062c3e.chunk.js.map",
|
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
"3961.a98ff7ab.chunk.js.map": "./static/js/3961.a98ff7ab.chunk.js.map",
|
|
781
781
|
"4815.d1a7e288.chunk.js.map": "./static/js/4815.d1a7e288.chunk.js.map",
|
|
782
782
|
"7397.1b13afbc.chunk.js.map": "./static/js/7397.1b13afbc.chunk.js.map",
|
|
783
|
-
"2261.
|
|
783
|
+
"2261.5341bfce.chunk.js.map": "./static/js/2261.5341bfce.chunk.js.map",
|
|
784
784
|
"217.cf6e20e6.chunk.js.map": "./static/js/217.cf6e20e6.chunk.js.map",
|
|
785
785
|
"1366.043d3607.chunk.js.map": "./static/js/1366.043d3607.chunk.js.map",
|
|
786
786
|
"7412.d6cc8adb.chunk.js.map": "./static/js/7412.d6cc8adb.chunk.js.map",
|
|
@@ -939,8 +939,8 @@
|
|
|
939
939
|
"2155.7a6c75f8.chunk.js.map": "./static/js/2155.7a6c75f8.chunk.js.map",
|
|
940
940
|
"7951.abd5510b.chunk.js.map": "./static/js/7951.abd5510b.chunk.js.map",
|
|
941
941
|
"7808.bc888e96.chunk.js.map": "./static/js/7808.bc888e96.chunk.js.map",
|
|
942
|
-
"7581.
|
|
943
|
-
"7228.
|
|
942
|
+
"7581.49a7cf60.chunk.js.map": "./static/js/7581.49a7cf60.chunk.js.map",
|
|
943
|
+
"7228.59a1073c.chunk.js.map": "./static/js/7228.59a1073c.chunk.js.map",
|
|
944
944
|
"js.map": "./b20cd9acf45420fcacfd923754185663.js.map",
|
|
945
945
|
"7893.5fda0ee9.chunk.js.map": "./static/js/7893.5fda0ee9.chunk.js.map",
|
|
946
946
|
"9533.71c9f0ad.chunk.js.map": "./static/js/9533.71c9f0ad.chunk.js.map",
|
|
@@ -951,6 +951,6 @@
|
|
|
951
951
|
"8596.8c24ae8a.chunk.js.map": "./static/js/8596.8c24ae8a.chunk.js.map"
|
|
952
952
|
},
|
|
953
953
|
"entrypoints": [
|
|
954
|
-
"static/js/main.
|
|
954
|
+
"static/js/main.33904be8.js"
|
|
955
955
|
]
|
|
956
956
|
}
|
package/www/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="admin - ioBroker"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="stylesheet" href="./css/leaflet.css"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./lib/js/socket.io.js"></script><script type="text/javascript" src="./lib/js/sparkline.js"></script><title>Admin</title><script>window.loginHideLogo="@@loginHideLogo@@",window.loginMotto="@@loginMotto@@",window.login="@@auth@@",window.loginLogo="@@loginLogo@@",window.loginLink="@@loginLink@@",window.loginTitle="@@loginTitle@@",window.loginBackgroundColor="@@loginBackgroundColor@@",window.loginBackgroundImage="@@loginBackgroundImage@@",window.vendorPrefix="@@vendorPrefix@@",window.disableDataReporting="@@disableDataReporting@@",window.loadingBackgroundColor="@@loadingBackgroundColor@@",window.loadingBackgroundImage="@@loadingBackgroundImage@@",window.loadingHideLogo="@@loadingHideLogo@@"</script><style>.root{background-color:rgba(255,255,255,.87);border-radius:10px}.unsupported{width:200px;background-color:#aaa;margin:auto;margin-top:3rem;padding:10px;line-height:25px;border-radius:4px;text-align:center}.leaflet-container{height:400px;width:100%}</style><script>setTimeout((()=>{const o=document.body;window.location.search.includes("?login")?(window.loginBackgroundColor&&-1===window.loginBackgroundColor.indexOf("loginBackgroundColor")&&(o.style.backgroundColor=window.loginBackgroundColor),window.loginBackgroundImage&&-1===window.loginBackgroundImage.indexOf("loginBackgroundImage")&&(o.style.backgroundImage="url("+window.loginBackgroundImage+")",o.style.backgroundSize="cover")):(window.loadingBackgroundColor&&-1===window.loadingBackgroundColor.indexOf("loadingBackgroundColor")&&(o.style.backgroundColor=window.loadingBackgroundColor),window.loadingBackgroundImage&&-1===window.loadingBackgroundImage.indexOf("loadingBackgroundImage")&&(o.style.backgroundImage="url("+window.loadingBackgroundImage+")",o.style.backgroundSize="cover"))}),0),window.addEventListener("load",(function o(n){window.removeEventListener("load",o,!1);if(window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)){const o=document.getElementById("root");o.classList.add("unsupported"),o.innerHTML="Browser is not supported. Please use Firefox or Chrome."}}),!1)</script><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="admin - ioBroker"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="stylesheet" href="./css/leaflet.css"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./lib/js/socket.io.js"></script><script type="text/javascript" src="./lib/js/sparkline.js"></script><title>Admin</title><script>window.loginHideLogo="@@loginHideLogo@@",window.loginMotto="@@loginMotto@@",window.login="@@auth@@",window.loginLogo="@@loginLogo@@",window.loginLink="@@loginLink@@",window.loginTitle="@@loginTitle@@",window.loginBackgroundColor="@@loginBackgroundColor@@",window.loginBackgroundImage="@@loginBackgroundImage@@",window.vendorPrefix="@@vendorPrefix@@",window.disableDataReporting="@@disableDataReporting@@",window.loadingBackgroundColor="@@loadingBackgroundColor@@",window.loadingBackgroundImage="@@loadingBackgroundImage@@",window.loadingHideLogo="@@loadingHideLogo@@"</script><style>.root{background-color:rgba(255,255,255,.87);border-radius:10px}.unsupported{width:200px;background-color:#aaa;margin:auto;margin-top:3rem;padding:10px;line-height:25px;border-radius:4px;text-align:center}.leaflet-container{height:400px;width:100%}</style><script>setTimeout((()=>{const o=document.body;window.location.search.includes("?login")?(window.loginBackgroundColor&&-1===window.loginBackgroundColor.indexOf("loginBackgroundColor")&&(o.style.backgroundColor=window.loginBackgroundColor),window.loginBackgroundImage&&-1===window.loginBackgroundImage.indexOf("loginBackgroundImage")&&(o.style.backgroundImage="url("+window.loginBackgroundImage+")",o.style.backgroundSize="cover")):(window.loadingBackgroundColor&&-1===window.loadingBackgroundColor.indexOf("loadingBackgroundColor")&&(o.style.backgroundColor=window.loadingBackgroundColor),window.loadingBackgroundImage&&-1===window.loadingBackgroundImage.indexOf("loadingBackgroundImage")&&(o.style.backgroundImage="url("+window.loadingBackgroundImage+")",o.style.backgroundSize="cover"))}),0),window.addEventListener("load",(function o(n){window.removeEventListener("load",o,!1);if(window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)){const o=document.getElementById("root");o.classList.add("unsupported"),o.innerHTML="Browser is not supported. Please use Firefox or Chrome."}}),!1)</script><script defer="defer" src="./static/js/main.33904be8.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
package/www/lib/js/socket.io.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ioBroker WebSockets
|
|
3
3
|
* Copyright 2020-2022, bluefox <dogafox@gmail.com>
|
|
4
4
|
* Released under the MIT License.
|
|
5
|
-
* v
|
|
5
|
+
* v 1.1.2 (2022_08_18)
|
|
6
6
|
*/
|
|
7
7
|
/* jshint -W097 */
|
|
8
8
|
/* jshint strict: false */
|
|
@@ -37,6 +37,13 @@ const ERRORS = {
|
|
|
37
37
|
1015: 'TLS handshake fail' // Transport Layer Security handshake failure
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
// every time create a new socket
|
|
41
|
+
function connect(url, options) {
|
|
42
|
+
const socket = new SocketClient();
|
|
43
|
+
socket.connect(url, options);
|
|
44
|
+
return socket;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
// possible events: connect, disconnect, reconnect, error, connect_error
|
|
41
48
|
function SocketClient () {
|
|
42
49
|
const handlers = {};
|
|
@@ -61,8 +68,25 @@ function SocketClient () {
|
|
|
61
68
|
error: text => console.error(`[${new Date().toISOString()}] ${text}`)
|
|
62
69
|
};
|
|
63
70
|
|
|
71
|
+
this.getQuery = _url => {
|
|
72
|
+
const query = _url.split('?')[1] || '';
|
|
73
|
+
const parts = query.split('&');
|
|
74
|
+
const result = {};
|
|
75
|
+
for (let p = 0; p < parts.length; p++) {
|
|
76
|
+
const parts1 = parts[p].split('=');
|
|
77
|
+
result[parts1[0]] = parts1[1];
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
};
|
|
81
|
+
|
|
64
82
|
this.connect = (_url, _options) => {
|
|
65
83
|
this.log.debug('Try to connect');
|
|
84
|
+
|
|
85
|
+
// remove hash
|
|
86
|
+
if (_url) {
|
|
87
|
+
_url = _url.split('#')[0];
|
|
88
|
+
}
|
|
89
|
+
|
|
66
90
|
id = 0;
|
|
67
91
|
connectTimer && clearInterval(connectTimer);
|
|
68
92
|
connectTimer = null;
|
|
@@ -91,8 +115,24 @@ function SocketClient () {
|
|
|
91
115
|
url = window.location.protocol + '//' + window.location.host + '/' + parts.join('/');
|
|
92
116
|
}
|
|
93
117
|
|
|
118
|
+
// extract all query attributes
|
|
119
|
+
const query = this.getQuery(url);
|
|
120
|
+
if (query.sid) {
|
|
121
|
+
delete query.sid;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (query.hasOwnProperty('')) {
|
|
125
|
+
delete query[''];
|
|
126
|
+
}
|
|
127
|
+
|
|
94
128
|
let u = url.replace(/^http/, 'ws').split('?')[0] + '?sid=' + sessionID;
|
|
95
|
-
|
|
129
|
+
|
|
130
|
+
// Apply query to new url
|
|
131
|
+
if (Object.keys(query).length) {
|
|
132
|
+
u += '&' + Object.keys(query).map(attr => query[attr] === undefined ? attr : attr + '=' + query[attr]).join('&');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (options && options.name && !query.name) {
|
|
96
136
|
u += '&name=' + encodeURIComponent(options.name);
|
|
97
137
|
}
|
|
98
138
|
// "ws://www.example.com/socketserver"
|
|
@@ -192,7 +232,6 @@ function SocketClient () {
|
|
|
192
232
|
|
|
193
233
|
this.pending = [];
|
|
194
234
|
}
|
|
195
|
-
|
|
196
235
|
} else if (args) {
|
|
197
236
|
handlers[name] && handlers[name].forEach(cb => cb.call(this, args[0], args[1], args[2], args[3], args[4]));
|
|
198
237
|
} else {
|
|
@@ -397,4 +436,6 @@ function SocketClient () {
|
|
|
397
436
|
}
|
|
398
437
|
|
|
399
438
|
// eslint-disable-next-line no-undef
|
|
400
|
-
window.io =
|
|
439
|
+
window.io = {
|
|
440
|
+
connect: connect
|
|
441
|
+
};
|