Skip to content

Commit ae1526f

Browse files
committed
Replace old UI with new frontend
1 parent 3aa076e commit ae1526f

File tree

120 files changed

+28
-46570
lines changed

Some content is hidden

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

120 files changed

+28
-46570
lines changed

.circleci/config.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ jobs:
77
- checkout
88
- run:
99
name: "Install dependencies"
10-
command: yarn install
11-
- run:
12-
name: "Run lint"
13-
command: yarn lint
10+
working_directory: frontend
11+
command: npm install
1412
- run:
1513
name: "Build"
16-
command: yarn build
14+
working_directory: frontend
15+
command: npm run build
1716
- persist_to_workspace:
1817
root: .
1918
paths:
20-
- internal/app/ui/dist/*
19+
- frontend/dist/*
2120

2221
backend:
2322
docker:

.dockerignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/.circleci
2-
/.idea
3-
/.vscode
4-
/.local
1+
.circleci
2+
.idea
3+
.vscode
4+
.local
55
/config
66
/doc
7-
/node_modules
7+
node_modules
88
/proto
9-
/.git
9+
.git
1010
/Dockerfile
1111
/.env
1212
/docker-compose.yaml

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
node_modules
3-
/internal/app/ui/dist
43
/config/
54

65
# Editor directories and files

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
FROM node:16.15-alpine3.15 AS build_node
2-
WORKDIR /tmp/ssl-game-controller
3-
COPY public public
4-
COPY src src
5-
COPY babel.config.js .
6-
COPY package.json .
7-
COPY vue.config.js .
8-
COPY yarn.lock .
9-
RUN yarn install
10-
RUN yarn build
2+
COPY frontend /tmp/ssl-game-controller/frontend
3+
WORKDIR /tmp/ssl-game-controller/frontend
4+
RUN npm install
5+
RUN npm run build
116

127
FROM golang:1.18-alpine3.15 AS build_go
138
WORKDIR /go/src/github.com/RoboCup-SSL/ssl-game-controller
149
COPY cmd cmd
1510
COPY internal internal
1611
COPY pkg pkg
12+
COPY frontend frontend
1713
COPY go.mod .
1814
COPY go.sum .
19-
COPY --from=build_node /tmp/ssl-game-controller/internal/app/ui/dist internal/app/ui/dist
15+
COPY --from=build_node /tmp/ssl-game-controller/frontend/dist frontend/dist
2016
RUN go install -v ./cmd/ssl-game-controller
2117

2218
# Start fresh from a smaller image

FAQ.md

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

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ The [ssl-refbox](https://github.com/RoboCup-SSL/ssl-refbox) replacement that was
1010

1111
![Screenshot of Interface](./doc/screenshot_interface.png)
1212

13-
See [FAQ](./FAQ.md) for some general information.
14-
1513
## Usage
1614
If you just want to use this app, simply download the latest [release binary](https://github.com/RoboCup-SSL/ssl-game-controller/releases/latest). The binary is self-contained. No dependencies are required.
1715

babel.config.js

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

cmd/ssl-game-controller/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package main
22

33
import (
44
"flag"
5+
"github.com/RoboCup-SSL/ssl-game-controller/frontend"
56
"github.com/RoboCup-SSL/ssl-game-controller/internal/app/config"
67
"github.com/RoboCup-SSL/ssl-game-controller/internal/app/gc"
7-
"github.com/RoboCup-SSL/ssl-game-controller/internal/app/ui"
88
"log"
99
"net/http"
1010
"os"
@@ -35,7 +35,7 @@ func main() {
3535
return
3636
}
3737

38-
ui.HandleUi()
38+
frontend.HandleUi()
3939

4040
err := http.ListenAndServe(*address, nil)
4141
if err != nil {

internal/app/ui/embed.go renamed to frontend/embed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ui
1+
package frontend
22

33
import (
44
"embed"

install.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22

3-
set -e
3+
set -euo pipefail
44

5-
# UI
6-
yarn install
7-
yarn build
5+
# frontend
6+
(
7+
cd frontend
8+
npm install
9+
npm run build
10+
)
811

912
# backend
1013
go install -v ./cmd/ssl-game-controller

0 commit comments

Comments
 (0)