-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
102 lines (82 loc) · 2.31 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
from bokeh.resources import INLINE
from flask import Flask,render_template
from module.PortTrafficVolumeModule import TrafficVolume
from module.PortLabourCapacityModule import LabourCapacity
from module.PortBerthingCapacityModule import BerthingCapacity
app = Flask(__name__)
@app.route('/')
def hello():
return render_template("intro.html")
@app.route('/test1')
def hello1():
return render_template("RealTimeVessl.html")
@app.route('/test2')
def hello2():
return render_template("RealTimeVessl2.html")
@app.route('/test3')
def hello10():
# return render_template("RealTimePort.html")
return render_template("RealTimePort.html")
@app.route('/test4')
def hello11():
return render_template("RealTimePort2.html")
@app.route('/test5')
def hello3():
script, div, df,c1,c2,c3,c4 = BerthingCapacity.test22()
#건드리면 안되는 거1
print(c1)
js_resources = INLINE.render_js()
css_resources = INLINE.render_css()
html = render_template(
'PortBerthingCapacity.html',
script=script,
div=div,
df1 = df,
c1 = c1,
c2 = c2,
c3 = c3,
c4 = c4,
js_resources=js_resources,
css_resources=css_resources
)#
return html
@app.route('/test6')
def hello4():
bar, df,c1,c2,c3,c4 = LabourCapacity.test22()
#건드리면 안되는 거
js_resources = INLINE.render_js()
css_resources = INLINE.render_css()
html = render_template(
'PortLabourCapacity.html',
plot=bar,
df= df,
c1 = c1,
c2 = c2,
c3 = c3,
c4 = c4,
js_resources=js_resources,
css_resources=css_resources
)
return html
@app.route('/test7')
def hello5():
bar,df1 = TrafficVolume.test25()
bar2,df2 = TrafficVolume.test24()
bar3 ,df3 = TrafficVolume.test23()
#건드리면 안되는 거
js_resources = INLINE.render_js()
css_resources = INLINE.render_css()
html = render_template(
"PortTrafficVolume.html",
plot1=bar,
plot2=bar2,
plot3 = bar3,
df1=df1,
df2=df2,
df3=df3,
js_resources=js_resources,
css_resources=css_resources
)
return html
# if __name__ == "__main__":
# app.run(host='0.0.0.0')