Commit graph

52 commits

Author SHA1 Message Date
Leon Mika 3f1aec2c87
Made table information available to scripts (#49)
- Added a property with table information to session and result set Script types
- Added the ability to add new key bindings to the script
- Rebuilt the foreground job dispatcher to reduce the occurrence of the progress indicator showing up when no job was running.
- Fixed rebinding of keys. Rebinding a key will no longer clear other keys for the old or new bindings.
2023-02-22 21:53:05 +11:00
Leon Mika 54a120342e
Added command history (#45)
* Added command line history to the command, query and filter prompts.
* Added query planning debugging to the log.
* Fixed bug in query expression which was not treating true and false as boolean literals.
* Fixed a bug in the query planning logic which was incorrectly determine that an expression of the form sort_key ^= "string", with no partition key, could be executed as a query instead of a scan.
2023-01-26 21:46:31 +11:00
Leon Mika c89b09447c
Initial version of scripting (#40)
* scripting: added service and controller for scripting

* scripting: have got prompts working

Scripts are now running in a separate go-routine.  When a prompt is encountered, the
script is paused and the user is prompted for input.  This means that the script no
longer needs to worry about synchronisation issues.

* scripting: started working on the session methods

* scripting: added methods to get items and attributes

* scripting: have got loading of scripts working

These act more like plugins and allow defining new commands.

* scripting: have got script scheduling working

Scripts are now executed on a dedicated goroutine and only one script can run at any one time.

* scripting: added session.set_result_set(rs)

* scripting: upgraded tamarin to 0.14

* scripting: started working on set_value

* tamarin: replaced ad-hoc path with query expressions

* scripting: changed value() and set_value() to attr() and set_attr()

Also added 'delete_attr()'

* scripting: added os.exec()

This method is controlled by permissions which govern whether shellouts are allowed
Also fixed a resizing bug with the status window which was not properly handling status messages with newlines

* scripting: added the session.current_item() method

* scripting: added placeholders to query expressions

* scripting: added support for setting and deleteing items with placeholders

Also refactored the dot AST type so that it support placeholders.  Placeholders are not yet supported
for subrefs yet, they need to be identifiers.

* scripting: made setting the result-set push the current result-set to the backstack

* scripting: started working on byte encoding of attribute values

* scripting: finished attrcodec

* scripting: integrated codec into expression

* scripting: added equals and hashcode to queryexpr

This finally finishes the work required to store queries in the backstack

* scripting: fixed some bugs with the back-stack

* scripting: upgraded Tamarin

* scripting: removed some commented out code
2023-01-10 22:27:13 +11:00
Leon Mika bfd0943c4f Fixed some small paper-cuts
- Fixed a bug that was pushing duplicate view entries to the backstack
- The appended column will now be selected once added
2022-10-16 09:50:27 +11:00
Leon Mika 79692302af
Issue 23: Added progress indicators and cancellation (#34)
- Wrapped all table operations in a new foreground job context, which mediates foreground tasks.
- Added cancellation support and partial results for table read operations.
- Added the "mark" command, which can mark, unmark & toggle marked items
- Added support for alias arguments.
- Removed the "unmark" command, and replaced it as an alias to the "marked" command
- Fixed seg faults raised when there is no table shown in the result set.
2022-10-10 10:15:25 +11:00
Leon Mika 982d3a9ca7
Issue 18: Added a popup to modify table columns (#31)
Added a new popup to modify the columns of the table. With this new popup, the user can:

- Show and hide columns
- Move columns around
- Add new columns which are derived from the value of an expression
- Delete columns

Also got the overlay mechanisms working.
2022-10-04 22:23:48 +11:00
Leon Mika f373a3313a
A few bug-fixes and maintenance tasks (#30)
- Fixed a bug which was not properly detecting whether MacOS was in light mode.
- Fixed a bug which was breaking filtering with the table-selection mode.
- Upgraded bubble-tea.
2022-10-04 13:01:53 +11:00
Leon Mika efdc7f9e25
issue-28: added default limit as a setting (#29) 2022-09-30 22:28:59 +10:00
Leon Mika 93ec519127
Issue 24: Added read-only mode (#27)
- Added settings to workspace, and added the read-only mode
- Added the `-ro` field which will launch Dynamo-Browse in read-only mode
- Added the `set ro` to enable read-only mode, and `set rw` to enable read-write mode
2022-09-29 22:10:18 +10:00
Leon Mika aa7ec9f863 issue-9: fixed unit tests 2022-08-29 20:45:34 +10:00
Leon Mika 24304d21c3 issue-9: added the RC file
Added the RC file which can be used to load commands on startup.  Also added the "echo"
command which can be used for debugging.
2022-08-28 10:54:25 +10:00
Leon Mika d9c9e5d845 issue-9: added clearing of existing bindings for keys 2022-08-25 22:31:33 +10:00
Leon Mika 7c5bfd27a3 issue-9: finishing keybinding service and implemented controller
Have now got rebinding keys working with the "rebind" command.
Still need to make sure key names are correct and implement rebinding
as part of an RC file and add bindings for the table.
2022-08-25 22:14:36 +10:00
Leon Mika 2f89610c51 issue-9: moved keybindings out into a separate type
Also started working on a service which can be used to rebind keys using reflection.
2022-08-24 22:06:29 +10:00
Leon Mika 4c187ebb4d issue-8: added going forward in backstack and restoring last view 2022-08-23 22:33:20 +10:00
Leon Mika 90ec88d360 issue-10: copy item to clipboard
Added key binding to copy selected, or marked, items to clipboard.
2022-08-20 10:41:32 +10:00
Leon Mika 5b6bf1f0ae ctrlret: replaced return types of controllers from tea.Cmd to tea.Msg
This dramatically cuts downs the number of closures.
2022-08-18 21:39:13 +10:00
Leon Mika cc58db2d49 backstack: have added the workspace flag 2022-08-14 09:20:24 +10:00
Leon Mika 721d3abe5e backstack: added saving of backstack to workspace 2022-08-11 22:23:39 +10:00
Leon Mika a8dd264983 Changed package from awstools to audax 2022-07-28 21:36:16 +10:00
Leon Mika 716adbdce5 Changes made as part of merge 2022-07-14 21:25:27 +10:00
Leon Mika ffca588a2c Merge remote-tracking branch 'origin/feature/dynamo-query'
# Conflicts:
#	cmd/dynamo-browse/main.go
#	cmd/ssm-browse/main.go
#	docker-compose.yml
#	internal/dynamo-browse/ui/model.go
#	test/cmd/load-test-table/main.go
2022-07-14 21:23:31 +10:00
Leon Mika eadf8d1720 Fixed styling of the other tools 2022-06-27 16:05:59 +10:00
Leon Mika 41af399215 A few various changes
- Fixed the '-local' flag to accept host and port
- Added a '-debug' flag to accept a file to write debug log messages
- Added some logic which will force the dark background flag on if MacOS is in dark mode
2022-06-16 22:00:25 +10:00
Leon Mika 174bab36c3 put-items: started adding some basic commands for putting items 2022-05-26 09:01:39 +10:00
Leon Mika f6e38bbdeb Added an export command to dynamo-browse 2022-05-19 10:48:47 +10:00
Leon Mika d48263e43f Added command to load test SSM parameters 2022-04-15 06:03:55 +10:00
Leon Mika c49f3913a8 ssm-browse: added mark and delete in dynamo-browse 2022-03-30 21:04:30 +11:00
Leon Mika b3d0fbfe29 ssm-browse: added structed log view 2022-03-30 15:07:49 +11:00
Leon Mika d3f6475070 ssm-browse: fixed the views of dynamo-browse 2022-03-29 15:46:18 +11:00
Leon Mika f6f06eb22d ssm-browse: added cd command
Also came up with an approach for dealing with commands that will probably work with contexts
2022-03-29 10:29:25 +11:00
Leon Mika 0b745a6dfa ssm-browse: new utility to browse SSM parameters
This is more of an exercise to work out how best to use controllers
2022-03-29 08:41:27 +11:00
Leon Mika 9709e6aed1 table-select: cleanup 2022-03-28 21:36:47 +11:00
Leon Mika 6f323fa4cf table-select: fixed sizing bug 2022-03-28 21:07:11 +11:00
Leon Mika aa828df3ae Most of the new models have been reimplemented 2022-03-27 23:19:38 +00:00
Leon Mika 7a5584cf9a Building the main model 2022-03-27 22:23:28 +00:00
Leon Mika 6ab8a3ef44 Rejigged the frames a little 2022-03-27 21:58:41 +00:00
Leon Mika c3d19d5891 Have got the item view working 2022-03-27 21:43:53 +00:00
Leon Mika 2638597f42 Have got the table view working again 2022-03-27 21:21:52 +00:00
Leon Mika 8b743351dd table-select: have got a basic loading indicator built 2022-03-27 22:43:36 +11:00
Leon Mika 5d213c4ee8 Have got a modal table-selection list working
Also tracked down what was causing major pauses when creating new tables.
It was due to querying whether terminal is light or not.  So making a call to
get that info on launch.
2022-03-27 15:53:58 +11:00
Leon Mika 81cd1d0971 Added status and prompt 2022-03-27 11:40:32 +11:00
Leon Mika b0909ffe4e Rebuilding the UI models
Rebuilding the UI model with brand new utility models for layout and dealing with model stuff.
2022-03-27 11:01:24 +11:00
Leon Mika 6ac22aad1f Checkpoint commit
Have got a basic table select model working.  Now will try to setup modal models to support prompts and confirmations
2022-03-27 08:48:34 +11:00
Leon Mika 5a69e6c954 sqs-browse: remove assumption regarding table keys
Table keys are now retrieved from describe
2022-03-25 08:17:52 +11:00
Leon Mika 30dbc4eefe sqs-browse: added notion of workspaces in sqs-browse
Also added a tool to generate test tables
2022-03-24 15:44:57 +11:00
Leon Mika cecdbafabb sqs-browse: started working on put commands 2022-03-24 12:54:32 +11:00
Leon Mika 7526c095ee sqs-browse: a lot of work to try to keep UI complexity down
Added the notion of controllers and a dispatcher which will queue up operations
2022-03-23 15:40:31 +11:00
Leon Mika 1969504611 sqs-browse: Added dynamo-browse
Added another tool for browsing DynamoDB tables
2022-03-23 11:56:33 +11:00
Leon Mika 5d1f4c78f4 sqs-browse: new tool
Started working on a new tool to poll and browse an SQS queue.  This is built using a TUI framework
2022-03-23 08:58:42 +11:00