Skip to content

Commit

Permalink
r0b08x [chore] 4/4/2024, 7:11:15 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Apr 4, 2024
1 parent 7f199ee commit d164f94
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
6 changes: 3 additions & 3 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.218
# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.219



Expand All @@ -26,7 +26,7 @@ https://corifeus.com/redis-ui
### Built on NodeJs version

```txt
v20.12.0
v20.12.1
```


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.218
[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.219

[![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
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "p3x-redis-ui-material",
"version": "2024.4.218",
"version": "2024.4.219",
"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",
"code": "Fireball",
"opencollective": false,
"build": true,
"nodejs": "v20.12.0",
"nodejs": "v20.12.1",
"reponame": "redis-ui-material",
"publish": true,
"prefix": "p3x-",
Expand Down Expand Up @@ -42,8 +42,8 @@
"author": "Patrik Laszlo <[email protected]>",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.24.3",
"@babel/preset-env": "^7.24.3",
"@babel/core": "^7.24.4",
"@babel/preset-env": "^7.24.4",
"@fontsource/roboto": "^5.0.12",
"@fontsource/roboto-mono": "^5.0.17",
"@fortawesome/fontawesome-free": "^6.5.2",
Expand All @@ -64,7 +64,7 @@
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^12.0.2",
"corifeus-builder": "^2024.4.131",
"css-loader": "^6.10.0",
"css-loader": "^6.11.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"grunt-injector": "^1.1.0",
"html-loader": "^5.0.0",
Expand Down
34 changes: 28 additions & 6 deletions src/angular/factory/p3xr-redis-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ p3xr.ng.factory('p3xrRedisParser', function ($rootScope) {
}

this.info = (str) => {
//console.log( str)
console.log( str)
const lines = str.split('\n')
const obj = {}
let section
let currentSectionObj
let hadSection = false

//let pikaIndex = 0
let pikaIndex = 0
for (let line of lines) {
if (line.startsWith('#')) {
if (hadSection) {
Expand All @@ -50,20 +50,42 @@ p3xr.ng.factory('p3xrRedisParser', function ($rootScope) {
if (line.includes(':')) {
lineArray = line.split(':')
value = lineArray[1] ?? "";

currentSectionObj[lineArray[0]] = value.includes(',') ? selfMain.array({
line: value.trim()
}) : value.trim()
} else {
continue
// pika
let [key, values] = line.split(/ (.+)/);
lineArray = key
value = values ?? "";

value = value.split(',').map((item) => `${(pikaIndex) + '-' + item.trim()}`).join(',')

//console.log('value', value)

if (currentSectionObj.hasOwnProperty('db0')) {
Object.assign(currentSectionObj['db0'], value.includes(',') ? selfMain.array({
line: value.trim()
}) : value.trim() )
} else {
currentSectionObj['db0'] = value.includes(',') ? selfMain.array({
line: value.trim()
}) : value.trim()
}
pikaIndex++

}

currentSectionObj[lineArray[0]] = value.includes(',') ? selfMain.array({
line: value.trim()
}) : value.trim()
}
}
if (section !== undefined && Object.keys(currentSectionObj).length > 0) {
obj[section] = currentSectionObj
}


console.warn('info', obj)

obj.keyspaceDatabases = {}
if (obj.hasOwnProperty('keyspace')) {
//alert('ok')
Expand Down

0 comments on commit d164f94

Please sign in to comment.