diff options
Diffstat (limited to 'dashboard/src/templates')
-rw-r--r-- | dashboard/src/templates/dashboard/idf.yaml | 52 | ||||
-rw-r--r-- | dashboard/src/templates/dashboard/pdf.yaml | 175 | ||||
-rw-r--r-- | dashboard/src/templates/notifier/inbox.html | 34 | ||||
-rw-r--r-- | dashboard/src/templates/notifier/notification.html | 65 | ||||
-rw-r--r-- | dashboard/src/templates/workflow/viewport-base.html | 1 |
5 files changed, 218 insertions, 109 deletions
diff --git a/dashboard/src/templates/dashboard/idf.yaml b/dashboard/src/templates/dashboard/idf.yaml new file mode 100644 index 0000000..5da20c4 --- /dev/null +++ b/dashboard/src/templates/dashboard/idf.yaml @@ -0,0 +1,52 @@ +idf: + version: {{version|default:"0.1"}} + net_config: + oob: + ip-range: {{net_config.oob.ip-range}} + vlan: {{net_config.oob.vlan}} + admin: + interface: {{net_config.admin.interface}} + vlan: {{net_config.admin.vlan}} + network: {{net_config.admin.network}} + mask: {{net_config.admin.mask}} + mgmt: + interface: {{net_config.mgmt.interface}} + vlan: {{net_config.mgmt.vlan}} + network: {{net_config.mgmt.network}} + mask: {{net_config.mgmt.mask}} + private: + interface: {{net_config.private.interface}} + vlan: {{net_config.private.vlan}} + network: {{net_config.private.network}} + mask: {{net_config.private.mask}} + public: + interface: {{net_config.public.interface}} + vlan: {{net_config.public.vlan}} + network: {{net_config.public.network}} + mask: {{net_config.public.mask}} + ip-range: {{net_config.public.ip-range}} + mask: {{net_config.public.mask}} + gateway: {{net_config.public.gateway}} + dns: + {% for serv in net_config.public.dns %} + - {{serv}} + {% endfor %} + fuel: + jumphost: + bridges: + admin: {{fuel.jumphost.bridges.admin}} + mgmt: {{fuel.jumphost.bridges.mgmt}} + private: {{fuel.jumphost.bridges.private}} + public: {{fuel.jumphost.bridges.public}} + network: + {% for node in fuel.network.nodes %} + node: + - interfaces: + {% for iface in node.interfaces %} + - {{ iface }} + {% endfor %} + - busaddr: + {% for addr in node.bus_addrs %} + - {{addr}} + {% endfor %} + {% endfor %} diff --git a/dashboard/src/templates/dashboard/pdf.yaml b/dashboard/src/templates/dashboard/pdf.yaml index 297e04b..c893919 100644 --- a/dashboard/src/templates/dashboard/pdf.yaml +++ b/dashboard/src/templates/dashboard/pdf.yaml @@ -1,95 +1,92 @@ --- version: {{version|default:"1.0"}} details: - pod_owner: {{details.owner}} - contact: {{details.contact}} - lab: {{details.lab}} - location: {{details.location}} - type: {{details.type}} - link: {{details.link}} - + contact: {{details.contact}} + lab: {{details.lab}} + link: {{details.link}} + location: {{details.location}} + pod_owner: {{details.owner}} + type: {{details.type}} jumphost: - name: {{jumphost.name}} - node: - type: {{jumphost.node.type}} - vendor: {{jumphost.node.vendor}} - model: {{jumphost.node.model}} - arch: {{jumphost.node.arch}} - cpus: {{jumphost.node.cpus}} - cpu_cflags: {{jumphost.node.cpu_cflags}} - cores: {{jumphost.node.cores}} - memory: {{jumphost.node.memory}} - disks: - {% for disk in jumphost.disks %} - - name: {{disk.name}} - disk_capacity: {{disk.capacity}} - disk_type: {{disk.type}} - disk_interface: {{disk.interface}} - disk_rotation: {{disk.rotation}} - - {% endfor %} - os: {{jumphost.os}} - remote_params: - type: {{jumphost.remote.type}} - versions: - {% for version in jumphost.remote.versions %} - - {{version}} - {% endfor %} - user: {{jumphost.remote.user}} - pass: {{jumphost.remote.pass}} - remote_management: - type: {{jumphost.remote.type}} - versions: - {% for version in jumphost.remote.versions %} - - {{version}} - {% endfor %} - user: {{jumphost.remote.user}} - pass: {{jumphost.remote.pass}} - address: {{jumphost.remote.address}} - mac_address: {{jumphost.remote.mac_address}} - interfaces: - {% for interface in jumphost.interfaces %} - - name: {{interface.name}} - address: {{interface.address}} - mac_address: {{interface.mac_address}} - vlan: {{interface.vlan}} - {% endfor %} + disks: + {% for disk in jumphost.disks %} + - disk_capacity: {{disk.capacity}} + disk_interface: {{disk.interface}} + disk_rotation: {{disk.rotation}} + disk_type: {{disk.type}} + name: {{disk.name}} + {% endfor %} + interfaces: + {% for interface in jumphost.interfaces %} + - features: {{interface.features}} + mac_address: {{interface.mac_address}} + name: {{interface.name}} + speed: {{interface.speed}} + {% endfor %} + name: {{jumphost.name}} + node: + arch: {{jumphost.node.arch}} + cores: {{jumphost.node.cores}} + cpu_cflags: {{jumphost.node.cpu_cflags}} + cpus: {{jumphost.node.cpus}} + memory: {{jumphost.node.memory}} + model: {{jumphost.node.model}} + type: {{jumphost.node.type}} + vendor: {{jumphost.node.vendor}} + os: {{jumphost.os}} + remote_management: + address: {{jumphost.remote.address}} + mac_address: {{jumphost.remote.mac_address}} + pass: {{jumphost.remote.pass}} + type: {{jumphost.remote.type}} + user: {{jumphost.remote.user}} + versions: + {% for version in jumphost.remote.versions %} + - {{version}} + {% endfor %} + remote_params: + pass: {{jumphost.remote.pass}} + type: {{jumphost.remote.type}} + user: {{jumphost.remote.user}} + versions: + {% for version in jumphost.remote.versions %} + - {{version}} + {% endfor %} nodes: - {% for node in nodes %} - - name: {{node.name}} - node: - type: {{node.node.type}} - vendor: {{node.node.vendor}} - model: {{node.node.model}} - arch: {{node.node.arch}} - cpus: {{node.node.cpus}} - cpu_cflags: {{node.node.cpu_cflags}} - cores: {{node.node.cores}} - memory: {{node.node.memory}} - disks: - {% for disk in node.disks %} - - name: {{disk.name}} - disk_capacity: {{disk.capacity}} - disk_type: {{disk.type}} - disk_interface: {{disk.interface}} - disk_rotation: {{disk.rotation}} - - {% endfor %} - remote_management: - type: {{node.remote.type}} - versions: - {% for version in node.remote.versions %} - - {{version}} - {% endfor %} - user: {{node.remote.user}} - pass: {{node.remote.pass}} - address: {{node.remote.address}} - mac_address: {{node.remote.mac_address}} - interfaces: - {% for interface in node.interfaces %} - - name: {{interface.name}} - address: {{interface.address}} - mac_address: {{interface.mac_address}} - vlan: {{interface.vlan}} - {% endfor %} +{% for node in nodes %} +- disks: + {% for disk in node.disks %} + - disk_capacity: {{disk.capacity}} + disk_interface: {{disk.interface}} + disk_rotation: {{disk.rotation}} + disk_type: {{disk.type}} + name: {{disk.name}} + {% endfor %} + interfaces: + {% for interface in node.interfaces %} + - features: {{interface.features}} + mac_address: {{interface.mac_address}} + name: {{interface.name}} + speed: {{interface.speed}} {% endfor %} + name: {{node.name}} + node: + arch: {{node.node.arch}} + cores: {{node.node.cores}} + cpu_cflags: {{node.node.cpu_cflags}} + cpus: {{node.node.cpus}} + memory: {{node.node.memory}} + model: {{node.node.model}} + type: {{node.node.type}} + vendor: {{node.node.vendor}} + remote_management: + address: {{node.remote.address}} + mac_address: {{node.remote.mac_address}} + pass: {{node.remote.pass}} + type: {{node.remote.type}} + user: {{node.remote.user}} + versions: + {% for version in node.remote.versions %} + - {{version}} + {% endfor %} +{% endfor %} diff --git a/dashboard/src/templates/notifier/inbox.html b/dashboard/src/templates/notifier/inbox.html index 471eae4..4184d1d 100644 --- a/dashboard/src/templates/notifier/inbox.html +++ b/dashboard/src/templates/notifier/inbox.html @@ -9,7 +9,7 @@ .inbox-panel { display: grid; - grid-template-columns: 30% 70%; + grid-template-columns: 30% 5% 65%; } .section-panel { @@ -22,7 +22,8 @@ } .card-container { - box-shadow: 0 0 5px 2px #cccccc; + border: 1px solid #cccccc; + border-bottom: 0px; } .card { height: 50px; @@ -43,7 +44,7 @@ } #inbox-iframe { - height: calc(100vh - 130px); + height: calc(100vh - 57px); } .half_width { @@ -51,29 +52,45 @@ } .card-wrapper { } + + #page-wrapper{ + padding: 0px; + } + + .read_notification{ + background-color: #efefef; + } </style> <div class="inbox-panel"> <div class="section-panel"> + <h4>New:</h4> <div class="card-container"> - {% for notification in notifications %} + {% for notification in unread_notifications %} <div class="inbox-entry card" onclick="showmessage({{notification.id}}); setactive(this);"> {{ notification }} </div> {% endfor %} </div> + <h4>Read:</h4> + <div class="card-container"> + {% for notification in read_notifications %} + <div class="inbox-entry card read_notification" onclick="showmessage({{notification.id}}); setactive(this);"> + {{ notification }} + </div> + {% endfor %} + </div> + </div> + <div> </div> <div class="iframe-panel inbox-expanded-view"> <div class="inbox-iframe-div"> - <iframe id="inbox-iframe" frameBorder="0" width="100%" height="100vh" scrolling="yes" onload="sizetoiframe(this);">Please select a notification</iframe> + <iframe id="inbox-iframe" frameBorder="0" width="100%" height="100vh" scrolling="yes">Please select a notification</iframe> </div> </div> </div> <script type="text/javascript"> - $('#inbox-iframe').load(function() { - sizetoiframe(this); - }) function showmessage(msg_id) { @@ -82,5 +99,4 @@ } </script> - {% endblock %} diff --git a/dashboard/src/templates/notifier/notification.html b/dashboard/src/templates/notifier/notification.html index 65d26c9..0eafa60 100644 --- a/dashboard/src/templates/notifier/notification.html +++ b/dashboard/src/templates/notifier/notification.html @@ -2,19 +2,55 @@ {% block extrahead %} <base target="_parent"> {% endblock %} + {% block basecontent %} -<div class="card-container"> -<h3 class="msg_header">{{notification.title}}</h3> -<p class="content"></p> -<pre> -{{notification.content|safe}} -</pre> +<script> + function send_request(post_data){ + var form = $("#notification_action_form"); + var formData = form.serialize() + '&' + post_data + '=true'; + var req = new XMLHttpRequest(); + req.open("POST", ".", false); + req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + req.onerror = function() { alert("problem occurred while trying to cancel current workflow"); } + req.onreadystatechange = function() { if(req.readyState === 4){ + window.top.location.href += ''; + }}; + req.send(formData); + } + function delete_notification() + { + send_request("delete"); + } + function mark_unread() + { + send_request("unread"); + } +</script> +<div> + <h3 class="msg_header">{{notification.title}} + <div class="btn_group"> + <button class="btn btn-primary inbox-btn" onclick="mark_unread()">Mark Unread</button> + <button class="btn btn-danger inbox-btn" onclick="delete_notification()">Delete</button> + </div> + </h3> </div> +<p class="content-divider"></p> + +{% if not notification.is_html %} +<pre> +{% endif %} + {{notification.content|safe}} +{% if not notification.is_html %} +</pre> +{% endif %} +<form id="notification_action_form" action="." method="post"> + {% csrf_token %} +</form> + <style media="screen"> .card-container { - box-shadow: 0 0 5px 2px #cccccc; border: 1px solid #ffffff; margin-top: 11px; } @@ -28,11 +64,20 @@ background-color: #ffffff; z-index: 5; } - .sender { color: #636363; } - - + .content-divider { + border-bottom: 1px solid #cccccc; + padding-bottom: 15px; + clear: right; + } + .inbox-btn{ + display: inline; + margin: 3px; + } + .btn_group{ + float: right; + } </style> {% endblock %} diff --git a/dashboard/src/templates/workflow/viewport-base.html b/dashboard/src/templates/workflow/viewport-base.html index 9ddb4b8..f78bc01 100644 --- a/dashboard/src/templates/workflow/viewport-base.html +++ b/dashboard/src/templates/workflow/viewport-base.html @@ -419,7 +419,6 @@ var page_rect = document.getElementById("wrapper").getBoundingClientRect(); var title_rect = document.getElementById("iframe_header").getBoundingClientRect(); var iframe_height = page_rect.bottom - title_rect.bottom; - console.log("setting height to " + iframe_height); document.getElementById("viewport-iframe").height = iframe_height; } |