Skip to content

Commit

Permalink
Some design considerations.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiarn committed Apr 29, 2023
1 parent 417c271 commit ce154b7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ angular.module('ajenti.dns_api').controller('DnsAPIIndexController', function($s

$scope.delete = (name) => {
messagebox.show({
text: gettext('Really delete this entry?'),
text: gettext(`Really delete the entry ${name}?`),
positive: gettext('Delete'),
negative: gettext('Cancel')
}).then(() => {
Expand Down
32 changes: 23 additions & 9 deletions plugins/dns_api/resources/partial/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
<div root-access>
<h2>{{provider}}</h2>

<br />

<div ng:show="domains.length == 0 " class="alert alert-info" translate>
No domain found with this apikey.
</div>

<div ng:show="domains.length > 0">
<div>
<span translate>Select domain: </span>
<select ng:options="domain for domain in domains" ng:model="active_domain" ng:change="get_records()"></select>
<div class="form-group">
<label translate>Select domain: </label>
<select
ng:options="domain for domain in domains"
ng:model="active_domain"
ng:change="get_records()"
class="form-control"
>
</select>
</div>

<table class="table">
Expand All @@ -19,7 +27,8 @@ <h2>{{provider}}</h2>
<th translate>TTL</th>
<th translate>Type</th>
<th translate>Values</th>
<th translate></th>
<th></th>
<th></th>
</tr>
<tr ng:repeat="record in records">
<td style="word-break:break-all;width:150px;">{{record.name}}</td>
Expand All @@ -31,18 +40,23 @@ <h2>{{provider}}</h2>
</span>
</td>
<td>
<button class="btn pull-right" ng:click="delete(record.name)">
<i class="fas fa-trash"></i>
</button>
<button class="btn pull-right" ng:click="openDialog(record)">
<button class="btn btn-default" ng:click="openDialog(record)">
<i class="fas fa-pen"></i>
</button>
</td>
<td>
<button class="btn btn-default" ng:click="delete(record.name)">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>

</table>

<button class="btn btn-default" ng:click="openDialog()" translate>Add entry</button>
<button class="btn btn-default" ng:click="openDialog()" translate>
<i class="fas fa-plus-circle"></i>
Add entry
</button>

<dialog ng:show="detailsVisible">
<div class="modal-header">
Expand Down

0 comments on commit ce154b7

Please sign in to comment.