hi Colton @basepi,
Please find the create app. Please let us know what is causing the UI to show blank.
Appreciate your help here.
[jaaaa@PXXXXXXXKA01 worklist]$ cat app.py
import os
from datetime import timedelta
from flask import request
from werkzeug.exceptions import HTTPException
from flask_jwt_extended import JWTManager
from flask_openapi3 import Info, HTTPBearer, OpenAPI
from jivacore.logger.log import Logger
from worklist.resources.worklist import worklist_routes
from worklist.resources.other_routes import health_routes
from worklist.common import constants
from worklist.security import permissions
from jivacore.db.db import get_scoped_session
from worklist import config, error_handlers
def create_app(flask_config=None, **kwargs):
"""
Instantiation and configure of flask application
Args:
flask_config (str): Flask configuration value
Returns:
OpenAPI: Flask OpenAPI instance
"""
info = Info(title=os.getenv("PROJECT_NAME"), version="1.0.0", description=constants.WORKLIST_DESCRIPTION)
app = OpenAPI(name, info=info, security_schemes={"jwt": HTTPBearer()})
Configuring logger for Worklist Service
logger = Logger(request)
logger.info('Starting worklist Service*')
Load application configuration from the object
config.LoadApplicationConfig(app, flask_config)
Adding permissions to the application
app.permissions = permissions
Adding scoped_session to the application
app.scoped_session = get_scoped_session()
JSON Web Token configuration
jwt = JWTManager(app)
app.config["JWT_IDENTITY_CLAIM"] = "jti"
app.config["JWT_TOKEN_LOCATION"] = ["headers", "cookies"]
app.config["JWT_ACCESS_COOKIE_NAME"] = "aptn"
app.config["JWT_ACCESS_CSRF_HEADER_NAME"] = "X-CSRFT"
app.config["JWT_ACCESS_TOKEN_EXPIRES"] = timedelta(minutes=30)
Register Error Handlers
jwt.unauthorized_loader(error_handlers.missing_token_callback)
app.register_error_handler(HTTPException, error_handlers.http_errors)
app.register_error_handler(Exception, error_handlers.global_errors)
Register blueprints
app.register_api(worklist_routes)
app.register_api(health_routes)
Before and after request handlers
app.before_request(config.before_request_func)
app.after_request(config.after_request_func)
app.teardown_request(config.teardown_request_func)
return app
Thank you