Skip to content

Commit 3d1746e

Browse files
authored
Merge pull request #228 from prometheus-lua/feature/webui
Add Web-UI
2 parents 003a081 + 9188621 commit 3d1746e

45 files changed

Lines changed: 6086 additions & 51 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Build.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/Test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Test
22
on:
33
push:
4+
branches:
5+
- master
46
pull_request:
57
branches:
68
- master

.github/workflows/pages.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Web UI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 10.33.0
27+
- name: Setup Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 24
31+
cache: pnpm
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
- name: Build web
35+
run: pnpm --filter web build
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: web/dist
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ srlua.exe
1111
glue.exe
1212
build
1313

14+
# Web tooling
15+
node_modules
16+
web/node_modules
17+
web/dist
18+
web/dist-ssr
19+
web/test-results
20+
web/playwright-report
21+
.vite
22+
1423
# Ignore Local Test Files
1524
test.lua
1625
test.obfuscated.lua
17-
config.lua
26+
config.lua

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<br/>
1010

11+
<a href="https://prometheus-lua.github.io/Prometheus/">
12+
<img src="https://img.shields.io/badge/Prometheus%20Web-Open-0F766E?style=for-the-badge&logo=github&logoColor=white" alt="Open Prometheus Web UI" />
13+
</a>
1114
<a href="https://github.com/prometheus-lua/Prometheus/actions/workflows/Test.yml">
1215
<img src="https://img.shields.io/github/actions/workflow/status/prometheus-lua/Prometheus/Test.yml?branch=master&style=for-the-badge&label=Tests" alt="Tests" />
1316
</a>
@@ -46,6 +49,14 @@ Currently, Prometheus supports:
4649

4750
## Quick Start
4851

52+
Try the browser version first:
53+
54+
55+
<a href="https://prometheus-lua.github.io/Prometheus/">
56+
<img src="https://img.shields.io/badge/Prometheus%20Web-Open-0F766E?style=for-the-badge&logo=github&logoColor=white" alt="Open Prometheus Web UI" />
57+
</a>
58+
59+
### Local CLI usage
4960
Clone the repository:
5061

5162
```bash
@@ -190,6 +201,6 @@ Full license text: [Prometheus License](https://github.com/prometheus-lua/Promet
190201

191202
<div align="center">
192203

193-
<img src="https://capsule-render.vercel.app/api?type=waving&height=120&section=footer&color=gradient" />
204+
<img width="100%" src="https://capsule-render.vercel.app/api?type=waving&height=120&section=footer&color=gradient" />
194205

195206
</div>

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "prometheus-workspace",
3+
"private": true,
4+
"packageManager": "pnpm@10.33.0",
5+
"scripts": {
6+
"web:dev": "pnpm --filter web dev",
7+
"web:build": "pnpm --filter web build",
8+
"web:preview": "pnpm --filter web preview",
9+
"web:test": "pnpm --filter web test"
10+
}
11+
}

0 commit comments

Comments
 (0)