Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@
</template>
</v-data-table>
</v-card>
<v-dialog v-model="uploadPathDialog" max-width="600">
<v-dialog
v-model="uploadPathDialog"
max-width="600"
persistent
@keydown.esc="cancelFileUpload"
>
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down Expand Up @@ -194,7 +199,7 @@
variant="outlined"
class="mx-2"
data-test="upload-file-cancel-btn"
@click="uploadPathDialog = false"
@click="cancelFileUpload"
>
Cancel
</v-btn>
Expand All @@ -215,7 +220,8 @@
<v-dialog
v-model="optionsDialog"
max-width="300"
@keydown.esc="optionsDialog = false"
persistent
@keydown.esc="cancelChangeRefreshInterval"
>
<v-card>
<v-toolbar height="24">
Expand All @@ -236,6 +242,22 @@
/>
</div>
</v-card-text>
<v-card-actions class="px-2">
<v-btn
data-test="options-close-btn"
variant="outlined"
@click="saveRefreshInterval"
>
Save
</v-btn>
<v-btn
data-test="options-close-btn"
variant="outlined"
@click="cancelChangeRefreshInterval"
>
Cancel
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<output-dialog
Expand All @@ -262,7 +284,9 @@ export default {
OutputDialog,
},
data() {
const refreshInterval = Number.parseInt(localStorage.getItem('bucketExplorerRefreshInterval')) || 60
const refreshIntervalKey = 'bucketExplorerRefreshInterval'
const refreshInterval =
Number.parseInt(localStorage.getItem(refreshIntervalKey)) || 60

return {
title: 'Bucket Explorer',
Expand All @@ -274,6 +298,7 @@ export default {
uploadPathDialog: false,
optionsDialog: false,
refreshInterval,
refreshIntervalKey,
updater: null,
updating: false,
path: '',
Expand Down Expand Up @@ -331,8 +356,9 @@ export default {
},
computed: {
folderTotal() {
return formatBytesToString(this.files
.reduce((a, b) => a + (b.size ? b.size : 0), 0))
return formatBytesToString(
this.files.reduce((a, b) => a + (b.size ? b.size : 0), 0),
)
},
breadcrumbPath() {
const parts = this.path.split('/')
Expand All @@ -349,12 +375,6 @@ export default {
this.uploadFilePath = `${this.path}${this.file.name}`
this.uploadPathDialog = true
},
refreshInterval() {
if (this.refreshInterval != null) {
localStorage.setItem('bucketExplorerRefreshInterval', String(this.refreshInterval))
}
this.changeUpdater()
},
},
created() {
Api.get('/openc3-api/storage/buckets').then((response) => {
Expand Down Expand Up @@ -424,6 +444,23 @@ export default {
})
this.updateFiles()
},
saveRefreshInterval() {
if (this.refreshInterval) {
localStorage.setItem(this.refreshIntervalKey, this.refreshInterval)
} else {
// restore previous value
this.refreshInterval =
Number.parseInt(localStorage.getItem(this.refreshIntervalKey)) || 60
}
this.optionsDialog = false
this.changeUpdater()
},
cancelChangeRefreshInterval() {
// restore previous value
this.refreshInterval =
Number.parseInt(localStorage.getItem(this.refreshIntervalKey)) || 60
this.optionsDialog = false
},
changeUpdater() {
this.clearUpdater()
this.updater = setInterval(() => {
Expand Down Expand Up @@ -572,6 +609,10 @@ export default {
}
this.updateFiles()
},
cancelFileUpload() {
this.file = null
this.uploadPathDialog = false
},
deleteFile(filename) {
let root = this.root.toUpperCase()
if (this.mode === 'volume') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
:cmd-user="criticalCmdUser"
/>

<!-- This dialog is informational, should not be persistent -->
<v-dialog v-model="displayErrorDialog" max-width="600">
<v-card>
<v-toolbar height="24">
Expand Down Expand Up @@ -118,7 +119,12 @@
</v-card>
</v-dialog>

<v-dialog v-model="displaySendHazardous" max-width="600">
<v-dialog
v-model="displaySendHazardous"
max-width="600"
persistent
@keydown.esc="cancelHazardousCmd"
>
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand All @@ -140,7 +146,12 @@
</v-card>
</v-dialog>

<v-dialog v-model="displaySendRaw" max-width="600">
<v-dialog
v-model="displaySendRaw"
max-width="600"
persistent
@keydown.esc="cancelRawCmd"
>
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down Expand Up @@ -882,10 +893,10 @@ export default {
// reader.readAsArrayBuffer(this.rawCmdFile)
// },

// cancelRawCmd() {
// this.displaySendRaw = false
// this.status = 'Raw command not sent'
// },
cancelRawCmd() {
this.displaySendRaw = false
this.status = 'Raw command not sent'
},
},
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
</v-card>
<div style="height: 15px" />
<log-messages :time-zone="timeZone" />

<!-- This dialog updates at time of input, so it does not need to be persistent -->
<v-dialog v-model="optionsDialog" max-width="300">
<v-card>
<v-toolbar height="24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
<v-dialog
v-model="item.edit"
max-width="600"
persistent
@keydown.esc="item.edit = false"
>
<v-card>
Expand Down Expand Up @@ -231,7 +232,8 @@
<v-dialog
v-model="editAll"
max-width="600"
@keydown.esc="editAll = !editAll"
persistent
@keydown.esc="editAll = false"
>
<v-card>
<v-toolbar height="24">
Expand Down Expand Up @@ -281,7 +283,7 @@
</v-card-text>
<v-card-actions class="px-2">
<v-spacer />
<v-btn variant="outlined" @click="editAll = !editAll"> Cancel </v-btn>
<v-btn variant="outlined" @click="editAll = false"> Cancel </v-btn>
<v-btn
variant="flat"
:disabled="!allItemValueType"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
<div>
<!-- Dialog for adding a new component to a tab -->
<!-- width chosen to fit target-packet-item-chooser at full width -->
<v-dialog v-model="show" width="1200">
<v-dialog
v-model="show"
persistent
width="1200"
@keydown.esc="cancelAddComponent"
>
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@
@success="saveConfiguration"
/>
<!-- Dialog for renaming a new tab -->
<v-dialog v-model="tabNameDialog" width="600">
<v-dialog
v-model="tabNameDialog"
width="600"
persistent
@keydown.esc="cancelTabRename"
>
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
is loaded.
</div>
</v-card>
<!-- Changes in this dialog are applied immediately, so persistent is not necessary -->
<v-dialog v-model="ignoredItemsDialog" max-width="600">
<v-card>
<v-toolbar height="24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@
:config-key="configKey"
@success="saveConfiguration"
/>
<v-dialog v-model="limitsSetDialog" max-width="650">
<v-dialog
v-model="limitsSetDialog"
max-width="650"
persistent
@keydown.esc="limitsSetDialog = false"
>
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<template>
<!-- Dialog for creating new screen -->
<v-dialog v-model="show" width="600">
<v-dialog v-model="show" persistent width="600" @keydown.esc="show = false">
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@

<template>
<!-- Edit dialog -->
<v-dialog v-model="show" persistent width="75vw">
<v-dialog
v-model="show"
persistent
width="75vw"
@keydown.esc="$emit('cancel')"
>
<v-card>
<v-toolbar height="24">
<v-btn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
-->

<template>
<v-dialog v-model="show" width="800" @keydown.enter="success()">
<v-dialog
v-model="show"
persistent
width="800"
@keydown.enter="success()"
@keydown.esc="disableButtons ? null : (show = false)"
>
<v-card>
<v-overlay :model-value="loading">
<v-progress-circular
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@

<template>
<!-- Edit Item dialog -->
<v-dialog v-model="show" max-width="700" @keydown.esc="$emit('cancel')">
<v-dialog
v-model="show"
persistent
max-width="700"
@keydown.esc="$emit('cancel')"
>
<v-toolbar height="24">
<v-spacer />
<span> Edit Graph </span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@

<template>
<!-- Edit Item dialog -->
<v-dialog v-model="show" width="400" @keydown.enter="success()">
<v-dialog
v-model="show"
persistent
width="400"
@keydown.enter="success()"
@keydown.esc="$emit('cancel')"
>
<v-card>
<v-card-title class="mb-2">Edit Item</v-card-title>
<v-card-text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
-->

<template>
<!-- This dialog does not have a cancel button and has no user input, so it does not need to be persistent -->
<v-dialog v-model="show" :width="width" scrollable>
<v-card>
<v-toolbar height="24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<v-dialog v-model="show" width="600" @keydown.esc="cancel">
<v-dialog v-model="show" persistent width="600" @keydown.esc="cancel">
<v-card>
<form @submit.prevent="success">
<v-toolbar height="24">
Expand All @@ -35,7 +35,7 @@
<v-row dense>
<v-text-field
v-model="search"
label="search"
label="Search"
type="text"
prepend-inner-icon="mdi-magnify"
clearable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<v-dialog v-model="show" width="600" @keydown.esc="cancel">
<v-dialog v-model="show" persistent width="600" @keydown.esc="cancel">
<v-card>
<form @submit.prevent="success">
<v-toolbar height="24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<v-app>
<v-dialog v-model="show" width="600">
<v-dialog v-model="show" persistent width="600" @keydown.esc="cancel">
<v-card>
<v-toolbar height="24">
<v-spacer />
Expand Down
Loading
Loading