Skip to content

Commit

Permalink
Merge pull request #565 from GhostManager/hotfix/holiday-fixes
Browse files Browse the repository at this point in the history
Minor Fixed for v4.3.10
  • Loading branch information
chrismaddalena authored Jan 4, 2025
2 parents 7a60108 + c900b96 commit f50189a
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 5 deletions.
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

0 comments on commit f50189a

Please sign in to comment.