remove self update capability from service

This commit is contained in:
Luke Pulverenti 2013-10-07 12:22:19 -04:00
parent d8fdb2f5f8
commit e3b0163c4a
2 changed files with 15 additions and 2 deletions

View File

@ -23,7 +23,12 @@
<div id="pUpdateNow" style="display: none;"> <div id="pUpdateNow" style="display: none;">
<p><strong>A new version of Media Browser Server is available!</strong></p> <p><strong>A new version of Media Browser Server is available!</strong></p>
<p id="newVersionNumber"></p> <p id="newVersionNumber"></p>
<button id="btnUpdateApplication" type="button" data-icon="download" data-theme="b" onclick="DashboardPage.updateApplication();">Update Now</button> <div id="btnUpdateApplicationContainer">
<button id="btnUpdateApplication" type="button" data-icon="download" data-theme="b" onclick="DashboardPage.updateApplication();">Update Now</button>
</div>
<div id="btnManualUpdateContainer">
Please shutdown the server and <a href="http://www.mediabrowser3.com/download" target="_blank">update manually.</a>
</div>
</div> </div>
<div id="updateFail" style="color: #cc0000; display: none;">There was an error connecting to the remote Media Browser repository.</div> <div id="updateFail" style="color: #cc0000; display: none;">There was an error connecting to the remote Media Browser repository.</div>
<p id="ports"></p> <p id="ports"></p>

View File

@ -362,7 +362,7 @@
$('#updateFail', page).hide(); $('#updateFail', page).hide();
if (dashboardInfo.SystemInfo.IsNetworkDeployed && !dashboardInfo.SystemInfo.HasPendingRestart) { if (!dashboardInfo.SystemInfo.HasPendingRestart) {
// Only check once every 10 mins // Only check once every 10 mins
if (DashboardPage.lastAppUpdateCheck && (new Date().getTime() - DashboardPage.lastAppUpdateCheck) < 600000) { if (DashboardPage.lastAppUpdateCheck && (new Date().getTime() - DashboardPage.lastAppUpdateCheck) < 600000) {
@ -382,6 +382,14 @@
$('#pUpToDate', page).hide(); $('#pUpToDate', page).hide();
$('#pUpdateNow', page).show(); $('#pUpdateNow', page).show();
if (dashboardInfo.SystemInfo.CanSelfUpdate) {
$('#btnUpdateApplicationContainer', page).show();
$('#btnManualUpdateContainer', page).hide();
} else {
$('#btnUpdateApplicationContainer', page).hide();
$('#btnManualUpdateContainer', page).show();
}
$('#newVersionNumber', page).html("Version " + version.versionStr + " is now available for download."); $('#newVersionNumber', page).html("Version " + version.versionStr + " is now available for download.");
} }