vm-detail.html 4.01 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 36 37 38 39 40 41 42 43
          </ul>
        </div>
      </div>
      <h3>{% trans "Connection" %}</h3>
      <input type="text" value="ssh cloud@vm.ik.bme.hu -p22312" class="form-control" readonly />
      <dl class="dl-horizontal">
        <dt>Etiam at felis:</dt>
        <dd>condimentum lig igulaulal ulaligula vel</dd>
        <dt>Vivamus nec:</dt>
        <dd>ac metus interdum, tincidunt</dd>
      </dl>
    </div>
44
    <div class="col-md-8" id="vm-detail-pane">
45 46 47 48 49 50 51 52 53 54
      <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>
55 56
            <li {% if instance.state != "RUNNING" %}class="disabled"{% endif %}>
            <a href="#{% if instance.state == "RUNNING" %}console" data-toggle="pill{% endif %}" class="text-center">
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
              <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">
74 75 76 77 78 79
          <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>
80 81 82 83 84 85 86
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock %}