Beispiel #1
0
from flask import Blueprint, render_template, redirect

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

ARCHIVE_DASHBOARDS = [
    Dashboard('Violations', 'violations', 116),
    Dashboard('Permits and Inspections',
              'tl-investigations-permits-and-inspections', 167),
    Dashboard('TL Investigation - Cases', 'tl-investigations-cases', 173),
    Dashboard('Service Requests (Hansen)', 'service-requests-hansen', 158)
]

bp = Blueprint('archive', __name__)


@bp.route('/archive/<dashboard_url>')
@auth.login_required
def archive(dashboard_url):
    global ARCHIVE_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url,
                                                     ARCHIVE_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #2
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

TRADE_LICENSING_DASHBOARDS = [
    Dashboard('Trade Licensing Active Jobs', 'active-jobs', 69),
    Dashboard('Trade Licensing Active Processes', 'active-processes', 71),
    Dashboard('Expiring Trade Licensing', 'expiring-licenses', 74),
    Dashboard('Expired Trade Licenses With Permits', 'expired-tl-with-permits',
              206),
    Dashboard('Trade Licensing Incomplete Processes', 'incomplete-processes',
              75),
    Dashboard('Trade Licensing Jobs By Submission Mode', 'submission-mode',
              84),
    Dashboard('Trade Licensing Revenue', 'revenue', 43),
    Dashboard('Trade Licensing SLA', 'sla', 79),
    Dashboard('Trade Licensing Issued', 'issued', 35)
]

bp = Blueprint('trade_licensing', __name__)


@bp.route('/tl/<dashboard_url>')
@auth.login_required
def trade_licensing(dashboard_url):
    global TRADE_LICENSING_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(
        dashboard_url, TRADE_LICENSING_DASHBOARDS)
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


TL_INVESTIGATION_DASHBOARDS = [
    Dashboard('Permits and Inspections', 'permits-and-inspections', 167),
    Dashboard('TL Investigation - Cases', 'cases', 173)
]

bp = Blueprint('tl_investigation', __name__)

@bp.route('/tl/investigations/<dashboard_url>')
@auth.login_required
def cases_violations(dashboard_url):
    global TL_INVESTIGATION_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, TL_INVESTIGATION_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #4
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

PERMITS_DASHBOARDS = [
    Dashboard('Permit Volumes and Revenues', 'volume-and-revenues', 39),
    Dashboard('Permit Trends', 'trends', 78),
    Dashboard('Permits: OTC vs Reviewed', 'otc-vs-reviewed', 40),
    Dashboard('Accelerated Review Permits', 'accelerated-review', 41)
]

bp = Blueprint('permits', __name__)


@bp.route('/permits/<dashboard_url>')
@auth.login_required
def permits(dashboard_url):
    global PERMITS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url,
                                                     PERMITS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


APPEALS_DASHBOARDS = [
    Dashboard('Appeal Fee Revenue', 'appeal-fee-revenue', 202)

]

bp = Blueprint('appeals', __name__)

@bp.route('/appeals/<dashboard_url>')
@auth.login_required
def appeals(dashboard_url):
    global APPEALS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, APPEALS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #6
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

CASE_INVESTIGATIONS_DASHBOARDS = [
    Dashboard('Completed', 'completed', 196),
    Dashboard('Incomplete', 'incomplete', 197)
]

bp = Blueprint('case_inspections', __name__)


@bp.route('/compliance-enforcement/case-investigations/<dashboard_url>')
@auth.login_required
def case_inspections(dashboard_url):
    global CASE_INVESTIGATIONS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(
        dashboard_url, CASE_INVESTIGATIONS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #7
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

BUSINESS_LICENSING_DASHBOARDS = [
    Dashboard('Business Licensing Active Jobs', 'active-jobs', 33),
    Dashboard('Business Licensing Active Processes', 'active-processes', 45),
    Dashboard('Expiring Business Licensing', 'expiring-licenses', 47),
    Dashboard('Business Licensing Incomplete Processes',
              'incomplete-processes', 50),
    Dashboard('Business Licensing Complete Processes', 'complete-processes',
              208),
    Dashboard('Business Licensing Jobs By Submission Mode', 'submission-mode',
              83),
    Dashboard('Business Licensing Overdue Inspections', 'overdue-inspections',
              48),
    Dashboard('Business Licensing Revenue', 'revenue', 37),
    Dashboard('Business Licensing SLA', 'sla', 51),
    Dashboard(
        'Business Licensing Uninspected with Completed Completeness Checks',
        'uninspected-with-completed-completeness-checks', 70),
    Dashboard('Business Licensing Issued', 'issued', 34),
    Dashboard('Business Licensing Dumpster Medallion Lookup',
              'dumpster-medallions', 164),
]

bp = Blueprint('business_licensing', __name__)


@bp.route('/bl/<dashboard_url>')
Beispiel #8
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

PERMIT_INSPECTIONS_DASHBOARDS = [Dashboard('Outstanding', 'outstanding', 178)]

bp = Blueprint('permit_inspections', __name__)


@bp.route('/permits/permit-inspections/<dashboard_url>')
@auth.login_required
def permit_inspections(dashboard_url):
    global PERMIT_INSPECTIONS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(
        dashboard_url, PERMIT_INSPECTIONS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

IMM_DANG_DASHBOARDS = [
    Dashboard('Open Cases', 'open-cases', 153),
    Dashboard('Historical Violations', 'historical-violations', 190)
]

bp = Blueprint('imminently_dangerous', __name__)


@bp.route('/compliance-enforcement/imminently-dangerous/<dashboard_url>')
@auth.login_required
def imm_dang(dashboard_url):
    global IMM_DANG_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url,
                                                     IMM_DANG_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #10
0
from flask import Blueprint, render_template, redirect

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

MISC_DASHBOARDS = [
    Dashboard('Individual Workloads', 'individual-workloads', 180),
    Dashboard('Expiring Licenses with Tax Issues',
              'expiring-licenses-with-tax-issues', 72),
    Dashboard('Public Demos', 'public-demos', 76),
    Dashboard('Service Requests', 'service-requests', 158),
    Dashboard('Uninspected Service Requests', 'uninspected-service-requests',
              77),
    Dashboard('Inspections Completed in Future',
              'completed-inspections-future', 162),
    Dashboard('Notices', 'notices', 179)
]

bp = Blueprint('misc', __name__)


@bp.route('/misc/<dashboard_url>')
@auth.login_required
def misc(dashboard_url):
    global MISC_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url,
                                                     MISC_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)
Beispiel #11
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


CASES_DASHBOARDS = [
    Dashboard('All Recent', 'all-recent', 152),
    Dashboard('Old Unresolved', 'old-unresolved', 177)
]

bp = Blueprint('cases', __name__)

@bp.route('/cases-violations/cases/<dashboard_url>')
@auth.login_required
def cases_violations(dashboard_url):
    global CASES_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, CASES_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

TL_INVESTIGATION_DASHBOARDS = [
    Dashboard('Permits and Inspections', 'permits-and-inspections', 188),
    Dashboard('Cases', 'cases', 193)
]

bp = Blueprint('tl_investigation', __name__)


@bp.route('/tl/investigations/<dashboard_url>')
@auth.login_required
def cases_violations(dashboard_url):
    global TL_INVESTIGATION_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(
        dashboard_url, TL_INVESTIGATION_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #13
0
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


TRADE_LICENSES_DASHBOARDS = [
    Dashboard('Trade Licenses Active Jobs', 'active-jobs', 69),
    Dashboard('Trade Licenses Active Processes', 'active-processes', 71),
    Dashboard('Expiring Trade Licenses', 'expiring-licenses', 74),
    Dashboard('Trade Licenses Incomplete Processes', 'incomplete-processes', 75),
    Dashboard('Trade Licenses Jobs By Submission Mode', 'submission-mode', 84),
    Dashboard('Trade Licenses Revenue', 'revenue', 43),
    Dashboard('Trade Licenses SLA', 'sla', 79),
    Dashboard('Trade Licenses Issued', 'issued', 35)
]

bp = Blueprint('trade_licenses', __name__)

@bp.route('/tl/<dashboard_url>')
@auth.login_required
def trade_licenses(dashboard_url):
    global TRADE_LICENSES_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, TRADE_LICENSES_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


CASE_INSPECTIONS_DASHBOARDS = [
    Dashboard('Completed', 'completed', 150),
    Dashboard('Outstanding', 'outstanding', 115)
]

bp = Blueprint('case_inspections', __name__)

@bp.route('/cases-violations/case-inspections/<dashboard_url>')
@auth.login_required
def cases_violations(dashboard_url):
    global CASE_INSPECTIONS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, CASE_INSPECTIONS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
from flask import Blueprint, render_template, redirect

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

CASES_VIOLATIONS_DASHBOARDS = [
    Dashboard('Violations', 'violations', 116),
    Dashboard('Case Contacts', 'case-contacts', 174)
]

bp = Blueprint('violations', __name__)


@bp.route('/cases-violations/<dashboard_url>')
@auth.login_required
def cases_violations(dashboard_url):
    global CASES_VIOLATIONS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(
        dashboard_url, CASES_VIOLATIONS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')


#Redirect old versions of URLs to new versions
@bp.route('/cases-violations/completed-case-inspections')
from flask import Blueprint, render_template

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


PERMITS_DASHBOARDS = [
    Dashboard('Permit Volumes and Revenues', 'volume-and-revenues', 189),
    Dashboard('Permit Inspection', 'permit-inspections', 200),
    Dashboard('Permits', 'permits', 201)
]

bp = Blueprint('permits', __name__)

@bp.route('/permits/<dashboard_url>')
@auth.login_required
def permits(dashboard_url):
    global PERMITS_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, PERMITS_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #17
0
from flask import Blueprint, render_template, redirect

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth

COMPLIANCE_ENFORCEMENT_DASHBOARDS = [
    Dashboard('Complaints', 'complaints', 192),
    Dashboard('Violations', 'violations', 185)
]

bp = Blueprint('violations', __name__)


@bp.route('/compliance-enforcement/<dashboard_url>')
@auth.login_required
def compliance_enforcement(dashboard_url):
    global COMPLIANCE_ENFORCEMENT_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(
        dashboard_url, COMPLIANCE_ENFORCEMENT_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)


@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')
Beispiel #18
0
from flask import Blueprint, render_template, redirect

from li_metabase.utils import Dashboard, build_iframe_url_from_dashboard_url, DashboardNotFound
from li_metabase.auth import auth


CASES_DASHBOARDS = [
    Dashboard('All Eclipse', 'all-eclipse', 194),
    Dashboard('Open', 'open', 195)
]

bp = Blueprint('cases', __name__)

@bp.route('/compliance-enforcement/cases/<dashboard_url>')
@auth.login_required
def cases(dashboard_url):
    global CASES_DASHBOARDS

    iframe_url = build_iframe_url_from_dashboard_url(dashboard_url, CASES_DASHBOARDS)

    return render_template('dashboard.html', iframe_url=iframe_url)

@bp.errorhandler(DashboardNotFound)
def handle_error(error):
    return render_template('error.html')

#Redirect old versions of URLs to new versions
@bp.route('/compliance-enforcement/cases/all-recent')
@auth.login_required
def cases_all_eclipse():
    return redirect("/compliance-enforcement/cases/all-eclipse", code=301)