From 053fd7f8cca7e059b5d6036c0dbc6144d82822c3 Mon Sep 17 00:00:00 2001 From: Vivian Rook Date: Thu, 17 Nov 2022 11:35:24 -0500 Subject: [PATCH 1/2] Add default title entry Bug: T197029 --- quarry/web/query.py | 1 + quarry/web/static/js/query/view.js | 4 ++-- quarry/web/templates/query/list.html | 2 +- quarry/web/templates/query/view.html | 8 ++------ quarry/web/templates/user.html | 6 +++--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/quarry/web/query.py b/quarry/web/query.py index c77e184..d67997d 100644 --- a/quarry/web/query.py +++ b/quarry/web/query.py @@ -31,6 +31,7 @@ def new_query(): return redirect("/login?next=/query/new") query = Query() query.user = get_user() + query.title = "Untitled query" g.conn.session.add(query) g.conn.session.commit() return redirect(url_for("query.query_show", query_id=query.id)) diff --git a/quarry/web/static/js/query/view.js b/quarry/web/static/js/query/view.js index 5bf7891..ed2056b 100644 --- a/quarry/web/static/js/query/view.js +++ b/quarry/web/static/js/query/view.js @@ -130,7 +130,7 @@ $( function () { query_id: vars.query_id, title: title } ).done( function ( /* data */ ) { - document.title = ( title || 'Untitled query #' + vars.query_id ) + ' - Quarry'; + document.title = title + ' - Quarry'; } ); } ); } @@ -247,7 +247,7 @@ $( function () { ); if ( !silent && vars.preferences.use_notifications ) { - let title = $( '#title' ).val() ? '"' + $( '#title' ).val() + '"' : 'Untitled query #' + vars.query_id; + let title = '"' + $( '#title' ).val() + '"'; sendNotification( title + ' execution has been completed' ); } diff --git a/quarry/web/templates/query/list.html b/quarry/web/templates/query/list.html index 41f7762..dd83f94 100644 --- a/quarry/web/templates/query/list.html +++ b/quarry/web/templates/query/list.html @@ -26,7 +26,7 @@ {% for query in queries %} - {% if query.title %}{{query.title}}{% else %}Untitled query #{{query.id}}{% endif %} + {{query.title}} {{query.user.username}} {{query.latest_rev.latest_run.status_message}} {{query.latest_rev.latest_run.timestamp|timesince}} diff --git a/quarry/web/templates/query/view.html b/quarry/web/templates/query/view.html index bacff72..7a7f60e 100644 --- a/quarry/web/templates/query/view.html +++ b/quarry/web/templates/query/view.html @@ -16,7 +16,7 @@ {% endblock %} {% block title %} -{% if query.title %}{{query.title}}{% else %}Untitled query #{{ query.id }}{% endif %} - Quarry +{{query.title}} - Quarry {% endblock %} {% block content %}
@@ -24,7 +24,7 @@
-

+

@@ -50,11 +50,7 @@

{% for query in published_queries %}
  • - {% if query.title %}{{query.title}}{% else %}Untitled query #{{query.id}}{% endif %} + {{query.title}} {{query.last_touched|timesince}}
  • {% else %} @@ -37,7 +37,7 @@

    Starred Queries

      {% for star in stars %}
    • - {% if star.query.title %}{{star.query.title}}{% else %}Untitled query #{{star.query.id}}{% endif %} + {{star.query.title}}
    • {% else %} This user has not starred any queries yet. @@ -51,7 +51,7 @@

      Draft Queries

        {% for query in draft_queries %}
      • - {% if query.title %}{{query.title}}{% else %}Untitled query #{{query.id}}{% endif %} + {{query.title}} {{query.last_touched|timesince}}
      • {% else %} From 3b3a1d525ca0d170e717211dc67f6cb030b5afd7 Mon Sep 17 00:00:00 2001 From: Github Action Date: Mon, 2 Sep 2024 09:45:47 +0000 Subject: [PATCH 2/2] auto update of tag --- helm-quarry/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-quarry/values.yaml b/helm-quarry/values.yaml index 3a63217..37f13ed 100644 --- a/helm-quarry/values.yaml +++ b/helm-quarry/values.yaml @@ -1,7 +1,7 @@ web: repository: 'quay.io/wikimedia-quarry/quarry' - tag: pr-68 # web tag managed by github actions + tag: pr-13 # web tag managed by github actions worker: repository: 'quay.io/wikimedia-quarry/quarry' - tag: pr-68 # worker tag managed by github actions + tag: pr-13 # worker tag managed by github actions