Compare commits

...

6 commits
v0.1.0 ... main

Author SHA1 Message Date
10859d3efc
fix: add react types as dependency 2024-01-08 19:05:35 +01:00
a1a91a7976 update example.toml
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-22 04:42:41 +01:00
e09af1e559 add example config
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-22 04:33:27 +01:00
65f8625a09 fix task progress bar overflow
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-07 14:25:59 +01:00
2e914a4095 fix spa pages not found
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-07 01:26:02 +01:00
4a59767044 fix makefile build name
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-07 00:12:55 +01:00
6 changed files with 300 additions and 278 deletions

View file

@ -20,7 +20,7 @@ build-ui:
cd ${UI_DIR} && pnpm run build
build-server:
go build -tags prod -ldflags "-s -w -X code.thetadev.de/TSGRain/WebUI/src/util.version=${VER}" -o build/sebrauc ./src/.
go build -tags prod -ldflags "-s -w -X code.thetadev.de/TSGRain/WebUI/src/util.version=${VER}" -o build/tsgrainWebUI ./src/.
build: build-ui build-server

22
tsgrain_web.example.toml Normal file
View file

@ -0,0 +1,22 @@
# Webserver options
[Server]
Address = ""
Port = 8001
# Websocket connection settings: Ping interval/Timeout in seconds
[Server.Websocket]
Ping = 10
Timeout = 2
# Compression settings. Refer to code.thetadev.de/TSGRain/ginzip for details.
[Server.Compression]
Gzip = "default"
Brotli = "default"
[Authentication]
Enable = false
PasswdFile = "htpasswd"
# IP-Address and port for communicating with the controller
[GRPC]
Address = "127.0.0.1:50051"

View file

@ -22,6 +22,7 @@
},
"devDependencies": {
"@babel/core": "^7.17.0",
"@types/react": "^18.2.47",
"@types/react-dom": "^17.0.11",
"@vitejs/plugin-react-refresh": "latest",
"typescript": "^4.5.2",

550
ui/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -135,7 +135,7 @@ class TaskProgress extends React.Component<TaskProgressProps, TaskProgressState>
// Cap progress in case the client is out of sync
progSeconds = Math.min(Math.max(progSeconds, 0), this.props.task.duration)
progPercent = (progSeconds / srvDuration) * 100
progPercent = (progSeconds / this.props.task.duration) * 100
}
return (

View file

@ -40,6 +40,7 @@ func Register(r gin.IRouter, nZones int32) {
uiAssets := r.Group("/assets", middleware.Cache)
r.GET("/", indexHandler)
r.GET("/:path", indexHandler)
r.GET("/index.html", indexHandler)
uiAssets.StaticFS("/", http.FS(subFS(distFS(), "assets")))