diff --git a/definitions/base.js b/definitions/base.js index 05fe043a..a6718efd 100644 --- a/definitions/base.js +++ b/definitions/base.js @@ -8232,6 +8232,17 @@ module.exports = function(s,config,lang){ }, ] }, + { + "fieldType": "btn-group", + "btns": [ + { + "fieldType": "btn", + "class": `btn-success fill refresh-data`, + "icon": `refresh`, + "btnContent": `${lang['Refresh']}`, + }, + ], + }, { "fieldType": "div", "id": "videosTable_preview_area", diff --git a/languages/en_CA.json b/languages/en_CA.json index e165d282..797ad83d 100644 --- a/languages/en_CA.json +++ b/languages/en_CA.json @@ -17,6 +17,7 @@ "deleteSubAccount": "Delete Sub-Account", "deleteSubAccountText": "Do you want to delete this Sub-Account? You cannot recover it.", "Accuracy Mode": "Accuracy Mode", + "Refresh": "Refresh", "Compress": "Compress", "Tile Size": "Tile Size", "fieldTextTileSize": "When in Accuracy Mode this is the size of each tile in pixels squared. A lower number will have higher accuracy but more resource use.", @@ -620,8 +621,6 @@ "Not Saved": "Not Saved", "Not Connected": "Not Connected", "License Plate Detector": "License Plate Detector", - "OpenCV Cascades": "OpenCV Cascades", - "Refresh List of Cascades": "Refresh List of Cascades", "\"No Motion\" Detector": "\"No Motion\" Detector", "Control": "Control", "Grouping": "Grouping", diff --git a/web/assets/js/bs5.videosTable.js b/web/assets/js/bs5.videosTable.js index ab42b18b..7d0714c3 100644 --- a/web/assets/js/bs5.videosTable.js +++ b/web/assets/js/bs5.videosTable.js @@ -274,6 +274,11 @@ $(document).ready(function(e){ drawPreviewVideo(href) return false; }) + .on('click','.refresh-data',function(e){ + e.preventDefault() + drawVideosTableViewElements() + return false; + }) .on('click','.open-snapshot',function(e){ e.preventDefault() var href = $(this).parents('.video-thumbnail').find('img').click() diff --git a/web/pages/blocks/home/fieldBuilders.ejs b/web/pages/blocks/home/fieldBuilders.ejs index 9b4f3e7a..8c87ae04 100644 --- a/web/pages/blocks/home/fieldBuilders.ejs +++ b/web/pages/blocks/home/fieldBuilders.ejs @@ -171,7 +171,7 @@ drawBlock = function(monitorSettings){ if(btn.attribute){ btnAttributes.push(btn.attribute) } - fieldBtnContent += `<${btnBaseElement} class="btn ${btnClass.join(' ')}" ${btnAttributes.join(' ')}>${btn.btnContent}${btnBaseElement}>` + fieldBtnContent += `<${btnBaseElement} class="btn ${btnClass.join(' ')}" ${btnAttributes.join(' ')}>${btn.icon ? ` ` : ''}${btn.btnContent}${btnBaseElement}>` }) fieldElement = `