From a6c403a4ac0e1f12d663a7a20228f5eebb583acf Mon Sep 17 00:00:00 2001 From: Simpler1 Date: Mon, 24 Jul 2023 15:13:53 -0400 Subject: [PATCH 1/3] Refresh table on show After opening an event from the events table and editing some properties, returning back to the events table would show the cached version of the table without the new values. This change will refresh the events table each time it's shown. It is a bit of a performance hit, but it's more important to show accurate information after a quick delay than to show bad/inaccurate information fast. --- web/skins/classic/views/js/events.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/skins/classic/views/js/events.js b/web/skins/classic/views/js/events.js index b778e39e4..da99042fc 100644 --- a/web/skins/classic/views/js/events.js +++ b/web/skins/classic/views/js/events.js @@ -420,6 +420,11 @@ function initPage() { } }); + window.onpageshow = function(evt) { + console.log('Refreshing table'); + table.bootstrapTable('refresh'); + }; + table.bootstrapTable('resetSearch'); // The table is initially given a hidden style, so now that we are done rendering, show it table.show(); From 6fd119157a3f1091b3a891751a26c8d8ced96887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Sun, 27 Aug 2023 02:00:59 +0200 Subject: [PATCH 2/3] Text corrections --- conf.d/01-system-paths.conf.in | 2 +- docs/faq.rst | 2 +- scripts/ZoneMinder/lib/ZoneMinder/Control/Netcat.pm | 2 +- .../lib/ZoneMinder/Trigger/Connection/Example.pm | 2 +- utils/do_debian_package.sh | 8 ++++---- utils/packpack/startpackpack.sh | 8 ++++---- utils/zmeditconfigdata.sh | 2 +- web/ajax/console.php | 2 +- web/ajax/status.php | 8 ++++---- web/ajax/stream.php | 2 +- web/ajax/watch.php | 2 +- web/api/README.md | 2 +- zm.conf.in | 2 +- zmlinkcontent.sh.in | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/conf.d/01-system-paths.conf.in b/conf.d/01-system-paths.conf.in index 7bca9c932..6da92c665 100644 --- a/conf.d/01-system-paths.conf.in +++ b/conf.d/01-system-paths.conf.in @@ -9,7 +9,7 @@ # *** DO NOT EDIT THIS FILE *** # # To make custom changes to the variables below, create a new configuration -# file, with an extention of .conf, containing your desired modifications. +# file, with an extension of .conf, containing your desired modifications. # # Full path to the folder events are recorded to. diff --git a/docs/faq.rst b/docs/faq.rst index 74ac5f985..8d1800f5a 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -396,7 +396,7 @@ ZoneMinder provides a sample alarm script called `zmalarm.pl ' . $profileToken . ''; $self->sendCmd($cmd, $msg, $content_type); - # Reported to not work, so superceded by the cmd above + # Reported to not work, so superseded by the cmd above $msg = ''.authentificationHeader($username, $password).'' . $profileToken . 'truefalse'; $self->sendCmd($cmd, $msg, $content_type); } diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Connection/Example.pm b/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Connection/Example.pm index 8bef82460..92c8c50e5 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Connection/Example.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Connection/Example.pm @@ -19,7 +19,7 @@ # # ========================================================================== # -# This module contains an example overriden trigger connection class +# This module contains an example overridden trigger connection class # package ZoneMinder::Trigger::Connection::Example; diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index de609af2e..7df2a3106 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -235,7 +235,7 @@ IFS=',' ;for DISTRO in `echo "$DISTROS"`; do rm -rf debian fi; - # Generate Changlog + # Generate Changelog if [ "$DISTRO" == "beowulf" ]; then cp -Rpd distros/beowulf debian else @@ -292,14 +292,14 @@ EOF # Leave the .orig so that we don't pollute it when building deps cd .. if [ $TYPE == "binary" ]; then - # Auto-install all ZoneMinder's depedencies using the Debian control file + # Auto-install all ZoneMinder's dependencies using the Debian control file sudo apt-get install devscripts equivs sudo mk-build-deps -ir $DIRECTORY.orig/debian/control echo "Status: $?" DEBUILD=debuild else if [ $TYPE == "local" ]; then - # Auto-install all ZoneMinder's depedencies using the Debian control file + # Auto-install all ZoneMinder's dependencies using the Debian control file sudo apt-get install devscripts equivs sudo mk-build-deps -ir $DIRECTORY.orig/debian/control echo "Status: $?" @@ -381,7 +381,7 @@ EOF done; # foreach distro if [ "$INTERACTIVE" != "no" ]; then - read -p "Do you want to keep the checked out version of Zoneminder (incase you want to modify it later) [y/N]" + read -p "Do you want to keep the checked out version of Zoneminder (in case you want to modify it later) [y/N]" [[ $REPLY == [yY] ]] && { mv "$DIRECTORY.orig" zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted"; } echo "Done!" else diff --git a/utils/packpack/startpackpack.sh b/utils/packpack/startpackpack.sh index 313df59ff..ea64e2e6d 100755 --- a/utils/packpack/startpackpack.sh +++ b/utils/packpack/startpackpack.sh @@ -101,7 +101,7 @@ commonprep () { echo "Retrieving Crud ${CRUDVER} submodule..." curl -L https://github.com/FriendsOfCake/crud/archive/v${CRUDVER}.tar.gz > build/crud-${CRUDVER}.tar.gz if [ $? -ne 0 ]; then - echo "ERROR: Crud tarball retreival failed..." + echo "ERROR: Crud tarball retrieval failed..." exit 1 fi fi @@ -113,7 +113,7 @@ commonprep () { echo "Retrieving CakePHP-Enum-Behavior ${CEBVER} submodule..." curl -L https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/${CEBVER}.tar.gz > build/cakephp-enum-behavior-${CEBVER}.tar.gz if [ $? -ne 0 ]; then - echo "ERROR: CakePHP-Enum-Behavior tarball retreival failed..." + echo "ERROR: CakePHP-Enum-Behavior tarball retrieval failed..." exit 1 fi fi @@ -125,7 +125,7 @@ commonprep () { echo "Retrieving RTSP ${RTSPVER} submodule..." curl -L https://github.com/ZoneMinder/RtspServer/archive/${RTSPVER}.tar.gz > build/RtspServer-${RTSPVER}.tar.gz if [ $? -ne 0 ]; then - echo "ERROR: RtspServer tarball retreival failed..." + echo "ERROR: RtspServer tarball retrieval failed..." exit 1 fi fi @@ -159,7 +159,7 @@ movecrud () { fi } -# previsouly part of installzm.sh +# previously part of installzm.sh # install the deb and test zoneminder install_deb () { diff --git a/utils/zmeditconfigdata.sh b/utils/zmeditconfigdata.sh index 32b000730..b7a78ea50 100755 --- a/utils/zmeditconfigdata.sh +++ b/utils/zmeditconfigdata.sh @@ -14,7 +14,7 @@ Replace the default value, DEFAULT, of the specified ZoneMinder variable, VARIABLE, located in ConfigData.pm.in. Default folder for ConfigData is ./scripts/ZoneMinder/lib/ZoneMinder -Specify CONFIGDATA DIRETORY to override. +Specify CONFIGDATA DIRECTORY to override. Run this script from your build folder, before running configure or cmake. diff --git a/web/ajax/console.php b/web/ajax/console.php index 0077e3753..ff1f82c1b 100644 --- a/web/ajax/console.php +++ b/web/ajax/console.php @@ -4,7 +4,7 @@ if ( canEdit('Monitors') ) { case 'sort' : { $monitor_ids = $_POST['monitor_ids']; - # Two concurrent sorts could generate odd sortings... so lock the table. + # Two concurrent sorts could generate odd sorting... so lock the table. global $dbConn; $dbConn->beginTransaction(); $dbConn->exec('LOCK TABLES Monitors WRITE'); diff --git a/web/ajax/status.php b/web/ajax/status.php index 852560708..72818a1e1 100644 --- a/web/ajax/status.php +++ b/web/ajax/status.php @@ -123,7 +123,7 @@ $statusData = array( global $dateTimeFormatter; return $dateTimeFormatter->format(strtotime($row['StartDateTime'])); }), - # Left for backwards compatability. Remove in 1.37 + # Left for backwards compatibility. Remove in 1.37 'EndDateTime' => true, 'EndDateTimeFormatted' => array('postFunction'=>function($row){ global $dateTimeFormatter; @@ -157,7 +157,7 @@ $statusData = array( global $dateTimeFormatter; return $dateTimeFormatter->format(strtotime($row['StartDateTime'])); }), - # Left for backwards compatability. Remove in 1.37 + # Left for backwards compatibility. Remove in 1.37 'EndDateTime' => true, 'EndDateTimeFormatted' => array('postFunction'=>function($row){ global $dateTimeFormatter; @@ -478,7 +478,7 @@ function getNearEvents() { } $sql .= ' AND E.Id<'.$event['Id'] . ' ORDER BY '.$sortColumn.' '.($sortOrder=='ASC'?'DESC':'ASC'); if ( $sortColumn != 'E.Id' ) { - # When sorting by starttime, if we have two events with the same starttime (diffreent monitors) then we should sort secondly by Id + # When sorting by starttime, if we have two events with the same starttime (different monitors) then we should sort secondly by Id $sql .= ', E.Id DESC'; } $sql .= ' LIMIT 1'; @@ -496,7 +496,7 @@ function getNearEvents() { } $sql .=' AND E.Id>'.$event['Id'] . ' ORDER BY '.$sortColumn.' '.($sortOrder=='ASC'?'ASC':'DESC'); if ( $sortColumn != 'E.Id' ) { - # When sorting by starttime, if we have two events with the same starttime (diffreent monitors) then we should sort secondly by Id + # When sorting by starttime, if we have two events with the same starttime (different monitors) then we should sort secondly by Id $sql .= ', E.Id ASC'; } $sql .= ' LIMIT 1'; diff --git a/web/ajax/stream.php b/web/ajax/stream.php index 3726f4018..4ebdaeb5a 100644 --- a/web/ajax/stream.php +++ b/web/ajax/stream.php @@ -166,7 +166,7 @@ case MSG_DATA_WATCH : $data['auth'] = $auth_hash; ZM\Debug('including new auth hash '.$data['auth'].'because doesnt match request auth hash '.$_REQUEST['auth']); } else { - ZM\Debug('Not including new auth hash becase it hasn\'t changed '.$auth_hash); + ZM\Debug('Not including new auth hash because it hasn\'t changed '.$auth_hash); } } $data['auth_relay'] = get_auth_relay(); diff --git a/web/ajax/watch.php b/web/ajax/watch.php index 2bc6fb1d8..8f966b583 100644 --- a/web/ajax/watch.php +++ b/web/ajax/watch.php @@ -1,7 +1,7 @@ Date: Mon, 4 Sep 2023 17:11:40 +0000 Subject: [PATCH 3/3] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-bionic.yml | 2 +- .github/workflows/ci-bullseye.yml | 2 +- .github/workflows/ci-buster.yml | 2 +- .github/workflows/ci-centos-7.yml | 2 +- .github/workflows/ci-centos-8.yml | 2 +- .github/workflows/ci-eslint.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-packages.yml | 2 +- .github/workflows/depsreview.yaml | 2 +- .github/workflows/release-packages.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-bionic.yml b/.github/workflows/ci-bionic.yml index 13c22749d..25c36ee6b 100644 --- a/.github/workflows/ci-bionic.yml +++ b/.github/workflows/ci-bionic.yml @@ -34,7 +34,7 @@ jobs: add-apt-repository ppa:git-core/ppa apt-get -qq update apt-get -qq install git - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install dependencies diff --git a/.github/workflows/ci-bullseye.yml b/.github/workflows/ci-bullseye.yml index 5cf07a39f..d60c96a64 100644 --- a/.github/workflows/ci-bullseye.yml +++ b/.github/workflows/ci-bullseye.yml @@ -37,7 +37,7 @@ jobs: run: apt-get -qq update && apt-get -qq upgrade - name: Install git run: apt-get -qq install git - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install dependencies diff --git a/.github/workflows/ci-buster.yml b/.github/workflows/ci-buster.yml index d7af2cfb8..102e04826 100644 --- a/.github/workflows/ci-buster.yml +++ b/.github/workflows/ci-buster.yml @@ -37,7 +37,7 @@ jobs: run: apt-get -qq update && apt-get -qq upgrade - name: Install git run: apt-get -qq install git - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install dependencies diff --git a/.github/workflows/ci-centos-7.yml b/.github/workflows/ci-centos-7.yml index 39973d05a..1c8e9be9f 100644 --- a/.github/workflows/ci-centos-7.yml +++ b/.github/workflows/ci-centos-7.yml @@ -26,7 +26,7 @@ jobs: container: ghcr.io/dougnazar/centos7-gcc8-zm:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Prepare diff --git a/.github/workflows/ci-centos-8.yml b/.github/workflows/ci-centos-8.yml index 09c04a72c..5d04f1669 100644 --- a/.github/workflows/ci-centos-8.yml +++ b/.github/workflows/ci-centos-8.yml @@ -29,7 +29,7 @@ jobs: run: yum -y install "dnf-command(config-manager)" https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && yum config-manager --set-enabled powertools - name: Install git run: yum -y install git - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install dependencies diff --git a/.github/workflows/ci-eslint.yml b/.github/workflows/ci-eslint.yml index 6a7b640f4..f64a351b0 100644 --- a/.github/workflows/ci-eslint.yml +++ b/.github/workflows/ci-eslint.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install ESLint diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e0d3475a6..0149f48c3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. diff --git a/.github/workflows/create-packages.yml b/.github/workflows/create-packages.yml index fa228e25e..5470451b4 100644 --- a/.github/workflows/create-packages.yml +++ b/.github/workflows/create-packages.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: '0' submodules: recursive diff --git a/.github/workflows/depsreview.yaml b/.github/workflows/depsreview.yaml index da99d0c54..b9945082d 100644 --- a/.github/workflows/depsreview.yaml +++ b/.github/workflows/depsreview.yaml @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index d682f2e3b..a74d3bbdd 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: '0' submodules: recursive