mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-24 01:31:44 +00:00
Refined network management (#1672)
This PR implements several refinements to the way that NetworkManager controls the network interface. - The monitor detects and logs changes to the network address - The monitor detects and logs changes to the connection and will reinitialize the connection if needed - Remove NetworkInterface.java class, which wasn't used anywhere - Use java.net.NetworkInterface to get IP addresses for any interface (device) - Adds a metric for the current IP address (address on the currently selected interface)
This commit is contained in:
@@ -167,11 +167,11 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
<v-row>
|
||||
<!-- Active modules -->
|
||||
<v-col
|
||||
v-for="(module, index) in activeVisionModules"
|
||||
:key="`enabled-${module.uniqueName}`"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
v-for="(module, index) in activeVisionModules"
|
||||
:key="`enabled-${module.uniqueName}`"
|
||||
>
|
||||
<v-card dark color="primary">
|
||||
<v-card-title>{{ module.nickname }}</v-card-title>
|
||||
@@ -223,8 +223,8 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
</tbody>
|
||||
</v-simple-table>
|
||||
<photon-camera-stream
|
||||
class="mt-3"
|
||||
id="output-camera-stream"
|
||||
class="mt-3"
|
||||
:camera-settings="module"
|
||||
stream-type="Processed"
|
||||
style="width: 100%; height: auto"
|
||||
@@ -233,16 +233,16 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
<v-card-text class="pt-0">
|
||||
<v-row>
|
||||
<v-col cols="12" md="4" class="pr-md-0 pb-0 pb-md-3">
|
||||
<v-btn color="secondary" @click="setCameraView(module.matchedCameraInfo, true)" style="width: 100%">
|
||||
<v-btn color="secondary" style="width: 100%" @click="setCameraView(module.matchedCameraInfo, true)">
|
||||
<span>Details</span>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="6" md="5" class="pr-0">
|
||||
<v-btn
|
||||
class="black--text"
|
||||
@click="deactivateCamera(module.uniqueName)"
|
||||
color="accent"
|
||||
style="width: 100%"
|
||||
@click="deactivateCamera(module.uniqueName)"
|
||||
>
|
||||
Deactivate
|
||||
</v-btn>
|
||||
@@ -250,9 +250,9 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
<v-col cols="6" md="3">
|
||||
<v-btn
|
||||
class="black--text pa-0"
|
||||
@click="deleteThisCamera(module.uniqueName)"
|
||||
color="red"
|
||||
style="width: 100%"
|
||||
@click="deleteThisCamera(module.uniqueName)"
|
||||
>
|
||||
<v-icon>mdi-trash-can-outline</v-icon>
|
||||
</v-btn>
|
||||
@@ -263,7 +263,7 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
</v-col>
|
||||
|
||||
<!-- Disabled modules -->
|
||||
<v-col cols="12" sm="6" lg="4" v-for="module in disabledVisionModules" :key="`disabled-${module.uniqueName}`">
|
||||
<v-col v-for="module in disabledVisionModules" :key="`disabled-${module.uniqueName}`" cols="12" sm="6" lg="4">
|
||||
<v-card dark color="primary">
|
||||
<v-card-title>{{ module.nickname }}</v-card-title>
|
||||
<v-card-subtitle>Status: <span class="inactive-status">Deactivated</span></v-card-subtitle>
|
||||
@@ -299,16 +299,16 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
<v-card-text class="pt-0">
|
||||
<v-row>
|
||||
<v-col cols="12" md="4" class="pr-md-0 pb-0 pb-md-3">
|
||||
<v-btn color="secondary" @click="setCameraView(module.matchedCameraInfo)" style="width: 100%">
|
||||
<v-btn color="secondary" style="width: 100%" @click="setCameraView(module.matchedCameraInfo)">
|
||||
<span>Details</span>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="6" md="5" class="pr-0">
|
||||
<v-btn
|
||||
class="black--text"
|
||||
@click="activateModule(module.uniqueName)"
|
||||
color="accent"
|
||||
style="width: 100%"
|
||||
@click="activateModule(module.uniqueName)"
|
||||
>
|
||||
Activate
|
||||
</v-btn>
|
||||
@@ -316,9 +316,9 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
<v-col cols="6" md="3">
|
||||
<v-btn
|
||||
class="black--text pa-0"
|
||||
@click="deleteThisCamera(module.uniqueName)"
|
||||
color="red"
|
||||
style="width: 100%"
|
||||
@click="deleteThisCamera(module.uniqueName)"
|
||||
>
|
||||
<v-icon>mdi-trash-can-outline</v-icon>
|
||||
</v-btn>
|
||||
@@ -329,7 +329,7 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
</v-col>
|
||||
|
||||
<!-- Unassigned cameras -->
|
||||
<v-col cols="12" sm="6" lg="4" v-for="(camera, index) in unmatchedCameras" :key="index">
|
||||
<v-col v-for="(camera, index) in unmatchedCameras" :key="index" cols="12" sm="6" lg="4">
|
||||
<v-card dark color="primary">
|
||||
<v-card-title>
|
||||
<span v-if="camera.PVUsbCameraInfo">USB Camera:</span>
|
||||
@@ -345,12 +345,12 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
<v-card-text class="pt-0">
|
||||
<v-row>
|
||||
<v-col cols="6" class="pr-0">
|
||||
<v-btn color="secondary" @click="setCameraView(camera)" style="width: 100%">
|
||||
<v-btn color="secondary" style="width: 100%" @click="setCameraView(camera)">
|
||||
<span>Details</span>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<v-btn class="black--text" @click="activateCamera(camera)" color="accent" style="width: 100%">
|
||||
<v-btn class="black--text" color="accent" style="width: 100%" @click="activateCamera(camera)">
|
||||
Activate
|
||||
</v-btn>
|
||||
</v-col>
|
||||
@@ -377,7 +377,7 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
|
||||
<!-- Camera details modal -->
|
||||
<v-dialog v-model="viewingDetails">
|
||||
<v-card dark flat color="primary" v-if="viewingCamera !== null">
|
||||
<v-card v-if="viewingCamera !== null" dark flat color="primary">
|
||||
<v-card-title class="d-flex justify-space-between">
|
||||
<span>{{ cameraInfoFor(viewingCamera)?.name ?? cameraInfoFor(viewingCamera)?.baseName }}</span>
|
||||
<v-btn text @click="setCameraView(null)">
|
||||
@@ -398,10 +398,10 @@ const setCameraView = (camera: PVCameraInfo | null, showCurrent: boolean = false
|
||||
</v-banner>
|
||||
<div v-if="showCurrentView">
|
||||
<h3>Saved camera</h3>
|
||||
<PvCameraInfoCard :camera="viewingCamera" :showTitle="false" />
|
||||
<PvCameraInfoCard :camera="viewingCamera" :show-title="false" />
|
||||
<br />
|
||||
<h3>Current camera</h3>
|
||||
<PvCameraInfoCard :camera="getMatchedDevice(viewingCamera)" :showTitle="false" />
|
||||
<PvCameraInfoCard :camera="getMatchedDevice(viewingCamera)" :show-title="false" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<PvCameraInfoCard :camera="viewingCamera" />
|
||||
|
||||
Reference in New Issue
Block a user