aboutsummaryrefslogtreecommitdiff
path: root/_www/functions.js
AgeCommit message (Collapse)Author
2024-10-07_www: rename submodule "wui" to "pakakeh_ts"Shulhan
2024-04-24_www: fix form input type file where content is binaryShulhan
If the file in FormInput is binary, the conversion to "FormInput.value" will fail with an error like "invalid characters in String".
2024-04-23_www: fix save on null Headers and VarsShulhan
If the user does not define the Headers, clicking Run ony any HTTP Target will result in error when "save" function executed before it.
2024-03-15all: update module pakakeh.go to the tipShulhan
On the "lib/http" we refactoring RequestMethod and RequestType type from int to string for readability, when the value is encoded, for example to JSON. So instead of 0, 1 or 2; it will print "GET", "CONNECT", or "HEAD".
2024-02-21all: add global HTTP headers for TargetShulhan
The Headers field on Target define the global headers that will be send along with all HTTPTarget or WebSocketTarget. The same header can also be defined on HTTPTarget that override the value of Target.
2024-02-05all: implement form input fileShulhan
The FormInput now can be set to FormInputKindFile that will rendered as "<input type='file' ...>" on the web user interface. Once submitted, the file name, type, size, and lastModification will be stored under FormInput Filename, Filetype, Filesize, and Filemodms. Implements: https://todo.sr.ht/~shulhan/trunks/1
2024-01-25all: fix warnings recommended by linter reviveShulhan
Most of the fixes related to naming variables with acronyms, for example HTTP, JSON, URL, and so on.
2023-11-11_www: apply all eslint recommendationsShulhan
2023-11-11_www: setup eslint for linting TypeScript filesShulhan
2023-11-11_www: update wui moduleShulhan
While at it reformat all files using default prettier.
2022-03-14all: changes the license of trunks software to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl for more information.
2021-12-21all: add option to open link inside an iframeShulhan
The NavLink struct now has field OpenInIFrame. If its true, the Href will be opened inside an iframe in the same window, otherwise it will opened in new tab.
2021-10-19www: load the stored variables into Target, HttpTarget, WebSocketTargetShulhan
In the commit edff37e3 and 264cb988, we store the user modified input into local storage. This including Target options and variables, HttpTarget headers and parameters, and WebSocket headers and parameters. When the user interface refreshed, the stored variables is loaded into input form but not saved into current Target/HttpTarget/WebSocketTarget variables. This changes fix this issue by loading the stored variables into into current instance of Target/HttpTarget/WebSocketTarget variables.
2021-10-17www: create separate functions to save to local storagesShulhan
This changes split the Save function into several functions, in order to help review and minimize wrong storage key on load and save.
2021-09-29_www: store the target attack options to local storageShulhan
Once the Attack button is clicked, the Target's attack options will be stored to local storage. On the next refresh or opening the Trunks web interface, the stored values will be loaded again.
2021-09-25_www: store the variables, headers, and parameters to local storageShulhan
When user click "Run" button on any HttpTarget or WebSocketTarget, the application will store each dynamic values of input in Target's Variables, HttpTarget/WebSocketTarget Headers and Parameters into local storage. By storing the dynamic values of form input, different users can have their own dynamic values and automatically loaded when they re-open the Trunks website again.
2021-09-20_www: set default form input kind to stringShulhan
In case the FormInput from response does not define the Kind, due to lazy programmer, generate default form input string.
2021-09-19all: display notification on failed or success RunShulhan
Previously, after clicking the "Run" button user need to inspect the "Run output" to check if the request is success or fail. This changes, display a notification everytime the "Run" finished. It will display the notification as error or success based on the HttpStatusCode inside the RunResponse
2021-09-19all: add option to set description (Hint) on any inputs elementShulhan
This changes refactor the KeyValue from map[string]string into map[string]FormInput, where FormInput is a struct with Label, Hint, Kind, Value, Max, and Min. With the available of Hint field, the web user interface can render it as description of input. This changes also make all input hint to be displayed on the first render.