Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic web interface - work in process #21

Merged
merged 37 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7598a59
fix naming for assets
fredclausen Apr 23, 2024
55f720a
Update README.md
fredclausen Apr 23, 2024
e52d66d
fix deploy action
fredclausen Apr 23, 2024
bf6dc6d
Config Path based on OS
fredclausen Apr 23, 2024
21bcfc5
s6wrap nginx and fix docker local build
fredclausen Apr 23, 2024
d5f9ed2
favicon SDRE logo
fredclausen Apr 23, 2024
631e74f
tauri app icon
fredclausen Apr 23, 2024
9fd6fde
adjust cargo toml for front end
fredclausen Apr 23, 2024
7210922
wip
fredclausen Apr 24, 2024
1970c1e
working menu wuuuuuut
fredclausen Apr 24, 2024
0eec28d
use enum for checked state
fredclausen Apr 24, 2024
3d7309c
copyright, layout, remove example stuff, and search component
fredclausen Apr 24, 2024
3ee5371
fix layout spacing on borders
fredclausen Apr 24, 2024
09ae2c7
Create pallet.png
fredclausen Apr 25, 2024
01c64fd
clippy
fredclausen Apr 25, 2024
4ec06d9
search box layout and ui stuff
fredclausen Apr 25, 2024
5b7d4e5
fix margins
fredclausen Apr 25, 2024
2d5a072
move body parent div element to base function to avoid duplication
fredclausen Apr 25, 2024
ca3d06e
refactor
fredclausen Apr 25, 2024
ee98a78
wip
fredclausen Apr 25, 2024
9aa3da8
wip live page laying out
fredclausen Apr 25, 2024
e25c5f8
wip live page laying out
fredclausen Apr 25, 2024
6838413
some color mods
fredclausen Apr 25, 2024
878bbb5
wip responsive live page layout
fredclausen Apr 25, 2024
955204a
wip map works wooo
fredclausen Apr 27, 2024
2898613
Update map_display.rs
fredclausen Apr 27, 2024
13d1575
wip
fredclausen Apr 28, 2024
7132df4
wip border stuff
fredclausen Apr 28, 2024
077ce5b
wip
fredclausen Apr 28, 2024
0ec10aa
more layout margin improvements
fredclausen Apr 28, 2024
55b6c2c
use keys to change panels
fredclausen Apr 28, 2024
db80f83
wip on menuing and targeting the container elements
fredclausen Apr 28, 2024
b263bf4
cargo updates
fredclausen Apr 29, 2024
d4ebd98
wip
fredclausen May 5, 2024
a613986
Update to latest rust
fredclausen May 5, 2024
b0f69a1
wip
fredclausen May 7, 2024
e67eb4c
cargo updates
fredclausen May 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "App v__VERSION__"
tagName: SDREHub-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "SDR-E Hub v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: false
prerelease: false
Expand Down Expand Up @@ -333,6 +333,7 @@ jobs:
get_version_method: cargo_toml_file_in_repo:file=/Cargo.toml
cache_enabled: true
cache_path: ./bin/
cache_key: ${{ github.run_id }}

secrets:
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -360,6 +361,7 @@ jobs:
get_version_method: cargo_toml_file_in_repo:file=/Cargo.toml
cache_enabled: true
cache_path: ./bin/
cache_key: ${{ github.run_id }}
docker_latest_tag: test
secrets:
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/on_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
# tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
# releaseName: "App v__VERSION__"
# releaseBody: "See the assets to download this version and install."
# releaseDraft: true
# prerelease: false
args: ${{ matrix.args }}
48 changes: 38 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ homepage = "https://github.com/sdr-enthusiasts/sdre-hub"
repository = "https://github.com/sdr-enthusiasts/sdre-hub"
readme = "README.MD"
license = "MIT"
rust-version = "1.77.2"
rust-version = "1.78.0"
keywords = [
"acars",
"vdlm",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY ./bin/sdre-hub.armv7/sdre-hub /opt/sdre-hub.armv7
COPY ./bin/sdre-hub.arm64/sdre-hub /opt/sdre-hub.arm64
COPY ./bin/sdre-hub.amd64/sdre-hub /opt/sdre-hub.amd64
COPY ./bin/sh-frontend /opt/sh-frontend

ENV SH_DATA_PATH="/opt/sdre-hub-data"
# hadolint ignore=DL3008,DL3003,SC1091
RUN set -x && \
KEPT_PACKAGES=() && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build_binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.77.2 as builder
FROM rust:1.78.0 as builder
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
WORKDIR /tmp/sdre-hub
# hadolint ignore=DL3008,DL3003,SC1091,DL4006,DL3009
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build_frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.77.2 as builder
FROM rust:1.78.0 as builder
WORKDIR /tmp/sdre-hub
# hadolint ignore=DL3008,DL3003,SC1091,DL4006,DL3009
RUN set -x && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM rust:1.77.2 as builder
FROM rust:1.78.0 as builder
WORKDIR /tmp/sdre-hub
# hadolint ignore=DL3008,DL3003,SC1091,DL4006
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends libzmq3-dev \
apt-get install -y --no-install-recommends libzmq3-dev && \
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && \
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && \
cargo binstall trunk wasm-bindgen-cli --no-confirm && \
Expand All @@ -23,6 +23,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY rootfs /
COPY --from=builder /tmp/sdre-hub/target/release/sdre-hub /opt/sdre-hub
COPY --from=builder /tmp/sdre-hub/sh-frontend/dist /opt/sh-frontend
ENV SH_DATA_PATH="/opt/sdre-hub-data"
# hadolint ignore=DL3008,DL3003,SC1091
RUN set -x && \
KEPT_PACKAGES=() && \
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Sorry, there is no migration path from ACARS Hub to SDR-E Hub. The data that ACA
- [x] Application build
- [ ] Manage settings from the web interface
- [x] GitHub CI
- [ ] FIXME/TODO Cleanup
- [ ] Alpha 2
- [ ] Connect to data providers
- [ ] ADSB
Expand All @@ -39,13 +40,16 @@ Sorry, there is no migration path from ACARS Hub to SDR-E Hub. The data that ACA
- [ ] Satellite ACARS
- [ ] Combine data from data providers and provide a state machine to manage data
- [ ] Display data on the web interface
- [ ] FIXME/TODO Cleanup
- [ ] Alpha 3
- [ ] Implement database storage
- [ ] RRD style data storage for relevant stats
- [ ] SQL storage for historical data
- [ ] General stats
- [ ] FIXME/TODO Cleanup
- [ ] Beta 1
- [ ] Focus on interface; clean it up, mobile functionality, etc
- [ ] FIXME/TODO Cleanup

## Thank you

Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/nginx.sdrehub/sites-enabled/sdrehub
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ server {
access_log off;

# cache all of the files
location ~ \.(css|js|png|jpg|jpeg|gif|ico|woff|woff2|ttf|svg|eot|otf|map|mjs|mp3|wasm)$ {
location ~ \.(css|js|png|jpg|jpeg|gif|ico|woff|woff2|ttf|svg|eot|otf|map|mjs|mp3|wasm|webmanifest)$ {
expires 30d;
add_header Cache-Control "public";
root /opt/sh-frontend;
Expand Down
9 changes: 7 additions & 2 deletions rootfs/etc/s6-overlay/scripts/01-config-check
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/command/with-contenv bash
# shellcheck shell=bash
#!/bin/bash
## !/command/with-contenv bash
## shellcheck shell=bash

# check the environment and see if there are any SH_* variables set
# if so, warn the user that they really should be mapping a file
# to /opt/sdre-hub-data and using /opt/sdre-hub-data/sh_config.toml

SH_DATA=$(env | grep '^SH_')

# remove SH_DATA_PATH, if it exists in SH_DATA from the list of variables to check

SH_DATA=$(echo "$SH_DATA" | grep -v '^SH_DATA_PATH')

if [ -n "$SH_DATA" ]; then
echo "[01-config-check] WARNING: You have SH_* environment variables set. You should be using a config file instead."
echo " Please map a directory to /opt/sdre-hub-data and use /opt/sdre-hub-data/sh_config.toml"
Expand Down
12 changes: 4 additions & 8 deletions rootfs/etc/s6-overlay/scripts/nginx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/command/with-contenv bash
#shellcheck shell=bash

# shellcheck disable=SC2016
echo "Starting web proxy service" | stdbuf -oL awk '{print "[nginx ] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}'
source /scripts/common
s6wrap=(s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args)


# shellcheck disable=SC2016
mkdir -p /var/log/nginx
# TODO: Run this via wiede's script
# shellcheck disable=SC2016
exec \
/usr/sbin/nginx 2>&1 | stdbuf -oL awk '{print "[nginx ] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}'

"${s6wrap[@]}" /usr/sbin/nginx
62 changes: 41 additions & 21 deletions sh-frontend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading