generated from gapitio/utility-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add getMetricValueByName function
Retrieves last metric value based off of the name provided
- Loading branch information
Showing
12 changed files
with
434 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,8 @@ | |
"editor.formatOnSave": true, | ||
"files.exclude": { | ||
"**/node_modules/*": true | ||
} | ||
}, | ||
"cSpell.words": [ | ||
"grafana" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# Changelog for component-template | ||
# Changelog for grafana-metric | ||
|
||
## v0.0.0 (YYYY/MM/DD) | ||
|
||
### Breaking changes | ||
|
||
### Features / enhancements | ||
|
||
### Bug fixes | ||
- Add getMetricValueByName which retrieves last metric value based off of the name provided. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
# Component name | ||
# HTMLGraphics metric | ||
|
||
A short description of the component | ||
|
||
E.g. This component adds two numbers together. | ||
It also has a variable and function that returns "something". | ||
Retrieves metric value from Grafana's [data interface](https://grafana.com/docs/grafana/latest/packages_api/data/paneldata/). | ||
|
||
## Usage | ||
|
||
Description/example on how to use the component. | ||
|
||
### add | ||
|
||
```ts | ||
import { add } from "@gapit/component-template"; | ||
|
||
add(2, 3); // Returns 5 | ||
``` | ||
### getMetricValueByName | ||
|
||
### SOMETHING_VARIABLE | ||
Retrieves last metric value based off of the name provided. | ||
|
||
```ts | ||
import { SOMETHING_VARIABLE } from "@gapit/component-template"; | ||
import { getMetricValueByName } from "@gapit/grafana-metric"; | ||
|
||
console.log(SOMETHING_VARIABLE); // Returns "something | ||
getMetricValueByName("metric-name"); // Returns metric value | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.