Esempio n. 1
0
 def create_new_process(self,
                        lob,
                        group,
                        process_name,
                        process_desc,
                        created_date=datetime.datetime.utcnow()):
     process = Process(lob=lob,
                       group=group,
                       process_name=process_name,
                       process_desc=process_desc,
                       created_date=created_date)
     process.save_to_db()
Esempio n. 2
0
File: app.py Progetto: kfnawaz/iahub
def create_new_process():
    if request.method == 'GET':
        return render_template('new_process.html', email=session['email'])
    else:
        lob =  request.form['lob']
        group = request.form['group']
        process_name = request.form['process_name']
        process_desc = request.form['process_desc']
        created_by   = session['email']
        created_date = datetime.datetime.utcnow()
        updated_by   = None
        updated_date = None


        new_process = Process(lob, group, process_name, process_desc, )
        new_process.insert()
        return make_response(process_listing())
Esempio n. 3
0
File: app.py Progetto: kfnawaz/iahub
def process_listing(user_id=None):
    if user_id is not None:
        user =  User.get_by_user_id(user_id)
    else:
        user =  User.get_by_email(session['email'])

    processes = Process.get_all()

    return render_template("processes.html", processes=processes, email=user.email)
Esempio n. 4
0
File: app.py Progetto: kfnawaz/iahub
def edit_process(process_id):
    process = Process.get_by_id(process_id)

    if request.method == 'POST':
        process.process_desc = request.form['process_desc']
        print("request.form['process_desc']: "+request.form['process_desc'])
        print("process.process_desc: "+process.process_desc)
        process.update()
        return make_response(process_listing())

    return render_template('edit_process.html', process=process, email=session['email'])
Esempio n. 5
0
File: app.py Progetto: kfnawaz/iahub
def create_new_automation(process_id):

    process = Process.get_by_id(process_id)

    if request.method == 'GET':
        return render_template('new_automation.html', process=process, email=session['email'])
    else:
        #automation_tag, automation_name, automation_desc, platform, golive_dt, status, retirement_dt, last_certified_dt
        automation_tag =  request.form['automation_tag']
        automation_name = request.form['automation_name']
        automation_desc = request.form['automation_desc']
        platform = request.form['platform']
        golive_dt = request.form['golive_dt']
        status = request.form['status']
        retirement_dt = request.form['retirement_dt']
        last_certified_dt = request.form['last_certified_dt']

        new_automation = Automation(process_id, automation_tag, automation_name, automation_desc, platform, golive_dt, status, retirement_dt, last_certified_dt)
        new_automation.insert()
        return make_response(process_automations(process_id))
Esempio n. 6
0
File: app.py Progetto: kfnawaz/iahub
def process_automations(process_id):
    process = Process.get_by_id(process_id)
    automations = process.get_automations()
    return render_template('automations.html', email=session['email'], automations=automations, process_name=process.process_name, process_id=process._id)
Esempio n. 7
0
File: app.py Progetto: kfnawaz/iahub
def delete_process(process_id):
    process = Process.get_by_id(process_id)
    process.remove_from_db()
    return make_response(process_listing())
Esempio n. 8
0
 def get_all_processes():
     return Process.get_all()