* fix: separate v1 dbrp list results into physical and virtual
* fix: remove virtual column from v1 dbrp list
* fix: update v1 dbrp list tests for new format
* fix: add new test with virtual result
* feat: add username and password login
* fix: make sure cookie is not empty
* chore: go mod tidy
* fix: prevent local config from influencing tests
* fix: small cleanup on error handling
* fix: remove unnecessary trim
* fix: improve alignment for strings and numbers
* add scientific toggle command for table format
* enter altscreen when in table format interactive mode
* chore: run go mod tidy
* add owners endpoints to cli.yml
* run make openapi and mock
* add owner listing, adding and removing
* fix: update tests to remove getUser indirection
* add v1-compatible query path and refactor other paths to de-duplicate "/query"
* add initial influxQL repl
* add ping endpoint to schema
* improve prompt UX, implement some commands
* fix json column type in schema and improve completion
* feat: add table formatter and move to forked go-prompt
* improve formatting and add table pagination
* implement more REPL commands, including insert and history
* implement "INSERT INTO"
* move repl command to "v1 repl"
* refactor and improve documentation
* clean up v1_repl cmd
* update to latest openapi, use some openapi paths instead of overrides
* remove additional files that were moved to openapi
* compute historyFilePath at REPL start
* clean up REPL use command logic flow
* clean up comments for TODOs now in issues
* move gopher (chonky boi)
* remove autocompletion for separate PR
* run go mod tidy
* add rfc3339 precision option
* allow left and right column scrolling to display whole table
* add error to JSON query response
* add tags and partial to JSON response series schema
* fix csv formatting and add column formatting
* remove table format for separate PR
* add pretty table format to REPL
* fix getDatabases
* move from write to legacy write endpoint for INSERT
* remove history vestiges
* allow multiple spaces in INSERT commands
* add precision comment
* remove auth for separate PR
* separate parseInsert and add unit test
* add additional test case and improve error messages
* fix missing errors import
* update for simpler horizontal scrolling in table mode
* improve dialog printing
* improve table format and interactions
* jump to first page on shift-up
* add keybinding info
* change wording from result to table, flip
* basic list, create, and invoke working
* all commands working
* added support for create script body from file and invoke params from file
* linter cleanup
* update defaults to existing parameters if not provided
* updated generated mock files, added mock files for scripts, added basic script create test
* added mock script list
* cleanup pass, fixed not using params in list call
* added update mock test
* fixed mock tests requiring go 1.18
* updated openapi, integrated overrides upstream, added new override to fix codegen bug
* added nil check
* fixed routes
* add v1-compatible query path and refactor other paths to de-duplicate "/query"
* add initial influxQL repl
* add ping endpoint to schema
* improve prompt UX, implement some commands
* fix json column type in schema and improve completion
* feat: add table formatter and move to forked go-prompt
* improve formatting and add table pagination
* implement more REPL commands, including insert and history
* implement "INSERT INTO"
* move repl command to "v1 repl"
* refactor and improve documentation
* clean up v1_repl cmd
* update to latest openapi, use some openapi paths instead of overrides
* remove additional files that were moved to openapi
* compute historyFilePath at REPL start
* clean up REPL use command logic flow
* clean up comments for TODOs now in issues
* move gopher (chonky boi)
* remove autocompletion for separate PR
* run go mod tidy
* add back autocompletion & go-prompt
* add rfc3339 precision option
* allow left and right column scrolling to display whole table
* add error to JSON query response
* add tags and partial to JSON response series schema
* fix csv formatting and add column formatting
* remove table format for separate PR
* fix getDatabases
* move from write to legacy write endpoint for INSERT
* remove history vestiges
* allow multiple spaces in INSERT commands
* add precision comment
* remove auth for separate PR
* separate parseInsert and add unit test
* add additional test case and improve error messages
* fix missing errors import
* fix format suggestion
* re-add history implementation with history limit
* build: upgrade to Go 1.18.3 (#395)
* feat: add back the InfluxQL REPL (#386)
* add v1-compatible query path and refactor other paths to de-duplicate "/query"
* add initial influxQL repl
* add ping endpoint to schema
* improve prompt UX, implement some commands
* fix json column type in schema and improve completion
* feat: add table formatter and move to forked go-prompt
* improve formatting and add table pagination
* implement more REPL commands, including insert and history
* implement "INSERT INTO"
* move repl command to "v1 repl"
* refactor and improve documentation
* clean up v1_repl cmd
* update to latest openapi, use some openapi paths instead of overrides
* remove additional files that were moved to openapi
* compute historyFilePath at REPL start
* clean up REPL use command logic flow
* clean up comments for TODOs now in issues
* move gopher (chonky boi)
* remove autocompletion for separate PR
* run go mod tidy
* add rfc3339 precision option
* allow left and right column scrolling to display whole table
* add error to JSON query response
* add tags and partial to JSON response series schema
* fix csv formatting and add column formatting
* remove table format for separate PR
* fix getDatabases
* move from write to legacy write endpoint for INSERT
* remove history vestiges
* allow multiple spaces in INSERT commands
* add precision comment
* remove auth for separate PR
* separate parseInsert and add unit test
* add additional test case and improve error messages
* fix missing errors import
* print rfc3339 precision
* add rfc3339 to help output
* run tidy
* restructure autocomplete and handle review items
* improve autocompletion with leftover handling
* improve comments and add autocomplete for DELETE & DROP MEASUREMENT
* rename repl to shell
* remove unsupported CREATE & DROP autocompletions
* additional refactor for autocompletion
Co-authored-by: Dane Strandboge <dstrandboge@influxdata.com>
* add v1-compatible query path and refactor other paths to de-duplicate "/query"
* add initial influxQL repl
* add ping endpoint to schema
* improve prompt UX, implement some commands
* fix json column type in schema and improve completion
* feat: add table formatter and move to forked go-prompt
* improve formatting and add table pagination
* implement more REPL commands, including insert and history
* implement "INSERT INTO"
* move repl command to "v1 repl"
* refactor and improve documentation
* clean up v1_repl cmd
* update to latest openapi, use some openapi paths instead of overrides
* remove additional files that were moved to openapi
* compute historyFilePath at REPL start
* clean up REPL use command logic flow
* clean up comments for TODOs now in issues
* move gopher (chonky boi)
* remove autocompletion for separate PR
* run go mod tidy
* add rfc3339 precision option
* allow left and right column scrolling to display whole table
* add error to JSON query response
* add tags and partial to JSON response series schema
* fix csv formatting and add column formatting
* remove table format for separate PR
* fix getDatabases
* move from write to legacy write endpoint for INSERT
* remove history vestiges
* allow multiple spaces in INSERT commands
* add precision comment
* remove auth for separate PR
* separate parseInsert and add unit test
* add additional test case and improve error messages
* fix missing errors import
* print rfc3339 precision
* add rfc3339 to help output
* fix: template apply uses better diff checking
Previously, we did a DeepEqual of all the returned data about each changed entity,
but due to our template overrides that is not actually all the information
available for each entity. So we marked trivial things as 'conflicts' (e.g.
telegraf config ID's 'changing' from the empty string to the real, current value)
while not catching important conflicts like flux script changes in checks and tasks.
Changes to make things more straightforward:
* Change the --force behaviour to be more similar to `apt install`, where even
in non-interactive mode `--force yes` is required to bypass the prompt to apply.
* Before, there were two stages of diff checking - once to print diffs, and once
after the 'Yes/No' prompt. If any conflicts were detected in the second check,
the user got an inscrutable error message that did not highlight what the difference
was or how to force it to apply. `--force conflict` was required to avoid this error.
Instead, we now have simplified to `--force yes` to bypass the 'Yes/No' prompt, and
we never do a second stage of diff checking.
* Because we do not currently properly account for more complicated diffs (e.g.
flux tasks), we now assume in the diff printing that every object has changes,
except for Labels, Buckets, Variables, and Label Mappings. This could be improved
in the future.
* fix: when statestatus is 'remove', mark as removed
* Add openapi submodule instructions to README.md
Add instructions for updating the influx-cli/openapi git submodule when regenerating the CLI.
* update: instructions to update openapi
Add instructions to update and regenerate influx-cli/openapi when changing commits.