2019-10-19 16:58:10 +03:00
|
|
|
<template>
|
2020-06-26 04:39:14 -07:00
|
|
|
<v-app>
|
2020-07-13 19:34:31 -07:00
|
|
|
<!-- Although most of the app runs with the "light" theme, the navigation drawer needs to have white text and icons so it uses the dark theme-->
|
|
|
|
|
<v-navigation-drawer
|
2020-06-26 04:39:14 -07:00
|
|
|
dark
|
2020-07-13 19:34:31 -07:00
|
|
|
app
|
|
|
|
|
permanent
|
|
|
|
|
:mini-variant="compact"
|
|
|
|
|
color="primary"
|
2020-06-26 04:39:14 -07:00
|
|
|
>
|
2020-07-13 19:34:31 -07:00
|
|
|
<v-list>
|
|
|
|
|
<!-- List item for the heading; note that there are some tricks in setting padding and image width make things look right -->
|
|
|
|
|
<v-list-item :class="compact ? 'pr-0 pl-0' : ''">
|
|
|
|
|
<v-list-item-icon class="mr-0">
|
|
|
|
|
<img
|
|
|
|
|
v-if="!compact"
|
|
|
|
|
class="logo"
|
|
|
|
|
src="./assets/logoLarge.png"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
v-else
|
|
|
|
|
class="logo"
|
|
|
|
|
src="./assets/logoSmall.png"
|
|
|
|
|
>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
|
|
|
|
<v-list-item
|
|
|
|
|
link
|
|
|
|
|
to="dashboard"
|
2020-07-31 13:50:50 -07:00
|
|
|
@click="rollbackPipelineIndex()"
|
2020-07-13 19:34:31 -07:00
|
|
|
>
|
|
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon>mdi-view-dashboard</v-icon>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title>Dashboard</v-list-item-title>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
2020-07-31 13:50:50 -07:00
|
|
|
<v-list-item
|
2020-09-15 11:19:36 -07:00
|
|
|
ref="camerasTabOpener"
|
2020-07-31 13:50:50 -07:00
|
|
|
link
|
|
|
|
|
to="cameras"
|
|
|
|
|
@click="switchToDriverMode()"
|
|
|
|
|
>
|
|
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon>mdi-camera</v-icon>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title>Cameras</v-list-item-title>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
2020-07-13 19:34:31 -07:00
|
|
|
<v-list-item
|
|
|
|
|
link
|
|
|
|
|
to="settings"
|
2020-09-15 11:19:36 -07:00
|
|
|
@click="switchToSettingsTab()"
|
2020-07-13 19:34:31 -07:00
|
|
|
>
|
|
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon>mdi-settings</v-icon>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title>Settings</v-list-item-title>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
|
|
|
|
<v-list-item
|
|
|
|
|
link
|
|
|
|
|
to="docs"
|
|
|
|
|
>
|
|
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon>mdi-bookshelf</v-icon>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title>Documentation</v-list-item-title>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
|
|
|
|
<v-list-item
|
|
|
|
|
v-if="this.$vuetify.breakpoint.mdAndUp"
|
|
|
|
|
link
|
|
|
|
|
@click.stop="toggleCompactMode"
|
2020-06-26 04:39:14 -07:00
|
|
|
>
|
2020-07-13 19:34:31 -07:00
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon v-if="compact">
|
|
|
|
|
mdi-chevron-right
|
|
|
|
|
</v-icon>
|
|
|
|
|
<v-icon v-else>
|
|
|
|
|
mdi-chevron-left
|
|
|
|
|
</v-icon>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title>Advanced Mode</v-list-item-title>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
2020-07-31 13:50:50 -07:00
|
|
|
|
2021-11-25 15:43:29 -05:00
|
|
|
<div style="position: absolute; bottom: 0; left: 0;">
|
|
|
|
|
<v-list-item>
|
|
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon v-if="$store.state.settings.networkSettings.runNTServer">mdi-server</v-icon>
|
|
|
|
|
<img v-else-if="$store.state.ntConnectionInfo.connected" src="@/assets/robot.svg" alt="">
|
|
|
|
|
<img v-else class="pulse" style="border-radius: 100%" src="@/assets/robot-off.svg" alt="">
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title class="text-wrap" v-if="$store.state.settings.networkSettings.runNTServer">
|
|
|
|
|
NetworkTables server running for {{$store.state.ntConnectionInfo.clients ? $store.state.ntConnectionInfo.clients : 'zero'}} clients!
|
|
|
|
|
</v-list-item-title>
|
|
|
|
|
<v-list-item-title class="text-wrap" v-else-if="$store.state.ntConnectionInfo.connected && $store.state.backendConnected">
|
|
|
|
|
Robot connected! {{$store.state.ntConnectionInfo.address}}
|
|
|
|
|
</v-list-item-title>
|
|
|
|
|
<v-list-item-title class="text-wrap" v-else>
|
|
|
|
|
Not connected to robot!
|
|
|
|
|
</v-list-item-title>
|
|
|
|
|
<a
|
|
|
|
|
href="/#/settings"
|
|
|
|
|
style="color:#FFD843"
|
|
|
|
|
>{{"Team: " + $store.state.settings.networkSettings.teamNumber}}</a>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
|
|
|
|
<v-list-item>
|
|
|
|
|
<v-list-item-icon>
|
|
|
|
|
<v-icon v-if="$store.state.backendConnected">
|
|
|
|
|
mdi-wifi
|
|
|
|
|
</v-icon>
|
|
|
|
|
<v-icon
|
|
|
|
|
v-else
|
|
|
|
|
class="pulse"
|
|
|
|
|
style="border-radius: 100%;"
|
|
|
|
|
>
|
|
|
|
|
mdi-wifi-off
|
|
|
|
|
</v-icon>
|
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
<v-list-item-content>
|
|
|
|
|
<v-list-item-title class="text-wrap">
|
|
|
|
|
{{ $store.state.backendConnected ? "Backend Connected" : "Trying to connect..." }}
|
|
|
|
|
</v-list-item-title>
|
|
|
|
|
</v-list-item-content>
|
|
|
|
|
</v-list-item>
|
|
|
|
|
</div>
|
|
|
|
|
|
2020-07-13 19:34:31 -07:00
|
|
|
</v-list>
|
|
|
|
|
</v-navigation-drawer>
|
2020-09-04 18:18:44 -07:00
|
|
|
<v-main>
|
2020-06-26 04:39:14 -07:00
|
|
|
<v-container
|
|
|
|
|
fluid
|
|
|
|
|
fill-height
|
|
|
|
|
>
|
|
|
|
|
<v-layout>
|
|
|
|
|
<v-flex>
|
2020-09-15 11:19:36 -07:00
|
|
|
<router-view @switch-to-cameras="switchToDriverMode" />
|
2020-06-26 04:39:14 -07:00
|
|
|
</v-flex>
|
|
|
|
|
</v-layout>
|
|
|
|
|
</v-container>
|
2020-09-04 18:18:44 -07:00
|
|
|
</v-main>
|
|
|
|
|
|
|
|
|
|
<v-dialog
|
|
|
|
|
v-model="$store.state.logsOverlay"
|
|
|
|
|
width="1500"
|
|
|
|
|
dark
|
|
|
|
|
>
|
|
|
|
|
<logs />
|
|
|
|
|
</v-dialog>
|
2021-11-25 15:43:29 -05:00
|
|
|
<v-dialog
|
|
|
|
|
v-model="needsTeamNumberSet"
|
|
|
|
|
width="500"
|
|
|
|
|
dark
|
|
|
|
|
persistent
|
|
|
|
|
>
|
|
|
|
|
<v-card
|
|
|
|
|
dark
|
|
|
|
|
color="primary"
|
|
|
|
|
flat
|
|
|
|
|
>
|
|
|
|
|
<v-card-title>No team number set!</v-card-title>
|
|
|
|
|
<v-card-text>
|
|
|
|
|
PhotonVision cannot connect to your robot! Please
|
|
|
|
|
<a
|
|
|
|
|
href="/#/settings"
|
|
|
|
|
style="color:#FFD843"
|
|
|
|
|
>head to the settings page</a> and set your team number.
|
|
|
|
|
</v-card-text>
|
|
|
|
|
</v-card>
|
|
|
|
|
</v-dialog>
|
2020-06-26 04:39:14 -07:00
|
|
|
</v-app>
|
2019-03-10 22:29:29 +02:00
|
|
|
</template>
|
2019-03-18 00:23:31 +02:00
|
|
|
|
2019-03-10 22:29:29 +02:00
|
|
|
<script>
|
2020-09-04 18:18:44 -07:00
|
|
|
import Logs from "./views/LogsView"
|
2021-11-25 15:43:29 -05:00
|
|
|
// import {mapState} from "vuex";
|
2020-06-26 04:39:14 -07:00
|
|
|
|
2021-11-25 15:43:29 -05:00
|
|
|
export default {
|
2019-10-29 23:58:06 +02:00
|
|
|
name: 'App',
|
2020-06-26 04:39:14 -07:00
|
|
|
components: {
|
2020-09-04 18:18:44 -07:00
|
|
|
Logs
|
2020-06-26 04:39:14 -07:00
|
|
|
},
|
|
|
|
|
data: () => ({
|
2020-07-31 13:50:50 -07:00
|
|
|
// Used so that we can switch back to the previously selected pipeline after camera calibration
|
2021-01-08 21:00:23 -05:00
|
|
|
previouslySelectedIndices: [],
|
2020-06-26 04:39:14 -07:00
|
|
|
timer: undefined,
|
2021-11-25 15:43:29 -05:00
|
|
|
teamNumberDialog: true
|
2020-06-26 04:39:14 -07:00
|
|
|
}),
|
|
|
|
|
computed: {
|
2021-11-25 15:43:29 -05:00
|
|
|
needsTeamNumberSet: {
|
|
|
|
|
get() {
|
|
|
|
|
return this.$store.state.settings.networkSettings.teamNumber < 1
|
|
|
|
|
&& this.teamNumberDialog && this.$store.state.backendConnected
|
|
|
|
|
&& !this.$route.name.toLowerCase().includes("settings");
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-13 19:34:31 -07:00
|
|
|
compact: {
|
|
|
|
|
get() {
|
2020-07-31 13:50:50 -07:00
|
|
|
if (this.$store.state.compactMode === undefined) {
|
2020-08-14 12:39:21 -07:00
|
|
|
return this.$vuetify.breakpoint.smAndDown;
|
2020-07-31 13:50:50 -07:00
|
|
|
} else {
|
2020-08-14 12:39:21 -07:00
|
|
|
return this.$store.state.compactMode || this.$vuetify.breakpoint.smAndDown;
|
2020-07-31 13:50:50 -07:00
|
|
|
}
|
2020-07-13 19:34:31 -07:00
|
|
|
},
|
|
|
|
|
set(value) {
|
|
|
|
|
// compactMode is the user's preference for compact mode; it overrides screen size
|
|
|
|
|
this.$store.commit("compactMode", value);
|
2020-07-31 13:50:50 -07:00
|
|
|
localStorage.setItem("compactMode", value);
|
2020-07-13 19:34:31 -07:00
|
|
|
},
|
2020-08-14 12:39:21 -07:00
|
|
|
},
|
2021-11-25 15:43:29 -05:00
|
|
|
// ...mapState({
|
|
|
|
|
// ntServerMode: state => state.settings.networkSettings.runNTServer,
|
|
|
|
|
// ntClients: state => state.ntConnectionInfo.clients,
|
|
|
|
|
// ntConnected: state => state.ntConnectionInfo.connected,
|
|
|
|
|
// backendConnected: state => state.backendConnected
|
|
|
|
|
// })
|
2020-06-26 04:39:14 -07:00
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
document.addEventListener("keydown", e => {
|
|
|
|
|
switch (e.key) {
|
2020-09-04 18:18:44 -07:00
|
|
|
case "`":
|
|
|
|
|
this.$store.state.logsOverlay = !this.$store.state.logsOverlay;
|
2020-06-26 04:39:14 -07:00
|
|
|
break;
|
|
|
|
|
case "z":
|
|
|
|
|
if (e.ctrlKey && this.$store.getters.canUndo) {
|
|
|
|
|
this.$store.dispatch('undo', {vm: this});
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "y":
|
|
|
|
|
if (e.ctrlKey && this.$store.getters.canRedo) {
|
|
|
|
|
this.$store.dispatch('redo', {vm: this});
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
2020-07-31 13:50:50 -07:00
|
|
|
|
2020-06-26 04:39:14 -07:00
|
|
|
this.$options.sockets.onmessage = (data) => {
|
|
|
|
|
try {
|
|
|
|
|
let message = this.$msgPack.decode(data.data);
|
|
|
|
|
for (let prop in message) {
|
|
|
|
|
if (message.hasOwnProperty(prop)) {
|
|
|
|
|
this.handleMessage(prop, message[prop]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
2020-08-14 12:39:21 -07:00
|
|
|
console.error('error: ' + JSON.stringify(data.data) + " , " + error);
|
2020-06-26 04:39:14 -07:00
|
|
|
}
|
2020-07-31 13:50:50 -07:00
|
|
|
};
|
|
|
|
|
this.$options.sockets.onopen = () => {
|
2021-11-25 15:43:29 -05:00
|
|
|
this.$store.commit("backendConnected", true)
|
2020-10-16 16:48:24 -07:00
|
|
|
this.$store.state.connectedCallbacks.forEach(it => it())
|
2020-07-31 13:50:50 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let closed = () => {
|
2021-11-25 15:43:29 -05:00
|
|
|
this.$store.commit("backendConnected", false)
|
2020-08-14 12:39:21 -07:00
|
|
|
};
|
2020-07-31 13:50:50 -07:00
|
|
|
this.$options.sockets.onclose = closed;
|
|
|
|
|
this.$options.sockets.onerror = closed;
|
|
|
|
|
|
|
|
|
|
this.$connect();
|
2020-06-26 04:39:14 -07:00
|
|
|
},
|
2019-10-29 23:58:06 +02:00
|
|
|
methods: {
|
|
|
|
|
handleMessage(key, value) {
|
Bootup sprint (#18)
* Did some stuff
* Fix gradle, start implementing mjpeg frame consumer
* Did some stuff
* bade changes
* rename camera config to USBCameraConfiguration, add name
* unrename cameraconfiguration
* Add pub/sub framework
* Add setResolution to mjpeg frame consumer
* add NTDataConsumer
* Add some totally broken hsv hacks
* Start refactoring UI data
* Update index.js
* Commit and push, he says
* Fix up some errors
* Fix input tab
* Fix fps
* Update index.js
* Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables
* Change v-model to point to data()
* update hsv to use mutations
* Work on saving, fix hsv
* Rename shouldErode/shouldDilate to erode and dilate
* Hook all the tabs up to the Store
* Change handleData to handlePipelineData
* camera quirk redo, add ICCSub to SocketHandler
* Fix some property names
* Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums
* change pipeline type to an int in store
* Fix mutation naming
* Attempt threshold fix
* Update SocketHandler.java
* Add truthy data sending
* Start adding logging support
* [UI] Add delay to slider input boxes (#1)
* [UI] [Backend] potentially fix camera settings, various logging tweaks
* Don't release raw input mat
* add setVideoModeIndex to vision settables
* Implement pipeline index in socket handler, add framework for renaming/changing pipes
* (ish) get pipeline change working
* Create index.html
* Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused)
* Refactor UI to use mutatePipeline, send pipeline results
* Update NetworkConfig.java
* Change double to number
* Run spotless
* Fix reversal of large/small comparators
* Fix left/right
* Fix pitch/yaw calculation bug, fix area bug
* Use Vue.set instead of assignment
This fixes {{ }}
* Update App.vue
* run spotless
* Actually add pipelines and reassign indecies
* Delete old pipeline configs
Fixes duplication on renaming pipeline
* Start working on deleting pipes
* Fix camera nickname change
* run spotless
* Fix some test stuff
* Update VisionModuleManagerTest.java
* vision source manager test is still broken
* Fix VisionSourceManager test
* Apply spotless 2 electric boogaloo
Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
|
|
|
if (key === "logMessage") {
|
2020-08-14 12:39:21 -07:00
|
|
|
this.logMessage(value["logMessage"], value["logLevel"]);
|
2021-01-26 22:48:14 -06:00
|
|
|
} else if(key === "log"){
|
2021-11-21 17:22:56 -08:00
|
|
|
this.logMessage(value["logMessage"]["logMessage"], value["logMessage"]["logLevel"]);
|
Bootup sprint (#18)
* Did some stuff
* Fix gradle, start implementing mjpeg frame consumer
* Did some stuff
* bade changes
* rename camera config to USBCameraConfiguration, add name
* unrename cameraconfiguration
* Add pub/sub framework
* Add setResolution to mjpeg frame consumer
* add NTDataConsumer
* Add some totally broken hsv hacks
* Start refactoring UI data
* Update index.js
* Commit and push, he says
* Fix up some errors
* Fix input tab
* Fix fps
* Update index.js
* Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables
* Change v-model to point to data()
* update hsv to use mutations
* Work on saving, fix hsv
* Rename shouldErode/shouldDilate to erode and dilate
* Hook all the tabs up to the Store
* Change handleData to handlePipelineData
* camera quirk redo, add ICCSub to SocketHandler
* Fix some property names
* Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums
* change pipeline type to an int in store
* Fix mutation naming
* Attempt threshold fix
* Update SocketHandler.java
* Add truthy data sending
* Start adding logging support
* [UI] Add delay to slider input boxes (#1)
* [UI] [Backend] potentially fix camera settings, various logging tweaks
* Don't release raw input mat
* add setVideoModeIndex to vision settables
* Implement pipeline index in socket handler, add framework for renaming/changing pipes
* (ish) get pipeline change working
* Create index.html
* Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused)
* Refactor UI to use mutatePipeline, send pipeline results
* Update NetworkConfig.java
* Change double to number
* Run spotless
* Fix reversal of large/small comparators
* Fix left/right
* Fix pitch/yaw calculation bug, fix area bug
* Use Vue.set instead of assignment
This fixes {{ }}
* Update App.vue
* run spotless
* Actually add pipelines and reassign indecies
* Delete old pipeline configs
Fixes duplication on renaming pipeline
* Start working on deleting pipes
* Fix camera nickname change
* run spotless
* Fix some test stuff
* Update VisionModuleManagerTest.java
* vision source manager test is still broken
* Fix VisionSourceManager test
* Apply spotless 2 electric boogaloo
Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
|
|
|
} else if (key === "updatePipelineResult") {
|
|
|
|
|
this.$store.commit('mutatePipelineResults', value)
|
|
|
|
|
} else if (this.$store.state.hasOwnProperty(key)) {
|
2019-10-29 23:58:06 +02:00
|
|
|
this.$store.commit(key, value);
|
Bootup sprint (#18)
* Did some stuff
* Fix gradle, start implementing mjpeg frame consumer
* Did some stuff
* bade changes
* rename camera config to USBCameraConfiguration, add name
* unrename cameraconfiguration
* Add pub/sub framework
* Add setResolution to mjpeg frame consumer
* add NTDataConsumer
* Add some totally broken hsv hacks
* Start refactoring UI data
* Update index.js
* Commit and push, he says
* Fix up some errors
* Fix input tab
* Fix fps
* Update index.js
* Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables
* Change v-model to point to data()
* update hsv to use mutations
* Work on saving, fix hsv
* Rename shouldErode/shouldDilate to erode and dilate
* Hook all the tabs up to the Store
* Change handleData to handlePipelineData
* camera quirk redo, add ICCSub to SocketHandler
* Fix some property names
* Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums
* change pipeline type to an int in store
* Fix mutation naming
* Attempt threshold fix
* Update SocketHandler.java
* Add truthy data sending
* Start adding logging support
* [UI] Add delay to slider input boxes (#1)
* [UI] [Backend] potentially fix camera settings, various logging tweaks
* Don't release raw input mat
* add setVideoModeIndex to vision settables
* Implement pipeline index in socket handler, add framework for renaming/changing pipes
* (ish) get pipeline change working
* Create index.html
* Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused)
* Refactor UI to use mutatePipeline, send pipeline results
* Update NetworkConfig.java
* Change double to number
* Run spotless
* Fix reversal of large/small comparators
* Fix left/right
* Fix pitch/yaw calculation bug, fix area bug
* Use Vue.set instead of assignment
This fixes {{ }}
* Update App.vue
* run spotless
* Actually add pipelines and reassign indecies
* Delete old pipeline configs
Fixes duplication on renaming pipeline
* Start working on deleting pipes
* Fix camera nickname change
* run spotless
* Fix some test stuff
* Update VisionModuleManagerTest.java
* vision source manager test is still broken
* Fix VisionSourceManager test
* Apply spotless 2 electric boogaloo
Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
|
|
|
} else if (this.$store.getters.currentPipelineSettings.hasOwnProperty(key)) {
|
2020-07-17 01:37:18 -04:00
|
|
|
this.$store.commit('mutatePipeline', {[key]: value});
|
2020-08-14 12:39:21 -07:00
|
|
|
} else if (this.$store.state.settings.hasOwnProperty(key)) {
|
|
|
|
|
this.$store.commit('mutateSettings', {[key]: value});
|
2019-10-29 23:58:06 +02:00
|
|
|
} else {
|
|
|
|
|
switch (key) {
|
|
|
|
|
default: {
|
2020-07-31 13:50:50 -07:00
|
|
|
console.error("Unknown message from backend: " + value);
|
2019-10-29 23:58:06 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-11-01 17:10:48 +02:00
|
|
|
},
|
2020-07-13 19:34:31 -07:00
|
|
|
toggleCompactMode() {
|
|
|
|
|
this.compact = !this.compact;
|
|
|
|
|
},
|
2020-09-04 18:18:44 -07:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
|
|
logMessage(message, levelInt) {
|
|
|
|
|
this.$store.commit('logString', {
|
|
|
|
|
['level']: levelInt,
|
|
|
|
|
['message']: message
|
|
|
|
|
})
|
2020-07-31 13:50:50 -07:00
|
|
|
},
|
|
|
|
|
switchToDriverMode() {
|
2021-01-08 21:00:23 -05:00
|
|
|
if (!this.previouslySelectedIndices) this.previouslySelectedIndices = [];
|
|
|
|
|
|
|
|
|
|
for (const [i, cameraSettings] of this.$store.state.cameraSettings.entries()) {
|
|
|
|
|
this.previouslySelectedIndices[i] = cameraSettings.currentPipelineIndex;
|
|
|
|
|
this.handleInputWithIndex('currentPipeline', -1, i);
|
2020-07-31 13:50:50 -07:00
|
|
|
}
|
2020-09-15 11:19:36 -07:00
|
|
|
},
|
2021-01-08 21:00:23 -05:00
|
|
|
rollbackPipelineIndex()
|
|
|
|
|
{
|
|
|
|
|
if (this.previouslySelectedIndices !== null) {
|
|
|
|
|
for (const [i] of this.$store.state.cameraSettings.entries()) {
|
|
|
|
|
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndices[i] || 0, i);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.previouslySelectedIndices = null;
|
|
|
|
|
}
|
|
|
|
|
,
|
2020-09-15 11:19:36 -07:00
|
|
|
switchToSettingsTab() {
|
|
|
|
|
this.axios.post('http://' + this.$address + '/api/sendMetrics', {})
|
2019-11-09 21:26:02 +02:00
|
|
|
}
|
2019-09-16 23:54:31 +03:00
|
|
|
}
|
2019-10-29 23:58:06 +02:00
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
2020-06-28 17:58:26 -04:00
|
|
|
<style lang="sass">
|
2020-08-14 12:39:21 -07:00
|
|
|
@import "./scss/variables.scss"
|
2020-06-28 17:58:26 -04:00
|
|
|
</style>
|
|
|
|
|
|
2019-10-29 23:58:06 +02:00
|
|
|
<style>
|
2020-07-31 13:50:50 -07:00
|
|
|
.pulse {
|
|
|
|
|
animation: pulse-animation 2s infinite;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes pulse-animation {
|
|
|
|
|
0% {
|
2020-08-14 12:39:21 -07:00
|
|
|
box-shadow: 0 0 0 0px rgba(0, 0, 0, 0.2);
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.2);
|
2020-07-31 13:50:50 -07:00
|
|
|
}
|
|
|
|
|
100% {
|
2020-08-14 12:39:21 -07:00
|
|
|
box-shadow: 0 0 0 20px rgba(0, 0, 0, 0);
|
|
|
|
|
background-color: rgba(0, 0, 0, 0);
|
2020-07-31 13:50:50 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-13 19:34:31 -07:00
|
|
|
.logo {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 70px;
|
|
|
|
|
object-fit: contain;
|
2019-10-19 16:58:10 +03:00
|
|
|
}
|
2019-03-18 00:23:31 +02:00
|
|
|
|
2020-06-26 04:39:14 -07:00
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
width: 0.5em;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
2020-06-28 03:11:09 -07:00
|
|
|
background-color: #ffd843;
|
2020-06-26 04:39:14 -07:00
|
|
|
border-radius: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-29 23:58:06 +02:00
|
|
|
.container {
|
2020-06-28 03:11:09 -07:00
|
|
|
background-color: #232c37;
|
2019-10-29 23:58:06 +02:00
|
|
|
padding: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#title {
|
2020-06-28 03:11:09 -07:00
|
|
|
color: #ffd843;
|
2019-10-29 23:58:06 +02:00
|
|
|
}
|
2020-07-13 19:34:31 -07:00
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<style>
|
2020-09-04 18:18:44 -07:00
|
|
|
/* Hacks */
|
|
|
|
|
|
2020-07-13 19:34:31 -07:00
|
|
|
.v-divider {
|
2020-07-31 13:50:50 -07:00
|
|
|
border-color: white !important;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-04 18:18:44 -07:00
|
|
|
.v-input {
|
|
|
|
|
font-size: 1rem !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* This is unfortunately the only way to override table background color */
|
|
|
|
|
.theme--dark.v-data-table > .v-data-table__wrapper > table > tbody > tr:hover:not(.v-data-table__expanded__content):not(.v-data-table__empty-wrapper) {
|
|
|
|
|
background: #005281 !important;
|
|
|
|
|
}
|
2020-07-31 13:50:50 -07:00
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2020-08-14 12:39:21 -07:00
|
|
|
@import '~vuetify/src/styles/settings/_variables';
|
2020-07-31 13:50:50 -07:00
|
|
|
|
2020-08-14 12:39:21 -07:00
|
|
|
@media #{map-get($display-breakpoints, 'md-and-down')} {
|
|
|
|
|
html {
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
}
|
2020-07-31 13:50:50 -07:00
|
|
|
}
|
2021-11-21 17:22:56 -08:00
|
|
|
</style>
|