mirror of https://github.com/sfeakes/AqualinkD.git
2.6.8 (Dev)
parent
e513f14dd6
commit
9d5d90937b
|
@ -1,293 +0,0 @@
|
|||
|
||||
#####################################
|
||||
#
|
||||
# Build container to compile AqualnkD Release binaries (armhf and arm64)
|
||||
#
|
||||
# armhf is 32 bit armv6l (armhf) stretch and newer - work on all Pi's running 32bit (Pi1 to Pi4)
|
||||
# arm64 is 64 bit aarch64 buster and newer - work on Pi3/Pi4/2w running 64bit os
|
||||
#
|
||||
# docker build -f Dockerfile.releaseBinaries2 -t aqualinkd-releasebin2 .
|
||||
# For better debug logs use --progress=plain
|
||||
# docker build --progress=plain -f Dockerfile.releaseBinaries2 -t aqualinkd-releasebin2 .
|
||||
#
|
||||
# docker run -it --mount type=bind,source=./build,target=/build aqualinkd-releasebin2 bash
|
||||
#
|
||||
# clean method
|
||||
# docker system prune
|
||||
# docker buildx prune <- just build env
|
||||
#
|
||||
# armhf =
|
||||
# COLLECT_GCC=arm-linux-gnueabihf-gcc
|
||||
# COLLECT_LTO_WRAPPER=/opt/cross-pi-gcc/libexec/gcc/arm-linux-gnueabihf/6.3.0/lto-wrapper
|
||||
# Target: arm-linux-gnueabihf
|
||||
# Configured with: ../gcc-6.3.0/configure --prefix=/opt/cross-pi-gcc --target=arm-linux-gnueabihf --enable-languages=c,c++,fortran --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-multilib --enable-linker-build-id
|
||||
# Thread model: posix
|
||||
# gcc version 6.3.0 (GCC)
|
||||
# GLIBC version 2.24
|
||||
#
|
||||
# arm64 =
|
||||
# COLLECT_GCC=aarch64-linux-gnu-gcc
|
||||
# COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/aarch64-linux-gnu/8/lto-wrapper
|
||||
# Target: aarch64-linux-gnu
|
||||
# Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-2' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --disable-libphobos --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=aarch64-linux-gnu --program-prefix=aarch64-linux-gnu- --includedir=/usr/aarch64-linux-gnu/include
|
||||
# Thread model: posix
|
||||
# gcc version 8.3.0 (Debian 8.3.0-2)
|
||||
# GLIBC 2.28-10+deb10u3
|
||||
#####################################
|
||||
|
||||
FROM debian:buster
|
||||
|
||||
# ############
|
||||
# Get arm64 build environment.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
libsystemd-dev \
|
||||
gcc-aarch64-linux-gnu \
|
||||
binutils-arm-linux-gnueabi \
|
||||
file
|
||||
|
||||
RUN dpkg --add-architecture arm64
|
||||
RUN apt-get update && \
|
||||
apt-get install -y libsystemd-dev:arm64
|
||||
|
||||
# ############
|
||||
# Get armhf build environment
|
||||
# prebuilt armhf doesn't support hard float, (or something that causes it to fail on armhf machines)
|
||||
#RUN apt-get install -y \
|
||||
# gcc-arm-linux-gnueabihf \
|
||||
# binutils-arm-linux-gnueabihf
|
||||
|
||||
#RUN dpkg --add-architecture armhf
|
||||
#RUN apt-get update && \
|
||||
# apt-get install -y libsystemd-dev:armhf
|
||||
|
||||
# So we need to build arnhf our selves. Since we are doing that, using debian/rasbian stretch versions of
|
||||
# everthing for best compatibality
|
||||
|
||||
ENV GCC_VERSION gcc-6.3.0
|
||||
ENV GLIBC_VERSION glibc-2.24
|
||||
ENV BINUTILS_VERSION binutils-2.28
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install some tools and compilers + clean up
|
||||
RUN apt-get update && \
|
||||
#apt-get install -y rsync git wget gcc-6 g++-6 cmake gdb gdbserver bzip2 && \
|
||||
apt-get install -y rsync git wget cmake gdb gdbserver bzip2 && \
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Use GCC 6 as the default
|
||||
#RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 999 \
|
||||
# && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 999 \
|
||||
# && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-6 999 \
|
||||
# && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-6 999
|
||||
|
||||
# Add a user called `develop`
|
||||
RUN useradd -ms /bin/bash develop
|
||||
RUN echo "develop ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||
|
||||
WORKDIR /home/develop
|
||||
|
||||
# Download and extract GCC
|
||||
RUN wget https://ftp.gnu.org/gnu/gcc/${GCC_VERSION}/${GCC_VERSION}.tar.gz && \
|
||||
tar xf ${GCC_VERSION}.tar.gz && \
|
||||
rm ${GCC_VERSION}.tar.gz
|
||||
# Download and extract LibC
|
||||
RUN wget https://ftp.gnu.org/gnu/libc/${GLIBC_VERSION}.tar.bz2 && \
|
||||
tar xjf ${GLIBC_VERSION}.tar.bz2 && \
|
||||
rm ${GLIBC_VERSION}.tar.bz2
|
||||
# Download and extract BinUtils
|
||||
RUN wget https://ftp.gnu.org/gnu/binutils/${BINUTILS_VERSION}.tar.bz2 && \
|
||||
tar xjf ${BINUTILS_VERSION}.tar.bz2 && \
|
||||
rm ${BINUTILS_VERSION}.tar.bz2
|
||||
# Download the GCC prerequisites
|
||||
RUN cd ${GCC_VERSION} && contrib/download_prerequisites && rm *.tar.*
|
||||
#RUN cd gcc-9.2.0 && contrib/download_prerequisites && rm *.tar.*
|
||||
|
||||
# Build BinUtils
|
||||
RUN mkdir -p /opt/cross-pi-gcc
|
||||
WORKDIR /home/develop/build-binutils
|
||||
RUN ../${BINUTILS_VERSION}/configure \
|
||||
--prefix=/opt/cross-pi-gcc --target=arm-linux-gnueabihf \
|
||||
--with-arch=armv6 --with-fpu=vfp --with-float=hard \
|
||||
--disable-multilib
|
||||
RUN make -j$(nproc)
|
||||
RUN make install
|
||||
|
||||
|
||||
# Apply batch to GCC
|
||||
# https://github.com/qca/open-ath9k-htc-firmware/issues/135
|
||||
WORKDIR /home/develop
|
||||
RUN sed -i '1474s/file ==/file[0] ==/' gcc-6.3.0/gcc/ubsan.c
|
||||
|
||||
# Build the first part of GCC
|
||||
WORKDIR /home/develop/build-gcc
|
||||
RUN ../${GCC_VERSION}/configure \
|
||||
--prefix=/opt/cross-pi-gcc \
|
||||
--target=arm-linux-gnueabihf \
|
||||
--enable-languages=c,c++,fortran \
|
||||
--with-arch=armv6 --with-fpu=vfp --with-float=hard \
|
||||
--disable-multilib \
|
||||
--enable-linker-build-id
|
||||
RUN make -j$(nproc) 'LIMITS_H_TEST=true' all-gcc
|
||||
RUN make install-gcc
|
||||
ENV PATH=/opt/cross-pi-gcc/bin:${PATH}
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y gawk bison python3 && \
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download and install the Linux headers
|
||||
WORKDIR /home/develop
|
||||
# Should probably use below and change branch. Known to build with rpi-6.1.y or rpi-6.9.y rpi-6.12.y
|
||||
#RUN git clone -b <branch> --depth=1 https://github.com/raspberrypi/linux
|
||||
RUN git clone --depth=1 https://github.com/raspberrypi/linux
|
||||
WORKDIR /home/develop/linux
|
||||
ENV KERNEL=kernel7
|
||||
RUN make ARCH=arm INSTALL_HDR_PATH=/opt/cross-pi-gcc/arm-linux-gnueabihf headers_install
|
||||
|
||||
# Build GLIBC
|
||||
WORKDIR /home/develop/build-glibc
|
||||
RUN ../${GLIBC_VERSION}/configure \
|
||||
--prefix=/opt/cross-pi-gcc/arm-linux-gnueabihf \
|
||||
--build=$MACHTYPE --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf \
|
||||
--with-arch=armv6 --with-fpu=vfp --with-float=hard \
|
||||
--with-headers=/opt/cross-pi-gcc/arm-linux-gnueabihf/include \
|
||||
--disable-multilib libc_cv_forced_unwind=yes
|
||||
RUN make install-bootstrap-headers=yes install-headers
|
||||
RUN make -j8 csu/subdir_lib
|
||||
RUN install csu/crt1.o csu/crti.o csu/crtn.o /opt/cross-pi-gcc/arm-linux-gnueabihf/lib
|
||||
RUN arm-linux-gnueabihf-gcc -nostdlib -nostartfiles -shared -x c /dev/null \
|
||||
-o /opt/cross-pi-gcc/arm-linux-gnueabihf/lib/libc.so
|
||||
RUN touch /opt/cross-pi-gcc/arm-linux-gnueabihf/include/gnu/stubs.h
|
||||
|
||||
# Continue building GCC
|
||||
WORKDIR /home/develop/build-gcc
|
||||
RUN make -j$(nproc) all-target-libgcc
|
||||
RUN make install-target-libgcc
|
||||
|
||||
# Finish building GLIBC
|
||||
WORKDIR /home/develop/build-glibc
|
||||
RUN make -j$(nproc)
|
||||
RUN make install
|
||||
|
||||
# Finish building GCC
|
||||
WORKDIR /home/develop/build-gcc
|
||||
RUN make -j$(nproc)
|
||||
RUN make install
|
||||
|
||||
|
||||
# Download systemd and it's dependancys.
|
||||
RUN mkdir -p /home/develop/packages
|
||||
WORKDIR /home/develop/packages
|
||||
|
||||
|
||||
####################
|
||||
# Manually libsystemd-dev and all it's depandancys
|
||||
# Commented out ones are what I really want, but couldn;t find.
|
||||
#####RUN wget https://archive.debian.org/debian/pool/main/s/systemd/libsystemd-dev_232-25+deb9u14_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/s/systemd/libsystemd-dev_232-25+deb9u12_armhf.deb
|
||||
#####RUN wget https://archive.debian.org/debian/pool/main/s/systemd/libsystemd0_232-25+deb9u14_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/s/systemd/libsystemd0_232-25+deb9u12_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/g/glibc/libc6_2.24-11+deb9u4_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/libg/libgpg-error/libgpg-error0_1.26-2_armhf.deb
|
||||
#####RUN wget https://archive.debian.org/debian/pool/main/x/xz-utils/liblzma5_5.2.2-1.2+deb9u1_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/x/xz-utils/liblzma5_5.2.2-1.2+b1_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/libs/libselinux/libselinux1_2.6-3+b3_armhf.deb
|
||||
#####RUN wget https://archive.debian.org/debian/pool/main/libg/libgcrypt20//libgcrypt20_1.7.6-2+deb9u4_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/libg/libgcrypt20//libgcrypt20_1.7.6-2+deb9u3_armhf.deb
|
||||
#####RUN wget https://archive.debian.org/debian/pool/main/l/lz4/liblz4-1_0.0~r131-2+deb9u1_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/l/lz4/liblz4-1_0.0~r131-2+b1_armhf.deb
|
||||
#####RUN wget https://archive.debian.org/debian/pool/main/p/pcre3/libpcre3_2%3a8.39-3_armhf.deb
|
||||
#RUN wget https://archive.debian.org/debian/pool/main/p/pcre3/libpcre3_8.39-3_armhf.deb
|
||||
#
|
||||
# Now we have all packaged, let's unpack them.
|
||||
#
|
||||
# Install all packages into /opt/cross-pi-gcc/arm-linux-gnueabihf
|
||||
#RUN for file in *; do dpkg-deb -x $file /opt/cross-pi-gcc/arm-linux-gnueabihf; done
|
||||
#
|
||||
|
||||
####################
|
||||
# Rather than manually, Let's do some modifications to apt and get that working (kinda)
|
||||
|
||||
# Get just enough for apt-get and dpk to run. apt-get doesn't actually work, just enough to download
|
||||
ENV APT_ROOT=/opt/cross-pi-gcc/apt-armhf
|
||||
RUN mkdir -p $APT_ROOT
|
||||
#RUN APT_ROOT=/opt/cross-pi-gcc/apt-armhf; export APT_ROOT
|
||||
|
||||
RUN mkdir -p $APT_ROOT/etc/apt/sources.list.d/
|
||||
RUN mkdir -p $APT_ROOT/var/lib/dpkg/updates/
|
||||
RUN mkdir -p $APT_ROOT/var/lib/dpkg/info
|
||||
RUN mkdir -p $APT_ROOT/var/cache/apt/archives/partial
|
||||
RUN mkdir -p $APT_ROOT/var/log/apt/
|
||||
#mkdir -p $APT_ROOT/usr/share/
|
||||
|
||||
RUN echo "deb http://archive.debian.org/debian/ stretch main contrib non-free" > $APT_ROOT/etc/apt/sources.list
|
||||
RUN echo "deb http://archive.debian.org/debian/ stretch-proposed-updates main contrib non-free" >> $APT_ROOT/etc/apt/sources.list
|
||||
RUN echo "deb http://archive.debian.org/debian-security stretch/updates main contrib non-free" >> $APT_ROOT/etc/apt/sources.list
|
||||
|
||||
RUN touch $APT_ROOT/var/lib/dpkg/status
|
||||
|
||||
RUN ln -s /etc/apt/trusted.gpg.d $APT_ROOT/etc/apt/
|
||||
RUN ln -s /etc/apt/preferences.d $APT_ROOT/etc/apt/
|
||||
RUN ln -s /etc/apt/auth.conf.d $APT_ROOT/etc/apt/
|
||||
|
||||
# needed for download
|
||||
RUN dpkg --add-architecture armhf
|
||||
# needed for install
|
||||
RUN dpkg --root=$APT_ROOT --add-architecture armhf
|
||||
|
||||
RUN apt -o Dir=$APT_ROOT update
|
||||
|
||||
RUN apt -o Dir=$APT_ROOT download libsystemd-dev:armhf \
|
||||
libsystemd0:armhf \
|
||||
libc6:armhf \
|
||||
libgcrypt20:armhf \
|
||||
liblz4-1:armhf \
|
||||
liblzma5:armhf \
|
||||
libselinux1:armhf \
|
||||
libpcre3:armhf \
|
||||
libgpg-error0:armhf
|
||||
|
||||
############
|
||||
# Now we have all packaged, let's unpack them.
|
||||
|
||||
# Install all packages into /opt/cross-pi-gcc/arm-linux-gnueabihf
|
||||
# Could use `dpkg --root=$APT_ROOT --force-all -i` in below, but extract works without any warnings.
|
||||
RUN for file in *; do dpkg -x $file /opt/cross-pi-gcc/arm-linux-gnueabihf; done
|
||||
|
||||
# the above will ge installed in /opt/cross-pi-gcc/arm-linux-gnueabihf/lib/arm-linux-gnueabihf,
|
||||
# and we need them in /opt/cross-pi-gcc/arm-linux-gnueabihf/lib/, so make come links.
|
||||
WORKDIR /opt/cross-pi-gcc/arm-linux-gnueabihf/lib
|
||||
RUN for file in ./arm-linux-gnueabihf/*; do ln -s $file ./`basename $file` 2> /dev/null; done; exit 0
|
||||
|
||||
# liblz4.so.1 is installed in a different directory, so link that as well.
|
||||
RUN ln -s /opt/cross-pi-gcc/arm-linux-gnueabihf/usr/lib/arm-linux-gnueabihf/liblz4.so.1 /opt/cross-pi-gcc/arm-linux-gnueabihf/lib/liblz4.so.1
|
||||
|
||||
|
||||
ENV C_INCLUDE_PATH=/opt/cross-pi-gcc/arm-linux-gnueabihf/usr/include
|
||||
|
||||
ENV PATH=$PATH:/opt/cross-pi-gcc/bin:/opt/cross-pi-gcc/libexec/gcc/arm-linux-gnueabihf/6.3.0/
|
||||
|
||||
RUN mkdir /build
|
||||
WORKDIR /build
|
||||
|
||||
# Add a user called `build` uid 1001 & gid 10000
|
||||
# You chould change RB_UID & RB_GID to what works on your build setup
|
||||
ENV RB_USER=build
|
||||
ENV RB_UID=1001
|
||||
ENV RB_GID=1000
|
||||
RUN groupadd -g $RB_GID $RB_USER 2> /dev/null; exit 0
|
||||
RUN useradd $RB_USER -u $RB_UID -g $RB_GID -m -s /bin/bash
|
||||
RUN echo "$RB_USER ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||
|
||||
USER $RB_USER
|
||||
|
|
@ -127,7 +127,7 @@ NEED TO FIX FOR THIS RELEASE.
|
|||
* Update Mongoose
|
||||
-->
|
||||
# Updates in 2.6.8 (Dev)
|
||||
* Fixed some UI bugs
|
||||
* Fixed some UI bugs, added download config option
|
||||
* Heatpump / chiller updates
|
||||
|
||||
# Updates in 2.6.7 (May 23 2025)
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1028,7 +1028,7 @@ void mqtt_broadcast_aqualinkstate(struct mg_connection *nc)
|
|||
}
|
||||
|
||||
|
||||
typedef enum {uActioned, uBad, uDevices, uStatus, uHomebridge, uDynamicconf, uDebugStatus, uDebugDownload, uSimulator, uSchedules, uSetSchedules, uAQmanager, uLogDownload, uNotAvailable, uConfig, uSaveConfig} uriAtype;
|
||||
typedef enum {uActioned, uBad, uDevices, uStatus, uHomebridge, uDynamicconf, uDebugStatus, uDebugDownload, uSimulator, uSchedules, uSetSchedules, uAQmanager, uLogDownload, uNotAvailable, uConfig, uSaveConfig, uConfigDownload} uriAtype;
|
||||
//typedef enum {NET_MQTT=0, NET_API, NET_WS, DZ_MQTT} netRequest;
|
||||
const char actionName[][5] = {"MQTT", "API", "WS", "DZ"};
|
||||
|
||||
|
@ -1117,6 +1117,8 @@ uriAtype action_URI(request_source from, const char *URI, int uri_length, float
|
|||
return uSetSchedules;
|
||||
} else if (strncmp(ri1, "schedules", 9) == 0) {
|
||||
return uSchedules;
|
||||
} else if (strncmp(ri1, "config/download", 10) == 0) {
|
||||
return uConfigDownload;
|
||||
} else if (strncmp(ri1, "config/set", 10) == 0) {
|
||||
return uSaveConfig;
|
||||
} else if (strncmp(ri1, "config", 6) == 0) {
|
||||
|
@ -1173,14 +1175,8 @@ uriAtype action_URI(request_source from, const char *URI, int uri_length, float
|
|||
}
|
||||
return uAQmanager; // Want to resent updated status
|
||||
} else if (strncmp(ri1, "logfile", 7) == 0) {
|
||||
/*
|
||||
if (ri2 != NULL && strncmp(ri2, "start", 5) == 0) {
|
||||
startInlineLog2File();
|
||||
} else if (ri2 != NULL && strncmp(ri2, "stop", 4) == 0) {
|
||||
stopInlineLog2File();
|
||||
} else if (ri2 != NULL && strncmp(ri2, "clean", 5) == 0) {
|
||||
cleanInlineLog2File();
|
||||
} else*/ if (ri2 != NULL && strncmp(ri2, "download", 8) == 0) {
|
||||
if (ri2 != NULL && strncmp(ri2, "download", 8) == 0) {
|
||||
LOG(NET_LOG,LOG_INFO, "Received download log request!\n");
|
||||
return uLogDownload;
|
||||
}
|
||||
return uAQmanager; // Want to resent updated status
|
||||
|
@ -1791,6 +1787,11 @@ void action_web_request(struct mg_connection *nc, struct http_message *http_msg)
|
|||
remove("/dev/shm/aqualinkd.log");
|
||||
}
|
||||
break;
|
||||
|
||||
case uConfigDownload:
|
||||
LOG(NET_LOG, LOG_DEBUG, "Downloading config\n");
|
||||
mg_http_serve_file(nc, http_msg, _aqconfig_.config_file, mg_mk_str("text/plain"), mg_mk_str("Content-Disposition: attachment; filename=\"aqualinkd.conf\""));
|
||||
break;
|
||||
#endif
|
||||
case uBad:
|
||||
default:
|
||||
|
|
|
@ -351,6 +351,9 @@
|
|||
_addedBlankLightProgram = false;
|
||||
_addedBlankSensor = false;
|
||||
_addedBlankVirtualButton = false;
|
||||
|
||||
//var _cfgRestartAlertShown = false;
|
||||
let _AlertsShown = {};
|
||||
|
||||
var _config = {};
|
||||
|
||||
|
@ -496,7 +499,7 @@
|
|||
}
|
||||
send_command(msg);
|
||||
}
|
||||
function setlogfile(caller) {
|
||||
function requestFileDownload(caller) {
|
||||
var msg = {};
|
||||
/*
|
||||
if (caller.id == "logfile") {
|
||||
|
@ -517,22 +520,24 @@
|
|||
};
|
||||
} else*/
|
||||
if (caller.id == "downloadlog") {
|
||||
|
||||
//window.location = '/api/debug/download';
|
||||
downloadFile('/api/logfile/download', document.getElementById("logsize").value);
|
||||
return;
|
||||
downloadFile('/api/logfile/download', "aqualinkd.log", document.getElementById("logsize").value);
|
||||
return;
|
||||
} else if ( caller.id == "downloadconfig") {
|
||||
downloadFile('/api/config/download', "aqualinkd.conf");
|
||||
return;
|
||||
}
|
||||
|
||||
send_command(msg);
|
||||
}
|
||||
|
||||
function downloadFile(filePath, lines) {
|
||||
function downloadFile(filePath, fname, lines=0) {
|
||||
//console.log("Lines=" + lines);
|
||||
|
||||
var link = document.createElement('a');
|
||||
link.href = filePath + "/" + lines;
|
||||
//link.download = filePath.substr(filePath.lastIndexOf('/') + 1);
|
||||
link.download = "aqualinkd.log"
|
||||
link.download = fname
|
||||
link.click();
|
||||
// Can't get a form post to cleanly download, and "a download" above can only do get. So add value
|
||||
/*
|
||||
|
@ -1351,12 +1356,17 @@
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function cfgAlertForceRestart(event) {
|
||||
console.log("Caught event");
|
||||
var key = event.srcElement.getAttribute('key');
|
||||
var value = event.srcElement.value;
|
||||
|
||||
alert("If you change "+key+" You will need to restart AqualinkD after saving config!");
|
||||
console.log( _AlertsShown[key]);
|
||||
if ( _AlertsShown[key] == undefined || _AlertsShown[key] == false) {
|
||||
_AlertsShown[key] = true;
|
||||
alert("If you change "+key+" You will need to restart AqualinkD after saving config!");
|
||||
}
|
||||
}
|
||||
|
||||
function cfgValueChanged(event) {
|
||||
|
@ -1650,7 +1660,7 @@
|
|||
}, 5000);
|
||||
}
|
||||
} catch (exception) {
|
||||
alert('<p>Error' + exception);
|
||||
//alert('<p>Error' + exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1873,14 +1883,14 @@
|
|||
<div class="content" id="logfile">
|
||||
<!--
|
||||
<label class="toggle logtoggle"><input class="toggle-checkbox" type="checkbox" id="logfile"
|
||||
onclick="setlogfile(this);">
|
||||
onclick="requestFileDownload(this);">
|
||||
<div class="toggle-switch"></div><span class="toggle-label">Log to file</span>
|
||||
</label>
|
||||
-->
|
||||
<table border='0'>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="downloadlog" type="button" onclick="setlogfile(this);"
|
||||
<input id="downloadlog" type="button" onclick="requestFileDownload(this);"
|
||||
value="Download logfile"></input>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -1925,6 +1935,10 @@
|
|||
<input id="editconfig" type="button" onclick="editconfig(this);"
|
||||
value="edit config"></input>
|
||||
</td>
|
||||
<td align="center">
|
||||
<input id="downloadconfig" type="button" onclick="requestFileDownload(this);""
|
||||
value="download config"></input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue