mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-15 20:46:06 +00:00
Tabs on dashboard.html now fade effect when switching between
First pass at HTML conversion from Master/Slave to Primary/Secondary (TODO: Backend) Start work on migrating admin_auth_settings to Bootstrap v4 admin_setting_basic -> Change plain text for On/Off to toggles in current state, and changed "Action" column to the opposite toggle of current setting dashboard_domain -> Reduce deuplicate code for the new dropdown-menu for Actions register -> Add exclamation icon in front of error text template_add -> changed box-body to card-body user_profile -> Fixed tab naviation for Bootstrap v4. Tabs also fade between changes
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{% if domain.type != 'Slave' %}
|
||||
{% if domain.type != 'Secondary' %}
|
||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary pull-left button_add_record" id="{{ domain.name }}">
|
||||
<i class="fas fa-plus"></i>
|
||||
Add Record
|
||||
@ -43,9 +43,9 @@
|
||||
Apply Changes
|
||||
</button>
|
||||
{% else %}
|
||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary pull-left button_update_from_master" id="{{ domain.name }}">
|
||||
<button type="button" style="position: relative; margin-left: 20px" class="btn btn-primary pull-left button_update_from_primary" id="{{ domain.name }}">
|
||||
<i class="fas fa-download"></i>
|
||||
Update from Master
|
||||
Update from Primary
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||
@ -70,13 +70,16 @@
|
||||
<th>Status</th>
|
||||
<th>TTL</th>
|
||||
<th>Data</th>
|
||||
<th>Comment</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
<th >Changelog</th>
|
||||
{% if domain.type != 'Secondary' %}
|
||||
<th>Comment</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
<th >Changelog</th>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<th>Invisible Sorting Column</th>
|
||||
{% endif %}
|
||||
<th>Invisible Sorting Column</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -87,13 +90,17 @@
|
||||
<td>{{ record.status }}</td>
|
||||
<td>{{ record.ttl }}</td>
|
||||
<td>{{ record.data | pretty_domain_name }}</td>
|
||||
<td>{{ record.comment }}</td>
|
||||
{% if domain.type != 'Slave' %}
|
||||
{% if domain.type != 'Secondary' %}
|
||||
<td>{{ record.comment }}</td>
|
||||
<td width="6%">
|
||||
{% if record.is_allowed_edit() %}
|
||||
<button type="button" class="btn btn-warning button_edit"><i class="fa fa-edit"></i></button>
|
||||
<button type="button" class="btn btn-warning button_edit">
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-warning"><i class="fa fa-exclamation-circle"></i></button>
|
||||
<button type="button" class="btn btn-warning">
|
||||
<i class="fa fa-exclamation-circle"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="6%">
|
||||
@ -101,20 +108,13 @@
|
||||
<button type="button" class="btn btn-danger button_delete"><i class="fa fa-trash"></i></button>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% else %}
|
||||
<td width="6%">
|
||||
<button type="button" class="btn btn-warning"><i class="fa fa-exclamation-circle"></i></button>
|
||||
</td>
|
||||
<td width="6%">
|
||||
<button type="button" class="btn btn-warning"><i class="fa fa-exclamation-circle"></i></button>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
<td width="6%">
|
||||
<button type="button" onclick="show_record_changelog('{{record.name}}','{{record.type}}',event)" class="btn btn-primary">
|
||||
<i class="fa fa-history" aria-hidden="true"></i>
|
||||
</button>
|
||||
</td>
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
<td width="6%">
|
||||
<button type="button" onclick="show_record_changelog('{{record.name}}','{{record.type}}',event)" class="btn btn-primary">
|
||||
<i class="fa fa-history" aria-hidden="true"></i>
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<!-- hidden column that we can sort on -->
|
||||
<td>1</td>
|
||||
@ -171,10 +171,14 @@
|
||||
// hidden column so that we can add new records on top
|
||||
// regardless of whatever sorting is done. See orderFixed
|
||||
visible: false,
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
targets: [ 9 ]
|
||||
{% if domain.type != 'Secondary' %}
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
targets: [ 9 ]
|
||||
{% else %}
|
||||
targets: [ 8 ]
|
||||
{% endif %}
|
||||
{% else %}
|
||||
targets: [ 8 ]
|
||||
targets: [ 5 ]
|
||||
{% endif %}
|
||||
},
|
||||
{
|
||||
@ -182,10 +186,14 @@
|
||||
targets: [ 4, 5 ]
|
||||
}
|
||||
],
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
"orderFixed": [[9, 'asc']]
|
||||
{% if domain.type != 'Secondary' %}
|
||||
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||
"orderFixed": [[9, 'asc']]
|
||||
{% else %}
|
||||
"orderFixed": [[8, 'asc']]
|
||||
{% endif %}
|
||||
{% else %}
|
||||
"orderFixed": [[8, 'asc']]
|
||||
"orderFixed": [[5, 'asc']]
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
@ -221,7 +229,8 @@
|
||||
});
|
||||
});
|
||||
// handle edit button and record click
|
||||
$(document.body).on("click", ".button_edit{% if quick_edit %}, .row_record{% endif %}", function(e) {
|
||||
{% if domain.type != 'Secondary' %}
|
||||
$(document.body).on("click", ".button_edit{% if quick_edit %}, .row_record{% endif %}", function(e) {
|
||||
e.stopPropagation();
|
||||
if ($(this).is('tr')) {
|
||||
var nRow = $(this)[0];
|
||||
@ -248,7 +257,8 @@
|
||||
editRow(table, nRow);
|
||||
nEditing = nRow;
|
||||
}
|
||||
});
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
// handle apply changes button
|
||||
$(document.body).on("click",".button_apply_changes", function() {
|
||||
@ -319,8 +329,8 @@
|
||||
nNew = false;
|
||||
});
|
||||
|
||||
//handle update_from_master button
|
||||
$(document.body).on("click", ".button_update_from_master", function (e) {
|
||||
//handle update_from_primary button
|
||||
$(document.body).on("click", ".button_update_from_primary", function (e) {
|
||||
var domain = $(this).prop('id');
|
||||
applyChanges({'domain': domain, '_csrf_token': '{{ csrf_token() }}'}, $SCRIPT_ROOT + '/domain/' + domain + '/update', true);
|
||||
});
|
||||
|
Reference in New Issue
Block a user