vm-detail.html 4.81 KB
Newer Older
1 2 3 4 5 6
{% extends "dashboard/base.html" %}
{% load i18n %}

{% block content %}
<div class="body-content">
  <div class="page-header">
7 8 9 10 11 12 13 14 15 16 17
    <h1>
      <div id="vm-details-rename">
        <form action="" method="POST" id="vm-details-rename-form">
          {% csrf_token %}
          <input id="vm-details-rename-name" class="form-control" name="new_name" type="text" value="{{ instance.name }}"/> 
          <button type="submit" id="vm-details-rename-submit" class="btn">{% trans "Rename" %}</button>
        </form>
      </div>
      <div id="vm-details-h1-name">
        {{ instance.name }} 
      </div>
18
      <small>{{ instance.primary_host.get_fqdn }}</small></h1>
19 20
  </div>
  <div class="row">
21
    <div class="col-md-4" id="vm-info-pane">
22
      <div class="big">
23
        <span class="label label-success">{{ instance.state }}</span>
24 25 26
        <div class="btn-group">
          <button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Action <i class="icon-caret-down"></i></button>
          <ul class="dropdown-menu" role="menu">
27
            <li><a href="#" class="vm-details-rename-button"><i class="icon-pencil"></i> Rename</a></li>
28
            <li><a href="#" class="vm-details-save-button"><i class="icon-save"></i> Save as</a></li>
29 30
            <li><a href="#"><i class="icon-refresh"></i> Reboot</a></li>
            <li><a href="#"><i class="icon-off"></i> Shutdown</a></li>
31
            <li><a data-vm-pk="{{ instance.pk }}" class="vm-delete" href="{% url "dashboard.views.delete-vm" pk=instance.pk %}"><i class="icon-remove"></i> Discard</a></li>
32 33 34 35
          </ul>
        </div>
      </div>
      <h3>{% trans "Connection" %}</h3>
36
      <!-- TODO RDP -->
37
      <input type="text" value="{{ instance.get_connect_command }}" class="form-control" readonly />
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
      <dl class="dl-horizontal vm-details-pw">
        <dt>Password:</dt>
        <dd>
          <div class="input-group">
            <input type="text" class="form-control input-sm input-tags" value="{{ instance.pw }}"/>
            <span class="input-group-addon input-tags" id="vm-details-pw-show">
              <i class="icon-eye-open" id="vm-details-pw-eye" title="Show password"></i>
            </span>
          </div>
        </dd>
        <dd style="font-size: 10px; text-align: right; padding-top: 8px;">
          <a id="vm-details-pw-change" href="#">Generate new password!</a>
        </dd>
        <div id="vm-details-pw-confirm">
          <dt>
            Are you sure?
          </dt>
          <dd>
            <a href="#" class="vm-details-pw-confirm-choice label label-success" data-choice="1" data-vm="{{ instance.pk }}">Yes</a> / 
            <a href="#" class="vm-details-pw-confirm-choice label label-danger" data-choice="0">No</a>
          </dd>
        </div>
60 61
      </dl>
    </div>
62
    <div class="col-md-8" id="vm-detail-pane">
63 64 65 66 67 68 69 70 71 72
      <div class="panel panel-default" id="vm-detail-panel">
        <ul class="nav nav-pills panel-heading">
          <li class="active">
            <a href="#home" data-toggle="pill" class="text-center">
              <i class="icon-compass icon-2x"></i><br>
              {% trans "Home" %}</a></li>
          <li>
            <a href="#resources" data-toggle="pill" class="text-center">
              <i class="icon-tasks icon-2x"></i><br>
              {% trans "Resources" %}</a></li>
73 74
            <li {% if instance.state != "RUNNING" %}class="disabled"{% endif %}>
            <a href="#{% if instance.state == "RUNNING" %}console" data-toggle="pill{% endif %}" class="text-center">
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
              <i class="icon-desktop icon-2x"></i><br>
              {% trans "Console" %}</a></li>
          <li>
            <a href="#access" data-toggle="pill" class="text-center">
              <i class="icon-group icon-2x"></i><br>
              {% trans "Access" %}</a></li>
          <li>
            <a href="#network" data-toggle="pill" class="text-center">
              <i class="icon-globe icon-2x"></i><br>
              {% trans "Network" %}</a></li>
          <li>
            <a href="#activity" data-toggle="pill" class="text-center">
              <i class="icon-time icon-2x"></i><br>
              {% trans "Activity" %}</a></li>
        </ul>

        <div class="tab-content panel-body">
92 93 94 95 96 97
          <div class="tab-pane active" id="home">{% include "dashboard/vm-detail/home.html" %}</div>
          <div class="tab-pane" id="resources">{% include "dashboard/vm-detail/resources.html" %}</div>
          <div class="tab-pane" id="console">{% include "dashboard/vm-detail/console.html" %}</div>
          <div class="tab-pane" id="access">{% include "dashboard/vm-detail/access.html" %} </div>
          <div class="tab-pane" id="network">{% include "dashboard/vm-detail/network.html" %}</div>
          <div class="tab-pane" id="activity">{% include "dashboard/vm-detail/activity.html" %}</div>
98 99 100 101 102 103 104
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock %}