Przeglądaj źródła

快照列表倒序排列

James Iter 8 lat temu
rodzic
commit
d27abc9e6e
3 zmienionych plików z 4 dodań i 3 usunięć
  1. 2 1
      templates/guests_show.html
  2. 1 1
      templates/snapshots_show.html
  3. 1 1
      views/snapshot.py

+ 2 - 1
templates/guests_show.html

@@ -722,7 +722,8 @@
                                 <li class="">
                                     <a href="javascript:;" data-toggle="modal" data-target="#create_snapshot_modal"
                                        onclick="$('#instance_uuid').val($($(this).parent().parent().parent().parent().parent().children()[0]).text());
-                                                $('#create_snapshot_instance_desc').text($($(this).parent().parent().parent().parent().parent().children()[2]).find('div a')[0].textContent + '/' + $($(this).parent().parent().parent().parent().parent().children()[2]).find('div p')[0].textContent)">
+                                                $('#create_snapshot_instance_desc').text($($(this).parent().parent().parent().parent().parent().children()[2]).find('div a')[0].textContent + '/' + $($(this).parent().parent().parent().parent().parent().children()[2]).find('div p')[0].textContent);
+                                                $('#snapshot_label').val($($(this).parent().parent().parent().parent().parent().children()[2]).find('div a')[0].textContent + '/' + $($(this).parent().parent().parent().parent().parent().children()[2]).find('div p')[0].textContent)">
                                         创建快照
                                     </a>
                                 </li>

+ 1 - 1
templates/snapshots_show.html

@@ -283,7 +283,7 @@
                 <tr role="row">
                     <th style="display: none;">ID</th>
                     <th><input class="all_selector" title="选取所有" type="checkbox"></th>
-                    <th width="180px;">名称</th>
+                    <th width="220px;">名称</th>
                     <th>进度</th>
                     <th>状态</th>
                     <th>所属虚拟机</th>

+ 1 - 1
views/snapshot.py

@@ -33,7 +33,7 @@ def show():
     page_size = int(request.args.get('page_size', 10))
     keyword = request.args.get('keyword', None)
     order_by = request.args.get('order_by', None)
-    order = request.args.get('order', None)
+    order = request.args.get('order', 'desc')
 
     if page is not None:
         args.append('page=' + page.__str__())