Skip to content

Commit

Permalink
Capture 'unknown' status
Browse files Browse the repository at this point in the history
  • Loading branch information
zemogle committed Oct 10, 2024
1 parent dbd72b4 commit 3604531
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/components/RealTimeInterface/SessionImageCapture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const imagesCaptured = computed(() => {
return status.value.status.availability === 'Available' && status.value.status.instrument === 'Idle' && status.value.status.progress === 'Ready' && status.value.status.telescope === 'Tracking' && thumbnailsFetched.value === true
})
const failedToCaptureImages = computed(() => {
return status.value.status === 'Unknown'
})
const fetchTelescopeStatus = async () => {
if (configurationStore.demo) {
status.value = {
Expand Down Expand Up @@ -97,7 +101,13 @@ const setCameraState = computed(() => ({
<template>
<div class="columns">
<div class="column is-one-third">
<div v-if="status">
<div v-if="status">
<div v-if="failedToCaptureImages">
<div class="notification is-danger">
<p>Unable to fetch telescope status</p>
</div>
</div>
<div v-else>
<div v-for="item in status" :key="item" class="image-capture">
<div>
<span class="icon-text">
Expand Down Expand Up @@ -148,6 +158,7 @@ const setCameraState = computed(() => ({
@stopped="stopped"/>
<PolledThumbnails @thumbnailsFetched="handleThumbnailsFetched"/>
</div>
</div>
</div>
<button class="button red-bg" @click="sendStopCommand">
stop
Expand Down
2 changes: 1 addition & 1 deletion src/components/Views/RealTimeInterfaceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const statusSessionNotActive = computed(() => {
if (configurationStore.demo == true) {
return false
} else {
return ((sessionsStore.currentStatus === 'INACTIVE' || sessionsStore.currentStatus === 'UNEXPIRED' || configurationStore.demo == false) && timeRemaining.value >= 0)
return ((sessionsStore.currentStatus === 'INACTIVE' || sessionsStore.currentStatus === 'UNEXPIRED') && timeRemaining.value >= 0)
}
})
Expand Down

0 comments on commit 3604531

Please sign in to comment.