astronomer/airflow/version_check/update_checks.py
def register(self, app, options, first_registration):
        """
        Re-configure Flask to use our customized layout (that includes the call-home JS)
        Called by Flask when registering the blueprint to the app
        """
        from .models import AstronomerVersionCheck
        if not hasattr(app, 'appbuilder'):
            return

        with create_session() as session:
            engine = session.get_bind(mapper=None, clause=None)
            if not engine.has_table(AstronomerVersionCheck.__tablename__):
                self.log.warn("AstronomerVersionCheck tables are missing (plugin not installed at upgradedb "
                              "time?). No update checks will be performed")
                return

        self.airflow_base_template = app.appbuilder.base_template

        if app.appbuilder.base_template in ["airflow/master.html", "airflow/main.html"]:
            app.appbuilder.base_template = "astro-baselayout.html"
        else:
            self.log.warning("Not replacing appbuilder.base_template, it didn't have the expected value. Update"
                             " available messages will not be visible in UI")
        app.appbuilder.add_api(self.UpdateAvailable)
        self.app_context_processor(self.new_template_vars)

        super().register(app, options, first_registration)

        Re-configure Flask to use our customized layout (that includes the call-home JS)
        Called by Flask when registering the blueprint to the app
        
Re-configure Flask to use our customized layout (that includes the call-home JS)
Called by Flask when registering the blueprint to the app
Re - configure Flask to use our customized layout ( that includes the call - home JS ) Called by Flask when registering the blueprint to the app
def register(self, app, options, first_registration):
        from .models import AstronomerVersionCheck
        if not hasattr(app, 'appbuilder'):
            return
        with create_session() as session:
            engine = session.get_bind(mapper=None, clause=None)
            if not engine.has_table(AstronomerVersionCheck.__tablename__):
                self.log.warn("AstronomerVersionCheck tables are missing (plugin not installed at upgradedb "
                              "time?). No update checks will be performed")
                return
        self.airflow_base_template = app.appbuilder.base_template
        if app.appbuilder.base_template in ["airflow/master.html", "airflow/main.html"]:
            app.appbuilder.base_template = "astro-baselayout.html"
        else:
            self.log.warning("Not replacing appbuilder.base_template, it didn't have the expected value. Update"
                             " available messages will not be visible in UI")
        app.appbuilder.add_api(self.UpdateAvailable)
        self.app_context_processor(self.new_template_vars)
        super().register(app, options, first_registration)
def register ( self , app , options , first_registration ) : from . models import AstronomerVersionCheck if not hasattr ( app , 'appbuilder' ) : return with create_session ( ) as session : engine = session . get_bind ( mapper = None , clause = None ) if not engine . has_table ( AstronomerVersionCheck . __tablename__ ) : self . log . warn ( "AstronomerVersionCheck tables are missing (plugin not installed at upgradedb " "time?). No update checks will be performed" ) return self . airflow_base_template = app . appbuilder . base_template if app . appbuilder . base_template in [ "airflow/master.html" , "airflow/main.html" ] : app . appbuilder . base_template = "astro-baselayout.html" else : self . log . warning ( "Not replacing appbuilder.base_template, it didn't have the expected value. Update" " available messages will not be visible in UI" ) app . appbuilder . add_api ( self . UpdateAvailable ) self . app_context_processor ( self . new_template_vars ) super ( ) . register ( app , options , first_registration )
Re-configure Flask to use our customized layout (that includes the call-home JS)
Called by Flask when registering the blueprint to the app
Re - configure Flask to use our customized layout ( that includes the call - home JS ) Called by Flask when registering the blueprint to the app
"""
        Re-configure Flask to use our customized layout (that includes the call-home JS)
        Called by Flask when registering the blueprint to the app
        """
self
app
options
first_registration