Skip to content
Snippets Groups Projects

WS-592: Simple HTML CARTA wrapper for elegant expiration on countdown

Merged Nathan Hertz requested to merge WS-592-serve-carta-html-wrapper into main
1 file
+ 0
21
Compare changes
  • Side-by-side
  • Inline
@@ -15,11 +15,6 @@ from typing import Optional
import pendulum as pendulum
from carta_envoy.connect import ArchiveConnect, NotificationConnect, RedisConnect
from carta_envoy.templates import CartaWrapper
from carta_envoy.utilities import (
CARTA_HTML_FILENAME,
CARTA_TEMPLATE,
CARTA_URL_REPLACE_TEXT,
)
from pendulum import DateTime
# pylint: disable=E0401, R0913, R1721, W0603, W1203
@@ -259,22 +254,6 @@ class CartaLauncher:
else:
self.logger.warning("WARNING: CARTA not running.")
@staticmethod
def create_frame_html(carta_url: str, html_dir: Path) -> Path:
"""
Generate the HTML page containing the CARTA URL in a frame.
:param carta_url: URL of CARTA session
:param html_dir: where HTML will be written
:return: HTML file we just created
"""
new_content = CARTA_TEMPLATE.replace(CARTA_URL_REPLACE_TEXT, carta_url)
html_file = html_dir / CARTA_HTML_FILENAME
html_file.write_text(new_content)
return html_file
@staticmethod
def _calculate_timeout_date(timeout_minutes: int) -> DateTime:
"""
Loading