-
Notifications
You must be signed in to change notification settings - Fork 2
feat: grafana dashboard configuration #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
c9e83f6
feat: create grafana component
bornast 1df2135
docs: add grafana aws account hardcoded value comment
bornast ff2d228
refactor: provider config value extraction
bornast 02cb734
feat: remove tags prop from grafana builder and component
bornast 452c85c
refactor: rename grafana resources
bornast fd465d2
feat: grafana addDashboard builder method
bornast 37e5dde
refactor: config naming
bornast 60d26c2
Merge branch 'feat/grafana-comp' into feat/grafana-dashboards
bornast 509db81
feat: add name public prop to grafana component
bornast fd8dd9d
Merge branch 'feat/grafana-comp' into feat/grafana-dashboards
bornast 29e7167
feat: introduce grafana connections
bornast 9aced94
refactor: remove unnecessary lines
bornast b766efe
refactor: method signatures
bornast 99376d5
feat: make grafana props readonly
bornast 50398f2
Merge branch 'feat/grafana-comp' into feat/grafana-dashboards
bornast 631ded8
feat: add name prop to grafana component
bornast 8cec815
refactor: method signatures
bornast 1626551
refactor: method signatures
bornast 075cad6
Merge branch 'feat/grafana-comp' into feat/grafana-dashboards
bornast fa0dd95
feat: generic dashboard builder
bornast d07403c
Merge branch 'master' into feat/grafana-dashboards
bornast 6a58b75
Merge branch 'master' into feat/grafana-dashboards
bornast fde5f48
refactor: dashboard build configuration
bornast 21a9b46
refactor: dashboard builder
bornast 4d46c9b
feat: add dashboard builder default configuration
bornast 813775e
refactor: panel export type
bornast a389874
refactor: panel types
bornast 0c6d123
refactor: rename prometheusNamespace to ampNamespace
bornast e522d6f
refactor: panel types
bornast 36dac57
Merge branch 'master' into feat/grafana-dashboards
bornast 3049a67
refactor: error msg
bornast 518e77c
refactor: rename connection and dashboard creation methods
bornast 7f56ddf
Merge branch 'master' into feat/grafana-dashboards
bornast 5598b23
feat: add grafana folderName parameter
bornast 75a00ff
feat: make amp plugin installation optional
bornast ec0eddf
feat: make xray connection plugin installation optional
bornast 5b5c231
feat: add dataSourceName prop
bornast 46e116c
feat: add slo dashboard builder method
bornast f899b71
refactor: data source prop type
bornast a94815a
refactor: grafana dashboard name
bornast 3a98fe0
refactor: rename slo dashboard
bornast 9bf81b4
refactor: grafana builder error messages
bornast e7245e2
feat: introduce withTitle method inside grafana dashboard builder
bornast File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import * as pulumi from '@pulumi/pulumi'; | ||
| import { Grafana } from './grafana'; | ||
| import { GrafanaDashboard } from './dashboards/types'; | ||
|
|
||
| export class GrafanaBuilder { | ||
| private name: string; | ||
| private prometheusConfig?: Grafana.PrometheusConfig; | ||
| private dashboardConfigs: GrafanaDashboard.DashboardConfig[] = []; | ||
|
|
||
| constructor(name: string) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public withPrometheus(config: Grafana.PrometheusConfig): this { | ||
| this.prometheusConfig = config; | ||
|
|
||
| return this; | ||
| } | ||
|
|
||
| public addDashboard(config: GrafanaDashboard.DashboardConfig): this { | ||
| this.dashboardConfigs.push(config); | ||
|
|
||
| return this; | ||
| } | ||
|
|
||
| public build(opts: pulumi.ComponentResourceOptions = {}): Grafana { | ||
| return new Grafana( | ||
| this.name, | ||
| { | ||
| prometheusConfig: this.prometheusConfig, | ||
| dashboards: this.dashboardConfigs, | ||
| }, | ||
| opts, | ||
| ); | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.