aboutsummaryrefslogtreecommitdiff
path: root/_wui/main.js
AgeCommit message (Collapse)Author
2026-02-03all: add robots.txt to main and tour sitesShulhan
2024-04-06all: comply with linter recommendationsShulhan
2023-12-22_wui: implement button to stop executionShulhan
The Stop button call "DELETE /awwan/api/execute?id=" with id is the previous execution ID. Implements: https://todo.sr.ht/~shulhan/awwan/9
2023-12-08_wui: update wui sub moduleShulhan
Changes, * Reduce the left padding on the editor so space and padding not to similar * Set the caret color to red in editor * Prevent "Enter" without pressing Control trigger the Save
2023-12-06_wui: use the output for displaying notificationShulhan
Previously, we use a quick "pop-up" to display notification for each information or error from WUI. Sometimes this is annoying, it overlap the buttons, make it hard to Save and Encrypt at the same time. In this changes we move the nofication message to be displayed in the output, same with output of execution.
2023-12-04all: write the output as is when sending with server-sent eventsShulhan
Previously, if the command output is "line1\n\nline2\n", the web output it as line1 line2 it should be line1 line2 This fix the empty line not displayed in wui output.
2023-12-04_wui: do not clear output when executing another commandShulhan
This allow user to see the output of previous command without opening the log file.
2023-12-01_wui: store and load the vfs width in local storageShulhan
This is allow user to resize vfs width in one window and when new window is opened the vfs width is restored with the same size. Implements: https://todo.sr.ht/~shulhan/awwan/6
2023-12-01_wui: disable button "Local" and "Play" when clickedShulhan
Once the execution completed, both buttons will be enabled again. While at it, add an icon to show the execution status.
2023-12-01_wui: rename "Remote" to "Play"Shulhan
This is to make command between the CLI and WUI consistent.
2023-12-01all: handle reconnecting when streaming executionShulhan
In "/awwan/api/execute/tail" SSE endpoint, in order for client to be able to reconnect and start streaming from the last know output, we need to send the ID for each message that we send. The ID is the index of Output in slice. If client does not send Last-Event-ID, we send all Output from beginning, otherwise, we send only message start from index in Last-Event-ID.
2023-12-01all: implement HTTP API to fetch execution output by IDShulhan
The new API is "GET /awwan/api/execute/tail" that implement Server-sent events, not a normal GET request. Its accept the query parameter "id" with value is the execution ID from "/awwan/api/execute". Once called with valid ID, it will streaming the command output to client. By using this new API, the WUI can receive the output of command immediately without waiting for all commands to be completed. Implements: https://todo.sr.ht/~shulhan/awwan/5 Signed-off-by: Shulhan <ms@kilabit.info>
2023-12-01all: refactoring HTTP endpoint for ExecuteShulhan
Previously, the Execute endpoint wait for command execution to finish. In case the command takes longer than proxy or server write timeout, it will return with an timeout error to client. In this changes, we generate an execution ID for each request and return it immediately. The next commit will implement HTTP endpoint to fetch the latest status and/or output by execution ID. References: https://todo.sr.ht/~shulhan/awwan/5
2023-11-21_wui: update editor componentShulhan
Changes, * fix paste that always end with newline * fix editor content that got wrapped due to width * update layout without using float * replace execCommand with Selection
2023-11-20_wui: refactoring the layout once and for allShulhan
Last weeked, I spent one day to fix the resizer to works with flex layout, and its hard and not optimal.
2023-11-19_wui: various improvementsShulhan
Changes, * Add fixed height on output wrapper * Add space between Encrypt and Decrypt button * Add padding in Execute actions component * Change the wording of "Execute" to "Execute line"
2023-11-19_wui: fix build using tscShulhan
2023-11-19_wui: fix editor content grow outside browser widthShulhan
When file opened and the content length is greater than browser length, the editor width also growth based on the content. This changes fix this issue by using flex-basis (similar to setting width) and "overflow:auto" on the class awwan-content.
2023-11-17_wui: add vertical resizer, to resize between VFS and editorShulhan
While at it, refactoring the layout using flex.
2023-11-17_wui: increase max file size to 1MiBShulhan
This is to allow viewing log from editor.
2023-11-16all: always load SSH config when running PlayShulhan
In case awwan run with "serve" and we modify the ".ssh/config", the changes does not detected by awwan because we only read ".ssh/config" once we Awwan instance created. This changes fix this issue by always loading SSH config everytime the Play method executed so the user CLI and WUI has the same experiences.
2023-11-16_wui: allow all content type but decrease max file size to 100KBShulhan
Previously, only file with type json, message, octet-stream, script, text, or xml that can be opened by editor. In this changes we allow all files as long as the size is less than 100KB.
2023-11-16_wui: update wui/vfs to fix crumb overflowShulhan
In case the directory name is too long, the name can span multi line, break automatically by browser and overlap with previous crumbs.
2023-11-16_wui: implement DecryptShulhan
In the right side of Save button we now have a button Decrypt that allow user to Decrypt file with ".vault" extension only. This require the workspace has been setup with private key (.ssh/awwan.key) and pass file (.ssh/awwan.pass).
2023-11-15_wui: use CTRL+Enter to trigger save instead of CTRL+s on editorShulhan
Using CTRL+s sometimes cause pressing s only trigger the save, due to fast typing (or keyboard error?).
2023-11-15_wui: add placeholder for input execute and link to documentationShulhan
2023-11-15_wui: update vfs componentShulhan
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.
2023-11-15_wui: implement EncryptShulhan
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).
2023-11-12_wui: reset the input field when directory changesShulhan
2023-11-11_wui: implement file filterShulhan
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 "/".
2023-11-11_wui: update editor libraryShulhan
Changes, * editor: re-render content after save * editor: handle paste event manually
2023-11-11_wui: various enhancementsShulhan
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.
2023-11-09_wui: update submodule wuiShulhan
This changes simplify the editor and make it more user friendly that allow delete, copy, and paste with selection.
2023-10-30all: return the error as reponse in HTTP API executeShulhan
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.
2023-10-30_wui: fix mouse listener on down and up for resizing buttonShulhan
2023-10-30_wui: fix saving on control+s on editorShulhan
2023-10-29all: rename directory "_www" to "_wui"Shulhan
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.