Skip to content

Commit 9b03f7b

Browse files
wuriyantowuriyanto
authored andcommitted
dashboard: display pics
1 parent 572e571 commit 9b03f7b

File tree

2 files changed

+37
-15
lines changed

2 files changed

+37
-15
lines changed

config_example.json

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,103 +5,116 @@
55
"url": "postgres://demo:12345@localhost:5432/demo?sslmode=disable",
66
"checkInterval": 10,
77
"enable": false,
8-
"tags": ["product 1", "product 2"]
8+
"tags": ["product 1", "product 2"],
9+
"pics": ["alex", "jason"]
910
},
1011

1112
"postgresql_two": {
1213
"kind": "postgresql",
1314
"url": "postgres://demo:12345@localhost:5433/demo?sslmode=disable",
1415
"checkInterval": 10,
1516
"enable": false,
16-
"tags": ["product 1", "product 2"]
17+
"tags": ["product 1", "product 2"],
18+
"pics": ["alex", "jason"]
1719
},
1820

1921
"oracle_one": {
2022
"kind": "oracle",
2123
"url": "oracle://username:pass%[email protected]:1521/servicename",
2224
"checkInterval": 10,
2325
"enable": false,
24-
"tags": ["product 1", "product 2"]
26+
"tags": ["product 1", "product 2"],
27+
"pics": ["alex", "jason"]
2528
},
2629

2730
"mongodb_one": {
2831
"kind": "mongodb",
2932
"url": "mongodb://admin:admin@localhost:27017",
3033
"checkInterval": 10,
3134
"enable": false,
32-
"tags": ["product 2"]
35+
"tags": ["product 2"],
36+
"pics": ["alex", "jason"]
3337
},
3438

3539
"mysql_one": {
3640
"kind": "mysql",
3741
"url": "demo:123456@tcp(127.0.0.1:3306)/demo",
3842
"checkInterval": 5,
3943
"enable": false,
40-
"tags": ["product 1"]
44+
"tags": ["product 1"],
45+
"pics": ["alex", "jason"]
4146
},
4247

4348
"redis_one": {
4449
"kind": "redis",
4550
"url": "redis://:[email protected]:6379",
4651
"checkInterval": 5,
4752
"enable": false,
48-
"tags": ["product 1", "product 2", "product 3"]
53+
"tags": ["product 1", "product 2", "product 3"],
54+
"pics": ["alex", "jason"]
4955
},
5056

5157
"minio_one": {
5258
"kind": "web",
5359
"url": "https://minio-storage.com/minio/health/ready",
5460
"checkInterval": 10,
5561
"enable": false,
56-
"tags": ["product 1", "product 2"]
62+
"tags": ["product 1", "product 2"],
63+
"pics": ["alex", "jason"]
5764
},
5865

5966
"elasticsearch_cluster_one": {
6067
"kind": "elasticsearch",
6168
"url": "http://elastic:devpass@localhost:9200/_cluster/health?pretty",
6269
"checkInterval": 10,
6370
"enable": false,
64-
"tags": ["product 1", "product 2"]
71+
"tags": ["product 1", "product 2"],
72+
"pics": ["alex", "jason"]
6573
},
6674

6775
"kafka_cluster_one": {
6876
"kind": "kafka",
6977
"url": "kafka://myname:[email protected]:9093,10.1.1.2:9093,10.1.1.3:9093",
7078
"checkInterval": 5,
7179
"enable": false,
72-
"tags": ["product 1", "product 2"]
80+
"tags": ["product 1", "product 2"],
81+
"pics": ["bimo", "walker"]
7382
},
7483

7584
"kafka_local": {
7685
"kind": "kafka",
7786
"url": "kafka://127.0.0.1:9092",
7887
"checkInterval": 5,
7988
"enable": false,
80-
"tags": ["product 1", "product 2"]
89+
"tags": ["product 1", "product 2"],
90+
"pics": ["ryan", "walker"]
8191
},
8292

8393
"airflow_one": {
8494
"kind": "airflow",
8595
"url": "http://localhost:8080/health",
8696
"checkInterval": 10,
8797
"enable": false,
88-
"tags": ["product 1"]
98+
"tags": ["product 1"],
99+
"pics": ["ryan", "walker"]
89100
},
90101

91102
"airflow_flower_one": {
92103
"kind": "airflowflower",
93104
"url": "http://localhost:9090",
94105
"checkInterval": 10,
95106
"enable": false,
96-
"tags": ["product 1", "product 2"]
107+
"tags": ["product 1", "product 2"],
108+
"pics": ["ryan", "walker"]
97109
},
98110

99111
"dummy_one": {
100112
"kind": "dummy",
101113
"url": "https://minio-storage.com/minio/health/ready",
102114
"checkInterval": 5,
103115
"enable": true,
104-
"tags": ["product 1", "product 2"]
116+
"tags": ["product 1", "product 2"],
117+
"pics": ["ryan", "walker"]
105118
},
106119

107120
"server_1_storage_status": {
@@ -111,7 +124,8 @@
111124
"thresholdDiskUsage": 5,
112125
"fileSystem": "/dev/sdd",
113126
"enable": false,
114-
"tags": ["product 1", "product 2"]
127+
"tags": ["product 1", "product 2"],
128+
"pics": ["ryan", "walker"]
115129
}
116130
},
117131

dashboard/ui/src/pages/dashboard.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ function Dashboard() {
153153
<div style={{ flex: '1 1 auto', marginBottom: '10px' }}>
154154
<img
155155
src="tob.png"
156+
title='Tob the Bot (https://github.com/telkomdev/tob)'
156157
alt="Logo"
157158
style={{
158159
width: '100px',
@@ -251,10 +252,17 @@ function Dashboard() {
251252
{service.messageDetails}
252253
</span>
253254
)}
254-
255+
256+
{service.pics && service.pics.length > 0 && (
257+
<span style={{ fontSize: '14px', color: '#555', marginBottom: '10px', fontWeight: 'bold' }}>
258+
<span style={{ color: '#04a0bf' }}>PICs: {service.pics.join(', ')}</span>
259+
</span>
260+
)}
261+
255262
<span style={{ fontSize: '13px', color: '#555' }}>
256263
<span style={{ color: '#593f03' }}>Last checked: {service.latestCheckTime}</span>
257264
</span>
265+
258266
{service.tags && (
259267
<div style={getTagsStyle()}>
260268
{service.tags.map((tag, tagIndex) => (

0 commit comments

Comments
 (0)