From f35c02b34681fc24560df5abf3fbe37bf87a0e22 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 19 Dec 2018 12:30:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=8F=AF=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/templates/assets/asset_list.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/assets/templates/assets/asset_list.html b/apps/assets/templates/assets/asset_list.html index cb7c13e56..70362a241 100644 --- a/apps/assets/templates/assets/asset_list.html +++ b/apps/assets/templates/assets/asset_list.html @@ -92,8 +92,7 @@ {% trans 'Hostname' %} {% trans 'IP' %} {% trans 'Hardware' %} - {% trans 'Active' %} -{# {% trans 'Reachable' %}#} + {% trans 'Reachable' %} {% trans 'Action' %} @@ -163,10 +162,12 @@ function initTable() { $(td).html(rowData.hardware_info) }}, {targets: 4, createdCell: function (td, cellData) { - if (!cellData) { - $(td).html('') + if (cellData === 1){ + $(td).html('') + } else if (cellData === 0) { + $(td).html('') } else { - $(td).html('') + $(td).html('') } }}, @@ -179,8 +180,8 @@ function initTable() { ajax_url: '{% url "api-assets:asset-list" %}', columns: [ {data: "id"}, {data: "hostname" }, {data: "ip" }, - {data: "cpu_cores"}, {data: "is_active", orderable: false }, - {data: "id", orderable: false } + {data: "cpu_cores"}, + {data: "connectivity"}, {data: "id", orderable: false } ], op_html: $('#actions').html() }; From a9a1bae8058086f79f76021f598a3176167807bd Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 19 Dec 2018 12:32:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=8F=AF=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/templates/assets/asset_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/templates/assets/asset_list.html b/apps/assets/templates/assets/asset_list.html index 70362a241..2b4e3a9f8 100644 --- a/apps/assets/templates/assets/asset_list.html +++ b/apps/assets/templates/assets/asset_list.html @@ -180,8 +180,8 @@ function initTable() { ajax_url: '{% url "api-assets:asset-list" %}', columns: [ {data: "id"}, {data: "hostname" }, {data: "ip" }, - {data: "cpu_cores"}, - {data: "connectivity"}, {data: "id", orderable: false } + {data: "cpu_cores", orderable: false}, + {data: "connectivity", orderable: false}, {data: "id", orderable: false } ], op_html: $('#actions').html() };