guest_create.html 10 KB

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