Commit d2a7a8e8 authored by Janis Streib's avatar Janis Streib

REV: reverted fqdn-group feature until there is a proper solution using a js...

REV: reverted fqdn-group feature until there is a proper solution using a js list library (net-suite#2)
parent 7023c3fb
......@@ -183,19 +183,15 @@
</tr>
</thead>
<tbody class="list card-table">
{% set displayed_group = dict() %}
{% set first = False %}
{% for i in rrs[r.name] %}
<tr data-rrt="{{ r.name }}">
{% if i['NTree'].fqdn not in displayed_group %}
{% if i['NTree'].fqdn %}
{% set first = True %}
<td class="fqdn vertical-center"
rowspan="{{ grouped_rrs[r.name][i['NTree'].fqdn]|length }}">
<td class="fqdn vertical-center">
{{ i['NTree'].fqdn }} {% if i['NTree'].is_d %}<span class="badge badge-info">Domain</span>{% endif %}
{% do displayed_group.update({i['NTree'].fqdn:True}) %}
</td>
<td class="vertical-center"
rowspan="{{ grouped_rrs[r.name][i['NTree'].fqdn]|length }}">
<td class="vertical-center">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true"
......@@ -226,12 +222,9 @@
NATVS</a>
{% endif %}
</td>
{% if first %}
<td rowspan="{{ grouped_rrs[r.name][i['NTree'].fqdn]|length }}" class="description vertical-center">
{{ i['NTree'].description }}
</td>
{% set first = False %}
{% endif %}
<td class="description vertical-center">
{{ i['NTree'].description }}
</td>
<td colspan="2" style="white-space: nowrap">
{% if i['rr'].inttype.name %}
<a href="{{ url_for('dnsvs.edit_rr_data', area=area.name, suffix=area.suffix, inttype=i['rr'].inttype.name, rr_data=i['rr'].rr_data, fqdn=i['NTree'].fqdn) }}"
......
......@@ -167,16 +167,9 @@ def inspect_area(area, suffix):
not r.is_intern or len(
[res for res in rrs if res['rr'].inttype.dns_rr_type_name == r.name]) > 0] # TODO: filter/gen
add_form = RRAddForm()
grouped_rr_rr_type = dict()
for r in rrs:
del_form = RRDeleteForm(inttype=r['rr'].inttype.name, rr_data=r['rr'].rr_data, fqdn=r['NTree'].fqdn)
r['del_form'] = del_form
if r['rr'].inttype.dns_rr_type_name not in grouped_rr_rr_type:
grouped_rr_rr_type[r['rr'].inttype.dns_rr_type_name] = dict()
grouped_rr = grouped_rr_rr_type[r['rr'].inttype.dns_rr_type_name]
if r['NTree'].fqdn not in grouped_rr:
grouped_rr[r['NTree'].fqdn] = list()
grouped_rr[r['NTree'].fqdn].append(r)
if area_db.net.net.version == 4: # TODO: s.o
disp_rr_types = [d for d in disp_rr_types if d.name != "AAAA"]
......@@ -199,7 +192,7 @@ def inspect_area(area, suffix):
possible_rr_names=possible_rr_names,
add_form=add_form,
rr_types=disp_rr_types,
rrs=rrs_by_r_name, grouped_rrs=grouped_rr_rr_type,
rrs=rrs_by_r_name,
reserved_addrs=reserved_addrs, area_max=area_db.get_max_addr(db, get_db_conn()),
area_min=area_db.get_min_addr(db, get_db_conn()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment