From 64170743b46d310684982dfe745d65643c08e844 Mon Sep 17 00:00:00 2001 From: Chris Clark Date: Wed, 3 Jul 2024 09:27:50 -0400 Subject: [PATCH] 5.0.2 - Addresses #633 + some styling (#634) --- .github/workflows/lint.yml | 2 +- HISTORY.rst | 7 +++++++ explorer/__init__.py | 2 +- .../0019_alter_databaseconnection_engine.py | 18 +++++++++++++++++ explorer/src/js/pivot-setup.js | 1 + explorer/src/scss/assistant.scss | 9 --------- explorer/src/scss/variables.scss | 10 ++++++++++ explorer/templates/explorer/assistant.html | 6 +++--- explorer/templates/explorer/preview_pane.html | 20 ++++++++++++------- 9 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 explorer/migrations/0019_alter_databaseconnection_engine.py diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4e207c3a..563cb5d9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,4 +14,4 @@ jobs: - run: python -Im pip install --user ruff - name: Run ruff - run: ruff --output-format=github explorer + run: ruff check --output-format=github explorer diff --git a/HISTORY.rst b/HISTORY.rst index 707b362b..33bdf0f8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,11 @@ Change Log This document records all notable changes to `django-sql-explorer `_. This project adheres to `Semantic Versioning `_. +`5.0.2`_ (2024-07-3) +=========================== +* `#633`_: Missing migration +* CSS tweaks to tighten up the Query UI + `5.0.1`_ (2024-06-26) =========================== * `#631`_: Pandas is only required if EXPLORER_USER_UPLOADS_ENABLED is True @@ -477,6 +482,7 @@ Initial Release .. _4.3.0: https://github.com/explorerhq/django-sql-explorer/compare/4.2.0...4.3.0 .. _5.0.0: https://github.com/explorerhq/django-sql-explorer/compare/4.3.0...5.0.0 .. _5.0.1: https://github.com/explorerhq/django-sql-explorer/compare/5.0.0...5.0.1 +.. _5.0.2: https://github.com/explorerhq/django-sql-explorer/compare/5.0.1...5.0.2 .. _#254: https://github.com/explorerhq/django-sql-explorer/pull/254 @@ -580,5 +586,6 @@ Initial Release .. _#618: https://github.com/explorerhq/django-sql-explorer/issues/618 .. _#619: https://github.com/explorerhq/django-sql-explorer/issues/619 .. _#631: https://github.com/explorerhq/django-sql-explorer/issues/631 +.. _#633: https://github.com/explorerhq/django-sql-explorer/issues/633 .. _furo: https://github.com/pradyunsg/furo diff --git a/explorer/__init__.py b/explorer/__init__.py index ef2b108f..a8806366 100644 --- a/explorer/__init__.py +++ b/explorer/__init__.py @@ -1,7 +1,7 @@ __version_info__ = { "major": 5, "minor": 0, - "patch": 1, + "patch": 2, "releaselevel": "final", "serial": 0 } diff --git a/explorer/migrations/0019_alter_databaseconnection_engine.py b/explorer/migrations/0019_alter_databaseconnection_engine.py new file mode 100644 index 00000000..1ca16066 --- /dev/null +++ b/explorer/migrations/0019_alter_databaseconnection_engine.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.5 on 2024-07-03 12:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('explorer', '0018_alter_databaseconnection_host_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='databaseconnection', + name='engine', + field=models.CharField(choices=[('django.db.backends.sqlite3', 'SQLite3'), ('django.db.backends.postgresql', 'PostgreSQL'), ('django.db.backends.mysql', 'MySQL'), ('django.db.backends.oracle', 'Oracle'), ('django.db.backends.mysql', 'MariaDB'), ('django_cockroachdb', 'CockroachDB'), ('django.db.backends.sqlserver', 'SQL Server (mssql-django)')], max_length=255), + ), + ] diff --git a/explorer/src/js/pivot-setup.js b/explorer/src/js/pivot-setup.js index 01bc3ceb..112c9181 100644 --- a/explorer/src/js/pivot-setup.js +++ b/explorer/src/js/pivot-setup.js @@ -21,6 +21,7 @@ export function pivotSetup($) { let csvButton = document.querySelector("#button-excel"); if (csvButton) { csvButton.addEventListener("click", e => { + e.preventDefault(); let table = document.querySelector(".pvtTable"); if (typeof (table) != 'undefined' && table != null) { csvFromTable(table); diff --git a/explorer/src/scss/assistant.scss b/explorer/src/scss/assistant.scss index 70c239ae..fbb2c625 100644 --- a/explorer/src/scss/assistant.scss +++ b/explorer/src/scss/assistant.scss @@ -24,12 +24,3 @@ overflow: hidden; } -#response_block::after { - content: ""; - position: absolute; - top: -20px; - right: 10px; - border-width: 10px; - border-style: solid; - border-color: transparent transparent var(--bs-border-color) transparent; -} diff --git a/explorer/src/scss/variables.scss b/explorer/src/scss/variables.scss index 90301d2a..77bf8838 100644 --- a/explorer/src/scss/variables.scss +++ b/explorer/src/scss/variables.scss @@ -17,3 +17,13 @@ $font-size-base: .8rem; --bs-btn-color: white !important; } +$card-border-radius: 0; +$card-spacer-x: 0; +.card-header { + padding-left: 1rem !important; + padding-right: 1rem !important; +} + +.card { + border-top: 0 !important; +} diff --git a/explorer/templates/explorer/assistant.html b/explorer/templates/explorer/assistant.html index e5b61ee2..2d298939 100644 --- a/explorer/templates/explorer/assistant.html +++ b/explorer/templates/explorer/assistant.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
-
+
- Hit "Ask Assistant" to try and fix the issue. The assistant is automatically aware of error messages & context. + "Ask Assistant" to try and automatically fix the issue. The assistant is already aware of error messages & context.
diff --git a/explorer/templates/explorer/preview_pane.html b/explorer/templates/explorer/preview_pane.html index b093793d..1dcadbfa 100644 --- a/explorer/templates/explorer/preview_pane.html +++ b/explorer/templates/explorer/preview_pane.html @@ -1,9 +1,9 @@ {% load i18n %} {% if headers %} -
+