annotate client/src/components/admin/Systemconfiguration.vue @ 1361:ea3a89a1813a

remove trailing whitespace, add headers for Makefile, add the missed authors * remove trailing whitespace for some cleint files * add headers for licensing to Makefile * add the missed authors in the header to Systemconfiguration.vue file
author Fadi Abbud <fadi.abbud@intevation.de>
date Mon, 26 Nov 2018 11:11:13 +0100
parents aec9ed491dad
children ca33ad696594
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
1 <template>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
2 <div class="d-flex flex-row">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
3 <div class="card sysconfig mt-3 mx-auto">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
4 <div class="card-header shadow-sm text-white bg-info mb-6">Systemconfiguration</div>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
5 <div class="card-body config">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
6 <section class="configsection">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
7 <h4 class="card-title">Bottleneck Areas stroke-color</h4>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
8 <compact-picker v-model="strokeColor"/>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
9 </section>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
10 <section>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
11 <h4 class="card-title">Bottleneck Areas fill-color</h4>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
12 <chrome-picker v-model="fillColor"/>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
13 </section>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
14 <div class="sendbutton">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
15 <a @click.prevent="submit" class="btn btn-info">Send</a>
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
16 </div>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
17 </div>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
18 <!-- card-body -->
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
19 </div>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
20 </div>
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
21 </template>
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
22
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
23 <style scoped lang="sass">
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
24 .config
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
25 text-align: left
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
26
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
27 .configsection
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
28 margin-bottom: $large-offset
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
29
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
30 .sendbutton
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
31 position: absolute
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
32 right: $offset
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
33 bottom: $offset
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
34
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
35 .inputs
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
36 margin-left: auto
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
37 margin-right: auto
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
38
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
39 .sysconfig
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
40 width: 30vw
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
41 </style>
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
42
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
43 <script>
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
44 /*
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
45 * This is Free Software under GNU Affero General Public License v >= 3.0
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
46 * without warranty, see README.md and license for details.
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
47 *
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
48 * SPDX-License-Identifier: AGPL-3.0-or-later
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
49 * License-Filename: LICENSES/AGPL-3.0.txt
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
50 *
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
51 * Copyright (C) 2018 by via donau
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
52 * – Österreichische Wasserstraßen-Gesellschaft mbH
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
53 * Software engineering by Intevation GmbH
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
54 *
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
55 * Author(s):
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
56 * Thomas Junk <thomas.junk@intevation.de>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1276
diff changeset
57 * Bernhard Reiter <bernhard@intevation.de>
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
58 */
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
59 import { Chrome } from "vue-color";
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
60 import { Compact } from "vue-color";
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
61
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
62 import { HTTP } from "../../lib/http";
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
63 import { displayError } from "../../lib/errors.js";
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
64 export default {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
65 name: "systemconfiguration",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
66 data() {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
67 return {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
68 sent: false,
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
69 strokeColor: { r: 0, g: 0, b: 0, a: 1.0 },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
70 fillColor: { r: 0, g: 0, b: 0, a: 1.0 },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
71 currentConfig: null
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
72 };
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
73 },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
74 components: { "chrome-picker": Chrome, "compact-picker": Compact },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
75 methods: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
76 submit() {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
77 HTTP.put("/system/style/Bottlenecks/stroke", this.strokeColor.rgba, {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
78 headers: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
79 "X-Gemma-Auth": localStorage.getItem("token"),
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
80 "Content-type": "application/json"
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
81 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
82 })
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
83 .then()
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
84 .catch(error => {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
85 const { status, data } = error.response;
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
86 displayError({
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
87 title: "Backend Error",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
88 message: `${status}: ${data.message || data}`
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
89 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
90 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
91
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
92 HTTP.put("/system/style/Bottlenecks/fill", this.fillColor.rgba, {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
93 headers: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
94 "X-Gemma-Auth": localStorage.getItem("token"),
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
95 "Content-type": "application/json"
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
96 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
97 })
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
98 .then()
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
99 .catch(error => {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
100 const { status, data } = error.response;
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
101 displayError({
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
102 title: "Backend Error",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
103 message: `${status}: ${data.message || data}`
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
104 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
105 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
106 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
107 },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
108 mounted() {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
109 HTTP.get("/system/style/Bottlenecks/stroke", {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
110 headers: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
111 "X-Gemma-Auth": localStorage.getItem("token"),
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
112 "Content-type": "application/json"
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
113 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
114 })
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
115 .then(response => {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
116 this.strokeColor = response.data.colour;
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
117 })
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
118 .catch(error => {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
119 const { status, data } = error.response;
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
120 displayError({
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
121 title: "Backend Error",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
122 message: `${status}: ${data.message || data}`
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
123 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
124 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
125
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
126 HTTP.get("/system/style/Bottlenecks/fill", {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
127 headers: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
128 "X-Gemma-Auth": localStorage.getItem("token"),
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
129 "Content-type": "application/json"
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
130 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
131 })
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
132 .then(response => {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
133 this.fillColor = response.data.colour;
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
134 })
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
135 .catch(error => {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
136 const { status, data } = error.response;
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
137 displayError({
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
138 title: "Backend Error",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
139 message: `${status}: ${data.message || data}`
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
140 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
141 });
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
142 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
143 };
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
144 </script>