-
Notifications
You must be signed in to change notification settings - Fork 1
/
view.html.erb
32 lines (29 loc) · 1.24 KB
/
view.html.erb
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
<%-
# generate form id, based on host and port
form_tb = Digest::SHA1.hexdigest("--" + host.to_s + "--" + app_port.to_s + "--")
form_tf = Digest::SHA1.hexdigest("--" + host.to_s + "--" + port.to_s + "--")
test_location = Dir.pwd
#list_env = ENV.values
#list_env = ENV.keys
#file_location = ENV["HOME"]
#tb_info = File.read(ENV["HOME"] + "/.ood_tensorboard" + "." + host.to_s + "." + port.to_s).split
#spark_info = File.read(ENV["HOME"] + "/.ood_spark" + "." + host.to_s + "." + port.to_s).split
-%>
<div>
<div style="display:inline-block; width:45%;text-align:left;">
<form id="<%= form_tf %>" action="/node/<%= host %>/<%= port %>/login" method="post" target="_blank">
<input type="hidden" name="password" value="<%= password %>">
<button class="btn btn-primary" type="submit">
<i class="fa fa-eye"></i> Connect to Jupyter
</button>
</form>
</div>
<div style="display:inline-block; width:45%;text-align:right;">
<form id="<%= form_tb %>" action="/rnode/<%= host %>/<%= tb_port %>/auth" method="post" target="_blank" <%= show_tb %>>
<input type="hidden" name="password" value="<%= password %>">
<button class="btn btn-primary" type="submit">
<i class="fa fa-eye"></i> Connect to Tensorboard
</button>
</form>
</div>
</div>