1
0
Fork 0
Commit Graph

25 Commits (master)

Author SHA1 Message Date
Dustin 2325da85fd svc: Create windows without URLs
dustin/hudctrl/pipeline/head This commit looks good Details
Every screen needs a window, even if it does not have a URL, otherwise
no URL can ever be assigned to it.
2022-12-18 13:24:10 -06:00
Dustin d278eedcbd ci: Publish container image to Gitea
dustin/hudctrl/pipeline/head This commit looks good Details
The Docker Distribution image resitry is no more.
2022-12-18 13:09:53 -06:00
Dustin a14921b79e svc: Save config after navigation
dustin/hudctrl/pipeline/head There was a failure building this commit Details
When a makes a *POST /screen/{name}/navigate* HTTP request, the URL list
is updated and saved to the configuration file.  This provides a
mechanism for configuring the URL list, since it is now part of the
display configuration file and not a separate file manged externally.
2022-12-18 13:02:33 -06:00
Dustin debce63bba svc: Save display config on change
When the display host updates its monitor configuration by making the
*PUT /display/monitors* HTTP request, the configuration is now saved to
disk.  This will allow the controller to "remember" the configuration
the next time it starts up.
2022-12-18 13:02:33 -06:00
Dustin f9eaf9f9d7 svc: Load display config at startup
The biggest issue with the HUD controller right now is how it handles,
or rather does not handle, reconnecting to the display after the
controller restarts.  Since it is completely stateless, it does not
"remember" the display configuration, and thus does not know how to
connect to the display or what its monitor configuration is when it
first starts.  If the display is already running the the controller
starts up, it will not receive the request to initialize the display
until the display reboots.

To resolve this, the HUD controller needs to be able to load the display
configuration and initialize the display any time it starts up.  As
such, the `HUDService` class now attempts to load the state from a JSON
file in its startup hook.  If the file is available and valid, and
specifies the address and port of the display host, the controller will
open the Marionette connection.  If the file also contains valid list of
monitors, the display will be initialized.

The URL list is now also read from the same configuration file, so as to
avoid having to manage multiple files.
2022-12-18 12:52:01 -06:00
Dustin 949d180edd svc: Set venv path for Pyright
dustin/hudctrl/pipeline/head This commit looks good Details
Need to set the path to the Python venv for Pyright in order to get
valid diagnostics in Neovim.
2022-08-02 21:51:45 -05:00
Dustin 70956d540e svc: Update to aiomarionette 0.0.3
Older versions hard-coded using the `AF_INET6` address family, even for
IPv4 addresses.  While this "worked on my machine," it did not work when
the application was deployed to the Kubernetes cluster.  Either cri-o or
the Debian-based *python* container image must disable this somehow.
2022-08-02 21:51:45 -05:00
Dustin 327d902657 svc: api: Get URLs file path from env var
The `HUDCTRL_URLS_FILE` environment variable can be used to specify the
location to the `urls.json` file.
2022-08-02 21:51:45 -05:00
Dustin 6443b64c02 ci: Build container image
This image will be used to deploy the application on the Kubernetes
cluster.
2022-08-02 21:51:45 -05:00
Dustin 97f94450c5 svc: Remove playwright dependency 2022-08-02 21:51:45 -05:00
Dustin f316c08b72 svc: Update poetry.lock 2022-08-02 21:51:45 -05:00
Dustin 43f2d62570 ui: update package-lock.json 2022-08-02 21:51:45 -05:00
Dustin d9adedf30c svc: Use released aiomarionette 2022-08-02 21:51:45 -05:00
Dustin 3bca14132e ci: Begin Jenkins build pipeline 2022-08-02 21:51:45 -05:00
Dustin 3c5ee6fa00 ui: Add navigation field
The GUI now allows controlling the location of the screens by entering a
new URL in the text field.  Upon submitting the form, the card will
refresh with the updated screen information and screenshot.
2022-04-30 21:49:30 -05:00
Dustin 12d6337335 svc: Add get screen operation
The *GET /screen/{name}/* path operation retrieves the current
information about a single screen.
2022-04-30 21:49:00 -05:00
Dustin e452393b9f svc: Add navigate operation
The *POST /screen/{name}/navigate* path operation allows the client to
request the screen navigate to a different URL, specified by the `url`
form field.
2022-04-30 21:48:12 -05:00
Dustin 0536574072 ui: Begin GUI
The GUI shows a screenshot of each monitor, as well as the title and URL
of the page being displayed.  There's also a button to trigger a page
reload on the remote machine.
2022-04-30 18:17:07 -05:00
Dustin fa1c9cb42a svc: hud: Protect window switches with a lock
Any time we need to switch Firefox windows, we need to use a lock to
prevent multiple simultaneous requests.  If we do not, interleaved
Marionette commands may result in performing operations on the wrong
window.  For example, making two simultaneous requests for screenshots
is liable to return the wrong window for one of them.
2022-04-30 15:53:57 -05:00
Dustin 35eba74bfd api: Add get screenshot operation
The *GET /screen/{name}/screenshot* path operation returns a screenshot
of the specified screen as a PNG image.  If a value is specified for one
or more of `height`, `width`, or `ratio`, then the image will be resized
accordingly.
2022-04-30 15:51:03 -05:00
Dustin b537896d56 api: List screens by monitor name
The *GET /screens/* path operation now returns a mapping of monitor
names to screen properties.  This matches the new behavior of the *POST
/screen/{name}/refresh* operation.
2022-04-30 14:24:53 -05:00
Dustin d075a1b1a9 meta: Install aiomarionette in development mode
Poetry does not install local path dependencies in "editable" mode by
default.  Instead, it builds them and installs them into the venv like
any other dependency.  This means that changes in the local copy are not
picked up.
2022-04-30 14:22:42 -05:00
Dustin 78169c06f0 api: Refresh screen by monitor name
In order to be more precise about which screen will be refreshed, the
*POST /screen/{number}/refresh* path operation has been changed to *POST
/screen/{name}/refresh*.  It takes a monitor name as the key instead of
an array index.
2022-04-30 14:15:10 -05:00
Dustin dbf266de5b svc: Load URL list from file
Instead of hard-coding the list of URLs to open, we'll read it from a
JSON file on the disk.  The file contains a mapping of monitor names to
URLs, e.g.

```json
{
    "HDMI-1": "http://my.site.one",
    "HDMI-2": "http://my.site.two"
}
```
2022-04-30 13:57:21 -05:00
Dustin 939f24d79f Initial commit 2022-04-30 13:32:42 -05:00