Skip to content

Commit d4c6001

Browse files
committed
feat: build IQSS Glance dashboard with static no-JS graph templates
0 parents  commit d4c6001

36 files changed

+1793
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Glance example dashboard repo
2+
3+
# local reference repos used to copy styles/images
4+
/_reference/
5+
6+
# OS/editor junk
7+
.DS_Store
8+
9+
# local env overrides
10+
.env.local
11+
12+
# downloaded glance binaries / archives (keep local)
13+
/glance
14+
/glance-*.tar.gz
15+
/glance-*.zip

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# IQSS Public Metrics Dashboard (Glance Example)
2+
3+
This repository is an **example** rebuild of the legacy IQSS public metrics dashboard using
4+
[Glance](https://github.com/glanceapp/glance).
5+
6+
The look-and-feel (colors/fonts/images) is inspired by the legacy site:
7+
https://iqss.github.io/iqss-metrics-dashboard/
8+
9+
All metrics are **fake** and served as **static JSON files** so you can compare Glance against
10+
the existing dashboard implementation.
11+
12+
## Run
13+
14+
Requirements:
15+
- Glance installed (or downloaded)
16+
17+
Start Glance from the repo root:
18+
```bash
19+
glance --config ./config/glance.yml
20+
```
21+
22+
Open:
23+
- Dashboard: http://localhost:8080
24+
25+
## Where Things Live
26+
27+
- Glance config: `config/glance.yml` and `config/*.yml`
28+
- Custom styling (IQSS-inspired): `assets/user.css`
29+
- Images (copied from the legacy dashboard repo): `assets/images/`
30+
- Fake static data (flat files served by Glance): `assets/data/*.json`
31+
- No-JS graph examples (line/area/bar/pie): `assets/data/graphs/*.json`
32+
33+
## Offline / No Runtime Internet Calls
34+
35+
This example uses no custom JS for graphs. Charts are rendered as
36+
HTML/CSS/SVG from static JSON using Glance templates.
37+
38+
This example self-hosts its font dependencies:
39+
- Fonts: `assets/fonts/*.woff2` (Montserrat + Questrial)
40+
41+
To (re)download vendor assets:
42+
```bash
43+
./scripts/vendor-assets.sh
44+
```
45+
46+
## Reusable Graph Template (No JS)
47+
48+
Graph widgets use a shared Glance template in
49+
`config/scientific-programs.yml` (anchor: `&iqss_graph_template`) and
50+
accept these JSON shapes:
51+
52+
- `type: "line"` or `type: "area"` with `points: [{label, value}, ...]`
53+
- `type: "bar"` with `bars: [{label, value}, ...]`
54+
- `type: "pie"` with `slices: [{label, value, color}, ...]`
55+
56+
To add another graph, point a `custom-api` widget URL to a static graph JSON
57+
file and set `template: *iqss_graph_template`.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"updated": "2026-02-01",
3+
"kpis": [
4+
{ "label": "Invoices processed", "value": 3840, "unit": "", "format": "int", "accent": "primary" },
5+
{ "label": "Purchase orders created", "value": 1260, "unit": "", "format": "int", "accent": "secondary" },
6+
{ "label": "Vendors onboarded", "value": 94, "unit": "", "format": "int", "accent": "primary" },
7+
{ "label": "Median approval time", "value": 2.3, "unit": "days", "format": "float", "accent": "tertiary" },
8+
{ "label": "Spend managed ($M)", "value": 8.7, "unit": "M", "format": "float", "accent": "secondary" },
9+
{ "label": "Budget utilization", "value": 78.4, "unit": "%", "format": "float", "accent": "primary" }
10+
],
11+
"trend_max": 360,
12+
"trend": [
13+
{ "label": "Sep", "value": 280 },
14+
{ "label": "Oct", "value": 310 },
15+
{ "label": "Nov", "value": 295 },
16+
{ "label": "Dec", "value": 330 },
17+
{ "label": "Jan", "value": 360 },
18+
{ "label": "Feb", "value": 340 }
19+
],
20+
"notes": [
21+
{ "text": "Numbers are illustrative only and do not represent real IQSS operations." },
22+
{ "text": "This page shows how a KPI grid + simple bar trend can be done with Glance custom-api widgets." },
23+
{ "text": "For real data, replace the fake JSON service with a real API endpoint (or generate JSON during CI)." }
24+
]
25+
}
26+

assets/data/dataverse.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"updated": "2026-02-01",
3+
"kpis": [
4+
{ "label": "Installations (worldwide)", "value": 112, "unit": "", "format": "int", "accent": "primary", "delta_pct": 3.6 },
5+
{ "label": "Datasets published", "value": 28500, "unit": "", "format": "int", "accent": "secondary", "delta_pct": 11.1 },
6+
{ "label": "Files stored", "value": 910000, "unit": "", "format": "int", "accent": "primary", "delta_pct": 8.3 },
7+
{ "label": "Downloads", "value": 3250000, "unit": "", "format": "int", "accent": "secondary", "delta_pct": 12.9 },
8+
{ "label": "API requests", "value": 1840000, "unit": "", "format": "int", "accent": "tertiary" },
9+
{ "label": "Median ingest time", "value": 3.2, "unit": "min", "format": "float", "accent": "primary", "delta_pct": -4.7 }
10+
],
11+
"trend_max": 640000,
12+
"trend": [
13+
{ "label": "Sep", "value": 480000 },
14+
{ "label": "Oct", "value": 520000 },
15+
{ "label": "Nov", "value": 510000 },
16+
{ "label": "Dec", "value": 560000 },
17+
{ "label": "Jan", "value": 640000 },
18+
{ "label": "Feb", "value": 610000 }
19+
],
20+
"notes": [
21+
{ "text": "All numbers are fake. Replace the JSON with real Dataverse telemetry when ready." },
22+
{ "text": "Glance custom-api can consume any JSON that is reachable from the server container." },
23+
{ "text": "This demo keeps it simple: a KPI grid + a 6-point trend series." }
24+
]
25+
}
26+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"type": "line",
3+
"aria_label": "Virtual help desk requests (fake data)",
4+
"points": [
5+
{ "label": "Mar", "value": 92 },
6+
{ "label": "Apr", "value": 88 },
7+
{ "label": "May", "value": 95 },
8+
{ "label": "Jun", "value": 101 },
9+
{ "label": "Jul", "value": 110 },
10+
{ "label": "Aug", "value": 98 },
11+
{ "label": "Sep", "value": 104 },
12+
{ "label": "Oct", "value": 120 },
13+
{ "label": "Nov", "value": 117 },
14+
{ "label": "Dec", "value": 130 },
15+
{ "label": "Jan", "value": 142 },
16+
{ "label": "Feb", "value": 125 }
17+
]
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"type": "area",
3+
"aria_label": "Training registrations (fake data)",
4+
"points": [
5+
{ "label": "Mar", "value": 45 },
6+
{ "label": "Apr", "value": 52 },
7+
{ "label": "May", "value": 60 },
8+
{ "label": "Jun", "value": 58 },
9+
{ "label": "Jul", "value": 64 },
10+
{ "label": "Aug", "value": 70 },
11+
{ "label": "Sep", "value": 72 },
12+
{ "label": "Oct", "value": 68 },
13+
{ "label": "Nov", "value": 75 },
14+
{ "label": "Dec", "value": 78 },
15+
{ "label": "Jan", "value": 85 },
16+
{ "label": "Feb", "value": 82 }
17+
]
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"type": "bar",
3+
"aria_label": "Top GIS license requests (fake data)",
4+
"bars": [
5+
{ "label": "ArcGIS Pro", "value": 220 },
6+
{ "label": "ArcGIS Online", "value": 180 },
7+
{ "label": "ArcGIS Desktop", "value": 160 },
8+
{ "label": "ENVI", "value": 120 },
9+
{ "label": "ERDAS Imagine", "value": 110 },
10+
{ "label": "Global Mapper", "value": 95 },
11+
{ "label": "Mapbox Studio", "value": 88 },
12+
{ "label": "GeoDa", "value": 80 },
13+
{ "label": "Tableau (Mapping)", "value": 72 },
14+
{ "label": "Other", "value": 60 }
15+
]
16+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"type": "pie",
3+
"aria_label": "License requests by status (fake data)",
4+
"slices": [
5+
{ "label": "Approved", "value": 340, "color": "#215990" },
6+
{ "label": "Pending", "value": 90, "color": "#B84D00" },
7+
{ "label": "Needs info", "value": 42, "color": "#808285" },
8+
{ "label": "Denied", "value": 18, "color": "#A41034" }
9+
]
10+
}

assets/data/it-support.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"updated": "2026-02-01",
3+
"kpis": [
4+
{ "label": "Tickets received", "value": 1320, "unit": "", "format": "int", "accent": "primary", "delta_pct": -3.4 },
5+
{ "label": "Tickets resolved", "value": 1275, "unit": "", "format": "int", "accent": "secondary", "delta_pct": -2.1 },
6+
{ "label": "Median resolution time", "value": 14.5, "unit": "hours", "format": "float", "accent": "tertiary", "delta_pct": -6.0 },
7+
{ "label": "Devices supported", "value": 620, "unit": "", "format": "int", "accent": "primary", "delta_pct": 1.5 },
8+
{ "label": "OS upgrades", "value": 148, "unit": "", "format": "int", "accent": "secondary" },
9+
{ "label": "CSAT", "value": 4.6, "unit": "/5", "format": "float", "accent": "primary", "delta_pct": 2.2 }
10+
],
11+
"trend_max": 260,
12+
"trend": [
13+
{ "label": "Sep", "value": 210 },
14+
{ "label": "Oct", "value": 240 },
15+
{ "label": "Nov", "value": 230 },
16+
{ "label": "Dec", "value": 250 },
17+
{ "label": "Jan", "value": 260 },
18+
{ "label": "Feb", "value": 245 }
19+
],
20+
"notes": [
21+
{ "text": "This is demo data for comparing Glance to the legacy dashboard." },
22+
{ "text": "The trend widget is a CSS-only bar chart, not a JS charting library." },
23+
{ "text": "For a real dashboard, you might connect to a helpdesk system API (ServiceNow/Jira/etc.)." }
24+
]
25+
}
26+

assets/data/overview.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"updated": "2026-02-01",
3+
"kpis": [
4+
{ "label": "Operating budget ($M)", "value": 12.4, "unit": "M", "format": "float", "accent": "primary", "delta_pct": 2.7 },
5+
{ "label": "Staff FTE", "value": 86, "unit": "", "format": "int", "accent": "secondary", "delta_pct": 1.2 },
6+
{ "label": "Researchers served", "value": 1420, "unit": "", "format": "int", "accent": "primary", "delta_pct": 6.4 },
7+
{ "label": "Consultations", "value": 980, "unit": "", "format": "int", "accent": "secondary", "delta_pct": 4.1 },
8+
{ "label": "Workshops delivered", "value": 74, "unit": "", "format": "int", "accent": "primary", "delta_pct": 8.0 },
9+
{ "label": "Dataverse downloads", "value": 3250000, "unit": "", "format": "int", "accent": "secondary", "delta_pct": 12.9 },
10+
{ "label": "Cluster node-hours", "value": 910000, "unit": "", "format": "int", "accent": "primary", "delta_pct": 22.0 },
11+
{ "label": "Helpdesk tickets", "value": 1320, "unit": "", "format": "int", "accent": "tertiary", "delta_pct": -3.4 }
12+
],
13+
"trend_max": 1450,
14+
"trend": [
15+
{ "label": "FY26 Q1", "value": 1140 },
16+
{ "label": "FY26 Q2", "value": 1280 },
17+
{ "label": "FY26 Q3", "value": 1310 },
18+
{ "label": "FY26 Q4", "value": 1450 }
19+
],
20+
"notes": [
21+
{ "text": "All metrics on this demo are fake and static (hard-coded JSON files served by a local container)." },
22+
{ "text": "The goal is to compare Glance widget/layout/theming ergonomics to the legacy IQSS metrics dashboard." },
23+
{ "text": "Update date is also fake: 2026-02-01." }
24+
]
25+
}
26+

0 commit comments

Comments
 (0)