Skip to content

Commit 398c106

Browse files
committed
try fixing docker file; fix batch delete buttons
1 parent 6763cba commit 398c106

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Dockerfile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,25 @@ Name: mbedx509\n\
5050
Description: MbedTLS X509 Library\n\
5151
Version: 3.4.0\n\
5252
Libs: -L\${libdir} -lmbedx509\n\
53-
Cflags: -I\${includedir}" > /usr/local/lib/pkgconfig/mbedx509.pc && \
54-
rm -rf /opt/mbedtls
53+
Cflags: -I\${includedir}" > /usr/local/lib/pkgconfig/mbedx509.pc
54+
55+
# Fetch external dependencies
56+
RUN mkdir -p /opt/external && \
57+
# ezxml
58+
cd /opt/external && \
59+
git clone https://github.com/lumberjaph/ezxml.git && \
60+
# inih
61+
cd /opt/external && \
62+
git clone https://github.com/benhoyt/inih.git
5563

5664
# Copy current directory contents into container
5765
WORKDIR /opt
5866
COPY . .
5967

60-
# Build the application
61-
RUN PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH ./scripts/build.sh --release --with-sod && \
68+
# Prepare and build the application
69+
RUN mkdir -p /etc/lightnvr /var/lib/lightnvr /var/log/lightnvr /var/run/lightnvr /var/lib/lightnvr/recordings && \
70+
chmod -R 777 /var/lib/lightnvr /var/log/lightnvr /var/run/lightnvr && \
71+
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH ./scripts/build.sh --release --with-sod && \
6272
./scripts/install.sh --prefix=/
6373

6474
# Stage 2: Minimal runtime image
@@ -73,7 +83,8 @@ RUN apt-get update && apt-get install -y \
7383
rm -rf /var/lib/apt/lists/*
7484

7585
# Create necessary directories in runtime
76-
RUN mkdir -p /etc/lightnvr /var/lib/lightnvr /var/log/lightnvr /var/run/lightnvr /var/lib/lightnvr/recordings
86+
RUN mkdir -p /etc/lightnvr /var/lib/lightnvr /var/log/lightnvr /var/run/lightnvr /var/lib/lightnvr/recordings && \
87+
chmod -R 777 /var/lib/lightnvr /var/log/lightnvr /var/run/lightnvr
7788

7889
# Copy MbedTLS libraries from builder
7990
COPY --from=builder /usr/local/lib/libmbed*.so* /usr/local/lib/

web/js/components/preact/RecordingsView.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ export function RecordingsView() {
626626
newSelectedRecordings[recording.id] = true;
627627
});
628628
}
629+
// Always update selectedRecordings, even when deselecting all
629630
setSelectedRecordings(newSelectedRecordings);
630631
};
631632

@@ -806,14 +807,16 @@ export function RecordingsView() {
806807

807808
// Add stream filter
808809
if (filters.streamId !== 'all') {
809-
filter.stream = filters.streamId;
810+
filter.stream_name = filters.streamId; // Changed from 'stream' to 'stream_name' to match API expectations
810811
}
811812

812813
// Add recording type filter
813814
if (filters.recordingType === 'detection') {
814815
filter.detection = 1;
815816
}
816817

818+
console.log('Deleting with filter:', filter);
819+
817820
// Use the batch delete endpoint with filter
818821
const deleteResponse = await fetch('/api/recordings/batch-delete', {
819822
method: 'POST',

0 commit comments

Comments
 (0)