Skip to content

Commit

Permalink
r0b08x [chore] 3/28/2024, 5:26:16 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Mar 28, 2024
1 parent d8bea70 commit 428f5f5
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 57 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
125 changes: 71 additions & 54 deletions src/angular/dialog/p3xr-dialog-connection.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,73 +64,35 @@ <h2 flex md-truncate>{{ $root.p3xr.state.cfg.readonlyConnections ?
<br/>
</span>

<md-switch ng-model="model.tlsWithoutCert" name="tlsWithoutCert" aria-label=""
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ $root.p3xr.strings.label.tlsWithoutCert }}
</md-switch>

<md-switch ng-model="model.tlsRejectUnauthorized" name="tlsRejectUnauthorized" aria-label=""
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ $root.p3xr.strings.label.tlsRejectUnauthorized }}
</md-switch>

<div ng-if="model.tlsWithoutCert !== true" style="padding-top: 4px;">

<md-input-container class="md-block p3xr-md-input-container-no-bottom">
<label>TLS (redis.crt)</label>
<textarea name="tlsCrt" ng-model="model.tlsCrt"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections" autocomplete="off"></textarea>
</md-input-container>
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.tlsSecure }}
</div>
<br/>

<md-input-container class="md-block p3xr-md-input-container-no-bottom">
<label>TLS (redis.key)</label>
<textarea name="tlsKey" ng-model="model.tlsKey"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections" autocomplete="off"></textarea>
</md-input-container>
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.tlsSecure }}
<br/>

<div layout="row" layout-align="start center">
<div>
<md-switch ng-model="model.cluster" name="cluster" aria-label="" style="margin: 0;"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ model.cluster ? $root.p3xr.strings.label.cluster.on : $root.p3xr.strings.label.cluster.off }}
</md-switch>
</div>
<br/>

<md-input-container class="md-block p3xr-md-input-container-no-bottom">
<label>TLS (ca.crt)</label>
<textarea name="tlsCa" ng-model="model.tlsCa"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections" autocomplete="off"></textarea>
</md-input-container>
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.tlsSecure }}

<div style="margin-left: 15px;">
<md-switch ng-model="model.sentinel" name="sentinel" aria-label="" style="margin: 0;"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ model.sentinel ? $root.p3xr.strings.label.sentinel.on : $root.p3xr.strings.label.sentinel.off }}
</md-switch>
</div>

<br/>
</div>



<span ng-if="$root.p3xr.state.donated">
<md-switch ng-model="model.readonly" name="readonly" aria-label="" style="margin: 0;"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ model.readonly ? $root.p3xr.strings.label.readonly.on : $root.p3xr.strings.label.readonly.off }}
</md-switch>

<br/>

<md-switch ng-model="model.cluster" name="cluster" aria-label="" style="margin: 0;"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ model.cluster ? $root.p3xr.strings.label.cluster.on : $root.p3xr.strings.label.cluster.off }}
</md-switch>

<span ng-if="model.cluster === true && !$root.p3xr.state.cfg.readonlyConnections" ng-click="addNode()">
<span ng-if="(model.cluster === true || model.sentinel === true) && !$root.p3xr.state.cfg.readonlyConnections" ng-click="addNode()">
<md-button class="md-fab md-primary md-mini">
<md-icon>add</md-icon>
</md-button>
{{ $root.p3xr.strings.label.addNode }}
</span>

<div ng-if="model.cluster === true">
<div ng-if="(model.cluster === true || model.sentinel === true)">

<div ng-repeat="node in model.nodes">
<fieldset>
Expand Down Expand Up @@ -188,7 +150,62 @@ <h2 flex md-truncate>{{ $root.p3xr.state.cfg.readonlyConnections ?
</div>
<div style="clear: both;"></div>
</div>
</div>


<md-switch ng-model="model.tlsWithoutCert" name="tlsWithoutCert" aria-label=""
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ $root.p3xr.strings.label.tlsWithoutCert }}
</md-switch>

<md-switch ng-model="model.tlsRejectUnauthorized" name="tlsRejectUnauthorized" aria-label=""
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ $root.p3xr.strings.label.tlsRejectUnauthorized }}
</md-switch>

<div ng-if="model.tlsWithoutCert !== true" style="padding-top: 4px;">

<md-input-container class="md-block p3xr-md-input-container-no-bottom">
<label>TLS (redis.crt)</label>
<textarea name="tlsCrt" ng-model="model.tlsCrt"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections" autocomplete="off"></textarea>
</md-input-container>
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.tlsSecure }}
</div>
<br/>

<md-input-container class="md-block p3xr-md-input-container-no-bottom">
<label>TLS (redis.key)</label>
<textarea name="tlsKey" ng-model="model.tlsKey"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections" autocomplete="off"></textarea>
</md-input-container>
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.tlsSecure }}
</div>
<br/>

<md-input-container class="md-block p3xr-md-input-container-no-bottom">
<label>TLS (ca.crt)</label>
<textarea name="tlsCa" ng-model="model.tlsCa"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections" autocomplete="off"></textarea>
</md-input-container>
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.tlsSecure }}
</div>

<br/>
</div>



<span ng-if="$root.p3xr.state.donated">
<md-switch ng-model="model.readonly" name="readonly" aria-label="" style="margin: 0;"
ng-disabled="$root.p3xr.state.cfg.readonlyConnections">
{{ model.readonly ? $root.p3xr.strings.label.readonly.on : $root.p3xr.strings.label.readonly.off }}
</md-switch>


</span>

</div>
Expand Down
14 changes: 14 additions & 0 deletions src/angular/dialog/p3xr-dialog-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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 () {
/*
Expand Down
4 changes: 4 additions & 0 deletions src/strings/en/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions src/strings/ru/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ const strings = {
on: "Кластеризация активирована",
off: "Кластеризация деактивирована",
},
sentinel: {
on: "Сентинел включен",
off: "Сентинел выключен",
},
readonly: {
on: 'Режим "только чтение"',
off: 'Режим "редактирование"',
Expand Down
4 changes: 4 additions & 0 deletions src/strings/zn/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ const strings = {
on: "群集",
off: "集群关闭",
},
sentinel: {
on: "哨兵開啟",
off: "哨兵關閉",
},
readonly: {
on: "只读",
off: "只读关闭",
Expand Down

0 comments on commit 428f5f5

Please sign in to comment.