Skip to content
GitLab
Explore
Sign in
ExaCT
Rosetta
Compare revisions
721536e286befc6f5b4d48008558cccf6920992a to 7c962dfb51644758873b227378ee96285f62c619
Hide whitespace changes
Inline
Side-by-side
services/webapp/code/rosetta/core_app/models.py
View file @
7c962dfb
...
...
@@ -246,14 +246,20 @@ class Computing(models.Model):
managers_mapping
=
{}
managers_mapping
[
'
cluster
'
+
'
ssh+cli
'
+
'
user_keys
'
+
'
slurm
'
]
=
computing_managers
.
SlurmSSHClusterComputingManager
managers_mapping
[
'
standalone
'
+
'
ssh+cli
'
+
'
user_keys
'
+
'
None
'
]
=
computing_managers
.
SSHStandaloneComputingManager
managers_mapping
[
'
standalone
'
+
'
ssh+cli
'
+
'
platform_keys
'
+
'
None
'
]
=
computing_managers
.
SSHStandaloneComputingManager
managers_mapping
[
'
standalone
'
+
'
internal
'
+
'
internal
'
+
'
None
'
]
=
computing_managers
.
InternalStandaloneComputingManager
# Instantiate the computing manager and return (if not already done)
try
:
return
self
.
_manager
except
AttributeError
:
self
.
_manager
=
managers_mapping
[
self
.
type
+
self
.
access_mode
+
self
.
auth_mode
+
str
(
self
.
wms
)](
self
)
return
self
.
_manager
try
:
self
.
_manager
=
managers_mapping
[
self
.
type
+
self
.
access_mode
+
self
.
auth_mode
+
str
(
self
.
wms
)](
self
)
except
KeyError
:
raise
ValueError
(
'
No computing resource manager for type=
"
{}
"
, access_mode=
"
{}
"
, auth_mode=
"
{}
"
, wms=
"
{}
"'
.
format
(
self
.
type
,
self
.
access_mode
,
self
.
auth_mode
,
self
.
wms
))
from
None
else
:
return
self
.
_manager
...
...
@@ -377,7 +383,7 @@ class Storage(models.Model):
# Paths
base_path
=
models
.
CharField
(
'
Base path
'
,
max_length
=
4096
,
blank
=
False
,
null
=
False
)
bind_path
=
models
.
CharField
(
'
Bind path
'
,
max_length
=
4096
,
blank
=
Fals
e
,
null
=
Fals
e
)
bind_path
=
models
.
CharField
(
'
Bind path
'
,
max_length
=
4096
,
blank
=
Tru
e
,
null
=
Tru
e
)
# Link with a computing resource
computing
=
models
.
ForeignKey
(
Computing
,
related_name
=
'
storages
'
,
on_delete
=
models
.
CASCADE
,
blank
=
True
,
null
=
True
)
# Make optional?
...
...
@@ -387,6 +393,9 @@ class Storage(models.Model):
# Configuration
conf
=
JSONField
(
blank
=
True
,
null
=
True
)
# Include as browsable in the file manager?
browsable
=
models
.
BooleanField
(
'
Browsable in the file manager?
'
,
default
=
True
)
class
Meta
:
ordering
=
[
'
name
'
]
...
...
services/webapp/code/rosetta/core_app/templates/account.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/add_profile_conf.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/add_software.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
@@ -13,12 +11,23 @@
{% if not data.added %}
<h4>
Container basics
</h4>
Here you can add a new software container on the platform. You can add containers from image registries
as
<a
href=
"https://hub.docker.com/"
>
Docker Hub
</a>
or by importing Git repositories, provided that they
are compatible with
<a
href=
"https://mybinder.readthedocs.io/en/latest/introduction.html"
>
Binder
</a>
specifications.
<br/>
<br/>
{% if data.new_container_from == 'registry' %}
<div
style=
"font-size:1.1em; background:whitesmoke; display:inline-block; padding:2px 15px 2px 15px"
>
New container from registry
</div>
<div
style=
"font-size:1.1em; background:white; display:inline-block; padding:2px 15px 2px 15px"
><a
href=
"?new_container_from=repository"
>
New container from Git repository
</a></div>
<hr
style=
"margin-top:0;"
>
<h4>
Basics
</h4>
<form
action=
"#"
method=
"POST"
>
{% csrf_token %}
<table
class=
"dashboard"
style=
"width:
36
0px; margin-bottom:25px"
>
<table
class=
"dashboard"
style=
"width:
40
0px; margin-bottom:25px"
>
<tr>
<td><b>
Name
</b></td>
...
...
@@ -35,8 +44,6 @@
</td>
</tr>
<tr>
<td><b>
Registry
</b></td><td>
<input
type=
"text"
name=
"container_registry"
value=
"docker.io"
size=
"23"
required
/>
...
...
@@ -61,8 +68,8 @@
<h4>
Container i
nterface
</h4>
<table
class=
"dashboard"
style=
"width:
36
0px; margin-bottom:25px"
>
<h4>
I
nterface
</h4>
<table
class=
"dashboard"
style=
"width:
40
0px; margin-bottom:25px"
>
<tr>
<td><b>
Interface port
</b></td>
...
...
@@ -88,10 +95,10 @@
<a
href=
"javascript:void(0);"
id=
"show_button"
onclick=
"toggle_visibility('advanced_div')"
>
Advanced...
</a>
<div
id=
"advanced_div"
style=
"display:none; width:
36
0px;"
>
<h4>
Container advanced settings
<font
size=
-1
>
|
<a
href=
"javascript:void(0);"
id=
"hide_button"
onclick=
"toggle_visibility('advanced_div')"
style=
"display:none"
>
hide
</a></font></h4>
<div
id=
"advanced_div"
style=
"display:none; width:
40
0px;"
>
<h4>
Advanced
<font
size=
-1
>
|
<a
href=
"javascript:void(0);"
id=
"hide_button"
onclick=
"toggle_visibility('advanced_div')"
style=
"display:none"
>
hide
</a></font></h4>
<table
class=
"dashboard"
style=
"width:
36
0px; margin-bottom:25px"
>
<table
class=
"dashboard"
style=
"width:
40
0px; margin-bottom:25px"
>
<tr>
<td><b>
Image arch
</b></td><td>
...
...
@@ -145,14 +152,78 @@
</table>
</div>
<table
style=
"width:
36
0px; border:0; background:#ffffff; margin-top:20px"
>
<table
style=
"width:
40
0px; border:0; background:#ffffff; margin-top:20px"
>
<tr><td
align=
"center"
>
<input
type=
"submit"
value=
"Add"
>
</td></tr>
</table>
<input
type=
"hidden"
name=
"new_container_from"
value=
"registry"
>
</form>
{% else %}
<div
style=
"font-size:1.1em; background:white; display:inline-block; padding:2px 15px 2px 15px"
><a
href=
"?new_container_from=registry"
>
New container from registry
</a></div>
<div
style=
"font-size:1.1em; background:whitesmoke; display:inline-block; padding:2px 15px 2px 15px"
>
New container from Git repository
</div>
<hr
style=
"margin-top:0;"
>
<h4>
Basics
</h4>
<form
action=
"#"
method=
"POST"
>
{% csrf_token %}
<table
class=
"dashboard"
style=
"width:400px; margin-bottom:25px"
>
<tr>
<td><b>
Name
</b></td>
<td>
<input
type=
"text"
name=
"container_name"
value=
""
placeholder=
""
size=
"23"
required
/>
</td>
</tr>
<tr>
<td><b>
Description
</b></td>
<td>
<!-- ><input type="text" name="container_description" value="" placeholder="" size="23" required /> -->
<textarea
name=
"container_description"
rows=
"3"
cols=
"22"
></textarea>
</td>
</tr>
<tr>
<td><b>
Repository URL
</b></td><td>
<input
type=
"text"
name=
"repository_url"
size=
"23"
required
/>
</td>
</tr>
<tr>
<td><b>
Repository tag
</b></td>
<td>
<input
type=
"text"
name=
"repository_tag"
placeholder=
"Tag or hash, optional"
value=
""
size=
"23"
/>
</td>
</tr>
</table>
<table
style=
"width:400px; border:0; background:#ffffff; margin-top:20px"
>
<tr><td
align=
"center"
>
<input
type=
"submit"
value=
"Add"
>
</td></tr>
</table>
<input
type=
"hidden"
name=
"new_container_from"
value=
"repository"
>
</form>
{% endif %}
<br/>
<br/>
<br/>
...
...
@@ -165,7 +236,7 @@
{% else %}
Ok, software container added. Go
back
to
<a
href=
"/software"
>
software
</a>
.
Ok, software container added. Go to
<a
href=
"/software"
>
software
</a>
.
{% endif %}
...
...
services/webapp/code/rosetta/core_app/templates/components/computing.html
View file @
7c962dfb
...
...
@@ -76,14 +76,36 @@
{% else %}
<div
style=
"width:300px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:15px"
>
{% load computing_helpers %}
{% is_computing_configured computing request.user as computing_configured %}
<!-- Insert an "if false" here to let the computign show up even when creating the task but to not allow to be chosen (greyed out button) -->
{% if container and not computing_configured %}
{% else%}
<div
style=
"width:300px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:15px;"
>
<!-- <div style="background:{{computing.color}}; height:24px"></div> -->
<div
style=
"padding:10px; margin-top:5px; text-align:center; border-bottom: #e0e0e0 solid 1px; "
>
<a
href=
"/computing/?uuid={{ computing.uuid }}&details=True"
>
{{ computing.name }}
</a>
</div>
{% if not computing_configured %}
<div
style=
"width:298px; float:left; margin:0; margin-bottom:5px; padding:2px; background: gary; color:black; text-align:center; border-bottom: #e0e0e0 solid 1px;"
>
<i
class=
"fa fa-info-circle"
></i>
Not configured
<!-- style="color:#337ab7" -->
</div>
{% endif %}
{% if not computing_configured %}
<!-- <div style="padding:10px; -webkit-filter: blur(5px); -moz-filter: blur(5px); -o-filter: blur(5px); -ms-filter: blur(5px); filter: blur(5px);"> -->
<div
style=
"padding:10px;"
>
{% else %}
<div
style=
"padding:10px;"
>
{% endif %}
{% if computing.description %}
<div
class=
"description-box"
title=
"{{ computing.description }}"
>
...
...
@@ -116,6 +138,7 @@
{% if 'singularity' in computing.container_engines %}<img src="/static/img/singularity-logo.svg" style="height:18px; width:18px; margin-bottom:2px" />{% endif %}-->
{% if container %}
<div
style=
"margin:0px; margin-top:2px; text-align:center; padding:5px"
>
{% if computing_configured %}
<form
action=
"/new_task/"
method=
"POST"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"step"
value=
"{{ data.next_step }}"
/>
...
...
@@ -124,12 +147,16 @@
<input
type=
"hidden"
name=
"task_computing_uuid"
value=
"{{computing.uuid}}"
>
<input
type=
"submit"
value=
"Choose"
class=
"btn btn-connect"
>
</form>
{% else %}
<input
type=
"submit"
value=
"Choose"
class=
"btn btn-connect"
disabled
>
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endif %}
...
...
services/webapp/code/rosetta/core_app/templates/components/container.html
View file @
7c962dfb
...
...
@@ -152,7 +152,7 @@
</div>
<div
style=
"margin-bottom:1
3
px; margin-top: 3px; text-align:center"
>
<div
style=
"margin-bottom:1
8
px; margin-top: 3px; text-align:center"
>
{% if not disable_play_button %}
<a
href=
"/new_task?task_container_uuid={{ container.uuid }}&step=two"
class=
"btn btn-light"
style=
"border: #c0c0c0 1px solid"
>
<i
class=
"fa fa-play"
style=
"color:green"
></i></a>
{% endif %}
...
...
services/webapp/code/rosetta/core_app/templates/components/task.html
View file @
7c962dfb
...
...
@@ -3,7 +3,7 @@
<center>
<div
style=
"width:350px; display:block; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:20px"
>
<div
style=
"margin-top:5px; padding:10px; text-align:center; border-bottom: #f8f8f8 solid 1px; "
>
Task
<b>
{{data.task.name}}
</b>
summary
<b>
{{data.task.name}}
</b>
</div>
<hr
style=
"margin:0"
>
...
...
@@ -33,21 +33,21 @@
<!-- <b>Container:</b> {{ task.container.name }} <span style="font-size:14px; background-color:{{task.container.color}}"> </span> <br/>
<b>Computing:</b> {{ task.computing.name }} <span style="font-size:14px; background-color:{{task.computing.color}}"> </span><br/> -->
<b>
Software
container
:
</b>
<b>
Software:
</b>
<a
href=
"/software/?container_uuid={{ task.container.uuid }}"
style=
"color:{{task.container.color}}"
>
{{ task.container.name }}
</a>
{% if task.container.type == 'docker' %}
<img
src=
"/static/img/docker-logo.svg"
style=
"height:18px; width:18px; margin-bottom:4px"
/>
{% endif %}
{% if task.container.type == 'singularity' %}
<img
src=
"/static/img/singularity-logo.svg"
style=
"height:18px; width:18px; margin-bottom:4px"
/>
{% endif %}
<br/>
<b>
Computing
resource
:
</b>
<a
href=
"/computing/?uuid={{ task.computing.uuid }}"
>
{{ task.computing.name }}
</a>
<b>
Computing:
</b>
<a
href=
"/computing/?uuid={{ task.computing.uuid }}"
>
{{ task.computing.name }}
</a>
<!-- <a href="/computing/?uuid={{ task.computing.uuid }}" no_style="color:{{task.computing.color}}"><i class="fa fa-external-link" ></i></a><br/> -->
<div
style=
"margin-top:2px"
>
{% if task.status == "running" %}
{% if task.
verified_
status == "running" %}
<b>
Status:
</b>
<font
color=
"green"
>
running
</font>
{% else %}
<b>
Status:
</b>
{{ task.status }}
<b>
Status:
</b>
{{ task.
verified_
status }}
{% endif %}
</div>
</div>
...
...
@@ -63,7 +63,7 @@
<!-- Connect -->
{% if task.interface_port %}
{% if task.status == "running" %}
{% if task.
verified_
status == "running" %}
<a
href=
"/task_connect/?uuid={{task.uuid}}"
class=
"btn btn-connect"
target=
"_blank"
>
Connect
</a>
{% else %}
<a
href=
""
class=
"btn btn-disabled"
>
Connect
</a>
...
...
@@ -85,6 +85,14 @@
{% if data.task %}
<br/>
<a
href=
"javascript:void(0);"
id=
"show_button"
onclick=
"toggle_visibility('details_div')"
>
Details..
</a>
<div
id=
"details_div"
style=
"display:none; width:400px;"
>
<b>
Details
<font
size=
-1
>
|
<a
href=
"javascript:void(0);"
id=
"hide_button"
onclick=
"toggle_visibility('details_div')"
style=
"display:none"
>
hide
</a></font></b>
<div
style=
"display:block"
;
max-width:450px
"
>
<table
class=
"dashboard"
style=
"margin:10px"
>
...
...
@@ -98,10 +106,6 @@
</tr>
-->
<tr>
<td
colspan=
"2"
align=
"center"
style=
"padding:15px"
><b>
Details
</b></td>
</tr>
<!-- <tr>
<td><b>Name</b></td>
<td>{{ task.name }}</td>
...
...
@@ -158,13 +162,15 @@
<!-- <tr><td style="padding-right:0"><b>Direct link</b>
<td>{% if task.status == "running" %}<a href="{{ task.sharable_link }}">{{ task.sharable_link }}</a>{% else %}N.A. (task not running) {% endif %}</td>
-->
</tr>
<td>{% if task.status == "running" %}<a href="{{ task.sharable_link }}">{{ task.sharable_link }}</a>{% else %}N.A. (task not running) {% endif %}</td>
</tr>
-->
</table>
</div>
<!-- <p style="margin-left:10px; font-size:0.9em; color:#484848">
<i class="fa fa-info-circle" style="color:#337ab7"></i> You can share a direct link with other people, but remember that if you have no authentication in place anyone will be able to access.
</p> -->
...
...
services/webapp/code/rosetta/core_app/templates/computing.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/error.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/import_repository.html
0 → 100644
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
<div
class=
"span8 offset2"
>
{% if data.mode == 'new_task' %}
<h1>
New Task
</h1>
{% elif data.mode == 'new_container' %}
<h1>
Add software container
</h1>
{% else %}
<h1>
Importing repository
</h1>
{% endif %}
<hr>
<div
id=
"importing"
>
Importing repository
<code>
{{ data.repository_url }}
</code>
...
<br>
<br>
<br>
<br>
<center><img
src=
"/static/img/ajax-loader.gif"
></center>
</div>
<div
id=
"import_succeded"
style=
"display:none"
>
Ok, software container added. Go to
<a
href=
"/software"
>
software
</a>
.
</div>
<div
id=
"import_failed"
style=
"display:none"
>
FAILED:
<span
id=
"import_failed_text"
></span>
</div>
<script
type=
"text/javascript"
>
var
apiUrl
=
'
/api/v1/import_repository/?repository_url={{data.repository_url}}&repository_tag={{data.repository_tag}}&container_name={{data.container_name}}&container_description={{data.container_description}}
'
;
fetch
(
apiUrl
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
status
!=
200
){
// Throw the error catched below
throw
response
.
statusText
;
}
return
response
.
json
();
}).
then
(
data
=>
{
// Work with JSON data here
console
.
log
(
data
)
if
(
data
.
results
.
import_succeded
){
// Terrbile django templating mixed with javascript
{
%
if
data
.
mode
==
'
new_task
'
%
}
window
.
location
.
replace
(
"
/new_task/?step=two&task_container_uuid=
"
+
data
.
results
.
container_uuid
)
{
%
else
%
}
$
(
"
#importing
"
).
hide
();
$
(
"
#import_succeded
"
).
show
();
{
%
endif
%
}
}
else
{
throw
data
.
results
.
error_message
}
}).
catch
(
error
=>
{
// Do something for an error here
console
.
log
(
error
)
$
(
"
#importing
"
).
hide
();
$
(
"
#import_failed
"
).
show
();
$
(
"
#import_failed_text
"
).
html
(
error
);
});
</script>
</div>
</div>
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
{% include "footer.html" %}
services/webapp/code/rosetta/core_app/templates/login.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html"%}
{% include "logo.html" %}
<center>
<div
style=
"width:300px;"
>
...
...
services/webapp/code/rosetta/core_app/templates/logo.html
0 → 100644
View file @
7c962dfb
<div
style=
"background:#f8f8f8; margin:0px; padding-top:8px; padding-bottom:0px; border-bottom:lightgray 1px solid; margin-bottom:20px"
>
<!-- <img src="/static/img/logo.png" style="height:35px; margin-left:10px; margin-top:10px; margin-bottom:10px; margin-right:20px;"> -->
<span
style=
"margin-left:15px;font-size:1.8em"
><b>
Rosetta
</b></span>
<img
src=
"/static/img/emoji_u1f6f0.png"
style=
"height:42px; padding-bottom:20px"
>
</div>
services/webapp/code/rosetta/core_app/templates/new_task.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
@@ -132,7 +130,7 @@
<tr>
<td><b>
Container
engine
</b></td><td>
<select
name=
"container_engine"
>
<option
value=
""
selected
>
Default
</option>
<option
value=
""
selected
>
Default
({{data.task_computing.container_engines.0}})
</option>
{% for container_engine in data.task_computing.container_engines %}
<option
value=
"{{container_engine}}"
>
{{container_engine}}
</option>
{% endfor %}
...
...
@@ -200,7 +198,7 @@
{% else %}
Ok, task created. Go
back
to your
<a
href=
"/tasks"
>
task list
</a>
.
Ok, task created. Go to your
<a
href=
"/tasks"
>
task list
</a>
.
{% endif %}
...
...
services/webapp/code/rosetta/core_app/templates/page.html
View file @
7c962dfb
{% load static %}
{% include "header.html" with title=data.page.title %}
{% include "navigation.html"%}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/register.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/software.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
@@ -60,7 +58,13 @@
</select>
{% csrf_token %}
<button
type=
"submit"
class=
"btn btn-secondary"
>
Go
</button>
<font
size=
4.0em
>
|
</font>
<a
href=
"/add_software"
>
Add new...
</a>
</form>
</div>
...
...
@@ -81,12 +85,6 @@
{% endif %}
{% endif %}
</div>
{% if not data.container %}
<div
class=
"row"
style=
"padding:10px; padding-left:15px"
>
<a
href=
"/add_software"
>
Add new...
</a>
</div>
{% endif %}
<br/>
<br/>
...
...
services/webapp/code/rosetta/core_app/templates/storage.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
style=
"height:75%;"
>
<div
class=
"dashboard"
style=
"height:100%;"
>
...
...
services/webapp/code/rosetta/core_app/templates/success.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/task_log.html
View file @
7c962dfb
{% load static %}
{% include "header.html" with refresh=data.refresh %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
services/webapp/code/rosetta/core_app/templates/tasks.html
View file @
7c962dfb
{% load static %}
{% include "header.html" %}
{% include "navigation.html" %}
<br/>
<br/>
{% include "logo.html" %}
<div
class=
"container"
>
<div
class=
"dashboard"
>
...
...
@@ -46,6 +44,22 @@
{% include "footer.html" %}
<script>
function
toggle_visibility
(
id
)
{
var
x
=
document
.
getElementById
(
id
);
var
y
=
document
.
getElementById
(
'
show_button
'
);
var
z
=
document
.
getElementById
(
'
hide_button
'
);
if
(
x
.
style
.
display
===
"
none
"
)
{
x
.
style
.
display
=
"
block
"
;
y
.
style
.
display
=
"
none
"
z
.
style
.
display
=
"
inline
"
}
else
{
x
.
style
.
display
=
"
none
"
;
y
.
style
.
display
=
"
inline
"
z
.
style
.
display
=
"
none
"
}
}
</script>
Prev
1
2
3
Next