mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-13 01:56:58 -07:00
Prevent installing GeoLite2 database without license key
This commit is contained in:
parent
ee91da2ff1
commit
e7b3d768ce
1 changed files with 7 additions and 1 deletions
|
@ -1250,7 +1250,7 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" id="geoip_db" name="geoip_db" value="${config['geoip_db']}" ${docker_setting}>
|
<input type="text" class="form-control" id="geoip_db" name="geoip_db" value="${config['geoip_db']}" ${docker_setting}>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-form" type="button" id="install_geoip_db">${'Update' if config["geoip_db_installed"] else 'Install'}</button>
|
<button class="btn btn-form" type="button" id="install_geoip_db" disabled>${'Update' if config["geoip_db_installed"] else 'Install'}</button>
|
||||||
<button class="btn btn-form" type="button" id="uninstall_geoip_db">Uninstall</button>
|
<button class="btn btn-form" type="button" id="uninstall_geoip_db">Uninstall</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1999,6 +1999,7 @@ $(document).ready(function() {
|
||||||
getNewslettersTable();
|
getNewslettersTable();
|
||||||
getMobileDevicesTable();
|
getMobileDevicesTable();
|
||||||
loadUpdateDistros();
|
loadUpdateDistros();
|
||||||
|
enableGeoLiteInstallButton();
|
||||||
settingsChanged = false;
|
settingsChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2859,6 +2860,11 @@ $(document).ready(function() {
|
||||||
gotoSetting('3rd_party_apis', 'geoip_db')
|
gotoSetting('3rd_party_apis', 'geoip_db')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function enableGeoLiteInstallButton() {
|
||||||
|
$('#install_geoip_db').prop('disabled', !(Boolean($("#maxmind_license_key").val())));
|
||||||
|
}
|
||||||
|
enableGeoLiteInstallButton();
|
||||||
|
|
||||||
if ("${config['geoip_db_installed']}" > "0") {
|
if ("${config['geoip_db_installed']}" > "0") {
|
||||||
$("#geoip_db_updated").text(moment("${config['geoip_db_installed']}", "X").fromNow());
|
$("#geoip_db_updated").text(moment("${config['geoip_db_installed']}", "X").fromNow());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue