# Copyright (C) The Arvados Authors. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 try: from html import escape except ImportError: from cgi import escape import json from typing import ItemsView class ReportTemplate(object): """Base class for HTML reports produced by Arvados reporting tools. Used by crunchstat-summary and cluster-activity. """ STYLE = ''' ''' def __init__(self, label): self.label = label self.cards = [] def cardlist(self, items): if not isinstance(items, list): items = [items] return "\n".join( """