-
-
Notifications
You must be signed in to change notification settings - Fork 646
Expand file tree
/
Copy pathgroups-domains.lp
More file actions
182 lines (174 loc) · 11 KB
/
Copy pathgroups-domains.lp
File metadata and controls
182 lines (174 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<? --[[
* Pi-hole: A black hole for Internet advertisements
* (c) 2019 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware.
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license.
--]]
mg.include('scripts/lua/header_authenticated.lp','r')
?>
<!-- Title/Header -->
<div class="app-content-header">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<h1 class="mb-0">Domain management</h1>
</div>
</div>
</div>
</div>
<div class="app-content">
<div class="container-fluid">
<!-- Domain Input -->
<div class="row">
<div class="col-md-12">
<div class="card" id="add-group">
<div class="card-header">
<h3 class="card-title">
Add a new domain or regex filter
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<!-- TABS card -->
<div class="card">
<div class="card-header p-0 border-0 nav-tabs-custom">
<ul class="nav nav-tabs card-header-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a href="#tab_domain" class="nav-link active" aria-controls="tab_domain" aria-expanded="true" role="tab" data-bs-toggle="tab">Domain</a>
</li>
<li class="nav-item" role="presentation">
<a href="#tab_regex" class="nav-link" aria-controls="tab_regex" aria-expanded="false" role="tab" data-bs-toggle="tab">RegEx filter</a>
</li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<!-- Domain tab -->
<div id="tab_domain" class="tab-pane active fade show">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="new_domain">Domain:</label>
<input id="new_domain" type="url" class="form-control active" placeholder="Domain to be added" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off">
<div id="suggest_domains" class="table-responsive no-border"></div>
</div>
</div>
<div class="col-lg-3 col-md-6 form-group">
<label for="new_domain_comment">Comment:</label>
<input id="new_domain_comment" type="text" class="form-control" placeholder="Description (optional)">
</div>
<div class="col-lg-3 col-md-6 form-group">
<label for="new_domain_group">Group assignment:</label>
<div><select class="group-select" id="new_domain_group" multiple></select></div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="wildcard_checkbox">
<label class="form-check-label" for="wildcard_checkbox"><strong>Add domain as wildcard</strong></label>
<p>Check this box if you want to involve all subdomains. The entered domain will be converted to a RegEx filter while adding.</p>
</div>
</div>
</div>
</div>
<!-- RegEx tab -->
<div id="tab_regex" class="tab-pane fade">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="new_regex">Regular Expression:</label>
<input id="new_regex" type="text" class="form-control active" placeholder="RegEx to be added">
</div>
<div class="form-group">
<strong>Hint:</strong> Need help to write a proper RegEx rule? Have a look at our online
<a href="https://docs.pi-hole.net/ftldns/regex/tutorial" rel="noopener noreferrer" target="_blank">
regular expressions tutorial</a>.
</div>
</div>
<div class="col-lg-3 col-md-6 form-group">
<label for="new_regex_comment">Comment:</label>
<input id="new_regex_comment" type="text" class="form-control" placeholder="Description (optional)">
</div>
<div class="col-lg-3 col-md-6 form-group">
<label for="new_regex_group">Group assignment:</label>
<div><select class="group-select" id="new_regex_group" multiple></select></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.TABS card -->
<div>
<p><strong>Note:</strong><br>
The domain or regex filter will be automatically assigned to the Default Group.<br>
Other groups can optionally be assigned in the list below (using <strong>Group assignment</strong>).<br>
You can add multiple entries at once by separating them with spaces (e.g. <code>example.com example.org</code>).
</p>
</div>
<div class="btn-toolbar float-end" role="toolbar" aria-label="Toolbar with buttons">
<div class="btn-group" role="group">
<button type="button" class="btn btn-danger" id="add_deny">Add to denied domains</button>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-success" id="add_allow">Add to allowed domains</button>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
</div>
<!-- Domain List -->
<div class="row">
<div class="col-md-12">
<div class="card" id="domains-list">
<div class="card-header">
<h3 class="card-title">
List of domains
</h3>
<div class="filter_types">
<div class="line">
<span class="form-check"><input class="form-check-input" type="checkbox" name="typ" value="allow/exact" id="typ0" checked><label class="form-check-label" for="typ0">Exact allow</label></span>
<span class="form-check"><input class="form-check-input" type="checkbox" name="typ" value="allow/regex" id="typ2" checked><label class="form-check-label" for="typ2">Regex allow</label></span>
</div>
<div class="line">
<span class="form-check"><input class="form-check-input" type="checkbox" name="typ" value="deny/exact" id="typ1" checked><label class="form-check-label" for="typ1">Exact deny</label></span>
<span class="form-check"><input class="form-check-input" type="checkbox" name="typ" value="deny/regex" id="typ3" checked><label class="form-check-label" for="typ3">Regex deny</label></span>
</div>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="domainsTable" class="table table-striped table-bordered" width="100%">
<thead>
<tr>
<th>ID</th>
<th></th>
<th>Domain/RegEx</th>
<th>Type</th>
<th>Status</th>
<th>Comment</th>
<th>Group assignment</th>
<th> </th>
</tr>
</thead>
</table>
<button type="button" id="resetButton" class="btn btn-secondary btn-sm text-red hidden">Reset sorting</button>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
</div>
</div><!-- /.container-fluid -->
</div><!-- /.app-content -->
<script src="<?=pihole.fileversion('vendor/bootstrap-multiselect/bootstrap-multiselect.min.js')?>"></script>
<script src="<?=pihole.fileversion('vendor/bootstrap5-toggle/bootstrap5-toggle.jquery.min.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/js/groups-common.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/js/groups-domains.js')?>"></script>
<? mg.include('scripts/lua/footer.lp','r')?>