Commit graph

62 commits

Author SHA1 Message Date
Leon Mika 5d95d44a97
Added the rel-picker which can quickly goto related tables
* New rel-picker that can be opened using Shift+O and allows for quickly going to related tables.
2024-03-03 09:20:28 +11:00
Leon Mika 7ca0cf6982
Converted scripting language Tamarin to Risor ()
- Converted Tamarin script language to Risor
- Added a "find" and "merge" method to the result set script type.
- Added the ability to copy the table of results to the pasteboard by pressing C
- Added the -q flag, which will run a query and display the results as a CSV file on the command line
- Upgraded Go to 1.21 in Github actions
- Fix issue with missing limits
- Added the '-where' switch to the mark
- Added the 'marked' function to the query expression.
- Added a sampled time and count on the right-side of the mode line
- Added the 'M' key binding to toggle the marked items
- Started working on tab completion for 'sa' and 'da' commands
- Added count and sample time to the right-side of the mode line
- Added Ctrl+V to the prompt to paste the text of the pasteboard with all whitespace characters trimmed
- Fixed failing unit tests
2023-10-06 15:27:06 +11:00
Leon Mika ed53173a1d
Added the "export -all" switch ()
Extended the "export" command with an "-all" flag. When included, all rows of the table matching the query will be exported to CSV.
2023-07-31 20:59:05 +10:00
Leon Mika f65c5778a9
issue-50: fixed package name ()
Changed package name from github.com/lmika/audax to github.com/lmika/dynamo-browse
2023-04-17 08:31:03 +10:00
Leon Mika 4b4d515ade
Added a few changes to query expressions ()
- Added the between operator to query expressions.
- Added the using query expression suffix to specify which index to query (or force a scan). This is required if query planning has found multiple indices that can potentially be used.
- Rewrote the types of the query expressions to allow for functions to be defined once, and be useful in queries that result in DynamoDB queries, and evaluation.
- Added some test functions around time and summing numbers.
- Fixed a bug in the del-attr which was not honouring marked rows in a similar way to set-attr: it was only deleting attributes from the first row.
- Added the -to type flag to set-attr which will set the attribute to the value of a query expression.
2023-04-14 15:35:43 +10:00
Leon Mika 3f1aec2c87
Made table information available to scripts ()
- 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 ad1a77a257
Added paging and the ability to specify the table in query script method ()
* paging: added controller for paging through results
* paging: added command and key binding for going to the next page
* paging: added the ability to specify the table in the query script method
* paging: have got exclusive start key written to backstack
2023-01-23 21:23:46 +11:00
Leon Mika c89b09447c
Initial version of scripting ()
* 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 7d2817812c
Fixed various bugs and papercuts ()
- Enabled CGO for release builds so that copy to clipboard does not panic.
- Added a prompt to confirm quitting when pressing Esc or Ctrl+C
- Fixed the table prompt to not quit app on Esc when invoked with the table command.
2022-11-01 21:59:46 +11:00
Leon Mika 79692302af
Issue 23: Added progress indicators and cancellation ()
- 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 ()
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 93ec519127
Issue 24: Added read-only mode ()
- 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 454fcf2eae issue-20: Added binding action for prompting for tables
At the moment, this is not bound to anything
2022-09-03 09:41:47 +10:00
Leon Mika 5f76836166 Fixed a few cosmetic bugs
- Clear status messages when setting or deleting fields
- Fixed "Filter" status label
2022-08-31 20:46:53 +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 d4734846fc issue-11: added the last two views 2022-08-21 09:38:02 +10:00
Leon Mika 6d23e3ee2c issue-11: started working on toggling the size of table and item views 2022-08-20 11:28:08 +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 ec9ac34d26 backstack: an initial complete version of the backstack
This needs a lot of work, and a fair bit of refactoring.
2022-08-13 11:42:21 +10:00
Leon Mika a8dd264983 Changed package from awstools to audax 2022-07-28 21:36:16 +10:00
Leon Mika 2a35667cdb Added extra table 2022-07-28 21:32:32 +10:00
Leon Mika 64c43d6b73 Made 'quit' a full command and disabled the temporary edit item display 2022-07-25 21:40:07 +10:00
Leon Mika cc7ead496f awstools: Fixed some bugs with the item view UI model
- The item view model is now being updated when the item itself is being updated
- Fixed a NPE when the item view model receives a nil item
2022-07-18 08:04:03 +10:00
Leon Mika 2dbd664dd2 Modified put to put all dirty or marked items 2022-07-16 11:35:53 +10:00
Leon Mika 9fee17a6a6 Merged all 'set-X' commands into a single 'set-attr' command 2022-07-16 10:05:48 +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 c00b99a2eb dynamo-query: added delete attribute command 2022-07-14 21:15:31 +10:00
Leon Mika e35855f05c Added set-n command to set number attributes
Also added the ability to set subattribes of maps
2022-07-06 13:03:19 +10:00
Leon Mika ed577dc53e Merge branch 'feature/dialog-prompt' into feature/dynamo-query 2022-06-27 16:12:17 +10:00
Leon Mika 809f9adfea Added mode line
Also rescanning will maintain the current query
2022-06-22 11:57:12 +10:00
Leon Mika 54fab1b1c3 dynamo-query: started working on queries 2022-06-21 13:37:07 +10:00
Leon Mika e5a7b82a63 Prompt user for primary and secondary key for new items 2022-06-09 20:33:19 +10:00
Leon Mika 4aac153edb Small confirmation to check if numbers can contain decimals 2022-06-03 15:39:12 +10:00
Leon Mika 33783ee688 put-items: added noisy-touch
This will delete the item before putting it back
2022-05-26 11:00:40 +10:00
Leon Mika 16cb6bdc6b put-items: added a command to put a dirty item 2022-05-26 10:17:21 +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 b0399e41ee dialog-prompt: started working on dialog prompt control 2022-05-26 08:11:30 +10:00
Leon Mika 3319a9d4aa Fixed a small bug with the export command 2022-05-19 10:58:56 +10:00
Leon Mika f6e38bbdeb Added an export command to dynamo-browse 2022-05-19 10:48:47 +10:00
Leon Mika ee6011bc3e Some small quality of life improvements 2022-04-01 09:53:43 +11:00
Leon Mika 71acd75685 dynamo-item-edit: started working on a screen to edit items
Didn't get far in it
2022-03-31 22:01:19 +11:00
Leon Mika 798150a403 ssm-browse: added mark, filtering and delete items 2022-03-30 21:55:16 +11:00
Leon Mika c49f3913a8 ssm-browse: added mark and delete in dynamo-browse 2022-03-30 21:04:30 +11:00
Leon Mika d3f6475070 ssm-browse: fixed the views of dynamo-browse 2022-03-29 15:46:18 +11:00
Leon Mika 9709e6aed1 table-select: cleanup 2022-03-28 21:36:47 +11:00