-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from 464d41/store-dashboards-as-json
Store dashboards as json
- Loading branch information
Showing
5 changed files
with
5,935 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ndjson2json () { | ||
jq '. | if .attributes.fields then .attributes.fields|=fromjson else . end | ||
| if .attributes.visState then .attributes.visState|=fromjson else . end | ||
| if .attributes.kibanaSavedObjectMeta.searchSourceJSON then .attributes.kibanaSavedObjectMeta.searchSourceJSON|=fromjson else . end | ||
| if .attributes.panelsJSON then .attributes.panelsJSON|=fromjson else . end' | ||
} | ||
json2ndjson () { | ||
jq -c '. | if .attributes.fields then .attributes.fields|=tojson else . end | ||
| if .attributes.visState then .attributes.visState|=tojson else . end | ||
| if .attributes.kibanaSavedObjectMeta.searchSourceJSON then .attributes.kibanaSavedObjectMeta.searchSourceJSON|=tojson else . end | ||
| if .attributes.panelsJSON then .attributes.panelsJSON|=tojson else . end' | ||
} |
Oops, something went wrong.