From 0b20dc7712200f5de3333089eed6f6d230cf87f9 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 19 Dec 2022 20:30:32 +0100 Subject: [PATCH 1/2] Tidy up list icons a bit (#1250) --- changedetectionio/static/styles/scss/styles.scss | 7 +++++++ changedetectionio/static/styles/styles.css | 5 +++++ changedetectionio/templates/watch-overview.html | 8 ++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/changedetectionio/static/styles/scss/styles.scss b/changedetectionio/static/styles/scss/styles.scss index 69310fa4..01d23be6 100644 --- a/changedetectionio/static/styles/scss/styles.scss +++ b/changedetectionio/static/styles/scss/styles.scss @@ -22,6 +22,13 @@ body { width: 1px; } +// Row icons like chrome, pdf, share, etc +.status-icon { + display: inline-block; + height: 1rem; + vertical-align: middle; +} + .pure-table-even { background: var(--color-background); } diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index 2d5511b4..c1a7c4d1 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -275,6 +275,11 @@ body { white-space: nowrap; width: 1px; } +.status-icon { + display: inline-block; + height: 1rem; + vertical-align: middle; } + .pure-table-even { background: var(--color-background); } diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 10f6645a..77fe7cf5 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -89,10 +89,10 @@ {{watch.title if watch.title is not none and watch.title|length > 0 else watch.url}} - + - {%if watch.get_fetch_backend == "html_webdriver" %}{% endif %} - {%if watch.is_pdf %}{% endif %} + {%if watch.get_fetch_backend == "html_webdriver" %}{% endif %} + {%if watch.is_pdf %}{% endif %} {% if watch.last_error is defined and watch.last_error != False %}
{{ watch.last_error }}
{% endif %} @@ -103,7 +103,7 @@
Embedded price data detected, follow only price data? Yes No
{% endif %} {% if watch['track_ldjson_price_data'] == 'accepted' %} - Price + Price {% endif %} {% if not active_tag %} {{ watch.tag}} From 0790dd555edfdf44e27c3a8402fc8e71edd14af7 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 19 Dec 2022 20:46:02 +0100 Subject: [PATCH 2/2] Docker container updates - use Python 3.10, remove unused packages --- Dockerfile | 21 +++++++-------------- changedetectionio/dev-docker/Dockerfile | 14 -------------- changedetectionio/dev-docker/sleep.py | 7 ------- 3 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 changedetectionio/dev-docker/Dockerfile delete mode 100644 changedetectionio/dev-docker/sleep.py diff --git a/Dockerfile b/Dockerfile index 585324fa..2e38b410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # pip dependencies install stage -FROM python:3.8-slim as builder +FROM python:3.10-slim as builder # See `cryptography` pin comment in requirements.txt ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1 @@ -29,23 +29,16 @@ RUN pip install --target=/dependencies playwright~=1.27.1 \ || echo "WARN: Failed to install Playwright. The application can still run, but the Playwright option will be disabled." # Final image stage -FROM python:3.8-slim +FROM python:3.10-slim -# See `cryptography` pin comment in requirements.txt -ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1 - -# Re #93, #73, excluding rustc (adds another 430Mb~) RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - gcc \ + libssl1.1 \ + libxslt1.1 \ # For pdftohtml poppler-utils \ - libc-dev \ - libffi-dev \ - libjpeg-dev \ - libssl-dev \ - libxslt-dev \ - zlib1g-dev + zlib1g \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + # https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops ENV PYTHONUNBUFFERED=1 diff --git a/changedetectionio/dev-docker/Dockerfile b/changedetectionio/dev-docker/Dockerfile deleted file mode 100644 index f16eac91..00000000 --- a/changedetectionio/dev-docker/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM python:3.8-slim - -# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops -ENV PYTHONUNBUFFERED=1 - -WORKDIR /app - -RUN [ ! -d "/datastore" ] && mkdir /datastore - -COPY sleep.py / -CMD [ "python", "/sleep.py" ] - - - diff --git a/changedetectionio/dev-docker/sleep.py b/changedetectionio/dev-docker/sleep.py deleted file mode 100644 index 27c632b5..00000000 --- a/changedetectionio/dev-docker/sleep.py +++ /dev/null @@ -1,7 +0,0 @@ -import time - -print ("Sleep loop, you should run your script from the console") - -while True: - # Wait for 5 seconds - time.sleep(2)