This commit is contained in:
Tommy Mikkelsen 2022-07-04 22:57:39 +02:00
parent 0aa2b02a85
commit 23b98b8165

View file

@ -1,10 +1,14 @@
<template>
<b-container fluid>
<div class="col-lg-10 col-md-12 col-xs-12">
<h1>{{ $t("Modules.PMS.DVR.Name") }}</h1>
<p>{{ $t("Modules.PMS.DVR.Description") }}</p>
</div>
<b-container class="m-2 mt-2">
<div> <!-- Title and desc -->
<h2>
{{ $t(`Modules.PMS.DVR.Name`) }}
</h2>
<h5>{{ $t(`Modules.PMS.DVR.Description`) }}</h5>
</div>
<b-link id="general" :to="{ path: '/settings/export', query: { return: 'dvr' } }">{{ $t("Modules.ET.Settings.Note") }} </b-link>
<br>
<br>
<div class="d-flex align-items-center">
<b-form-group id="dvrSelDVRGroup" v-bind:label="$t('Modules.PMS.DVR.selDVR')" label-size="lg" label-class="font-weight-bold pt-0" name="dvrSelDVRGroup">
<b-tooltip target="dvrSelDVRGroup" triggers="hover">
@ -13,44 +17,42 @@
<b-form-select
v-model="selDVR"
id="selDVR"
:options="optSelDVR"
:options="optSelDVR"
name="selDVR">
</b-form-select>
</b-form-group>
</div>
<br>
<br>
<br>
<div class="buttons">
<!-- Buttons -->
<div id="buttons" class="text-center">
<b-button-group >
<b-button
class="mr-2"
type="is-primary"
@click="dvrBackup"
icon-left="fas fa-file-download"
icon-pack="fas"
:disabled="this.selDVR == ''"
variant="success"
>
{{ $t("Modules.PMS.DVR.lblBtnBackup") }}
</b-button>
<b-button
class="mr-2"
type="is-primary"
@click="dvrRestore"
icon-left="fas fa-file-download"
icon-pack="fas"
:disabled=!this.serverIsSelected
variant="success"
>
{{ $t("Modules.PMS.DVR.lblBtnRestore") }}
</b-button>
</b-button-group>
</div>
</div>
<!-- Buttons -->
<div id="buttons" class="text-center">
<b-button-group >
<b-button
class="mr-2"
type="is-primary"
@click="dvrBackup"
icon-left="fas fa-file-download"
icon-pack="fas"
:disabled="this.selDVR == ''"
variant="success"
>
{{ $t("Modules.PMS.DVR.lblBtnBackup") }}
</b-button>
<b-button
class="mr-2"
type="is-primary"
@click="dvrRestore"
icon-left="fas fa-file-download"
icon-pack="fas"
:disabled=!this.serverIsSelected
variant="success"
>
{{ $t("Modules.PMS.DVR.lblBtnRestore") }}
</b-button>
</b-button-group>
</div>
</div>
</b-container>
</template>
@ -74,14 +76,14 @@
created() {
log.info("DVR Created");
this.serverSelected();
this.optSelDVR = this.getDVRList();
this.optSelDVR = this.getDVRList();
},
watch: {
// Watch for when selected server address is updated
selectedServerAddress: async function(){
log.info("DVR Selected server changed");
this.optSelDVR = this.getDVRList();
this.serverIsSelected = ( this.$store.getters.getSelectedServer != "none" );
this.serverIsSelected = ( this.$store.getters.getSelectedServer != "none" );
},
doneDVRBackup: async function(){
if (this.$store.getters.doneDVRBackup!='')
@ -107,12 +109,12 @@
},
methods: {
async dvrRestore() {
async dvrRestore() {
log.info("DVR Restore started");
//dvr.backupDVR( {'dvrName': this.selDVR} );
dvr.restoreDVR();
//dvr.backupDVR( {'dvrName': this.selDVR} );
dvr.restoreDVR();
},
async dvrBackup() {
async dvrBackup() {
log.info("DVR Backup started");
dvr.backupDVR( {'dvrName': this.selDVR} );
},
@ -135,7 +137,7 @@
variant: 'primary',
toaster: 'b-toaster-bottom-right'
});
}
}
}
}
};