guest_create.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. {% extends "layout.html" %}
  2. {% block title %} Guest {% endblock %}
  3. {% block head %}
  4. {{ super() }}
  5. <style type="text/css">
  6. @media (min-width: 768px) {
  7. .form-horizontal .control-label {
  8. text-align: left;
  9. }
  10. }
  11. label>span {
  12. color: deepskyblue;
  13. }
  14. .btn,
  15. .form-group>div>div,
  16. .form-control {
  17. border-radius: 0;
  18. }
  19. .btn-ability {
  20. margin-right: 16px;
  21. height: 50px;
  22. padding: 8px 50px;
  23. margin-bottom: 30px;
  24. }
  25. .btn-ability-line {
  26. }
  27. </style>
  28. {% endblock head %}
  29. {% block body %}
  30. <script>
  31. $(document).ready(function() {
  32. $('#os_template').chosen({
  33. "disable_search": true
  34. });
  35. $('body').addClass('add-transition');
  36. $('.add-page-transition').on('click', function(){
  37. var transAttr = $(this).attr('data-transition');
  38. $('.add-transition').attr('class', 'add-transition');
  39. $('.add-transition').addClass(transAttr);
  40. });
  41. });
  42. $(function() { "use strict";
  43. $(".chosen-select").chosen();
  44. $(".chosen-search").append('<i class="glyph-icon icon-search"></i>');
  45. $(".chosen-single div").html('<i class="glyph-icon icon-caret-down"></i>');
  46. });
  47. $(function() { "use strict";
  48. $("#quantity").TouchSpin({
  49. max: 20,
  50. min: 1,
  51. verticalbuttons: true,
  52. verticalupclass: 'glyph-icon icon-plus',
  53. verticaldownclass: 'glyph-icon icon-minus'
  54. });
  55. });
  56. </script>
  57. <div class="container" style="padding-top: 100px;">
  58. <div class="panel">
  59. <div class="panel-body">
  60. <h3 class="title-hero" style="display: inline;">
  61. 创建实例
  62. </h3>
  63. <a href="/guests" class="btn btn-xs btn-default add-page-transition" data-transition="pt-page-moveFromLeft-init" style="margin-bottom: 4px; margin-left: 10px;">
  64. <span class="glyph-icon icon-separator" style="transform: rotateY(-180deg);">
  65. <i class="glyph-icon icon-level-up"></i>
  66. </span>
  67. <span class="button-content">
  68. 返回虚拟机列表
  69. </span>
  70. </a>
  71. <div class="example-box-wrapper">
  72. <form class="form-horizontal bordered-row" action="/guests/create" method="post">
  73. <div class="form-group">
  74. <label class="col-sm-2 control-label"><span class="glyph-icon icon-elusive-gauge"></span>&nbsp;&nbsp;运算能力</label>
  75. <div class="col-sm-10">
  76. <div class="btn-ability-line" data-toggle="buttons">
  77. <a href="#" class="btn btn-default btn-ability">
  78. <input title="1 CPU 1GB Memory" name="ability" type="radio" value="1c1g">1&nbsp;&nbsp;核&nbsp;&nbsp;1&nbsp;&nbsp;GB
  79. </a>
  80. <a href="#" class="btn btn-default btn-ability">
  81. <input title="1 CPU 2GB Memory" name="ability" type="radio" value="1c2g">1&nbsp;&nbsp;核&nbsp;&nbsp;2&nbsp;&nbsp;GB
  82. </a>
  83. <a href="#" class="btn btn-default btn-ability">
  84. <input title="2 CPU 2GB Memory" name="ability" type="radio" value="2c2g">2&nbsp;&nbsp;核&nbsp;&nbsp;2&nbsp;&nbsp;GB
  85. </a>
  86. <a href="#" class="btn btn-default btn-ability">
  87. <input title="2 CPU 4GB Memory" name="ability" type="radio" value="2c4g">2&nbsp;&nbsp;核&nbsp;&nbsp;4&nbsp;&nbsp;GB
  88. </a>
  89. <a href="#" class="btn btn-default btn-ability">
  90. <input title="4 CPU 4GB Memory" name="ability" type="radio" value="4c4g">4&nbsp;&nbsp;核&nbsp;&nbsp;4&nbsp;&nbsp;GB
  91. </a>
  92. <a href="#" class="btn btn-default btn-ability">
  93. <input title="4 CPU 8GB Memory" name="ability" type="radio" value="4c8g">4&nbsp;&nbsp;核&nbsp;&nbsp;8&nbsp;&nbsp;GB
  94. </a>
  95. <a href="#" class="btn btn-default btn-ability">
  96. <input title="8 CPU 8GB Memory" name="ability" type="radio" value="8c8g">8&nbsp;&nbsp;核&nbsp;&nbsp;8&nbsp;&nbsp;GB
  97. </a>
  98. <a href="#" class="btn btn-default btn-ability">
  99. <input title="8 CPU 16GB Memory" name="ability" type="radio" value="8c16g">8&nbsp;&nbsp;核&nbsp;&nbsp;16GB
  100. </a>
  101. <a href="#" class="btn btn-default btn-ability">
  102. <input title="1 CPU 16GB Memory" name="ability" type="radio" value="1c16g">1&nbsp;&nbsp;核&nbsp;&nbsp;16GB
  103. </a>
  104. <a href="#" class="btn btn-default btn-ability">
  105. <input title="4 CPU 32GB Memory" name="ability" type="radio" value="4c32g">4&nbsp;&nbsp;核&nbsp;&nbsp;32GB
  106. </a>
  107. <a href="#" class="btn btn-default btn-ability">
  108. <input title="4 CPU 64GB Memory" name="ability" type="radio" value="4c64g">4&nbsp;&nbsp;核&nbsp;&nbsp;64GB
  109. </a>
  110. <a href="#" class="btn btn-default btn-ability">
  111. <input title="8 CPU 64GB Memory" name="ability" type="radio" value="8c64g">8&nbsp;&nbsp;核&nbsp;&nbsp;64GB
  112. </a>
  113. <a href="#" class="btn btn-default btn-ability">
  114. <input title="16 CPU 16GB Memory" name="ability" type="radio" value="16c16g">16核&nbsp;&nbsp;16GB
  115. </a>
  116. <a href="#" class="btn btn-default btn-ability">
  117. <input title="24 CPU 24GB Memory" name="ability" type="radio" value="24c24g">24核&nbsp;&nbsp;24GB
  118. </a>
  119. <a href="#" class="btn btn-default btn-ability">
  120. <input title="32 CPU 32GB Memory" name="ability" type="radio" value="32c32g">32核&nbsp;&nbsp;32GB
  121. </a>
  122. <a href="#" class="btn btn-default btn-ability">
  123. <input title="64 CPU 64GB Memory" name="ability" type="radio" value="64c64g">64核&nbsp;&nbsp;64GB
  124. </a>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="form-group">
  129. <label class="col-sm-2 control-label"><span class="glyph-icon icon-elusive-inbox-alt"></span>&nbsp;&nbsp;系统模板</label>
  130. <div class="col-sm-6">
  131. <select id="os_template" name="os_template_id" class="chosen-select" data-placeholder="请选择系统模板...">
  132. <option></option>
  133. {% for item in os_template_data %}
  134. <option value="{{ item.id }}">{{ item.label }}</option>
  135. {% endfor %}
  136. </select>
  137. </div>
  138. </div>
  139. <div class="form-group">
  140. <label class="col-sm-2 control-label"><span class="glyph-icon icon-elusive-th-list"></span>&nbsp;&nbsp;数量</label>
  141. <div class="col-sm-6">
  142. <input id="quantity" title="实例数量" class="form-control" type="text" value="1" name="quantity">
  143. </div>
  144. </div>
  145. <div class="form-group">
  146. <label class="col-sm-2 control-label"><span class="glyph-icon icon-elusive-compass-circled"></span>&nbsp;&nbsp;标识&密码</label>
  147. <div class="col-sm-6">
  148. <div class="row form-group">
  149. <label class="col-sm-2 control-label">登录密码:</label>
  150. <div class="col-sm-6">
  151. <input type="password" name="password" title="实例密码" class="form-control" id="password">
  152. </div>
  153. </div>
  154. <div class="row form-group">
  155. <label class="col-sm-2 control-label">确认密码:</label>
  156. <div class="col-sm-6">
  157. <input type="password" title="确认实例密码" class="form-control" id="confirm_password">
  158. </div>
  159. </div>
  160. <div style="height: 10px;"></div>
  161. <div class="row form-group">
  162. <label class="col-sm-2 control-label">实例名称:</label>
  163. <div class="col-sm-6">
  164. <input id="name" name="name" type="text" title="实例名称" class="form-control">
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <div class="form-group">
  170. <label class="col-sm-2 control-label"></label>
  171. <div class="col-sm-3 pull-right">
  172. <button class="btn btn-blue-alt" style="width: 180px; height: 40px; font-size: 16px;">创建</button>
  173. </div>
  174. </div>
  175. </form>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. {% endblock body %}