diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 576cf6d..40c74d4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,21 +5,11 @@ + - - - - - - - - - - - - + @@ -130,6 +165,7 @@ + @@ -142,11 +178,32 @@ + + + + + + + + + + + + + + + + + + + + + + - -
- - -
-
- - -
-
- - + +
- - - {% for cabinet in all_cabinet %} - - - - {% endfor %} + +
+
+ + +
@@ -99,13 +78,14 @@ ID - 主机名 - IP地址 - 服务类型 + 域名 + 域名类型 + 域名解析商 + 域名服务商 所属项目 - 配置信息 - 机柜信息 - 网络类型 + 状态 + 到期时间 + 备注信息 操作 @@ -135,7 +115,7 @@ // 菜单选中高亮 $(function () { $('#CMDB-EAM').addClass('active'); - $('#CMDB-EAM-DEVICE').addClass('active'); + $('#CMDB-EAM-DOMAIN').addClass('active'); }); @@ -150,53 +130,72 @@ { ajax: { - "url": "{% url 'cmdb:eam-device-list' %}", + "url": "{% url 'cmdb:eam-domain-list' %}", "data": function (d) { - d.sys_hostname = $("#sys_hostname").val(); - d.hostname = $("#hostname").val(); - d.network_type = $("#network_type").val(); - d.service_type = $("#service_type").val(); + d.domain = $("#domain").val(); + d.select = $("#select").val(); + d.dn_type = $("#dn_type").val(); d.operation_type = $("#operation_type").val(); - d.dev_cabinet = $("#dev_cabinet").val(); } }, columns: [ DATATABLES_CONSTANT.DATA_TABLES.COLUMN.CHECKBOX, - { data: "id", }, { - data: "sys_hostname", + data: "domain", }, { - data: "hostname", + data: "dn_type", + render : function(data, type, row, meta) { + if (data=="1") { + return "一级域名"; + }if (data=="2") { + return "二级域名"; + + } + } + }, { - data: "service_type", + data: "resolution_server__firm", }, { - data: "operation_type", + data: "domain_provider__firm", + }, + + { + data: "operation_type__value", }, { - data: "config", + data: "state", + render : function(data, type, row, meta) { + if (data==1) { + var ret=""; + return ret; + }if (data==0) { + var ret=""; + return ret; + + } + } + }, { - data: "dev_cabinet", + data: "warrantyDate", }, { - data: "network_type", + data: "desc", }, { data: "id", bSortable: "false", render: function (data, type, row, meta) { - var ret = ""; - ret = ret + ""; - ret = ret + ""; + ret = ret + ""; ret = ret + ""; return ret; @@ -214,35 +213,33 @@ }); //新建数据 $("#btnCreate").click(function () { - var div=layer.open({ + layer.open({ type: 2, title: '新增', shadeClose: false, maxmin: true, - area: ['800px', '400px'], - content: "{% url 'cmdb:eam-device-create' %}", + area: ['800px', '620px'], + content: "{% url 'cmdb:eam-domain-create' %}", end: function () { //关闭时做的事情 oDataTable.ajax.reload(); } }); - layer.full(div ) }); //修改数据 function doUpdate(id) { - var div=layer.open({ + layer.open({ type: 2, title: '编辑', shadeClose: false, maxmin: true, - area: ['800px', '400px'], - content: ["{% url 'cmdb:eam-device-update' %}" + '?id=' + id, 'no'], + area: ['800px', '620px'], + content: ["{% url 'cmdb:eam-domain-update' %}" + '?id=' + id], end: function () { oDataTable.ajax.reload(); } }); - layer.full(div ) } //checkbox全选 @@ -280,7 +277,7 @@ layer.close(index); $.ajax({ type: "POST", - url: "{% url 'cmdb:eam-device-delete' %}", + url: "{% url 'cmdb:eam-domain-delete' %}", data: {"id": sId, csrfmiddlewaretoken: '{{ csrf_token }}'}, cache: false, success: function (msg) { @@ -309,7 +306,7 @@ layer.close(index); $.ajax({ type: "POST", - url: "{% url 'cmdb:eam-device-delete' %}", + url: "{% url 'cmdb:eam-domain-delete' %}", data: {"id": id, csrfmiddlewaretoken: '{{ csrf_token }}'}, cache: false, success: function (msg) { @@ -338,22 +335,17 @@ }); - function doDevice2Connection(id) { + function dodn2nr(id) { layer.open({ type: 2, - title: '认证管理', + title: '解析地址', shadeClose: false, + skin: 'layui-layer-lan', maxmin: true, area: ['800px', '400px'], - content: ["{% url 'cmdb:eam-device-device2connection' %}" + '?id=' + id, 'no'], - end: function () { - oDataTable.ajax.reload(); - } + content: ["{% url 'cmdb:eam-domain-dn2nr' %}" + '?id=' + id], }); } - function doDetail(id){ - window.location.href="{% url 'cmdb:eam-device-detail' %}?id="+id; - } {% endblock %} \ No newline at end of file diff --git a/templates/cmdb/domainname2natrule.html b/templates/cmdb/domainname2natrule.html new file mode 100644 index 0000000..a3c30d1 --- /dev/null +++ b/templates/cmdb/domainname2natrule.html @@ -0,0 +1,32 @@ +{% extends 'base-layer.html' %} +{% load staticfiles %} + +{% block main %} +
+
+ + + + + + + + + + + {% for nat in all_nat %} + + + + + + + + + + {% endfor %} +
公网IP源端口内网iP目的端口状态规则说明
{{ nat.internet_ip }}{{ nat.src_port }}{{ nat.lan_ip }}{{ nat.dest_port }}{{ nat.state }}{{ nat.desc }}
+
+
+ +{% endblock %} diff --git a/templates/cmdb/domainname_form.html b/templates/cmdb/domainname_form.html new file mode 100644 index 0000000..956dec8 --- /dev/null +++ b/templates/cmdb/domainname_form.html @@ -0,0 +1,197 @@ +{% extends 'base-layer.html' %} +{% load staticfiles %} + +{% block css %} + + + +{% endblock %} + +{% block main %} +
+
+ + {% csrf_token %} +
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ +
+
+
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ + +
+
+ +{% endblock %} + +{% block javascripts %} + + + + +{% endblock %} \ No newline at end of file