Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Fixed for v4.3.10 #565

Merged
merged 6 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.3.10] - 3 January 2025

### Added

* Added a `HASURA_GRAPHQL_SERVER_HOSTNAME` for the DotEnv file to allow for setting the Hasura server hostname (Fixes #566)
* This is available for Kubernetes deployments (see issue #566)
* For all other deployments, the Hasura server hostname should be left set to `graphql_engine` by default

### Changed

* The linter now checks if the list styles are of type `PARAGRAPH` in the Word template
* The archived reports page now displays the project name for each report to help with identification
* Updated the pre-built Ghostwriter CLI binaries to v0.2.21

## [4.3.9] - 10 December 2024

### Changed
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v4.3.9
10 December 2024
v4.3.10
3 January 2025
6 changes: 4 additions & 2 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# 3rd Party Libraries
import environ

__version__ = "4.3.9"
__version__ = "4.3.10"
VERSION = __version__
RELEASE_DATE = "10 December 2024"
RELEASE_DATE = "3 January 2025"

ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
APPS_DIR = ROOT_DIR / "ghostwriter"
Expand Down Expand Up @@ -490,6 +490,8 @@
default="changeme",
)

GRAPHQL_HOST = env("HASURA_GRAPHQL_SERVER_HOSTNAME", default="graphql_engine")

# Health Checks
# ------------------------------------------------------------------------------
HEALTH_CHECK = {
Expand Down
Binary file modified ghostwriter-cli-linux
Binary file not shown.
Binary file modified ghostwriter-cli-macos
Binary file not shown.
Binary file modified ghostwriter-cli.exe
Binary file not shown.
9 changes: 8 additions & 1 deletion ghostwriter/modules/health_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Standard Libraries
from datetime import datetime
import os

# 3rd Party Libraries
import requests
Expand Down Expand Up @@ -33,10 +34,16 @@ class HasuraBackend(BaseHealthCheckBackend):

critical_service = True

@property
def graphql_host(self):
"""Retrieve the GraphQL host from the environment variable or use the default."""

return os.getenv("GRAPHQL_HOST", "graphql_engine")

def check_status(self):
"""Check the status of the backend service."""
try:
response = requests.get("http://graphql_engine:8080/healthz")
response = requests.get(f"http://{self.graphql_host}:8080/healthz")
if response.ok:
content = response.text
if "OK" in content:
Expand Down
9 changes: 9 additions & 0 deletions ghostwriter/modules/reportwriter/base/docx.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ def lint(cls, template_loc: str, p_style: str | None) -> Tuple[List[str], List[s
if style == "CodeBlock":
if document_styles[style].type != WD_STYLE_TYPE.PARAGRAPH:
warnings.append("CodeBlock style is not a paragraph style (see documentation)")
if style == "Bullet List":
if document_styles[style].type != WD_STYLE_TYPE.PARAGRAPH:
warnings.append("Bullet List style is not a paragraph style (see documentation)")
if style == "Number List":
if document_styles[style].type != WD_STYLE_TYPE.PARAGRAPH:
warnings.append("Number List style is not a paragraph style (see documentation)")
if style == "List Paragraph":
if document_styles[style].type != WD_STYLE_TYPE.PARAGRAPH:
warnings.append("List Paragraph style is not a paragraph style (see documentation)")
if "Table Grid" not in document_styles:
errors.append("Template is missing a required style (see documentation): Table Grid")
if p_style and p_style not in document_styles:
Expand Down
2 changes: 2 additions & 0 deletions ghostwriter/reporting/templates/reporting/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
<table class="roundedCorners table table-sm table-hover">
<tr>
<th>Client</th>
<th>Project</th>
<th>Zip Archive</th>
</tr>
{% for zip in filter.qs %}
<tr>
<td>{{ zip.project.client.name }}</td>
<td>{{ zip.project.start_date }} {{ zip.project.project_type }}</td>
<td><a class="icon download-icon" href="{% url 'reporting:download_archive' zip.pk %}">{{ zip.filename }}</a></td>
</tr>
{% endfor %}
Expand Down
1 change: 1 addition & 0 deletions local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- HASURA_ACTION_SECRET=${HASURA_GRAPHQL_ACTION_SECRET}
- HASURA_GRAPHQL_SERVER_HOSTNAME=${HASURA_GRAPHQL_SERVER_HOSTNAME}
- HEALTHCHECK_DISK_USAGE_MAX=${HEALTHCHECK_DISK_USAGE_MAX}
- HEALTHCHECK_MEM_MIN=${HEALTHCHECK_MEM_MIN}
- POSTGRES_DB=${POSTGRES_DB}
Expand Down
1 change: 1 addition & 0 deletions production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ services:
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- HASURA_ACTION_SECRET=${HASURA_GRAPHQL_ACTION_SECRET}
- HASURA_GRAPHQL_SERVER_HOSTNAME=${HASURA_GRAPHQL_SERVER_HOSTNAME}
- MAILGUN_API_KEY=${DJANGO_MAILGUN_API_KEY}
- MAILGUN_DOMAIN=${DJANGO_MAILGUN_DOMAIN}
- NO_PROXY=graphql_engine
Expand Down
Loading