Skip to content

Commit

Permalink
Map features (#113)
Browse files Browse the repository at this point in the history
* ensure callsign ends up not being blank

* bump version

* Move help page asset to typescript folder

* Correctly fix flight field causing mis-matches

* move to functions repetitive calls for same information

* Update site.css

* hide table contents correctly for safari

* Fix safari plane color hover

#82

* change icon scaling and stroke size

* temporarily disable msgno search

* Fix msgfts triggers being missing

* Update upgrade_db.py

* Delete helppage.MD

* Update .gitignore

* Update linting.yml

* update precommit to latest eslint

* alerts on live map

* Update version

* Clarify tooltip for callsign

* fix alert searches

* stat page link hover color

* emit signal levels on graph update

* ensure html element exists before grabbing the canvas context

* Use proper graphs if one decoder selected

* Update version
  • Loading branch information
fredclausen authored Jul 19, 2021
1 parent e93cef2 commit 5878cfd
Show file tree
Hide file tree
Showing 22 changed files with 343 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Pull markdownlint/markdownlint:latest Image
run: docker pull markdownlint/markdownlint:latest
- name: Run markdownlint against *.md files
run: docker run --rm -i -v "$(pwd)":/workdir --workdir /workdir markdownlint/markdownlint:latest --rules ~MD013,~MD033,~MD026 $(find . -type f -iname '*.md' | grep -v '/.git/')
run: docker run --rm -i -v "$(pwd)":/workdir --workdir /workdir markdownlint/markdownlint:latest --rules ~MD013,~MD033,~MD026,~MD002,~MD022 $(find . -type f -iname '*.md' | grep -v '/.git/')

flake8:

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ rootfs/webapp/static/images/*year.png
rootfs/webapp/data/acars-metadata.json
rootfs/webapp/data/ground-stations.json
package/
rootfs/webapp/templates/index.html
rootfs/webapp/templates/helppage.MD
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ repos:
- '@typescript-eslint/eslint-plugin'
exclude: ^(rootfs/webapp/static/css/other/|acars-decoder-typescript/|rootfs/webapp/static/js/other/|Logo-Sources|acarshub-typescript/css/other/|acarshub-typescript/js-other)
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.30.0
rev: v7.31.0
hooks:
- id: eslint
files: \.[j]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
exclude: ^(rootfs/webapp/static/css/other/|acars-decoder-typescript/|rootfs/webapp/static/js/other/|Logo-Sources|acarshub-typescript/css/other/|acarshub-typescript/js-other)
additional_dependencies:
- eslint@7.30.0
- eslint@7.31.0
- [email protected]
- [email protected]
# - '@typescript-eslint/eslint-plugin'
Expand Down
26 changes: 23 additions & 3 deletions acarshub-typescript/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ ol>li {
td {
padding: 7px;
}

hr {
display: block;
margin-top: 0.5em;
Expand Down Expand Up @@ -280,7 +281,7 @@ div#log.left {
}

a.spread_text:hover {
color: #FFF;
color: black;
}

select {
Expand Down Expand Up @@ -934,23 +935,34 @@ canvas {
}

.airplane_blue:hover,
.airplane_green:hover {
.airplane_green:hover,
.airplane_red:hover {
fill: orange;
paint-order: stroke;
}

.airplane_green {
fill: green;
stroke: black;
paint-order: stroke;
}

.airplane_blue {
fill: var(--blue-highlight);
stroke: black;
paint-order: stroke;
}

.airplane_orange {
fill: orange;
stroke: black;
paint-order: stroke;
}

.airplane_red {
fill: red;
stroke: black;
paint-order: stroke;
}

svg {
Expand Down Expand Up @@ -1027,7 +1039,11 @@ div.plane_element {
.sidebar_no_hover_with_acars:hover,
.sidebar_no_hover_with_acars:focus,
.sidebar_no_hover_with_acars:hover a,
.sidebar_no_hover_with_acars:focus a {
.sidebar_no_hover_with_acars:focus a,
.sidebar_alert:hover,
.sidebar_alert:focus,
.sidebar_alert:hover a,
.sidebar_alert:focus a {
background-color: black !important;
color: green !important;
}
Expand All @@ -1036,6 +1052,10 @@ div.plane_element {
color: green !important;
}

.sidebar_alert {
background-color: red !important;
}

.plane_element a {
color: white;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@@ -1,50 +0,0 @@
# ACARS Hub About/Help

## About
Expand Down
4 changes: 2 additions & 2 deletions acarshub-typescript/package-lock.json

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

2 changes: 1 addition & 1 deletion acarshub-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acarshub-typescript",
"version": "2.2.2",
"version": "2.3.0",
"description": "Web front end for the docker-acarshub project",
"main": "index.js",
"repository": "https://github.com/fredclausen/docker-acarshub",
Expand Down
2 changes: 1 addition & 1 deletion acarshub-typescript/src/aircraft_icons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare module "aircraft_icons" {
typeDescription: string | null,
wtc: string | null,
addrtype: string,
altitude: number
altitude: number | string
): import("./interfaces").svg_icon;

export function svgShapeToURI(
Expand Down
6 changes: 4 additions & 2 deletions acarshub-typescript/src/html_functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ export let html_functions = {
let html_output = "";
html_output += footer
? '<tr class="show_when_big"><td>'
: '<td class="text_top show_when_small">';
: '<td class="text_top">';

html_output += !footer ? '<div class="show_when_small">' : "";

if (typeof message.tail !== "undefined") {
html_output += `<span class="tail-tooltip">Tail: <strong><a href=\"https://flightaware.com/live/flight/${
Expand Down Expand Up @@ -349,7 +351,7 @@ export let html_functions = {
html_output += "</span></span>";
}
}

html_output += !footer ? "</div>" : "";
html_output += "</td></tr>";

return html_output;
Expand Down
3 changes: 2 additions & 1 deletion acarshub-typescript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
alert_matched,
plane_data,
acars_msg,
plane_match,
} from "./interfaces.js";

import { live_map_page } from "./live_map.js";
Expand Down Expand Up @@ -477,7 +478,7 @@ export function get_match(
callsign: string = "",
hex: string = "",
tail: string = ""
): acars_msg[] {
): plane_match {
return live_messages_page.get_match(callsign, hex, tail);
}

Expand Down
18 changes: 17 additions & 1 deletion acarshub-typescript/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export interface search_html_msg {

export interface plane {
identifiers: string[];
has_alerts: boolean;
num_alerts: number;
messages: acars_msg[];
}

Expand Down Expand Up @@ -267,7 +269,9 @@ export interface aircraft_icon {

export interface plane_data {
[index: string]: {
id: number;
count: number;
has_alerts: boolean;
num_alerts: number;
};
}

Expand All @@ -283,3 +287,15 @@ export interface alert_matched {
flight: string[] | null;
tail: string[] | null;
}

export interface plane_match {
messages: acars_msg[];
has_alerts: boolean;
num_alerts: number;
}

export interface plane_num_msgs_and_alert {
num_messages: number;
has_alerts: boolean;
num_alerts: number;
}
Loading

0 comments on commit 5878cfd

Please sign in to comment.