Skip to content

Commit 27f8ace

Browse files
committed
Modify readme
1 parent fe93eea commit 27f8ace

File tree

1 file changed

+79
-45
lines changed

1 file changed

+79
-45
lines changed

README.md

Lines changed: 79 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Redis Pub/Sub Listener GUI
22

3+
![Redi Pub/Sub GUI](./screenshot.png 'Redi Pub/Sub GUI')
4+
5+
## Top Bar
6+
7+
Just write the redis enter the `host` and `port` or just leave it with the defaults. after that you can click on `Start` button to listen and recieve the message on default channels.
8+
9+
You can also `Stop` to recieving any message fron the channels.
10+
11+
There is another `Clear` button that help to remove and cleare recieved messages from redis channels.
12+
13+
You can find to `Up`/`Down` button, these help you to increase or decrase the font of console.
14+
15+
# Settings
16+
17+
The `Eye Button`, it helps you to follow the console logs and scroll down or up without any concern about news logs and auto scrolling issue.
18+
19+
The `Save` button save all things that you write in inputs or set on the switches.
20+
21+
The `Load` button also helps you to reload the saved settings.
22+
23+
Pay attention that you can save only one settings and use it for all of your channel pages.
24+
25+
# SSH Client
26+
27+
IF you need to connect the redis on another server with SSh, you can switch it `on` and write down your credentials. and then start the listener.
28+
29+
# Another huge SETTINGS
30+
31+
Default channel is `info`, if you want to listen on another channel, just write down the channel name before you click on `start` button.
32+
33+
Can you see the little buggy counter box with the silly plus/mines buttons? that helps you to set the logs stock size. the default set on 500, if you have strong and crazy system, just increase the number.
34+
335
### Filter
436

537
To filter the response, just write your filter based on following pattern:
@@ -14,6 +46,8 @@ For example, I want to filter the response just if the `size` is `50`
1446
size => size === 50
1547
```
1648

49+
**Pay attentions: until you click on `Submit Filter`, there filter doesn't make any effect on logs, so whene you wrote down the filter, just click on _Submit Button_**
50+
1751
**For condition you can use any javascript methods that help you to filter the data.**
1852

1953
If you have more than one condition, just write another condition on the **Next Line**:
@@ -27,42 +61,42 @@ This is a complete example:
2761

2862
```javascript
2963
const products = [
30-
{
31-
name: 'A',
32-
color: 'Blue',
33-
size: 50,
34-
locations: ['USA', 'Europe'],
35-
details: { length: 20, width: 70 }
36-
},
37-
{
38-
name: 'B',
39-
color: 'Blue',
40-
size: 60,
41-
locations: [],
42-
details: { length: 20, width: 70 }
43-
},
44-
{
45-
name: 'C',
46-
color: 'Black',
47-
size: 70,
48-
locations: ['Japan'],
49-
details: { length: 20, width: 71 }
50-
},
51-
{
52-
name: 'D',
53-
color: 'Green',
54-
size: 50,
55-
locations: ['USA'],
56-
details: { length: 20, width: 71 }
57-
}
64+
{
65+
name: 'A',
66+
color: 'Blue',
67+
size: 50,
68+
locations: ['USA', 'Europe'],
69+
details: { length: 20, width: 70 }
70+
},
71+
{
72+
name: 'B',
73+
color: 'Blue',
74+
size: 60,
75+
locations: [],
76+
details: { length: 20, width: 70 }
77+
},
78+
{
79+
name: 'C',
80+
color: 'Black',
81+
size: 70,
82+
locations: ['Japan'],
83+
details: { length: 20, width: 71 }
84+
},
85+
{
86+
name: 'D',
87+
color: 'Green',
88+
size: 50,
89+
locations: ['USA'],
90+
details: { length: 20, width: 71 }
91+
}
5892
];
5993

6094
const filters = {
61-
size: (size) => size === 50 || size === 70,
62-
color: (color) => ['blue', 'black'].includes(color.toLowerCase()),
63-
locations: (locations) =>
64-
locations.find((x) => ['JAPAN', 'USA'].includes(x.toUpperCase())),
65-
details: (details) => details.length < 30 && details.width >= 70
95+
size: size => size === 50 || size === 70,
96+
color: color => ['blue', 'black'].includes(color.toLowerCase()),
97+
locations: locations =>
98+
locations.find(x => ['JAPAN', 'USA'].includes(x.toUpperCase())),
99+
details: details => details.length < 30 && details.width >= 70
66100
};
67101

68102
// RESULT:
@@ -88,17 +122,17 @@ Another filter example:
88122

89123
```javascript
90124
const filters = {
91-
size: (size) => size === 50 || size === 70,
92-
color: (color) => ['blue', 'black'].includes(color.toLowerCase()),
93-
details: (details) => details.length < 30 && details.width >= 70,
94-
locations: (locations) => {
95-
if (locations.includes('USA')) return true; // case sensitive
96-
if (locations.includes('Japan')) return true; // case sensitive
97-
98-
const url = window.location.pathname.toLowerCase();
99-
if (url.includes('/en-us/')) return true; // not case sensitive
100-
if (url.includes('/es/')) return true; // not case sensitive
101-
return false;
102-
}
125+
size: size => size === 50 || size === 70,
126+
color: color => ['blue', 'black'].includes(color.toLowerCase()),
127+
details: details => details.length < 30 && details.width >= 70,
128+
locations: locations => {
129+
if (locations.includes('USA')) return true; // case sensitive
130+
if (locations.includes('Japan')) return true; // case sensitive
131+
132+
const url = window.location.pathname.toLowerCase();
133+
if (url.includes('/en-us/')) return true; // not case sensitive
134+
if (url.includes('/es/')) return true; // not case sensitive
135+
return false;
136+
}
103137
};
104138
```

0 commit comments

Comments
 (0)