|
|
@@ -1,34 +1,20 @@
|
|
|
{% extends "layout.html" %}
|
|
|
{% block head %}
|
|
|
{{ super() }}
|
|
|
+
|
|
|
+ <style type="text/css">
|
|
|
+ [class^="content-box"] {
|
|
|
+ border-radius: 0 !important;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
{% endblock head %}
|
|
|
{% block content %}
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
- var page = 1;
|
|
|
- var page_size = 10;
|
|
|
- var keyword = '';
|
|
|
var resource_path = window.location.pathname;
|
|
|
var cur_url = resource_path;
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
- cur_url = resource_path + '?page=' + page + '&page_size=' + page_size;
|
|
|
-
|
|
|
- var last_ready = null;
|
|
|
- $('#content_search').keydown(function() {
|
|
|
- if (last_ready !== null) {
|
|
|
- clearTimeout(last_ready);
|
|
|
- }
|
|
|
- last_ready = setTimeout(function () {
|
|
|
- keyword = $('#content_search').val();
|
|
|
- cur_url = resource_path + '?page=' + page + '&page_size=' + page_size;
|
|
|
- if (keyword.length > 0) {
|
|
|
- cur_url = resource_path + '?page=' + page + '&page_size=' + page_size + '&keyword=' + keyword;
|
|
|
- }
|
|
|
- window.location.href=cur_url;
|
|
|
- }, 1000);
|
|
|
- });
|
|
|
-
|
|
|
$('body').addClass('add-transition');
|
|
|
$('.add-page-transition').on('click', function(){
|
|
|
var transAttr = $(this).attr('data-transition');
|
|
|
@@ -36,25 +22,6 @@
|
|
|
$('.add-transition').addClass(transAttr);
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
- function refresh() {
|
|
|
- keyword = $('#content_search').val();
|
|
|
- page = $('#pagination li.active a').text();
|
|
|
- page_size = $('#page_size').val();
|
|
|
- cur_url = resource_path + '?page=' + page + '&page_size=' + page_size;
|
|
|
- if (keyword.length > 0) {
|
|
|
- cur_url = resource_path + '?page=' + page + '&page_size=' + page_size + '&keyword=' + keyword;
|
|
|
- }
|
|
|
- window.location.href=cur_url;
|
|
|
- }
|
|
|
-
|
|
|
- function panel_onmouseover(me) {
|
|
|
- $(me).find(".show_detail_link").css('display','block');
|
|
|
- }
|
|
|
-
|
|
|
- function panel_onmouseout(me) {
|
|
|
- $(me).find(".show_detail_link").css('display','none');
|
|
|
- }
|
|
|
</script>
|
|
|
<div class="panel">
|
|
|
<div class="panel-body">
|
|
|
@@ -120,7 +87,7 @@
|
|
|
<div class="tile-content-wrapper">
|
|
|
<i class="webhh icon-diskspace"></i>
|
|
|
<div style="font-size: 20px; margin-top: 18px; right: 10px; position: absolute;">
|
|
|
- 103733 GB
|
|
|
+ {{ disks_distribute_count_ret.data.total_size }} GB
|
|
|
</div>
|
|
|
<div class="tile-header" style="opacity: .70;">
|
|
|
虚拟机磁盘空间总计
|
|
|
@@ -132,4 +99,48 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="panel-body">
|
|
|
+ <h3 class="title-hero">
|
|
|
+ 虚拟机 TOP <span style="font-size: 17px;">10</span>
|
|
|
+ </h3>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-4">
|
|
|
+ <div class="content-box">
|
|
|
+ <h3 class="content-box-header bg-blue-alt">
|
|
|
+ CPU
|
|
|
+ </h3>
|
|
|
+ <div class="content-box-wrapper" style="padding-top: 0;">
|
|
|
+ <table class="table mrg0B mrg10T">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 65%;">实例</td>
|
|
|
+ <td>负载</td>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {% for item in guests_current_top_10_ret.data.cpu_load %}
|
|
|
+ {% if item.guest_uuid not in guests_mapping_by_uuid %}{% continue %}{% endif %}
|
|
|
+ <tr>
|
|
|
+ <td class="text-left">
|
|
|
+ <a href="/guest/detail/{{ item.guest_uuid }}">
|
|
|
+ {{ guests_mapping_by_uuid[item.guest_uuid].label }}/{{ guests_mapping_by_uuid[item.guest_uuid].remark }}
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="progressbar-small progressbar" data-value="{{ item.cpu_load }}">
|
|
|
+ <div class="progressbar-value tooltip-button {% if item.cpu_load >= 85 %}bg-red{% elif item.cpu_load >= 65 %}bg-orange{% else %}bg-green{% endif %}" title="{{ item.cpu_load }}%">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
{% endblock content %}
|