mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Show extra info alert on successful import to remind users they should run gravity's update
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -48,9 +48,7 @@ function importZIP() {
|
||||
if (data.error.hint !== null) $("#modal-import-error-message").text(data.error.hint);
|
||||
} else if ("files" in data) {
|
||||
$("#modal-import-success").show();
|
||||
$("#modal-import-success-title").text(
|
||||
"Import successful, please run pihole -g to update gravity."
|
||||
);
|
||||
$("#modal-import-success-title").text("Import successful");
|
||||
var text = "<p>Processed files:<ul>";
|
||||
for (var i = 0; i < data.files.length; i++) {
|
||||
text += "<li>/" + utils.escapeHtml(data.files[i]) + "</li>";
|
||||
@@ -58,6 +56,7 @@ function importZIP() {
|
||||
|
||||
text += "</ul></p>";
|
||||
$("#modal-import-success-message").html(text);
|
||||
$("#modal-import-gravity").show();
|
||||
}
|
||||
|
||||
if ("took" in data) {
|
||||
|
||||
@@ -76,6 +76,12 @@ mg.include('scripts/pi-hole/lua/settings_header.lp','r')
|
||||
<p id="modal-import-error-message"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modal-import-gravity" style="display:none">
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<h4><i class="icon fa fa-fw fa-info-circle"></i> Please run gravity</h4>
|
||||
<p>Use <a href='/admin/gravity'>Tools → Gravity</a> or run <code>pihole -g</code> to update your lists.</p>
|
||||
</div>
|
||||
</div>
|
||||
<p id="modal-import-info-message"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
Reference in New Issue
Block a user