Skip to content

Commit e31d88c

Browse files
authored
Update dashboards in the application's menu as pages (#73)
1 parent 2429018 commit e31d88c

File tree

6 files changed

+48
-13
lines changed

6 files changed

+48
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
## 2.0.0 (IN PROGRESS)
44

5+
### Features / Enhancements
6+
7+
- Upgrade to Grafana 8.0.2 (#67)
8+
- Update dashboards for v8 and minor updates (#69)
9+
- Replace old Latency Graph with TimeSeries component (#70)
10+
- Add Redis 7 commands to CLI (#71)
11+
- Add NgAlert and Plugin catalog to docker image (#72)
12+
513
### Bug fixes
614

715
- "Available Requirements" panel should be set to $redis datasource #63
816
- Cannot read property 'v1' of undefined (theme.v1) in the Grafana8 #65
9-
- Upgrade to Grafana 8.0.2 (#67)
17+
- Add theme to getDisplayProcessor (#66)
18+
- Fix adding new data source and minor updates (#68)
1019

1120
## 1.2.0 (2021-05-11)
1221

src/components/config/config.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
22
import { AppPluginMeta, PluginConfigPageProps } from '@grafana/data';
33
import { BackendSrv, getBackendSrv, getLocationSrv } from '@grafana/runtime';
44
import { Button } from '@grafana/ui';
5-
import { ApplicationRoot } from '../../constants';
5+
import { ApplicationName, ApplicationRoot } from '../../constants';
66
import { GlobalSettings } from '../../types';
77

88
/**
@@ -100,7 +100,7 @@ export class Config extends PureComponent<Props, State> {
100100

101101
return (
102102
<>
103-
<h2>Redis Application</h2>
103+
<h2>{ApplicationName}</h2>
104104
<p>The Redis Application, is a plugin for Grafana that provides custom panels for Redis Data Source.</p>
105105
{!isEnabled && (
106106
<p>

src/components/root-page/root-page.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import { Observable } from 'rxjs';
44
import { AppPluginMeta, PluginType } from '@grafana/data';
55
import { Alert } from '@grafana/ui';
6-
import { DataSourceType, RedisCommand } from '../../constants';
6+
import { ApplicationName, DataSourceType, RedisCommand } from '../../constants';
77
import { DataSourceList } from '../data-source-list';
88
import { RootPage } from './root-page';
99

@@ -161,7 +161,7 @@ describe('RootPage', () => {
161161
);
162162
wrapper.instance().updateNav();
163163
const node = {
164-
text: 'Redis Application',
164+
text: ApplicationName,
165165
img: meta.info.logos.large,
166166
subTitle: 'Redis Data Source',
167167
url: path,

src/components/root-page/root-page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@grafana/data';
1111
import { config, getBackendSrv, getDataSourceSrv } from '@grafana/runtime';
1212
import { Alert } from '@grafana/ui';
13-
import { DataSourceType, RedisCommand } from '../../constants';
13+
import { ApplicationName, DataSourceType, RedisCommand } from '../../constants';
1414
import { RedisQuery } from '../../redis-cli-panel/types';
1515
import { GlobalSettings, RedisDataSourceInstanceSettings } from '../../types';
1616
import { DataSourceList } from '../data-source-list';
@@ -165,7 +165,7 @@ export class RootPage extends PureComponent<Props, State> {
165165
* Header
166166
*/
167167
const node = {
168-
text: 'Redis Application',
168+
text: ApplicationName,
169169
img: meta.info.logos.large,
170170
subTitle: 'Redis Data Source',
171171
url: path,

src/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ export enum ClientTypeValue {
4040
* Application root page
4141
*/
4242
export const ApplicationRoot = '/a/redis-app';
43+
44+
/**
45+
* Application's name
46+
*/
47+
export const ApplicationName = 'Redis Application';

src/plugin.json

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,49 @@
2323
"type": "page"
2424
},
2525
{
26-
"addToNav": true,
26+
"addToNav": false,
27+
"name": "Redis Overview",
28+
"path": "dashboards/redis-overview.json",
29+
"role": "Admin",
30+
"type": "dashboard"
31+
},
32+
{
33+
"addToNav": false,
2734
"name": "Redis CLI",
28-
"icon": "calculator-alt",
2935
"path": "dashboards/redis-cli.json",
3036
"role": "Admin",
3137
"type": "dashboard"
3238
},
39+
{
40+
"addToNav": false,
41+
"name": "RedisGears",
42+
"path": "dashboards/redis-gears.json",
43+
"role": "Admin",
44+
"type": "dashboard"
45+
},
3346
{
3447
"addToNav": true,
3548
"name": "Redis Overview",
3649
"icon": "monitor",
37-
"path": "dashboards/redis-overview.json",
50+
"path": "/d/RpSjVqWMz",
3851
"role": "Admin",
39-
"type": "dashboard"
52+
"type": "page"
53+
},
54+
{
55+
"addToNav": true,
56+
"name": "Redis CLI",
57+
"icon": "calculator-alt",
58+
"path": "/d/_SGxCBNGk",
59+
"role": "Admin",
60+
"type": "page"
4061
},
4162
{
4263
"addToNav": true,
4364
"name": "RedisGears",
4465
"icon": "cog",
45-
"path": "dashboards/redis-gears.json",
66+
"path": "/d/xFPiNzLMz",
4667
"role": "Admin",
47-
"type": "dashboard"
68+
"type": "page"
4869
},
4970
{
5071
"name": "Redis CLI Panel",

0 commit comments

Comments
 (0)