Compare commits
10 Commits
d15f2e2d36
...
1e634ed122
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e634ed122 | |||
| 16131521bc | |||
| 741720ed07 | |||
| 4ae7e7968b | |||
| 90e6842d71 | |||
| 8abfae803b | |||
| 88df927f5c | |||
| 9c1302fbfb | |||
| c29d448a30 | |||
| beaee4ae05 |
19
.gitlab-ci.yml
Normal file
19
.gitlab-ci.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
default:
|
||||
image: oven/bun
|
||||
|
||||
stages:
|
||||
- build
|
||||
- lint
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- bun install
|
||||
- bun run build
|
||||
|
||||
lint:
|
||||
stage: lint
|
||||
script:
|
||||
- bun install -g biome
|
||||
- biome check
|
||||
- biome lint
|
||||
@@ -1,3 +0,0 @@
|
||||
# Ignore artifacts:
|
||||
build
|
||||
coverage
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"useTabs": false
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
FROM bun:latest
|
||||
FROM oven/bun
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
|
||||
RUN bun install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bun run build
|
||||
|
||||
EXPOSE 9123
|
||||
EXPOSE 5173
|
||||
|
||||
CMD ["bun", "run", "start"]
|
||||
CMD ["bun", "run", "dev", "--host"]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
|
||||
"vcs": {
|
||||
"enabled": false,
|
||||
"clientKind": "git",
|
||||
|
||||
@@ -2,7 +2,5 @@ services:
|
||||
monitor-im-flur:
|
||||
build: .
|
||||
ports:
|
||||
- "9123:9123"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- "9123:5173"
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import { globalIgnores } from "eslint/config";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import reactRefresh from "eslint-plugin-react-refresh";
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
import { globalIgnores } from "eslint/config";
|
||||
|
||||
export default tseslint.config([
|
||||
globalIgnores(["dist"]),
|
||||
|
||||
1
pipeline/build-image.sh
Executable file
1
pipeline/build-image.sh
Executable file
@@ -0,0 +1 @@
|
||||
#!/bin/bash
|
||||
@@ -1,12 +1,14 @@
|
||||
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
|
||||
const token =
|
||||
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
|
||||
|
||||
async function fetchTentHumidity() {
|
||||
const url = "/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2";
|
||||
const url =
|
||||
"/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2";
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${token}`,
|
||||
}
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
const data = await response.json();
|
||||
|
||||
@@ -18,8 +20,8 @@ async function fetchTentTemperature() {
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${token}`,
|
||||
}
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
@@ -27,4 +29,4 @@ async function fetchTentTemperature() {
|
||||
return data.state;
|
||||
}
|
||||
|
||||
export { fetchTentHumidity, fetchTentTemperature };
|
||||
export { fetchTentHumidity, fetchTentTemperature };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
async function fetchKvvDepartures(stopId: number) {
|
||||
const API_URL = `https://projekte.kvv-efa.de/sl3-alone/XSLT_DM_REQUEST?outputFormat=JSON&coordOutputFormat=WGS84%5Bdd.ddddd%5D&command=&itdLPxx_timeFormat=12&language=de&itdLPxx_useJs=1&std3_suggestMacro=std3_suggest&std3_commonMacro=dm&itdLPxx_contractor=&std3_contractorMacro=&includeCompleteStopSeq=1&useAllStops=1&name_dm=${stopId}&type_dm=any&itdDateTimeDepArr=dep&includedMeans=checkbox&itdLPxx_ptActive=on&useRealtime=1&std3_inclMOT_0Macro=true&std3_inclMOT_1Macro=true&std3_inclMOT_4Macro=true&std3_inclMOT_5Macro=true&imparedOptionsActive=1&nameInfo_dm=7000044&itdLPxx_multiStepDm=2&deleteAssignedStops=1&mode=direct&line=kvv%253A22301%253AE%253AH%253As25&line=kvv%253A22301%253AE%253AR%253As25&line=kvv%253A21012%253AE%253AH%253As25&line=kvv%253A21012%253AE%253AR%253As25&line=kvv%253A22305%253AE%253AH%253As25&line=kvv%253A22305%253AE%253AR%253As25&line=kvv%253A22308%253AE%253AR%253As25&line=kvv%253A22311%253AE%253AH%253As25&line=kvv%253A22351%253AE%253AH%253As25&line=kvv%253A22351%253AE%253AR%253As25&itdLPxx_snippet=1&itdLPxx_template=dmresults&limit=10`;
|
||||
const API_URL = `https://projekte.kvv-efa.de/sl3-alone/XSLT_DM_REQUEST?outputFormat=JSON&coordOutputFormat=WGS84%5Bdd.ddddd%5D&command=&itdLPxx_timeFormat=12&language=de&itdLPxx_useJs=1&std3_suggestMacro=std3_suggest&std3_commonMacro=dm&itdLPxx_contractor=&std3_contractorMacro=&includeCompleteStopSeq=1&useAllStops=1&name_dm=${stopId}&type_dm=any&itdDateTimeDepArr=dep&includedMeans=checkbox&itdLPxx_ptActive=on&useRealtime=1&std3_inclMOT_0Macro=true&std3_inclMOT_1Macro=true&std3_inclMOT_4Macro=true&std3_inclMOT_5Macro=true&imparedOptionsActive=1&nameInfo_dm=${stopId}&itdLPxx_multiStepDm=2&deleteAssignedStops=1&mode=direct&line=kvv%253A22301%253AE%253AH%253As25&line=kvv%253A22301%253AE%253AR%253As25&line=kvv%253A21012%253AE%253AH%253As25&line=kvv%253A21012%253AE%253AR%253As25&line=kvv%253A22305%253AE%253AH%253As25&line=kvv%253A22305%253AE%253AR%253As25&line=kvv%253A22308%253AE%253AR%253As25&line=kvv%253A22311%253AE%253AH%253As25&line=kvv%253A22351%253AE%253AH%253As25&line=kvv%253A22351%253AE%253AR%253As25&itdLPxx_snippet=1&itdLPxx_template=dmresults&limit=10`;
|
||||
|
||||
const data = await fetch(API_URL, {
|
||||
method: "GET",
|
||||
|
||||
@@ -60,9 +60,9 @@ export default function DepartureList(props: {
|
||||
<div className={style.container}>
|
||||
<h2>{name} Departures</h2>
|
||||
<div className={style.departureLists}>
|
||||
{departureTables(left)}
|
||||
{departureTables(right)}
|
||||
</div>
|
||||
{departureTables(left)}
|
||||
{departureTables(right)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useFlatasticStore } from "@/store/flatastic";
|
||||
import { useEffect } from "react";
|
||||
import { useFlatasticStore } from "@/store/flatastic";
|
||||
|
||||
import type { FlatasticChore } from "@/types/flatasticChore";
|
||||
|
||||
|
||||
@@ -2,8 +2,12 @@ import { useEffect } from "react";
|
||||
import { useHomeAssistantStore } from "@/store/homeAssistant";
|
||||
|
||||
export default function Timetable() {
|
||||
const fetchHomeAssistantData = useHomeAssistantStore((state) => state.fetch);
|
||||
const tentTemperature = useHomeAssistantStore((state) => state.tentTemperature);
|
||||
const fetchHomeAssistantData = useHomeAssistantStore(
|
||||
(state) => state.fetch,
|
||||
);
|
||||
const tentTemperature = useHomeAssistantStore(
|
||||
(state) => state.tentTemperature,
|
||||
);
|
||||
const tentHumidity = useHomeAssistantStore((state) => state.tentHumidity);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user