Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/tileserver start fix #37 #48

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: User Story
about: Request a user story damn
title: ''
labels: user-story
assignees: ''

---

### Description

<!-- Always starts with "As a user, as a developer, as a researcher, ..." -->

### Acceptance Criteria

<!-- Display the required criteria to meet for an implementation to be accepted as a solution to this user story -->

### Notes

<!-- Optional section, delete if not used -->

### Meta

| **Field** | **Value** |
|-----------------|:------------:|
| Story ID | - |
| Story Points | - |
| Implemented by | *Seen in history / assignment* |
| Finished in It # | - |
| Total time | - |
| Velocity | - |
20 changes: 19 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,22 @@ jobs:
run: |
git status --porcelain
git diff
git status --porcelain | xargs -I {} -0 test -z \"{}\"
git status --porcelain | xargs -I {} -0 test -z \"{}\"

linting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 19.1

# ==== WEB LINT ====
- name: Install deps
run: npm clean-install --prefix web/client

- name: Run ESLint
run: npm run lint:eslint --prefix web/client

- name: Run Stylelint
run: npm run lint:stylelint --prefix web/client
4 changes: 4 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19.1

- name: Get deps
run: ln -s /deps deps
Expand All @@ -59,6 +62,7 @@ jobs:
- name: Build
run: |
buildcache -z
npm clean-install --prefix web/client
cmake --build build/${{ matrix.config.preset }} --target soro-server
buildcache -s

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
/CMakeSettings.json
resources/infrastructure/de_iss
resources/timetable/de_kss
resources/osm

# Ignore the file produced by cmake
test/include/test/file_paths.h
2 changes: 1 addition & 1 deletion .pkg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
[tiles]
[email protected]:motis-project/tiles.git
branch=master
commit=653637bd3fb595eaaca71d9a153ddfcc59930a8b
commit=6dc60472ba6b3270c2afb50f9905e86c8db7bff5
[rapidjson]
[email protected]:motis-project/rapidjson.git
branch=master
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ endif ()

# Gets us the soro-server-client target
set(SORO_SERVER_DIR ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(web/server)
add_subdirectory(web/client)
add_subdirectory(web)

# Generate file_paths.h for locating the test resources
configure_file(test/include/test/file_paths.h.in
Expand Down
6 changes: 6 additions & 0 deletions web/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
add_subdirectory(server)
add_subdirectory(client)

add_custom_target(soro-server-client)
add_dependencies(soro-server-client soro-server)
add_dependencies(soro-server-client soro-client-production)
74 changes: 74 additions & 0 deletions web/client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-essential',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-typescript/recommended',
],
overrides: [],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: [
'vue',
'@typescript-eslint'
],
rules: {
'indent': [
'error',
4
],
'curly': [
'error',
'all'
],
'brace-style': [
'error',
'1tbs'
],
'function-paren-newline': [
'error',
'multiline'
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
],
'comma-dangle': [
'error',
'only-multiline',
],
'object-curly-spacing': [
'error',
'always',
],
'object-shorthand': [
'error',
'properties',
{ avoidQuotes: true }
],
'vue/html-indent': [
'error',
4,
],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-comment': 0,
}
};
2 changes: 2 additions & 0 deletions web/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
10 changes: 10 additions & 0 deletions web/client/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-recommended-vue"
],
"ignoreFiles": ["**/*.js", "**/*.ts"],
"rules": {
"indentation": 4
}
}
20 changes: 4 additions & 16 deletions web/client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
cmake_minimum_required(VERSION 3.18)
project(soro)

file(GLOB_RECURSE soro-client-files
*.html
*.css
*.js
*.ico
*.png
*.svg
*.map)

foreach (file ${soro-client-files})
set(path ${file})
cmake_path(RELATIVE_PATH path BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE relative-path)
configure_file(${file} ${SORO_SERVER_DIR}/server_resources/${relative-path} COPYONLY)
endforeach ()


add_custom_target(soro-client-production COMMAND npm run build WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_command(TARGET soro-client-production POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/dist
${SORO_SERVER_DIR}/server_resources)
32 changes: 32 additions & 0 deletions web/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## SORO-S Webclient

### Tools:
- Node.js (preferably install via [nvm](https://github.com/nvm-sh/nvm))

### Setup:

Have nodejs installed with npm available globally (enabled by default). Execute the following in this directory:

```shell
npm install
```

### Development

```shell
npm run dev
```
You can access the client with hmr now on the port shown in the console (usually [5173](http://localhost:5173)).

### Building the web interface for production

If you never ran ninja before, run it now in your `build/{clang,gcc}-release` directory.
```shell
ninja
```

Then simply execute
```shell
ninja soro-client-production
```
This target has also been added to the `soro-server-client` target for convenience.
21 changes: 0 additions & 21 deletions web/client/components/disruption/disruption.css

This file was deleted.

9 changes: 0 additions & 9 deletions web/client/components/disruption/disruption.html

This file was deleted.

59 changes: 0 additions & 59 deletions web/client/components/disruption/disruption.js

This file was deleted.

Loading