vargburz
2 years ago
11 changed files with 10146 additions and 0 deletions
@ -0,0 +1,30 @@
|
||||
# Logs |
||||
logs |
||||
*.log |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
|
||||
node_modules/ |
||||
|
||||
# Runtime data |
||||
pids |
||||
*.pid |
||||
*.seed |
||||
*.pid.lock |
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover |
||||
lib-cov |
||||
|
||||
# Coverage directory used by tools like istanbul |
||||
coverage |
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html) |
||||
dist/ |
||||
artifacts/ |
||||
work/ |
||||
ci/ |
||||
e2e-results/ |
||||
|
||||
# Editors |
||||
.idea |
@ -0,0 +1,3 @@
|
||||
module.exports = { |
||||
...require('./node_modules/@grafana/toolkit/src/config/prettier.plugin.config.json'), |
||||
}; |
@ -0,0 +1,8 @@
|
||||
// This file is needed because it is used by vscode and other tools that
|
||||
// call `jest` directly. However, unless you are doing anything special
|
||||
// do not edit this file
|
||||
|
||||
const standard = require('@grafana/toolkit/src/config/jest.plugin.config'); |
||||
|
||||
// This process will use the same config that `yarn test` is using
|
||||
module.exports = standard.jestConfig(); |
@ -0,0 +1,28 @@
|
||||
{ |
||||
"name": "grafana-data-exporter-panel", |
||||
"version": "1.0.0", |
||||
"description": "Data Exporter Plugin", |
||||
"scripts": { |
||||
"build": "grafana-toolkit plugin:build", |
||||
"test": "grafana-toolkit plugin:test", |
||||
"dev": "grafana-toolkit plugin:dev", |
||||
"watch": "grafana-toolkit plugin:dev --watch", |
||||
"sign": "grafana-toolkit plugin:sign", |
||||
"start": "yarn watch", |
||||
"lint": "yarn prettier --write ." |
||||
}, |
||||
"author": "CorpGlory Inc.", |
||||
"license": "Apache-2.0", |
||||
"devDependencies": { |
||||
"@grafana/data": "latest", |
||||
"@grafana/toolkit": "latest", |
||||
"@grafana/ui": "latest", |
||||
"@types/grafana": "github:CorpGlory/types-grafana#8c55ade5212f089748f6955f73e8f753fff9f278", |
||||
"emotion": "10.0.27", |
||||
"lodash": "^4.17.21", |
||||
"prettier": "^2.6.2" |
||||
}, |
||||
"engines": { |
||||
"node": ">=14" |
||||
} |
||||
} |
@ -0,0 +1,17 @@
|
||||
import { PanelOptions } from '../types'; |
||||
|
||||
import { PanelProps } from '@grafana/data'; |
||||
|
||||
import React from 'react'; |
||||
import * as _ from 'lodash'; |
||||
|
||||
interface Props extends PanelProps<PanelOptions> { } |
||||
|
||||
export function Panel({ options, data, width, height, timeRange, onChangeTimeRange }: Props) { |
||||
console.log('panel',options, data); |
||||
return ( |
||||
<div> |
||||
test |
||||
</div> |
||||
); |
||||
} |
@ -0,0 +1,33 @@
|
||||
import { PanelOptions } from './types'; |
||||
|
||||
import { Panel } from './components/Panel'; |
||||
|
||||
import { PanelPlugin } from '@grafana/data'; |
||||
|
||||
export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((builder) => { |
||||
return ( |
||||
builder |
||||
.addRadio({ |
||||
path: 'visualizationType', |
||||
name: 'Pod', |
||||
category: ['Visualization'], |
||||
defaultValue: '1', |
||||
settings: { |
||||
options: [ |
||||
{ |
||||
label: 'Gauge', |
||||
value: '1', |
||||
}, |
||||
{ |
||||
label: 'Line', |
||||
value: '2', |
||||
}, |
||||
{ |
||||
label: 'Bar', |
||||
value: '3', |
||||
}, |
||||
], |
||||
}, |
||||
}) |
||||
) |
||||
}); |
@ -0,0 +1,38 @@
|
||||
{ |
||||
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json", |
||||
"type": "panel", |
||||
"name": "Data Exporter", |
||||
"id": "corpglory-dataexporter-panel", |
||||
"info": { |
||||
"description": "Panel for exporting metrics from Grafana dashboards.", |
||||
"author": { |
||||
"name": "CorpGlory Inc.", |
||||
"url": "https://corpglory.com" |
||||
}, |
||||
"keywords": [], |
||||
"logos": { |
||||
"small": "assets/logo.svg", |
||||
"large": "assets/logo.svg" |
||||
}, |
||||
"links": [ |
||||
{ |
||||
"name": "Website", |
||||
"url": "https://chartwerk.io/" |
||||
}, |
||||
{ |
||||
"name": "License", |
||||
"url": "https://gitlab.com/chartwerk/grafana-chartwerk-panel/blob/main/LICENSE" |
||||
}, |
||||
{ |
||||
"name": "Gitlab", |
||||
"url": "https://gitlab.com/chartwerk/grafana-chartwerk-panel/" |
||||
} |
||||
], |
||||
"version": "%VERSION%", |
||||
"updated": "%TODAY%" |
||||
}, |
||||
"dependencies": { |
||||
"grafanaDependency": ">=9.0.0", |
||||
"plugins": [] |
||||
} |
||||
} |
@ -0,0 +1,3 @@
|
||||
export interface PanelOptions { |
||||
visualizationType: string; |
||||
} |
@ -0,0 +1,14 @@
|
||||
{ |
||||
"extends": "./node_modules/@grafana/toolkit/src/config/tsconfig.plugin.json", |
||||
"include": [ |
||||
"src", |
||||
"types" |
||||
], |
||||
"compilerOptions": { |
||||
"rootDir": "./src", |
||||
"baseUrl": "./src", |
||||
"typeRoots": [ |
||||
"./node_modules/@types" |
||||
] |
||||
} |
||||
} |
Loading…
Reference in new issue