summaryrefslogtreecommitdiffstats
path: root/dmt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-11-20dmt: Add stats pageMalfurious3-0/+23
Signed-off-by: Malfurious <m@lfurio.us>
2023-11-20dmt: jobs: Invert default refresh timeMalfurious1-2/+2
Whenever we encounter an exception (which is usually due to a network problem), default to the active refresh time as to recover from the situation as soon as possible. Eg: Only wait the full idle time when the server successfully reports it is idle. There isn't even a real concern here of request load on the server, since we can't reach the server in this condition anyway. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-20dmt: Add faviconMalfurious3-0/+6
Signed-off-by: Malfurious <m@lfurio.us>
2023-11-18dmt: Add services pageMalfurious4-1/+60
Signed-off-by: Malfurious <m@lfurio.us>
2023-11-18dmt: Escape unintended HTML entitiesMalfurious2-4/+8
Signed-off-by: Malfurious <m@lfurio.us>
2023-11-18dmt: css: Rename remove class to standoutMalfurious2-3/+3
The css class originally used to represent service removal jobs is renamed to "standout". I wish to reuse it in other exceptional contexts which should draw the user's attention - which of course also covers the case of service removal. "Standout" is a more generic term for this. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-18dmt: jobs: Scope javascript to this pageMalfurious2-1/+2
The script.js file is only really intended to run against the main jobs page at this point. So, move its inclusion from the page master to the jobs page specifically. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Implement initial functionality for jobs pageMalfurious4-4/+171
Adds javascript to implement self-hydration for the main page. Several aspects of these features can be customized via new settings in config.sh. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Add routing / proper request handlingMalfurious1-2/+30
All requests are handled by interpreting the $PATH_INFO environment variable, which is set by the main path component of the HTTP request. All requests are assumed to be GET requests, as no other request method is supported. Elements in the $PATH_INFO are split into an array on the '/' delimiter, and we apply some sanity checks to the string to prevent potential exploits. Routes are established for all present API endpoints and valid resources / pages. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Add main page layoutMalfurious4-1/+58
Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Add stylesheetMalfurious1-0/+103
Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Implement API endpoint /api/log/{jobnum}Malfurious1-1/+11
This returns a plain-text response (not JSON) of the full log file for the requested job number. If `jobnum` is omited, the log of the latest job is returned. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Implement API endpoint /api/job/{jobnum}Malfurious2-1/+35
This returns all details related to the requested job number as well as a tail of the job log file. If `jobnum` is omited, details of the latest job are returned. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Implement API endpoint /api/statusMalfurious2-0/+37
This returns high-level information describing the current state of the system. The intent of the `version` field is primarily to act as a "page should be reloaded" indicator to the front-end javascript code. This would inform the client to reload (possibly) new markup or script whenever the version field changes. This field could return an accurate version spec of cychedelic or DMT, however just returns a random string at the moment which is tied to the DMT docker image build. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Add server-side templating functionalityMalfurious1-0/+55
This file is taken from the "werc" web "anti-framework" project, which is made available as Public Domain as well as MIT code. It is an awk script that implements a simple templating markup syntax. When run on an input file, it translates the content into equivalent shell syntax which can then be executed to produce the desired result. Therefore, the script should be invoked as `template.awk FILE | bash`, and the output can be streamed to the client. An overview of the template syntax follows: Lines beginning with '%' (no leading whitespace allowed) are taken as shell commands. Inline %{ ... %} gives the inner content taken as a shell command. Inline %( ... %) gives the inner content taken as a shell expression (which is substituted). All other text is echoed as-is. Signed-off-by: Malfurious <m@lfurio.us>
2023-11-15dmt: Add service containerMalfurious1-0/+19
DMT (Display for Monitoring log Text) will be the HTTP monitoring interface for cychedelic. We mount the system data as readonly for this purpose. The Dockerfile is largely based on that of ACID for the moment, as I anticipate the same underlying packages. Also, the web service entry is written to be intended for use with the nginx-proxy reverse proxy. CGD is an extremely simple daemon used for serving a CGI script over HTTP. It is available as Public Domain / MIT code. DMT's entrypoint will be implemented as a CGI shell script. Signed-off-by: Malfurious <m@lfurio.us>