From 428f5f5de8d020958dfef4c1bd2d6af5f30a2f83 Mon Sep 17 00:00:00 2001 From: patrikx3 Date: Thu, 28 Mar 2024 17:26:16 +0100 Subject: [PATCH] r0b08x [chore] 3/28/2024, 5:26:16 PM --- README.md | 4 +- package.json | 2 +- .../dialog/p3xr-dialog-connection.html | 125 ++++++++++-------- src/angular/dialog/p3xr-dialog-connection.js | 14 ++ src/strings/en/strings.js | 4 + src/strings/ru/strings.js | 4 + src/strings/zn/strings.js | 4 + 7 files changed, 100 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index ac1f69d..5aa9d9c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ https://corifeus.com/redis-ui --- -# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.171 +# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.172 @@ -77,7 +77,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https:// --- -[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.171 +[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.172 [![NPM](https://img.shields.io/npm/v/p3x-redis-ui-material.svg)](https://www.npmjs.com/package/p3x-redis-ui-material) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) diff --git a/package.json b/package.json index c743730..7d83612 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p3x-redis-ui-material", - "version": "2024.4.171", + "version": "2024.4.172", "description": "💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io", "corifeus": { "icon": "fas fa-database", diff --git a/src/angular/dialog/p3xr-dialog-connection.html b/src/angular/dialog/p3xr-dialog-connection.html index 7a538b9..c0a3c47 100644 --- a/src/angular/dialog/p3xr-dialog-connection.html +++ b/src/angular/dialog/p3xr-dialog-connection.html @@ -64,73 +64,35 @@

{{ $root.p3xr.state.cfg.readonlyConnections ?
- - {{ $root.p3xr.strings.label.tlsWithoutCert }} - - - - {{ $root.p3xr.strings.label.tlsRejectUnauthorized }} - - -
- - - - -
- {{ $root.p3xr.strings.label.tlsSecure }} -
-
- - - - - -
- {{ $root.p3xr.strings.label.tlsSecure }} +
+ +
+
+ + {{ model.cluster ? $root.p3xr.strings.label.cluster.on : $root.p3xr.strings.label.cluster.off }} +
-
- - - - - -
- {{ $root.p3xr.strings.label.tlsSecure }} + +
+ + {{ model.sentinel ? $root.p3xr.strings.label.sentinel.on : $root.p3xr.strings.label.sentinel.off }} +
-
- - - - {{ model.readonly ? $root.p3xr.strings.label.readonly.on : $root.p3xr.strings.label.readonly.off }} - - -
- - - {{ model.cluster ? $root.p3xr.strings.label.cluster.on : $root.p3xr.strings.label.cluster.off }} - - - + add {{ $root.p3xr.strings.label.addNode }} -
+
@@ -188,7 +150,62 @@

{{ $root.p3xr.state.cfg.readonlyConnections ?

+
+ + + + {{ $root.p3xr.strings.label.tlsWithoutCert }} + + + + {{ $root.p3xr.strings.label.tlsRejectUnauthorized }} + + +
+ + + + + +
+ {{ $root.p3xr.strings.label.tlsSecure }} +
+
+ + + + + +
+ {{ $root.p3xr.strings.label.tlsSecure }} +
+
+ + + + + +
+ {{ $root.p3xr.strings.label.tlsSecure }} +
+ +
+ + + + + + {{ model.readonly ? $root.p3xr.strings.label.readonly.on : $root.p3xr.strings.label.readonly.off }} + + +
diff --git a/src/angular/dialog/p3xr-dialog-connection.js b/src/angular/dialog/p3xr-dialog-connection.js index e2ab6cd..fce3834 100644 --- a/src/angular/dialog/p3xr-dialog-connection.js +++ b/src/angular/dialog/p3xr-dialog-connection.js @@ -39,6 +39,9 @@ p3xr.ng.factory('p3xrDialogConnection', function (p3xrCommon, $mdDialog, p3xrSoc if (!$scope.model.hasOwnProperty('cluster')) { $scope.model.cluster = false } + if (!$scope.model.hasOwnProperty('sentinel')) { + $scope.model.sentinel = false + } if (!$scope.model.hasOwnProperty('nodes')) { $scope.model.nodes = [] @@ -48,6 +51,17 @@ p3xr.ng.factory('p3xrDialogConnection', function (p3xrCommon, $mdDialog, p3xrSoc node.password = node.id } + $scope.$watch('model.cluster', function (newValue, oldValue) { + if (newValue === true) { + $scope.model.sentinel = false + } + }) + $scope.$watch('model.sentinel', function (newValue, oldValue) { + if (newValue === true) { + $scope.model.cluster = false + } + }) + // Promise reject $scope.cancel = function () { /* diff --git a/src/strings/en/strings.js b/src/strings/en/strings.js index 35f4c95..bef32ba 100644 --- a/src/strings/en/strings.js +++ b/src/strings/en/strings.js @@ -180,6 +180,10 @@ const strings = { on: "Cluster on", off: "Cluster off", }, + sentinel: { + on: "Sentinel on", + off: "Sentinel off", + }, readonly: { on: "Readonly on", off: "Readonly off", diff --git a/src/strings/ru/strings.js b/src/strings/ru/strings.js index 29f6c0c..fea5c3f 100644 --- a/src/strings/ru/strings.js +++ b/src/strings/ru/strings.js @@ -183,6 +183,10 @@ const strings = { on: "Кластеризация активирована", off: "Кластеризация деактивирована", }, + sentinel: { + on: "Сентинел включен", + off: "Сентинел выключен", + }, readonly: { on: 'Режим "только чтение"', off: 'Режим "редактирование"', diff --git a/src/strings/zn/strings.js b/src/strings/zn/strings.js index 1410b3e..a5e58f9 100644 --- a/src/strings/zn/strings.js +++ b/src/strings/zn/strings.js @@ -170,6 +170,10 @@ const strings = { on: "群集", off: "集群关闭", }, + sentinel: { + on: "哨兵開啟", + off: "哨兵關閉", + }, readonly: { on: "只读", off: "只读关闭",