metaflow/plugins/cards/card_modules/basic.py [701:729]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        pt = self._get_mustache()
        data_dict = dict(
            task_data=base64.b64encode(
                json.dumps(final_component_dict).encode("utf-8")
            ).decode("utf-8"),
            javascript=JS_DATA,
            title=task.pathspec,
            css=CSS_DATA,
            card_data_id=uuid.uuid4(),
            RENDER_COMPLETE=not runtime,
        )
        return pt.render(RENDER_TEMPLATE, data_dict)

    def render_runtime(self, task, data):
        return self.render(task, runtime=True)

    def refresh(self, task, data):
        return data["components"]

    def reload_content_token(self, task, data):
        """
        The reload token will change when the component array has changed in the Metaflow card.
        The change in the component array is signified by the change in the component_update_ts.
        """
        if task.finished:
            return "final"
        # `component_update_ts` will never be None. It is set to a default value when the `ComponentStore` is instantiated
        # And it is updated when components added / removed / changed from the `ComponentStore`.
        return "runtime-%s" % (str(data["component_update_ts"]))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



metaflow/plugins/cards/card_modules/basic.py [765:793]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        pt = self._get_mustache()
        data_dict = dict(
            task_data=base64.b64encode(
                json.dumps(final_component_dict).encode("utf-8")
            ).decode("utf-8"),
            javascript=JS_DATA,
            title=task.pathspec,
            css=CSS_DATA,
            card_data_id=uuid.uuid4(),
            RENDER_COMPLETE=not runtime,
        )
        return pt.render(RENDER_TEMPLATE, data_dict)

    def render_runtime(self, task, data):
        return self.render(task, runtime=True)

    def refresh(self, task, data):
        return data["components"]

    def reload_content_token(self, task, data):
        """
        The reload token will change when the component array has changed in the Metaflow card.
        The change in the component array is signified by the change in the component_update_ts.
        """
        if task.finished:
            return "final"
        # `component_update_ts` will never be None. It is set to a default value when the `ComponentStore` is instantiated
        # And it is updated when components added / removed / changed from the `ComponentStore`.
        return "runtime-%s" % (str(data["component_update_ts"]))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



