CP-32667 Added download action to CHC (#2912)

Added the interface option to download and install updates for client updates. Disabled by default until CP-31587 does the proper checks

Signed-off-by: Christophe25 <christopher.lancaste1@citrix.com>
This commit is contained in:
CitrixChris 2021-12-16 10:34:00 +00:00 committed by GitHub
parent eef4e5f995
commit 05cbae25ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -68,6 +68,13 @@ namespace XenAdmin.Alerts
public override string HelpID => "XenCenterUpdateAlert";
public bool Downloadable {
get {
// TODO: Implement proper check in CP-31587
return false;
}
}
static int DISMISSED_XC_VERSIONS_LIMIT = 5;
public override void Dismiss()

View File

@ -830,6 +830,14 @@ namespace XenAdmin.TabPages
items.Add(fix);
}
if (alert is ClientUpdateAlert)
{
var download = new ToolStripMenuItem(Messages.UPDATES_DOWNLOAD_AND_INSTALL);
download.Click += ToolStripMenuItemDownloadInstall_Click;
download.Enabled = (alert as ClientUpdateAlert).Downloadable;
items.Add(download);
}
if (items.Count > 0)
items.Add(new ToolStripSeparator());
@ -956,6 +964,11 @@ namespace XenAdmin.TabPages
}
}
private void ToolStripMenuItemDownloadInstall_Click(object sender, EventArgs e)
{
throw new NotImplementedException("To be implemented via CP-31587");
}
private void ToolStripMenuItemDismiss_Click(object sender, EventArgs e)
{
if (dataGridViewUpdates.SelectedRows.Count != 1)