| Age | Commit message (Collapse) | Author |
|
The update fix lib/memfs.Get with empty path.
|
|
Similar to the CLI, the HTTP API accept the path of vault file
and return the path to decrypted file.
|
|
Using CTRL+s sometimes cause pressing s only trigger the save, due to
fast typing (or keyboard error?).
|
|
|
|
Most file with this type is binary, we allow it to see if its file
has content or not.
|
|
While at it, format the log string to be consistent.
|
|
This changes allow user browse the crumb in path and item in the list
using tab key.
While at it, fix the layout to make VFS and editor aligned.
|
|
In the right side of Save button we now have a button Encrypt that
allow user to Encrypt openend file.
This require the workspace has been setup with private key
(.ssh/awwan.key) and pass file (.ssh/awwan.pass).
|
|
Similar to the CLI, the HTTP API accept the path of file and return the
path to encrypted file.
|
|
|
|
This changes move the text input for creating new file above the list.
Filling the text field will filter the list based on the node name using
regular expression.
Another changes is for node with type directory now suffixed with "/".
|
|
Awwan now have a website at https://awwan.org.
=== New features
* all: implement remote "#get!" and "#put!" with owner and mode
The magic command "#get" and "#put" now have an inline options to set
the owner and permission of copied file. Example of usage are,
#get:$USER:$GROUP+$PERM src dst
#put!$USER:$GROUP+$PERM src dst
The $USER, $GROUP and $PERM are optionals.
If $USER and/or $GROUP is set, a copied file will have owner set to
user $USER and/or group to $GROUP. If $PERM is set, a copied file will
have the mode permission set to $MODE.
* all: add magic command "#local"
The magic command "#local" define the command to be executed using
shell in local environment. Its have effect and can only be used in
script that executed using "play".
In script that is executed using "local" it does nothing.
* _www: replace button "Clear selection" with text input for line range
Instead of using mouse to select which lines to be executed, let user
input it manually like in the CLI.
* all: log all execution into file
For each script execution, a file suffixed with ".log" will be created
in the same directory with the same name as script file. For example,
if the script is path is "a/b/c.aww" then the log file would named
"a/b/c.aww.log".
This is to provides history and audit in the future.
* cmd/awwan: add option "-address" to command serve
The "-address" option allow defining the HTTP server address to serve
the web-user interface.
=== Bug fixes
* all: trim spaces in passphrase when its read from file
Using vim, or UNIX in general, the file always end with "\n".
If we read the whole file then the passphrase will end with it,
this cause the decryption may fail (or wrong encryption passphrase
used).
* _www: fix saving file content using CTRL+s
The issue is using "this.editorOnSave" result on undefined "this"
inside the editorOnSave.
* all: remove the node when requested from HTTP API /awwan/api/fs
Previously, the HTTP API for deleting node only remove the file but
not the node in the memfs.
This changes remove the child node from memfs, so the next refresh on
directory will not contains the removed file.
* all: return the error as reponse in HTTP API execute
Previously, when the command execution failed, we check the error and
return it as HTTP status code 500. In this way, user cannot view the
log and actual error.
In this changes, if the command failed, we store the error in separate
field "Error" and return to the caller with HTTP status code 200.
=== Enhancements
* all: fix printing the statement to be executed
This fix missing magic command not printed in stdout.
* all: use "mlog.MultiLogger" to log Request output and error
By using "mlog.MultiLogger" every output or error can be written to
stdout/stderr and additional log writer that can collect both of them,
buffered and returned to the caller.
This changes simplify the HttpResponse to use only single output that
combine both stdout and stderr.
* _www: add button to resize editor and output
The button can be dragged up and down to resize both the editor and output
panes.
* _www: show confirmation when user open other file with unsaved changes
If user modify the current file without saving it and then open another
file, it will show confirmation dialog to continue opening file or cancel
it.
* all: on file save, make sure file end with line-feed
On some application, like haproxy configuration, line-feed (LF or "n") are
required, otherwise the application would not start.
* script: respect spaces when joining multi lines command
If a multi lines command does not have spaces or have multiple spaces,
join them as is. For example,
a\\
b
should return the value as ab, while
a \\
b
should return "a<space><space>b".
* _wui: various enhancements
Changes,
- The "File" tag now highlighted to distinguish with file name
- The "Execute" action moved to replace the Output, so we have some
additional horizontal space
- The "Output" tag removed
- Fix layout on mobile devices where height is set to static
- editor: re-render content after save
- editor: handle paste event manually
|
|
|
|
In MemfsWui we exclude the "adoc" files but when calling Watch
we pass it as to be included.
When the adoc file changes, sometimes the changes not detected, probably
there is a bug in the memfs.Watch.
For now, we use separate instance of DirWatcher to watch any changes
on adoc, html, js, md, and files.
|
|
Changes,
* editor: re-render content after save
* editor: handle paste event manually
|
|
Changes,
* The "File" tag now highlighted to distinguish with file name.
* The "Execute" action moved to replace the Output, so we have some
additional horizontal space.
* The "Output" tag removed.
* Fix layout on mobile devices where height is set to static.
|
|
If a multi lines command does not have spaces or have multiple
spaces, join them as is.
For example,
a\
b
should return the value as "ab", while
a \
b
should return "a b".
|
|
On some application, like haproxy configuration, line-feed (LF or "\n")
are required, otherwise the application would not start.
|
|
The "-address" option allow defining the HTTP server address to serve
the web-user interface.
|
|
This changes simplify the editor and make it more user friendly that
allow delete, copy, and paste with selection.
|
|
|
|
|
|
The task "test-all-mkosi" run both unit and integration tests without
manually login inside to container first.
|
|
Instead of passing stdout and stderr as "io.Writer", pass the Request,
so we can log using the Request mlog.
While at it, return error from sshClient rmdirAll so the caller can log
the error.
|
|
Previously, if there is any error from Local or Play before any statement
get executed it will not logged to log, also the Request close() is
not called since we put it as defer in the middle.
This changes fix this by moving down error handler into single exit
goto label.
|
|
|
|
When the script executed, log the script and line number to be executed
with "=== BEGIN", and when its finished, log the end of it with "=== END".
This is to make the log more traceable.
|
|
For each script execution, a file suffixed with ".log" will be created
in the same directory with the same name as script file.
For example, if the script is path is "a/b/c.aww" then the log file
would named "a/b/c.aww.log".
This is to provides history and audit in the future.
|
|
For testing "local" command move the unit tests to file
"awwan_local_test.go", for testing "encrypt" command move the unit tests
to file "awwan_encrypt_test.go", and so on.
|
|
Previously, when the command execution failed, we check the error and
return it as HTTP status code 500.
In this way, user cannot view the log and actual error.
In this changes, if the command failed, we store the error in separate
field "Error" and return to the caller with HTTP status code 200.
|
|
|
|
|
|
|
|
The latest share module fix the generated embedded Go regarding
regex for Includes and Excludes not compiled, which causes some files
get included when running the instance with Watch method.
|
|
Since we now have website, the directory name "_www" become misleading.
The actual website files is located under "_www/doc", the "_www" directory
is for web-user interface which includes documentation that has the
same content as our websites.
|
|
Using separate DirWatcher will prevent the watched files being
included during embed.
|
|
In todo we remove completed and unknown tasks which makes the current
awwan implementation is feature complete in CLI perspective.
While at it, fix missing index.css not included in internal memfs.
|
|
Use relative path for "index.css" so documentation can rendered correctly
from awwan WUI.
While at it, reformat the file using js-beautify.
|
|
|
|
If user modify the current file without saving it and then open another
file, it will show confirmation dialog to continue opening file or cancel
it.
|
|
|
|
|
|
Using flag "-dev" is more explicit than using environment variable.
|
|
When the call to "DELETE /awwan/api/fs" success, re-open the directory
to fetch the new directory list.
|
|
Previously, the HTTP API for deleting node only remove the file but
not the node in the memfs.
This changes remove the child node from memfs, so the next refresh on
directory will not contains the removed file.
|
|
|
|
The issue is using "this.editorOnSave" result on undefined "this" inside
the editorOnSave.
|
|
Previously, we changes the height of "#output" element which cause
the height sometimes out of range if its content is not empty.
This changes add a wrapper for all output elements and use it as
component for resizing.
|
|
The button can be dragged up and down to resize both the editor and
output panes.
|
|
This is to provide consistent layout when the file content changes.
|