Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
eaf5b1c1
Commit
eaf5b1c1
authored
Jun 21, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenv: adds dashboard with multiple rows
parent
75e378b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
20 deletions
+31
-20
devenv/dashboards/dev-dashboards/dashboard_with_rows.json
+0
-0
devenv/dashboards/dev-dashboards/dev-dashboards.yaml
+9
-0
devenv/setup.sh
+22
-20
No files found.
devenv/dashboards/dev-dashboards/dashboard_with_rows.json
0 → 100644
View file @
eaf5b1c1
This diff is collapsed.
Click to expand it.
devenv/dashboards/dev-dashboards/dev-dashboards.yaml
0 → 100644
View file @
eaf5b1c1
apiVersion
:
1
providers
:
-
name
:
'
dev
dashboards'
folder
:
'
dev
dashboards'
type
:
file
options
:
path
:
devenv/dashboards/dev-dashboards
devenv/setup.sh
View file @
eaf5b1c1
...
@@ -2,41 +2,43 @@
...
@@ -2,41 +2,43 @@
bulkDashboard
()
{
bulkDashboard
()
{
requiresJsonnet
requiresJsonnet
COUNTER
=
0
COUNTER
=
0
MAX
=
400
MAX
=
400
while
[
$COUNTER
-lt
$MAX
]
;
do
while
[
$COUNTER
-lt
$MAX
]
;
do
jsonnet
-o
"dashboards/bulk-testing/dashboard
${
COUNTER
}
.json"
-e
"local bulkDash = import 'dashboards/bulk-testing/bulkdash.jsonnet'; bulkDash + { uid: 'uid-
${
COUNTER
}
', title: 'title-
${
COUNTER
}
' }"
jsonnet
-o
"dashboards/bulk-testing/dashboard
${
COUNTER
}
.json"
-e
"local bulkDash = import 'dashboards/bulk-testing/bulkdash.jsonnet'; bulkDash + { uid: 'uid-
${
COUNTER
}
', title: 'title-
${
COUNTER
}
' }"
let
COUNTER
=
COUNTER+1
let
COUNTER
=
COUNTER+1
done
done
ln
-s
-f
-r
./dashboards/bulk-testing/bulk-dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
ln
-s
-f
-r
./dashboards/bulk-testing/bulk-dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
}
}
requiresJsonnet
()
{
requiresJsonnet
()
{
if
!
type
"jsonnet"
>
/dev/null
;
then
if
!
type
"jsonnet"
>
/dev/null
;
then
echo
"you need you install jsonnet to run this script"
echo
"you need you install jsonnet to run this script"
echo
"follow the instructions on https://github.com/google/jsonnet"
echo
"follow the instructions on https://github.com/google/jsonnet"
exit
1
exit
1
fi
fi
}
}
defaultDashboards
()
{
defaultDashboards
()
{
echo
"not implemented yet"
requiresJsonnet
ln
-s
-f
-r
./dashboards/dev-dashboards/dev-dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
}
}
defaultDatasources
()
{
defaultDatasources
()
{
echo
"setting up all default datasources using provisioning"
echo
"setting up all default datasources using provisioning"
ln
-s
-f
-r
./datasources/default/default.yaml ../conf/provisioning/datasources/custom.yaml
ln
-s
-f
-r
./datasources/default/default.yaml ../conf/provisioning/datasources/custom.yaml
}
}
usage
()
{
usage
()
{
echo
-e
"install.sh
\n\t
This script installs my basic setup for a debian laptop
\n
"
echo
-e
"install.sh
\n\t
This script installs my basic setup for a debian laptop
\n
"
echo
"Usage:"
echo
"Usage:"
echo
" bulk-dashboards - create and provisioning 400 dashboards"
echo
" bulk-dashboards - create and provisioning 400 dashboards"
echo
" default-datasources - provisiong all core datasources"
echo
" default-datasources - provisiong all core datasources"
}
}
main
()
{
main
()
{
...
@@ -49,10 +51,10 @@ main() {
...
@@ -49,10 +51,10 @@ main() {
if
[[
$cmd
==
"bulk-dashboards"
]]
;
then
if
[[
$cmd
==
"bulk-dashboards"
]]
;
then
bulkDashboard
bulkDashboard
elif
[[
$cmd
==
"default-datasources"
]]
;
then
elif
[[
$cmd
==
"default-datasources"
]]
;
then
defaultDatasources
defaultDatasources
elif
[[
$cmd
==
"default-dashboards"
]]
;
then
elif
[[
$cmd
==
"default-dashboards"
]]
;
then
bulkDashboard
defaultDashboards
else
else
usage
usage
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment