Skip to content

Commit a354c48

Browse files
committed
feat: Add constellation-dashboard app
1 parent 3078146 commit a354c48

File tree

14 files changed

+415
-28
lines changed

14 files changed

+415
-28
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,18 @@ jobs:
5252
- run_unit_tests
5353
secrets:
5454
TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
55+
56+
release_constellation_dashboard:
57+
name: Release artifact (constellation-dashboard)
58+
uses: spuxx-dev/ci-cd/.github/workflows/pnpm_build_and_push.yml@v4.1.0
59+
needs:
60+
- run_checks
61+
- run_unit_tests
62+
with:
63+
tag: branch
64+
latest: true
65+
path: ./apps/constellation-dashboard
66+
dockerfile: ./apps/constellation-dashboard/Dockerfile
67+
dockerhub_repository: constellation-dashboard
68+
secrets:
69+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

.prettierrc.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* @type {import("prettier").Config}
44
*/
55
const config = {
6-
trailingComma: "es5",
6+
trailingComma: 'es5',
77
tabWidth: 2,
88
semi: true,
99
singleQuote: true,
10+
plugins: ['prettier-plugin-astro'],
1011
};
1112

1213
export default config;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:lts-alpine AS build
2+
RUN apk add g++ make py3-pip
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install --frozen-lockfile
6+
COPY . .
7+
RUN npm run build -- --mode custom
8+
9+
FROM nginxinc/nginx-unprivileged:alpine AS runtime
10+
COPY ./.nginx/nginx.conf /etc/nginx/nginx.conf
11+
COPY --from=build /app/dist /usr/share/nginx/html
12+
13+
USER 1000
14+
EXPOSE 8080
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Astro Starter Kit: Minimal
2+
3+
```sh
4+
pnpm create astro@latest -- --template minimal
5+
```
6+
7+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
8+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal)
9+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json)
10+
11+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
12+
13+
## 🚀 Project Structure
14+
15+
Inside of your Astro project, you'll see the following folders and files:
16+
17+
```text
18+
/
19+
├── public/
20+
├── src/
21+
│ └── pages/
22+
│ └── index.astro
23+
└── package.json
24+
```
25+
26+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
27+
28+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
29+
30+
Any static assets, like images, can be placed in the `public/` directory.
31+
32+
## 🧞 Commands
33+
34+
All commands are run from the root of the project, from a terminal:
35+
36+
| Command | Action |
37+
| :--------------------- | :----------------------------------------------- |
38+
| `pnpm install` | Installs dependencies |
39+
| `pnpm dev` | Starts local dev server at `localhost:4321` |
40+
| `pnpm build` | Build your production site to `./dist/` |
41+
| `pnpm preview` | Preview your build locally, before deploying |
42+
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
43+
| `pnpm astro -- --help` | Get help using the Astro CLI |
44+
45+
## 👀 Want to learn more?
46+
47+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import solidJs from '@astrojs/solid-js';
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
site: 'https://constellation.spuxx.dev',
8+
integrations: [solidJs()],
9+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "constellation-dashboard",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"build": "astro build",
8+
"preview": "astro preview",
9+
"astro": "astro"
10+
},
11+
"dependencies": {
12+
"@astrojs/solid-js": "5.0.8",
13+
"@spuxx/browser-utils": "^1.6.1",
14+
"@spuxx/solid": "1.3.0",
15+
"astro": "^5.7.9",
16+
"iconify-icon": "2.3.0",
17+
"solid-js": "1.9.5"
18+
}
19+
}
32 KB
Loading
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
import './styles.css';
3+
import { AppBar, ButtonLink } from '@spuxx/solid/server';
4+
---
5+
6+
<html lang="en" class="spx-app">
7+
<head>
8+
<meta charset="utf-8" />
9+
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
10+
<meta name="viewport" content="width=device-width" />
11+
<meta name="generator" content={Astro.generator} />
12+
<title>Constellation Dashboard</title>
13+
</head>
14+
<body>
15+
<AppBar>
16+
<AppBar.Section>
17+
<ButtonLink
18+
href="/"
19+
variant="colored"
20+
color="text-default"
21+
icon="mdi:view-dashboard"
22+
>
23+
Constellation Dashboard
24+
</ButtonLink>
25+
</AppBar.Section>
26+
</AppBar>
27+
<main>
28+
<slot />
29+
</main>
30+
</body>
31+
</html>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { ButtonLink } from '@spuxx/solid';
2+
import type { Component } from 'solid-js';
3+
4+
interface Props {
5+
path: string;
6+
icon: string;
7+
title: string;
8+
}
9+
10+
export const Link: Component<Props> = (props) => {
11+
return (
12+
<ButtonLink
13+
variant="contained"
14+
color="primary"
15+
href={`https://constellation.spuxx.dev${props.path}`}
16+
icon={props.icon}
17+
>
18+
{props.title}
19+
</ButtonLink>
20+
);
21+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
import Layout from '../Layout.astro';
3+
import { Container } from '@spuxx/solid/server';
4+
import { Link } from '../components/Link';
5+
---
6+
7+
<Layout>
8+
<Container
9+
style={{
10+
'max-width': '400px',
11+
margin: 'auto',
12+
display: 'flex',
13+
'flex-direction': 'column',
14+
gap: '4px',
15+
}}
16+
>
17+
<Link
18+
client:only
19+
path="/dashboard/#/"
20+
icon="mdi:kubernetes"
21+
title="Dashboard"
22+
/>
23+
<Link
24+
client:only
25+
path="/grafana/#/"
26+
icon="mdi:chart-areaspline-variant"
27+
title="Grafana"
28+
/>
29+
<Link
30+
client:only
31+
path="/longhorn/#/"
32+
icon="mdi:database"
33+
title="Longhorn"
34+
/>
35+
</Container>
36+
</Layout>

0 commit comments

Comments
 (0)