summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorJannik Schönartz2019-03-26 18:12:51 +0100
committerJannik Schönartz2019-03-26 18:12:51 +0100
commite2748fc46cbbae0ee7caf84d92b4a84a23f5783f (patch)
tree55003c866f106f02bb14e98650a30b143d65b79d /documentation
parent[webapp/alerts] Fix: Notification didn't fill the whole container when having... (diff)
downloadbas-e2748fc46cbbae0ee7caf84d92b4a84a23f5783f.tar.gz
bas-e2748fc46cbbae0ee7caf84d92b4a84a23f5783f.tar.xz
bas-e2748fc46cbbae0ee7caf84d92b4a84a23f5783f.zip
[docutmentation] Add german language support (wip)
Diffstat (limited to 'documentation')
-rw-r--r--documentation/.vuepress/config.js83
-rw-r--r--documentation/.vuepress/public/img/de/bss_screenshot.PNGbin0 -> 85869 bytes
-rw-r--r--documentation/README.md10
-rw-r--r--documentation/api/README.md4
-rw-r--r--documentation/api/collections.md4
-rw-r--r--documentation/de/README.md22
-rw-r--r--documentation/de/api/README.md57
-rw-r--r--documentation/de/api/collections.md2
-rw-r--r--documentation/de/installation/README.md50
-rw-r--r--documentation/de/webapp/README.md3
-rw-r--r--documentation/de/webapp/modules.md9
11 files changed, 215 insertions, 29 deletions
diff --git a/documentation/.vuepress/config.js b/documentation/.vuepress/config.js
index 0a8f1b3..5a76b61 100644
--- a/documentation/.vuepress/config.js
+++ b/documentation/.vuepress/config.js
@@ -3,25 +3,68 @@ module.exports = {
description: 'Boot Auswahl Server',
themeConfig: {
logo: '/img/logo-light.svg',
- nav: [
- { text: 'Home', link: '/' },
- { text: 'Installation', link: '/installation/' },
- { text: 'API', link: '/api/' },
- { text: 'Webapp', link: '/webapp/' }
- ],
- sidebar: {
- '/installation/': [
- ''
- ],
- '/api/': [
- '',
- 'collections'
- ],
- '/webapp/': [
- '',
- 'modules'
- ]
- },
- sidebarDepth: 1
+ sidebarDepth: 1,
+ locales: {
+ '/': {
+ selectText: 'Languages',
+ label: 'English',
+ nav: [
+ { text: 'Home', link: '/' },
+ { text: 'Webapp', link: '/webapp/' },
+ { text: 'API', link: '/api/' },
+ { text: 'Installation', link: '/installation/' }
+ ],
+ sidebar: {
+ '/webapp/': [
+ '',
+ 'modules'
+ ],
+ '/api/': [
+ '',
+ 'collections'
+ ],
+ '/installation/': [
+ ''
+ ]
+ },
+ },
+ '/de/': {
+ selectText: 'Sprachen',
+ label: 'Deutsch',
+ nav: [
+ { text: 'Startseite', link: '/de/' },
+ { text: 'Webapp', link: '/de/webapp/' },
+ { text: 'API', link: '/de/api/' },
+ { text: 'Installation', link: '/de/installation/' }
+ ],
+ sidebar: {
+ '/de/webapp/': [
+ '',
+ 'modules'
+ ],
+ '/de/api/': [
+ '',
+ 'collections'
+ ],
+ '/de/installation/': [
+ ''
+ ]
+ },
+ }
+ }
},
+ locales: {
+ // The key is the path for the locale to be nested under.
+ // As a special case, the default locale can use '/' as its path.
+ '/': {
+ lang: 'en-US', // this will be set as the lang attribute on <html>
+ title: 'BAS Documentation',
+ description: 'Boot Auswahl Server'
+ },
+ '/de/': {
+ lang: 'de-DE',
+ title: 'BAS Dokumentation',
+ description: 'Boot Auswahl Server '
+ }
+ }
} \ No newline at end of file
diff --git a/documentation/.vuepress/public/img/de/bss_screenshot.PNG b/documentation/.vuepress/public/img/de/bss_screenshot.PNG
new file mode 100644
index 0000000..2fb8504
--- /dev/null
+++ b/documentation/.vuepress/public/img/de/bss_screenshot.PNG
Binary files differ
diff --git a/documentation/README.md b/documentation/README.md
index 71fd20a..3283f78 100644
--- a/documentation/README.md
+++ b/documentation/README.md
@@ -2,21 +2,21 @@
home: true
heroImage: /img/logo-light.svg
actionText: Get Started →
-actionLink: /api/
+actionLink: /webapp/
footer: Albert-Ludwigs-Universität Freiburg | Copyright © 2019
---
<div class="features">
<div class="feature">
- <a href="/installation/"><h2>Installation</h2></a>
- <p>A guide on how to install and run the BAS.</p>
+ <a href="/webapp/"><h2>Webapp</h2></a>
+ <p>Picture guided instructions on how the webapp works.</p>
</div>
<div class="feature">
<a href="/api/"><h2>API</h2></a>
<p>Documentation of the API and instructions on how to use it.</p>
</div>
<div class="feature">
- <a href="/webapp/"><h2>Webapp</h2></a>
- <p>Picture guided instructions on how the webapp works.</p>
+ <a href="/installation/"><h2>Installation</h2></a>
+ <p>A guide on how to install and run the BAS.</p>
</div>
</div> \ No newline at end of file
diff --git a/documentation/api/README.md b/documentation/api/README.md
index f84cdf5..7f6dc66 100644
--- a/documentation/api/README.md
+++ b/documentation/api/README.md
@@ -38,7 +38,7 @@ If a request is not successfull it will set a html status code and return a json
}
```
* [400 - Bad Request](https://httpstatuses.com/400)\
-The request sent to the server was incorrect. (Parameter missing, ...)
+The request sent to the server was invalid. (Parameter missing, ...)
* [401 - Unauthorized](https://httpstatuses.com/401)\
The client which sent the request to the server wasn't authorized enough. (Invalid token, token missing, ...)
* [403 - Forbidden](https://httpstatuses.com/403)\
@@ -50,7 +50,7 @@ Server side error. (Hash errors, ...)
* [501 - Not Implemented](https://httpstatuses.com/501)\
The resource doesn't have the requested methods. (Backend doesn't have the method implemented)
-If an authenticated request doesn't pass the middleware one of the following error can occur
+If a request that requires authentication isn't properly authenticated one of the following erros can occur
* **401 - Unauthorized**
* TOKEN\_INVALID - The provided token is invalid.
* TOKEN\_INVALID - The token is from an invalid userid.
diff --git a/documentation/api/collections.md b/documentation/api/collections.md
index b1e85b8..ebfed8c 100644
--- a/documentation/api/collections.md
+++ b/documentation/api/collections.md
@@ -1,7 +1,7 @@
# Collections
-Collections can be called with the api url append with the resource name.
+Collections can be called with the api url appended with the collection and resource name.
```
-https://<domain_bss>/api/<collection>/<resource>
+https://<domain_bas>/api/<collection>/<resource>
```
```
https://<domain_bas>/api/<collection>/:id/<resource>
diff --git a/documentation/de/README.md b/documentation/de/README.md
new file mode 100644
index 0000000..fa47aad
--- /dev/null
+++ b/documentation/de/README.md
@@ -0,0 +1,22 @@
+---
+home: true
+heroImage: /img/logo-light.svg
+actionText: Los geht's →
+actionLink: /de/webapp/
+footer: Albert-Ludwigs-Universität Freiburg | Copyright © 2019
+---
+
+<div class="features">
+ <div class="feature">
+ <a href="/de/webapp/"><h2>Webapp</h2></a>
+ <p>Bildgeführte Anleitungen zur Funktionsweise der Webapp.</p>
+ </div>
+ <div class="feature">
+ <a href="/de/api/"><h2>API</h2></a>
+ <p>Dokumentation der API und Anleitung zur Verwendung.</p>
+ </div>
+ <div class="feature">
+ <a href="/de/installation/"><h2>Installation</h2></a>
+ <p>Eine Anleitung zum Installieren und Ausführen des BAS.</p>
+ </div>
+</div> \ No newline at end of file
diff --git a/documentation/de/api/README.md b/documentation/de/api/README.md
new file mode 100644
index 0000000..cda83b4
--- /dev/null
+++ b/documentation/de/api/README.md
@@ -0,0 +1,57 @@
+# Erste Schritte
+Die API kann unter folgender Adresse aufgerufen werden:
+```
+https://<domain_bss>/api/
+```
+Die Sammlungen und Ressourcen werden im Abschnitt [Sammlungen](/de/api/collections.md) beschrieben.
+
+## Autorisierung
+Einige Sammlungen benötigen eine Authentifizierung, während andere ohne aufgerufen werden können.
+Um eine Anfrage zu authentifizieren, müssen Sie den Json-Web-Token an das Backend senden.
+Es gibt zwei Möglichkeiten, dies zu tun
+* **Authorization Header**\
+Durch setzen des *Bearer* token im *Authorization* header.
+```
+Authorization: Bearer <jsonwebtoken>
+```
+
+> **\<jsonwebtoken\>** - Vollständiger json web token in der Form: header.payload.signature.
+
+* **Cookies**\
+Um zu verhindern, dass der Javascript-Code der Website Zugriff auf den vollständige Jwt hat, wird der Token in zwei separate Cookies aufgeteilt
+ * jwt\_hp - Normaler Cookie mit dem Header und Payload des Jwt als Wert.
+ * jwt\_s - HTTP-only Cookie mit der Signature als Wert.
+
+Um den Token zu erhalten, verwenden Sie die Anmeldemethode aus der [API/Authentifizierung](/de/api/collections.html#authentication).
+
+## Rückgabewerte
+Die API gibt Daten immer im JSON-Format zurück.
+Wenn die Anforderung erfolgreich war, wird der Statuscode 200 und die angeforderten Daten zurückgegeben.
+* [200 - OK](https://httpstatuses.com/200)\
+Die Anfrage war erfolgreich. Optional enthält die Antwort ein Json-Objekt mit den enthaltenen Daten.
+
+Wenn eine Anforderung nicht erfolgreich ist, setzt sie einen HTML-Statuscode und gibt ein Json-Objekt mit einem Status und einer Fehlernachricht zurück.
+```json
+{
+ "error": "",
+ "message": ""
+}
+```
+* [400 - Bad Request](https://httpstatuses.com/400)\
+Die an den Server gesendete Anfrage war ungültig. (Parameter fehlt, ...)
+* [401 - Unauthorized](https://httpstatuses.com/401)\
+Der Client, der die Anfrage an den Server gesendet hat, war nicht ausreichend autorisiert. (Ungültiger Token, Token fehlt, ...)
+* [403 - Forbidden](https://httpstatuses.com/403)\
+Der autorisierte Client verfügt nicht über ausreichende Berechtigungen.
+* [404 - Not Found](https://httpstatuses.com/404)\
+Die angeforderte Ressource wurde nicht gefunden. (Benutzer wurde nicht gefunden, ...)
+* [500 - Internal Server Error](https://httpstatuses.com/500)\
+Serverseitiger Fehler. (Hash-Fehler, ...)
+* [501 - Not Implemented](https://httpstatuses.com/501)\
+Die Ressource verfügt nicht über die angeforderten Methoden. (Das Backend hat die Methode nicht implementiert)
+
+Wenn eine Anfrage, die eine Authentifizierung benötigt, nicht hinreichend Authentifiziert ist, können folgende Fehler auftreten
+* **401 - Unauthorized**
+ * TOKEN\_INVALID - Der angegebene Token ist ungültig.
+ * TOKEN\_INVALID - Der Token stammt von einer ungültigen Benutzer-ID.
+ * TOKEN\_MISSING - Dieser Dienst erfordert einen Token.
diff --git a/documentation/de/api/collections.md b/documentation/de/api/collections.md
new file mode 100644
index 0000000..3fb32cb
--- /dev/null
+++ b/documentation/de/api/collections.md
@@ -0,0 +1,2 @@
+# Sammlungen
+Todo \ No newline at end of file
diff --git a/documentation/de/installation/README.md b/documentation/de/installation/README.md
new file mode 100644
index 0000000..a796ed8
--- /dev/null
+++ b/documentation/de/installation/README.md
@@ -0,0 +1,50 @@
+# Installation
+
+
+
+
+## Installation der benötigten Packete
+```bash
+sudo apt-get install git
+sudo apt-get install curl software-properties-common
+curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
+sudo apt-get install nodejs
+```
+
+## Installation des node.js Servers
+```bash
+git clone http://git.ks.uni-freiburg.de/lsfks/projekte/bas.git
+cd bas/server
+npm install
+```
+
+## Kopiere Zertifikate
+```bash
+scp privkey.pem user@host:path/privkey.pem
+scp fullchain.pem user@host:path/fullchain.pem
+```
+
+## Einrichten der Konfigurationsdateien
+```bash
+cd bas/server/config
+cp authentication.template.json authentication.json
+cp database.template.json database.json
+cp config.template.json config.json
+```
+
+## Installation der webapp
+```bash
+cd bas/webapp
+npm install
+npm run build
+```
+
+## Ausführen des node.js Server
+```bash
+cd bas/server
+npm start
+```
+
+## Standart Ports
+* Server: 3000
+* tftp: Serverport + 1 (3001)
diff --git a/documentation/de/webapp/README.md b/documentation/de/webapp/README.md
new file mode 100644
index 0000000..66eeb4e
--- /dev/null
+++ b/documentation/de/webapp/README.md
@@ -0,0 +1,3 @@
+# Webapplikation
+
+![BSS Screenshot](/img/de/bss_screenshot.PNG)
diff --git a/documentation/de/webapp/modules.md b/documentation/de/webapp/modules.md
new file mode 100644
index 0000000..fa01182
--- /dev/null
+++ b/documentation/de/webapp/modules.md
@@ -0,0 +1,9 @@
+# Module
+
+## Gruppen / Clients
+## iPXE Konfigurator
+## Client Registrierung
+## Externe Backends
+## Rechtemanager
+## iPXE Builder
+## Nutzermanagement \ No newline at end of file