Esempio n. 1
0
def advanced_product():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        results = ps.draw_line_all_product()
        start_date = '2016-09'
        end_date = '2018-10'
        month_slot = get_months(start_date, end_date)

        for r in results:
            month_slot[r[1]] = r[0]

        init_time = []
        init_value = []

        for m in month_slot.items():
            init_time.append(m[0])
            init_value.append(m[1])

        return render_template('advanced/product.html',
                               email=session['email'],
                               username=username,
                               title="SaleProduct",
                               active_parent="AdvancedAnalysis",
                               active_function="SaleProduct",
                               attributes=ps.get_selector_schema(),
                               init_time=init_time,
                               init_value=str(init_value))
    else:
        return redirect(url_for('login'))
Esempio n. 2
0
def advanced_benford():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('advanced/benford.html',
                               email=session['email'],
                               username=username,
                               title="Benford's Law Verification",
                               active_parent="AdvancedAnalysis",
                               active_function="BenfordLaw")
    else:
        return redirect(url_for('login'))
Esempio n. 3
0
def advanced_delivery():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('advanced/delivery.html',
                               email=session['email'],
                               username=username,
                               title="DeliveryTrend",
                               active_parent="AdvancedAnalysis",
                               active_function="DeliveryTrend")
    else:
        return redirect(url_for('login'))
Esempio n. 4
0
def advanced_location():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('advanced/location.html',
                               email=session['email'],
                               username=username,
                               title="SaleLocation",
                               active_parent="AdvancedAnalysis",
                               active_function="SaleLocation")
    else:
        return redirect(url_for('login'))
Esempio n. 5
0
def index():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('starter.html',
                               email=session['email'],
                               username=username,
                               title="Dashboard",
                               active_parent="Dashboard",
                               active_function="dashboard")
    else:
        return redirect(url_for('login'))
Esempio n. 6
0
def customer(keyword="%"):
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('simple/customer.html',
                               email=session['email'],
                               username=username,
                               title="Customer",
                               active_parent="SimpleSearch",
                               active_function="customer",
                               attributes=cs.get_schema())
    else:
        return redirect(url_for('login'))
Esempio n. 7
0
def advanced_satisfactory():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('advanced/satisfactory.html',
                               email=session['email'],
                               username=username,
                               title="SatisfactoryTrend",
                               active_parent="AdvancedAnalysis",
                               active_function="SatisfactoryTrend",
                               attributes=ps.get_selector_schema())
    else:
        return redirect(url_for('login'))
Esempio n. 8
0
def seller():
    if 'email' in session:
        username = us.get_name_by_email(session['email'])
        return render_template('simple/seller.html',
                               email=session['email'],
                               username=username,
                               title="Seller",
                               active_parent="SimpleSearch",
                               active_function="seller",
                               attributes=ss.get_schema())
    else:
        return redirect(url_for('login'))