|
|
|
@ -293,6 +293,7 @@
|
|
|
|
|
|
|
|
|
|
DashboardPage.renderApplicationUpdateInfo(dashboardInfo);
|
|
|
|
|
DashboardPage.renderPluginUpdateInfo(dashboardInfo);
|
|
|
|
|
DashboardPage.renderPendingInstallations(dashboardInfo.SystemInfo);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
renderApplicationUpdateInfo: function (dashboardInfo) {
|
|
|
|
@ -341,6 +342,32 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
renderPendingInstallations: function (systemInfo) {
|
|
|
|
|
|
|
|
|
|
var page = $.mobile.activePage;
|
|
|
|
|
|
|
|
|
|
if (systemInfo.CompletedInstallations.length) {
|
|
|
|
|
|
|
|
|
|
$('#collapsiblePendingInstallations', page).show();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$('#collapsiblePendingInstallations', page).hide();
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var html = '';
|
|
|
|
|
|
|
|
|
|
for (var i = 0, length = systemInfo.CompletedInstallations.length; i < length; i++) {
|
|
|
|
|
|
|
|
|
|
var update = systemInfo.CompletedInstallations[i];
|
|
|
|
|
|
|
|
|
|
html += '<div><strong>' + update.Name + '</strong> (' + update.Version + ')</div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#pendingInstallations', page).html(html);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
renderPluginUpdateInfo: function (dashboardInfo) {
|
|
|
|
|
|
|
|
|
|
// Only check once every 10 mins
|
|
|
|
@ -354,12 +381,14 @@
|
|
|
|
|
|
|
|
|
|
ApiClient.getAvailablePluginUpdates().done(function (updates) {
|
|
|
|
|
|
|
|
|
|
var elem = $('#pPluginUpdates', page);
|
|
|
|
|
|
|
|
|
|
if (updates.length) {
|
|
|
|
|
|
|
|
|
|
$('#collapsiblePluginUpdates', page).show();
|
|
|
|
|
elem.show();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$('#collapsiblePluginUpdates', page).hide();
|
|
|
|
|
elem.hide();
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -374,7 +403,7 @@
|
|
|
|
|
html += '<button type="button" data-icon="download" data-theme="b" onclick="DashboardPage.installPluginUpdate(this);" data-name="' + update.name + '" data-version="' + update.versionStr + '" data-classification="' + update.classification + '">Update Now</button>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#pPluginUpdates', page).html(html).trigger('create');
|
|
|
|
|
elem.html(html).trigger('create');
|
|
|
|
|
|
|
|
|
|
}).fail(function () {
|
|
|
|
|
|
|
|
|
|