Skip to content

Commit

Permalink
Update dashboards in the application's menu as pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-vl committed Jun 18, 2021
1 parent 2429018 commit 6590cfe
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 13 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

## 2.0.0 (IN PROGRESS)

### Features / Enhancements

- Upgrade to Grafana 8.0.2 (#67)
- Update dashboards for v8 and minor updates (#69)
- Replace old Latency Graph with TimeSeries component (#70)
- Add Redis 7 commands to CLI (#71)
- Add NgAlert and Plugin catalog to docker image (#72)

### Bug fixes

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

## 1.2.0 (2021-05-11)

Expand Down
4 changes: 2 additions & 2 deletions src/components/config/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import { AppPluginMeta, PluginConfigPageProps } from '@grafana/data';
import { BackendSrv, getBackendSrv, getLocationSrv } from '@grafana/runtime';
import { Button } from '@grafana/ui';
import { ApplicationRoot } from '../../constants';
import { ApplicationName, ApplicationRoot } from '../../constants';
import { GlobalSettings } from '../../types';

/**
Expand Down Expand Up @@ -100,7 +100,7 @@ export class Config extends PureComponent<Props, State> {

return (
<>
<h2>Redis Application</h2>
<h2>{ApplicationName}</h2>
<p>The Redis Application, is a plugin for Grafana that provides custom panels for Redis Data Source.</p>
{!isEnabled && (
<p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/root-page/root-page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { Observable } from 'rxjs';
import { AppPluginMeta, PluginType } from '@grafana/data';
import { Alert } from '@grafana/ui';
import { DataSourceType, RedisCommand } from '../../constants';
import { ApplicationName, DataSourceType, RedisCommand } from '../../constants';
import { DataSourceList } from '../data-source-list';
import { RootPage } from './root-page';

Expand Down Expand Up @@ -161,7 +161,7 @@ describe('RootPage', () => {
);
wrapper.instance().updateNav();
const node = {
text: 'Redis Application',
text: ApplicationName,
img: meta.info.logos.large,
subTitle: 'Redis Data Source',
url: path,
Expand Down
4 changes: 2 additions & 2 deletions src/components/root-page/root-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@grafana/data';
import { config, getBackendSrv, getDataSourceSrv } from '@grafana/runtime';
import { Alert } from '@grafana/ui';
import { DataSourceType, RedisCommand } from '../../constants';
import { ApplicationName, DataSourceType, RedisCommand } from '../../constants';
import { RedisQuery } from '../../redis-cli-panel/types';
import { GlobalSettings, RedisDataSourceInstanceSettings } from '../../types';
import { DataSourceList } from '../data-source-list';
Expand Down Expand Up @@ -165,7 +165,7 @@ export class RootPage extends PureComponent<Props, State> {
* Header
*/
const node = {
text: 'Redis Application',
text: ApplicationName,
img: meta.info.logos.large,
subTitle: 'Redis Data Source',
url: path,
Expand Down
5 changes: 5 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ export enum ClientTypeValue {
* Application root page
*/
export const ApplicationRoot = '/a/redis-app';

/**
* Application's name
*/
export const ApplicationName = 'Redis Application';
33 changes: 27 additions & 6 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,49 @@
"type": "page"
},
{
"addToNav": true,
"addToNav": false,
"name": "Redis Overview",
"path": "dashboards/redis-overview.json",
"role": "Admin",
"type": "dashboard"
},
{
"addToNav": false,
"name": "Redis CLI",
"icon": "calculator-alt",
"path": "dashboards/redis-cli.json",
"role": "Admin",
"type": "dashboard"
},
{
"addToNav": false,
"name": "RedisGears",
"path": "dashboards/redis-gears.json",
"role": "Admin",
"type": "dashboard"
},
{
"addToNav": true,
"name": "Redis Overview",
"icon": "monitor",
"path": "dashboards/redis-overview.json",
"path": "/d/RpSjVqWMz",
"role": "Admin",
"type": "dashboard"
"type": "page"
},
{
"addToNav": true,
"name": "Redis CLI",
"icon": "calculator-alt",
"path": "/d/_SGxCBNGk",
"role": "Admin",
"type": "page"
},
{
"addToNav": true,
"name": "RedisGears",
"icon": "cog",
"path": "dashboards/redis-gears.json",
"path": "/d/xFPiNzLMz",
"role": "Admin",
"type": "dashboard"
"type": "page"
},
{
"name": "Redis CLI Panel",
Expand Down

0 comments on commit 6590cfe

Please sign in to comment.