From 834c6de183d01128724f8f07d3ce65a7341ee32f Mon Sep 17 00:00:00 2001 From: Dennis Kerschus Date: Wed, 14 Jun 2023 11:18:04 +0200 Subject: [PATCH] https://git.kerschus.dk/dennis/FlowAnalyser.git --- FlowAnalyserMain.py | 15 +++++--- __pycache__/FlowAnalyserMain.cpython-311.pyc | Bin 2314 -> 2946 bytes __pycache__/sysjobs.cpython-311.pyc | Bin 13360 -> 13360 bytes sysjobs.py | 2 +- templates/index2.html | 38 ++++++++++++++++++- 5 files changed, 46 insertions(+), 9 deletions(-) diff --git a/FlowAnalyserMain.py b/FlowAnalyserMain.py index 42f6d52..f35ba0e 100644 --- a/FlowAnalyserMain.py +++ b/FlowAnalyserMain.py @@ -32,17 +32,20 @@ def create_app(test_config=None): return FlowTest.test() @FlowAnalyserMain.route('/test') def test(): + html='' return render_template('index.html', test=html) + @FlowAnalyserMain.route('/test2') - def test(): - return render_template('index2.html', test2=data2) + def test2(): + with Session(engine) as session: + sysjobs=(Sysjobs.getNattensKoersel(session)) + data2=json.dumps([str(b) for b in sysjobs]) + + return render_template('index2.html', test2=sysjobs) if __name__ == '__main__': FlowAnalyserMain.run() return FlowAnalyserMain engine=inn.getEngine("msdb") -with Session(engine) as session: - sysjobs=(Sysjobs.getNattensKoersel(session)) - html='' - data2=[b for b in sysjobs] + FlowAnalyserMain=create_app() diff --git a/__pycache__/FlowAnalyserMain.cpython-311.pyc b/__pycache__/FlowAnalyserMain.cpython-311.pyc index c6bc12f23307ef49ab7e57605aab458b6d8d612c..10a42680bdc705fa0ac826ec8f0401648a862244 100644 GIT binary patch delta 1384 zcmZuxPiPZa82{ePyiA%jO`9|oZ7Nx{rBgI(3N@}+X>>(T%Su7$!frQaVy(7moHt9g zB%~_^qx4{XN)=qlsfyjhf|ot&VOhK-B_KOcD2O)?5qF_1d)V(y(ljH!nfJZ#|9s!? zeaYRxtv!QJeLfH1`r*f--tPi{^`i>F4>)@wJg1mpRM6MH_ zm-ddftr2v6;a*&na?<5hpW?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FsmW&F{1|z0UOzg=00YBSwCRvF~E+;8{ytZi~z1I~`uGTxs)iZLP&e+kCWq ztH*$LFff1~jH558^gKH!) F;6GIez@GpB diff --git a/__pycache__/sysjobs.cpython-311.pyc b/__pycache__/sysjobs.cpython-311.pyc index db1897f58b2234076b1c8eb98773ef496261341d..b3dd630eb24d58da6395111c7717af7e4610bf12 100644 GIT binary patch delta 175 zcmdmxu_1$ZIWI340}wBI`#G zl?>q}vwjEha#%k>s1FPbxvZrSC1nsLWgwm(YXyi0qJS#PSSmn*WlWVIK@bJx2~>eN dKoV%8fHNCV8Ib%4be4cC8%V-+^LnvHSpY2SEyw@> delta 173 zcmdmxu_1$ZIWI340}y=n=twEw$U9evk!AC0p=#!OU)BKDuM7-9tWm6AKvV+jM-Y_+ z;U%$t2l295KS8Ju3=BD}B@iX05GAD`o-b=ThzFv8D$7{PL4svW6(B(n1>^}-f;d1D bXrh1<8&DaL{0MZEfD0Q)!e#S%u|`<{-a#!! diff --git a/sysjobs.py b/sysjobs.py index 171b4c0..1efb471 100644 --- a/sysjobs.py +++ b/sysjobs.py @@ -60,7 +60,7 @@ class Sysjobs(Base): def getNattensKoersel(session) -> List['Sysjobs']: natStat=(datetime.today()-timedelta(days=1)).replace(hour=20,minute=0,second=0,microsecond=0) resReturn: List['Sysjobs'] = list() - stmt = Select(Sysjobs,Sysjobhistory).join(DataflowManagement_JobListe).join(Sysjobhistory).where(Sysjobhistory.step_id==0).where(DataflowManagement_JobListe.Aktiv==1).where(or_(and_(Sysjobhistory.run_date>=int((natStat.strftime('%Y%m%d'))),(Sysjobhistory.run_time>=int((natStat.strftime('%H%M%S'))))),Sysjobhistory.run_date>int((datetime.today().strftime('%Y%m%d'))))).distinct() + stmt = Select(Sysjobs,Sysjobhistory).join(DataflowManagement_JobListe).join(Sysjobhistory).where(Sysjobhistory.step_id==0).where(DataflowManagement_JobListe.Aktiv==1).where(or_(and_(Sysjobhistory.run_date>=int((natStat.strftime('%Y%m%d'))),(Sysjobhistory.run_time>=int((natStat.strftime('%H%M%S'))))),Sysjobhistory.run_date>=int((datetime.today().strftime('%Y%m%d'))))).distinct() row : Sysjobs res = session.execute(stmt).all() # resReturn=[x[0] for x in res] diff --git a/templates/index2.html b/templates/index2.html index c8dfbb8..5ba0583 100644 --- a/templates/index2.html +++ b/templates/index2.html @@ -3,12 +3,46 @@ Gantt Chart Example 1 - + View on GitHub - \ No newline at end of file