Description
A browser-based client-server GUI for the fnest command.
The GUI aims to make the fnest group/fgroup more easy to use.
Background
The fnest index/findex command generates a static HTML page, which is uploaded to the remote server.
This allows for browsing all existing repositories.
Here is an example HTML page.
A modified version of fnest index/findex may be used to create a similar HTML page, but with JavaScript support.
The main purpose for JavaScript-enabled HTML page would be to use fnest group/fgroup options in a GUI environment.
The fgroup command is used to modify the .fgroup file.
The findex command is used to update the index.html file, based on .fgroup.
Both .fgroup and index.html resides on the remote server, so no access to local files is required.
Proposal
Proposals for the fgroup CLI options and the equivalent GUI actions:
CLI 'fgroup' option GUI action Description
------------------- ---------- -----------
--new Click '+' sign, popup text Create new group(s)
--new-hidden Click '+' sign, popup text, hidden checkbox Create new hidden group(s)
--new-synonym Click '+' sign, popup text, hidden checkbox Create new synonym group(s)
--delete Drag group to trash can (or right click) Delete group(s)
--add Drag repos to group, SHIFT pressed Add repos(s) to a group, or group(s) to a synonym group
--remove Drag repos to trash can (or right click), Remove repos(s) from a group, or group(s) from a synonym group
show info that repos will NOT be deleted!
--move Drag repos to group, SHIFT NOT pressed Move repo(s)/group(s) from one group to another
--rename Right click, type new text directly in group Rename group
--hide Select one or more groups, right click Hide group(s) (does not apply to synonym groups)
--unhide Select one or more groups, right click Unhide group(s) (does not apply to synonym groups)
--flatten Select one or more groups, right click Convert synonym group(s) to normal group(s)
--merge Select at least two groups, right click Merge existing groups to a new group
In the same fashion as the fgroup command, the GUI actions never modifies a repository, only properties related to groups.
The GUI may be launched with fnest ui.
GUI - Solutions
- Client-side JavaScript library, server-side Tcl CGI scripts, running on a local web server.
- Client-side JavaScript library, server-side Tcl CGI scripts, running on a remote web server.
- Wacl (WASM Tcl) implementation.
Solution 1: Client-side JS, local web server
Components:
- Local Tcl interpreter
- Local
fgroupandfindexcommands - Local and remote
fossilexecutable - Local web server
- No remote wrapper required for
fossil commit(internally used byfindex) on the remote server, as the command is executed locally.
Pros:
- The Tcl interpreter,
fgroup,findexandfossilare already installed locally.
Cons:
- An additional (the local) web server is required.
Solution 2: Client-side JS, remote web server
Components:
- Remote Tcl interpreter
- Remote
fgroupandfindexcommands - Remote
fossilexecutable - Remote web server
Pros:
- The remote web server does already exist.
fossilis already installed on the remote web server.
Cons:
- A Tcl interpreter is not necessarily installed on the remote web server.
- By default,
fgroupandfindexare not installed on the remote server.
Solution 3: Wacl (WASM Tcl) implementation
Components:
- Browser-embedded Tcl interpreter
- Browser-embedded
fgroupandfindexcommands - Remote
fossilexecutable - Remote web server
Pros:
- The remote web server does already exist.
fossilis already installed on the remote web server.- No local installation required.
- No additional server components required.
- May be used as part of a boostrap-solution (verifying the connection to the remote server, for example).
Cons:
- A WebAssembly solution is probably the most complicated to implement.
- Both the Tcl interpreter,
fgroupandfindexhave to be included in the same WASM image. findexneeds to be modified, to call a server-side wrapper forfossil commit, instead of executing the command locally.- HTTP requests with wacl are more complicated to implement than "plain" Tcl commands using the
httppackage.
Links
- MDN: The JavaScript Fetch API
- Writing simple CGI applications using vanilla Tcl
- wacl - A Tcl distribution for WebAssembly or Javascript
- HTTP requests with wacl