comparison client/src/components/Logs.vue @ 1669:16fb9667ddf8

refac: use dynamic imports for components
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 24 Dec 2018 13:12:11 +0100
parents f2d24dceecc7
children f185503ef35a
comparison
equal deleted inserted replaced
1668:eb832d81b67a 1669:16fb9667ddf8
118 * Thomas Junk <thomas.junk@intevation.de> 118 * Thomas Junk <thomas.junk@intevation.de>
119 */ 119 */
120 import { mapState } from "vuex"; 120 import { mapState } from "vuex";
121 import { HTTP } from "@/lib/http.js"; 121 import { HTTP } from "@/lib/http.js";
122 import "../../node_modules/highlight.js/styles/paraiso-dark.css"; 122 import "../../node_modules/highlight.js/styles/paraiso-dark.css";
123 import Spacer from "./Spacer";
124 import Vue from "vue"; 123 import Vue from "vue";
125 import VueHighlightJS from "vue-highlightjs"; 124 import VueHighlightJS from "vue-highlightjs";
126 Vue.use(VueHighlightJS); 125 Vue.use(VueHighlightJS);
127 126
128 const ACCESSLOG = "accesslog"; 127 const ACCESSLOG = "accesslog";
129 const ERRORLOG = "errorlog"; 128 const ERRORLOG = "errorlog";
130 129
131 export default { 130 export default {
132 name: "logs", 131 name: "logs",
133 components: { 132 components: {
134 Spacer 133 Spacer: () => import("./Spacer")
135 }, 134 },
136 mounted() { 135 mounted() {
137 this.fetch("system/log/apache2/access.log", ACCESSLOG); 136 this.fetch("system/log/apache2/access.log", ACCESSLOG);
138 }, 137 },
139 data() { 138 data() {