From d0d433db1a89701bc7b1fcae26044b28bae78de4 Mon Sep 17 00:00:00 2001 From: wangyong <864072399@qq.com> Date: Tue, 30 Aug 2016 13:50:30 +0800 Subject: [PATCH] add asset_list --- apps/assets/templates/assets/asset_list.html | 38 ++++++++++---------- apps/assets/urls.py | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/assets/templates/assets/asset_list.html b/apps/assets/templates/assets/asset_list.html index da5f2156f..61a56a406 100644 --- a/apps/assets/templates/assets/asset_list.html +++ b/apps/assets/templates/assets/asset_list.html @@ -6,7 +6,7 @@
-
主机详细信息列表
+
资产列表
@@ -102,14 +102,11 @@ 主机名 - IP地址 - IDC - 所属主机组 -{# 配置信息 #} - 操作系统 - cpu核数 - 内存 - 硬盘 + IP + 类型 + 配置 + 资产组 + 状态 操作 @@ -119,15 +116,18 @@ - {{ asset.hostname|default_if_none:"" }} - {{ asset.ip|default_if_none:"" }} - {{ asset.idc.name|default_if_none:"" }} -{# {{ asset.group.all|group_str2 }}#} -{# {{ asset.cpu }}|{{ asset.memory }}|{{ asset.disk }}#} - {{ asset.system_type|default_if_none:"" }}{{ asset.system_version|default_if_none:"" }} - {{ asset.cpu|default_if_none:"" }} - {{ asset.memory|default_if_none:"" }}{% if asset.memory %}G{% endif %} - {{ asset.disk }}{% if asset.disk %}G{% endif %} + {{ asset.hostname }} + {{ asset.ip }} + {{ asset.system_type }} + {{ asset.cpu }} | {{ asset.memory }} | {{ asset.disk }} + {% for group in asset.group.all %} {{ group.name }} {% endfor %} + + {% if asset.is_active %} + + {% else %} + + {% endif %} + {# 编辑#} 连接 @@ -145,7 +145,7 @@ {# #}
-{# {% include 'paginator.html' %}#} + {% include '_pagination.html' %}
diff --git a/apps/assets/urls.py b/apps/assets/urls.py index 6b19a7de6..184648cbe 100644 --- a/apps/assets/urls.py +++ b/apps/assets/urls.py @@ -6,7 +6,7 @@ app_name = 'assets' urlpatterns = [ url(r'^add/$', AssetAddView.as_view(), name='asset-add'), - url(r'^list/$', AssetListView.as_view(), name='asset-list'), + url(r'^$', AssetListView.as_view(), name='asset-list'), url(r'^(?P[0-9]+)/delete/$', AssetDeleteView.as_view(), name='asset-list'), url(r'^(?P[0-9]+)/detail/$', AssetDetailView.as_view(), name='asset-detail'), ]