|
|
@ -31,8 +31,6 @@
|
|
|
|
<th class="text-center">{% trans 'IP' %}</th>
|
|
|
|
<th class="text-center">{% trans 'IP' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Port' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Port' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Cluster' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Cluster' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Type' %}</th>
|
|
|
|
|
|
|
|
<th class="text-center">{% trans 'Env' %}</th>
|
|
|
|
|
|
|
|
<th class="text-center">{% trans 'Hardware' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Hardware' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Active' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Active' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Reachable' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Reachable' %}</th>
|
|
|
@ -78,22 +76,16 @@ function initTable() {
|
|
|
|
$(td).html(rowData.cluster_name)
|
|
|
|
$(td).html(rowData.cluster_name)
|
|
|
|
}},
|
|
|
|
}},
|
|
|
|
{targets: 5, createdCell: function (td, cellData, rowData) {
|
|
|
|
{targets: 5, createdCell: function (td, cellData, rowData) {
|
|
|
|
$(td).html(rowData.get_type_display)
|
|
|
|
|
|
|
|
}},
|
|
|
|
|
|
|
|
{targets: 6, createdCell: function (td, cellData, rowData) {
|
|
|
|
|
|
|
|
$(td).html(rowData.get_env_display)
|
|
|
|
|
|
|
|
}},
|
|
|
|
|
|
|
|
{targets: 7, createdCell: function (td, cellData, rowData) {
|
|
|
|
|
|
|
|
$(td).html(rowData.hardware_info)
|
|
|
|
$(td).html(rowData.hardware_info)
|
|
|
|
}},
|
|
|
|
}},
|
|
|
|
{targets: 8, createdCell: function (td, cellData) {
|
|
|
|
{targets: 6, createdCell: function (td, cellData) {
|
|
|
|
if (!cellData) {
|
|
|
|
if (!cellData) {
|
|
|
|
$(td).html('<i class="fa fa-times text-danger"></i>')
|
|
|
|
$(td).html('<i class="fa fa-times text-danger"></i>')
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$(td).html('<i class="fa fa-check text-navy"></i>')
|
|
|
|
$(td).html('<i class="fa fa-check text-navy"></i>')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}},
|
|
|
|
}},
|
|
|
|
{targets: 9, createdCell: function (td, cellData) {
|
|
|
|
{targets: 7, createdCell: function (td, cellData) {
|
|
|
|
if (cellData == 'Unknown'){
|
|
|
|
if (cellData == 'Unknown'){
|
|
|
|
$(td).html('<i class="fa fa-circle text-warning"></i>')
|
|
|
|
$(td).html('<i class="fa fa-circle text-warning"></i>')
|
|
|
|
} else if (!cellData) {
|
|
|
|
} else if (!cellData) {
|
|
|
@ -102,7 +94,7 @@ function initTable() {
|
|
|
|
$(td).html('<i class="fa fa-circle text-navy"></i>')
|
|
|
|
$(td).html('<i class="fa fa-circle text-navy"></i>')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}},
|
|
|
|
}},
|
|
|
|
{targets: 10, createdCell: function (td, cellData, rowData) {
|
|
|
|
{targets: 8, createdCell: function (td, cellData, rowData) {
|
|
|
|
var update_btn = '<a href="{% url "assets:asset-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>'.replace("{{ DEFAULT_PK }}", cellData);
|
|
|
|
var update_btn = '<a href="{% url "assets:asset-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>'.replace("{{ DEFAULT_PK }}", cellData);
|
|
|
|
var del_btn = '<a class="btn btn-xs btn-danger m-l-xs btn_asset_delete" data-uid="{{ DEFAULT_PK }}">{% trans "Delete" %}</a>'.replace('{{ DEFAULT_PK }}', cellData);
|
|
|
|
var del_btn = '<a class="btn btn-xs btn-danger m-l-xs btn_asset_delete" data-uid="{{ DEFAULT_PK }}">{% trans "Delete" %}</a>'.replace('{{ DEFAULT_PK }}', cellData);
|
|
|
|
$(td).html(update_btn + del_btn)
|
|
|
|
$(td).html(update_btn + del_btn)
|
|
|
@ -111,7 +103,7 @@ function initTable() {
|
|
|
|
ajax_url: '{% url "api-assets:asset-list" %}',
|
|
|
|
ajax_url: '{% url "api-assets:asset-list" %}',
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{data: "id"}, {data: "hostname" }, {data: "ip" }, {data: "port" },
|
|
|
|
{data: "id"}, {data: "hostname" }, {data: "ip" }, {data: "port" },
|
|
|
|
{data: "cluster"}, {data: "type" }, {data: "env"},
|
|
|
|
{data: "cluster"},
|
|
|
|
{data: "cpu_cores"}, {data: "is_active", orderable: false },
|
|
|
|
{data: "cpu_cores"}, {data: "is_active", orderable: false },
|
|
|
|
{data: "is_connective", orderable: false}, {data: "id", orderable: false }
|
|
|
|
{data: "is_connective", orderable: false}, {data: "id", orderable: false }
|
|
|
|
],
|
|
|
|
],
|
|
|
|