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

Source code for live telemetry dashboard #9

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Build Telemetry Dashboard'

on:
push:
branches:
- live-telemetry-dashboard-tauri
jobs:
publish-tauri:
defaults:
run:
working-directory: ./Telemetry/dashboard
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]


runs-on: ${{ matrix.platform }}
steps:

- uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- name: install frontend dependencies
run: pnpm install # change this to npm or pnpm depending on which one you use

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: 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
projectPath: './Telemetry/dashboard'
65 changes: 65 additions & 0 deletions .github/workflows/publish-live-telemetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: publish live telemetry
on:
push:
tags:
- 'dashboard-v*'
workflow_dispatch:

jobs:
release:
defaults:
run:
working-directory: ./Telemetry/dashboard
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev

- name: Rust setup
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './Telemetry/dashboard/src-tauri -> target'

- uses: pnpm/action-setup@v2
with:
version: 8.10.2

- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm' # Set this to npm, yarn or pnpm.

- name: Install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # Change this to npm, yarn or pnpm.

- name: Build the app
uses: tauri-apps/tauri-action@v0

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./Telemetry/dashboard
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
releaseName: 'App Name v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
releaseBody: 'See the assets to download and install this version.'
releaseDraft: true
prerelease: false
24 changes: 24 additions & 0 deletions Telemetry/dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
6 changes: 6 additions & 0 deletions Telemetry/dashboard/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "always"
}
19 changes: 19 additions & 0 deletions Telemetry/dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Live Telemetry Dashboard

## Development Requirements

- Rust
- Node.js
- Mosquitto

### Building

1. Install dependencies: `pnpm i`
2. To run a development version (wive weload): `pnpm tauri dev`
3. To build a production version: `pnpm tauri build`

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)

## For more help, talk to Isaiah Gamble (Ibomb)
13 changes: 13 additions & 0 deletions Telemetry/dashboard/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title>
<script type="module" src="/src/main.ts"></script>
</head>

<body>
</body>
</html>
3 changes: 3 additions & 0 deletions Telemetry/dashboard/openmct.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module 'openmct' {
export default openmct;
}
22 changes: 22 additions & 0 deletions Telemetry/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "telemetry-dashboard",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "1.5.2",
"openmct": "3.2.0"
},
"devDependencies": {
"@tauri-apps/cli": "1.5.8",
"typescript": "5.0.2",
"vite": "5.0.0",
"vite-plugin-static-copy": "1.0.0"
}
}
Loading
Loading