From 41a3070ba33bbbea62fbb06fc2e0edb084504e67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com>
Date: Fri, 19 Aug 2022 10:46:12 +0800
Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E5=8D=87=E7=BA=A7lodash?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
yarn.lock | 31 ++++++++++++++++++++-----------
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/package.json b/package.json
index 026b43a5..2c2fb1cc 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"jquery-slimscroll": "^1.3.8",
"jquery-sparkline": "^2.4.0",
"jvectormap": "1.2.2",
- "lodash": "^4.17.15",
+ "lodash": "^4.17.21",
"material-design-icons": "^3.0.1",
"materialize-css": "^0.100.2",
"ng2-charts": "^1.5.0",
diff --git a/yarn.lock b/yarn.lock
index 7b5a8b3e..e149b893 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1431,6 +1431,13 @@
resolved "https://registry.npmmirror.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
+"@ztree/ztree_v3@^3.5.48":
+ version "3.5.48"
+ resolved "https://registry.npmmirror.com/@ztree/ztree_v3/-/ztree_v3-3.5.48.tgz#ceb020e362f9c97c24a49d46d4b0cb91a57379ba"
+ integrity sha512-4dSA1g26T3j/O3I89+r/Palg+a+xwMGRS1etZoggnCGBPoOrwW8VGA3zitJCK/Yd7eEMX+LfKTRJjEGiWpoN3w==
+ dependencies:
+ jquery ">=1.4.4"
+
JSONStream@^1.3.4:
version "1.3.5"
resolved "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
@@ -1511,7 +1518,7 @@ ajv@6.12.3:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.5.0:
+ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
@@ -1950,11 +1957,6 @@ bonjour@^3.5.0:
multicast-dns "^6.0.1"
multicast-dns-service-types "^1.1.0"
-bootstrap@^4.3.1:
- version "4.6.1"
- resolved "https://registry.npmmirror.com/bootstrap/-/bootstrap-4.6.1.tgz#bc25380c2c14192374e8dec07cf01b2742d222a2"
- integrity sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og==
-
boxen@^5.0.1:
version "5.1.2"
resolved "https://registry.npmmirror.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50"
@@ -4938,7 +4940,7 @@ jest-worker@^26.0.0:
merge-stream "^2.0.0"
supports-color "^7.0.0"
-jquery@^3.4.1:
+jquery@>=1.4.4, jquery@^3.4.1:
version "3.6.0"
resolved "https://registry.npmmirror.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
@@ -5751,10 +5753,12 @@ ngx-clipboard@^12.2.1:
ngx-window-token "^2.0.0"
tslib "^1.9.0"
-ngx-cookie-service@^2.3.0:
- version "2.4.0"
- resolved "https://registry.npmmirror.com/ngx-cookie-service/-/ngx-cookie-service-2.4.0.tgz#293de6d393220f8fe5712a4c9f724042404e6971"
- integrity sha512-uR/6mCQ1t+XY5G1/irqRhoEddx1PPtmz7JHM/2nn5yQmicnj+n48x8C2PMxwaYDHKRh7QPQ9G5scR36Mmdz09A==
+ngx-cookie-service@^12.0.3:
+ version "12.0.3"
+ resolved "https://registry.npmmirror.com/ngx-cookie-service/-/ngx-cookie-service-12.0.3.tgz#eb2fc73b40dcc5ef8282eb78e82986afc299537f"
+ integrity sha512-F5xJBTrrreI2DERGOrO6U+L7s031HxTER+3Z4gDCwxdTl4AXmtWddMxxQVw7KflOLZ4InYEs6FjQsXmKU4HsJg==
+ dependencies:
+ tslib "^2.0.0"
ngx-infinite-scroll@^10.0.1:
version "10.0.1"
@@ -8158,6 +8162,11 @@ tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
+tslib@^2.0.0, tslib@^2.4.0:
+ version "2.4.0"
+ resolved "https://registry.npmmirror.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
+ integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
+
tslint@~5.11.0:
version "5.11.0"
resolved "https://registry.npmmirror.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed"
From 9fa6f3aab13702f48b7bb4dbcf142165edaa13d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com>
Date: Thu, 1 Sep 2022 14:14:06 +0800
Subject: [PATCH 2/5] =?UTF-8?q?fix:=20luna=E7=82=B9=E5=87=BB=E5=9B=BE?=
=?UTF-8?q?=E6=A0=87=E8=B7=B3=E8=BD=AC=E5=88=B0lina?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/elements/nav/nav.component.html | 4 +++-
src/app/elements/nav/nav.component.ts | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/app/elements/nav/nav.component.html b/src/app/elements/nav/nav.component.html
index e35ad0d2..85cb7141 100644
--- a/src/app/elements/nav/nav.component.html
+++ b/src/app/elements/nav/nav.component.html
@@ -1,7 +1,9 @@
-
-
+
+
+
-
{{v.name|translate}}
diff --git a/src/app/elements/nav/nav.component.ts b/src/app/elements/nav/nav.component.ts
index d4e5116e..c4ab4330 100644
--- a/src/app/elements/nav/nav.component.ts
+++ b/src/app/elements/nav/nav.component.ts
@@ -175,6 +175,10 @@ export class ElementNavComponent implements OnInit {
},
];
}
+
+ onJumpUi() {
+ window.open('/ui/', '_blank');
+ }
}
From c9c521953e222785564b546e0a796aa755b845fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com>
Date: Fri, 19 Aug 2022 19:20:16 +0800
Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0shift+=E5=B7=A6/?=
=?UTF-8?q?=E5=8F=B3=E9=94=AE=E7=9B=98=E4=BA=8B=E4=BB=B6=E5=88=87=E6=8D=A2?=
=?UTF-8?q?tabs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/app.component.ts | 17 ++++++++++++++---
src/app/services/view.ts | 20 ++++++++++++++++++++
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/src/app/pages/app.component.ts b/src/app/pages/app.component.ts
index 5c4d6f45..0375bd6c 100644
--- a/src/app/pages/app.component.ts
+++ b/src/app/pages/app.component.ts
@@ -1,5 +1,5 @@
-import {Component} from '@angular/core';
-import {I18nService} from '@app/services';
+import {Component, HostListener} from '@angular/core';
+import {I18nService, ViewService} from '@app/services';
@Component({
selector: 'app-root',
@@ -8,7 +8,18 @@ import {I18nService} from '@app/services';
})
export class AppComponent {
- constructor(_i18n: I18nService) {
+ constructor(_i18n: I18nService,
+ public viewSrv: ViewService
+ ) {}
+ @HostListener('window:keydown', ['$event'])
+ onKeyPress($event: KeyboardEvent) {
+ const condition = this.viewSrv.viewList.length > 1 && $event.shiftKey;
+ if (condition && $event.keyCode === 37) {
+ this.viewSrv.switchView('left');
+ }
+ if (condition && $event.keyCode === 39) {
+ this.viewSrv.switchView('right');
+ }
}
}
diff --git a/src/app/services/view.ts b/src/app/services/view.ts
index 1939e48e..f95a13a0 100644
--- a/src/app/services/view.ts
+++ b/src/app/services/view.ts
@@ -40,4 +40,24 @@ export class ViewService {
const index = this.viewList.indexOf(view);
this.viewList.splice(index, 1);
}
+
+ switchView(direction: ('left' | 'right')) {
+ const viewList = this.viewList;
+ const viewListLength = viewList.length;
+ for (let i = 0; i < viewListLength; i++) {
+ const current: View = viewList[i];
+ if (current.id === this.currentView.id) {
+ let nextView: View, nextViewLength: number;
+ const next: number = direction === 'left' ? i - 1 : i + 1;
+ if (direction === 'left') {
+ nextViewLength = next < 0 ? viewListLength - 1 : next;
+ } else {
+ nextViewLength = next >= viewListLength ? 0 : next;
+ }
+ nextView = viewList[nextViewLength];
+ if (nextView) { this.activeView(nextView); }
+ break;
+ }
+ }
+ }
}
From a473ac7df34b58e5dccdf8e945e9b757e312f68b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com>
Date: Thu, 1 Sep 2022 17:30:43 +0800
Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9C=A8=E7=BA=BF?=
=?UTF-8?q?=E4=BC=9A=E8=AF=9D=E7=9B=91=E6=8E=A7=E9=A1=B5=E9=9D=A2=E5=B8=83?=
=?UTF-8?q?=E5=B1=80=E9=81=AE=E6=8C=A1=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/monitor/monitor.component.scss | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/app/pages/monitor/monitor.component.scss b/src/app/pages/monitor/monitor.component.scss
index e0664f91..a9d3038e 100644
--- a/src/app/pages/monitor/monitor.component.scss
+++ b/src/app/pages/monitor/monitor.component.scss
@@ -22,6 +22,10 @@
display: inline-block;
}
+.nav li > p {
+ margin-bottom: -8px;
+}
+
li p {
color: #f0f0f1;
font-family: Roboto,sans-serif;
@@ -30,6 +34,7 @@ li p {
text-decoration: none;
padding: 2px 15px;
height: 30px;
+ margin: 0;
}
iframe {
From 37733952809b3c723a8e9e4f0e79327d0c89a216 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=91=A8=E6=96=87=E5=BA=86?=
Date: Mon, 5 Sep 2022 07:55:42 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=ADiframe?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E6=98=AF=E5=90=A6=E6=8F=90=E4=BE=9BReconnect?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E6=9C=89=E6=8F=90=E4=BE=9B=E7=9A=84?=
=?UTF-8?q?=E8=AF=9D=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=B0=83=E7=94=A8Reconnect?=
=?UTF-8?q?=EF=BC=8C=E8=80=8C=E4=B8=8D=E6=98=AF=E5=88=B7=E6=96=B0=E6=95=B4?=
=?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/elements/iframe/iframe.component.ts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/app/elements/iframe/iframe.component.ts b/src/app/elements/iframe/iframe.component.ts
index 4c25cb42..2b899917 100644
--- a/src/app/elements/iframe/iframe.component.ts
+++ b/src/app/elements/iframe/iframe.component.ts
@@ -45,6 +45,9 @@ export class ElementIframeComponent implements OnInit, AfterViewInit, OnDestroy
case 'CLOSE':
this.view.connected = false;
break;
+ case 'CONNECTED':
+ this.view.connected = true;
+ break;
case 'CLICK':
document.body.click();
break;
@@ -86,6 +89,12 @@ export class ElementIframeComponent implements OnInit, AfterViewInit, OnDestroy
}
reconnect() {
+ // @ts-ignore
+ if (typeof (this.iframeWindow.Reconnect) === 'function') {
+ // @ts-ignore
+ this.iframeWindow.Reconnect();
+ return;
+ }
const url = this.src;
this.src = 'about:blank';
setTimeout(() => {