Commit Graph

4 Commits (4cf05df35bb1f35c2c59faa9e18e81d5e1793d9b)

Author SHA1 Message Date
Marko Mikulicic 2aca0ea592 feat: add jq_edit_db_rules script
Emit also default values for fields in edit_db_rules, this way it's easier to know what to change.

Also simplify argument handling for edit_db_rules script
2021-04-19 10:51:09 +00:00
Marko Mikulicic 664d7103ca fix: Fix edit_db_rules script
- enable quitting on error by fixing `read` (read with heredoc always exits with non-0 causing the script to bail out)
- enable quitting on unbound variables by pulling cleanup outside of main
- accept hosts with `http://` prefix or without (improve compat with iox client)

Now the script cleanly reports errors when you have a typo in the db name or hostname
2021-04-16 13:49:49 +00:00
Marko Mikulicic 89409ca8b7 fix: Update scripts/edit_db_rules
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-04-09 11:12:22 +00:00
Marko Mikulicic f3d40bbff9 feat: Add edit_db_rules script
There are a few yaks to be shaven before we have a good CLI for editing database rules.

This is a simple shell script that uses the grpc API to edit the database rules on a remote
IOx server. It fetches the rules, spawns your default text editor, waits until your editor quits,
and then calls the update API with the results of your local edit.

(if you use emacs, there is a thing called emacsclient which knows how to block until you closed
the buffer in your main persistent emacs)
2021-04-09 11:12:22 +00:00