VedirectView becomes component
* move Vedirect in the component folder * VedirectView is now component of BasePage * /vedirectlivedata connectable through vue proxy
This commit is contained in:
parent
a529c91254
commit
0ac529146e
@ -203,6 +203,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
getInitialData() {
|
||||
console.log("Get initalData for VeDirect");
|
||||
this.dataLoading = true;
|
||||
fetch("/api/vedirectlivedata/status", { headers: authHeader() })
|
||||
.then((response) => handleResponse(response, this.$emitter, this.$router))
|
||||
@ -212,7 +213,7 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
initSocket() {
|
||||
console.log("Starting connection to WebSocket Server");
|
||||
console.log("Starting connection to VeDirect WebSocket Server");
|
||||
|
||||
const { protocol, host } = location;
|
||||
const authString = authUrl();
|
||||
@ -230,7 +231,7 @@ export default defineComponent({
|
||||
|
||||
this.socket.onopen = function (event) {
|
||||
console.log(event);
|
||||
console.log("Successfully connected to the echo websocket server...");
|
||||
console.log("Successfully connected to the VeDirect websocket server...");
|
||||
};
|
||||
|
||||
// Listen to window events , When the window closes , Take the initiative to disconnect websocket Connect
|
||||
@ -106,10 +106,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<VedirectView />
|
||||
</BasePage>
|
||||
|
||||
<VedirectView />
|
||||
|
||||
|
||||
<div class="modal" id="eventView" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@ -318,7 +317,7 @@ import EventLog from '@/components/EventLog.vue';
|
||||
import HintView from '@/components/HintView.vue';
|
||||
import InverterChannelInfo from "@/components/InverterChannelInfo.vue";
|
||||
import InverterTotalInfo from '@/components/InverterTotalInfo.vue';
|
||||
import VedirectView from '@/views/VedirectView.vue';
|
||||
import VedirectView from '@/components/VedirectView.vue';
|
||||
import type { DevInfoStatus } from '@/types/DevInfoStatus';
|
||||
import type { EventlogItems } from '@/types/EventlogStatus';
|
||||
import type { LimitConfig } from '@/types/LimitConfig';
|
||||
|
||||
@ -49,6 +49,11 @@ export default defineConfig({
|
||||
ws: true,
|
||||
changeOrigin: true
|
||||
},
|
||||
'^/vedirectlivedata': {
|
||||
target: 'ws://192.168.178.78/',
|
||||
ws: true,
|
||||
changeOrigin: true
|
||||
},
|
||||
'^/console': {
|
||||
target: 'ws://192.168.20.110/',
|
||||
ws: true,
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user