Skip to content

Commit

Permalink
bug-fix: WebUI
Browse files Browse the repository at this point in the history
- 録画をSD-Cardに直接記録のdefault値をoffに修正
- NASのmountを常時監視する機能は常時onにしたためUIから削除
  • Loading branch information
mnakada committed Mar 6, 2024
1 parent f08e091 commit 29ce8f4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
3 changes: 0 additions & 3 deletions overlay_rootfs/atom_patch/system_bin/mount_cifs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ STORAGE_CIFS=$(awk -F "=" '/STORAGE_CIFS *=/ {print $2}' $HACK_INI)
STORAGE_CIFSSERVER=$(awk -F "=" '/STORAGE_CIFSSERVER *=/ {gsub(/\/$/, "", $2); print $2}' $HACK_INI)
STORAGE_CIFSUSER=$(awk -F "=" '/STORAGE_CIFSUSER *=/ {print $2}' $HACK_INI)
STORAGE_CIFSPASSWD=$(awk -F "=" '/STORAGE_CIFSPASSWD *=/ {print $2}' $HACK_INI)
STORAGE_CIFSALWAYSMOUNT=$(awk -F "=" '/STORAGE_CIFSALWAYSMOUNT *=/ {print $2}' $HACK_INI)

[ "$1" = "watchdog" -a ! "$STORAGE_CIFSALWAYSMOUNT" = "on" ] && exit 0

if [ "$STORAGE_CIFS" = "on" -o "$STORAGE_CIFS" = "alarm" -o "$STORAGE_CIFS" = "record" ] && [ "$STORAGE_CIFSSERVER" != "" ]; then
mount | grep "$STORAGE_CIFSSERVER" > /dev/null && exit
Expand Down
7 changes: 3 additions & 4 deletions web/source/vue/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<SettingInput v-if="storage_cifs" i18n="recording.NAS.networkPath" :titleOffset="2" :span="10" type="text" v-model="config.STORAGE_CIFSSERVER" @input="FixPath('STORAGE_CIFSSERVER')" />
<SettingInput v-if="storage_cifs" i18n="recording.NAS.account" :titleOffset="2" type="text" v-model="config.STORAGE_CIFSUSER" />
<SettingInput v-if="storage_cifs" i18n="recording.NAS.password" :titleOffset="2" type="password" v-model="config.STORAGE_CIFSPASSWD" show-password />
<SettingSwitch v-if="storage_cifs" i18n="recording.NAS.alwaysMount" :titleOffset="2" v-model="config.STORAGE_CIFSALWAYSMOUNT" />
<SettingInput v-if="storage_cifs" i18n="recording.NAS.savePath" :titleOffset="2" :span="10" type="text" v-model="config.STORAGE_CIFS_PATH" @input="FixPath('STORAGE_CIFS_PATH')" />
<SettingSwitch v-if="storage_cifs" i18n="recording.NAS.automaticDeletion" :titleOffset="2" v-model="config.STORAGE_CIFS_REMOVE" />
<SettingInputNumber v-if="storage_cifs && config.STORAGE_CIFS_REMOVE === 'on'" i18n="recording.NAS.daysToKeep" :titleOffset="2" :span="3" v-model="config.STORAGE_CIFS_REMOVE_DAYS" :min="1" />
Expand Down Expand Up @@ -230,15 +229,14 @@
STORAGE_SDCARD_PATH: '%Y%m%d/%H%M%S',
STORAGE_SDCARD_REMOVE: 'off',
STORAGE_SDCARD_REMOVE_DAYS: 30,
STORAGE_SDCARD_DIRECT_WRITE: 'on',
STORAGE_SDCARD_DIRECT_WRITE: 'off',
STORAGE_CIFS: 'off', // on(alarm & record), alarm, record, off
STORAGE_CIFS_PATH: '%Y%m%d/%H%M%S',
STORAGE_CIFS_REMOVE: 'off',
STORAGE_CIFS_REMOVE_DAYS: 30,
STORAGE_CIFSSERVER: '',
STORAGE_CIFSUSER: '',
STORAGE_CIFSPASSWD: '',
STORAGE_CIFSALWAYSMOUNT: 'on',
TIMELAPSE: 'off',
TIMELAPSE_SCHEDULE: '0 4 * * 0:1:2:3:4:5:6', // -> /var/spool/crontabs/root
TIMELAPSE_PATH: '%Y%m%d%H%M',
Expand Down Expand Up @@ -717,7 +715,8 @@
(this.config.REBOOT_SCHEDULE !== this.oldConfig.REBOOT_SCHEDULE)) {
execCmds.push('setCron');
}
if(this.config.STORAGE_SDCARD !== this.oldConfig.STORAGE_SDCARD) {
if((this.config.STORAGE_SDCARD !== this.oldConfig.STORAGE_SDCARD) ||
(this.config.STORAGE_SDCARD_DIRECT_WRITE !== this.oldConfig.STORAGE_SDCARD_DIRECT_WRITE)) {
let periodic = 'ram';
let alarm = 'ram';
if(this.config.STORAGE_SDCARD_DIRECT_WRITE === 'on') {
Expand Down
3 changes: 0 additions & 3 deletions web/source/vue/i18n-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ recording:
savePath:
title: Save PATH
tooltip: enter the storage PATH after the network name in strftime format ending with the file extension.
alwaysMount:
title: always mount
tooltip: Monitor the NAS to mount periodically.
automaticDeletion:
title: Automatic Recording Deletion
tooltip: Automatically delete recordings from the CIFS Server
Expand Down
3 changes: 0 additions & 3 deletions web/source/vue/i18n-ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ recording:
savePath:
title: 保存するPATH
tooltip: ネットワークPATH以降の録画するPATHをstrftimeの書式指定で記述します。最後に拡張子が付加されます
alwaysMount:
title: 常時マウント
tooltip: 定期的にNASをmountするように監視します
automaticDeletion:
title: ファイルの自動削除
tooltip: CIFS Serverに録画したファイルを自動的に削除します
Expand Down

0 comments on commit 29ce8f4

Please sign in to comment.