-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP-40844: Adds download source action that gets the latest source code in the production stage #3153
CP-40844: Adds download source action that gets the latest source code in the production stage #3153
Changes from all commits
f0e75f2
fc75da7
fc2877f
32009af
5878f21
7d57754
a8c6616
723624e
be934fa
432e0a8
a3f5924
8dcacef
8cbd911
d5ef4d7
0fe7691
3222bd0
bd7eaad
91bd5e0
ed71d8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
using XenAdmin.Controls.GradientPanel; | ||
using XenAdmin.Dialogs.ServerUpdates; | ||
using XenAdmin.Help; | ||
using XenAdmin.Actions.Updates; | ||
|
||
namespace XenAdmin | ||
{ | ||
|
@@ -269,6 +270,7 @@ public MainWindow(string[] args) | |
statusButtonAlerts.Visible = statusButtonUpdates.Visible = statusButtonCdnUpdates.Visible = statusButtonProgress.Visible = statusButtonErrors.Visible = false; | ||
statusButtonUpdates.ToolTipText = string.Format(statusButtonUpdates.ToolTipText, BrandManager.ProductVersion821); | ||
statusButtonCdnUpdates.ToolTipText = string.Format(statusButtonCdnUpdates.ToolTipText, BrandManager.ProductBrand, BrandManager.ProductVersionPost82); | ||
downloadLatestSourceToolStripMenuItem.Text = Messages.DOWNLOAD_LATEST_SOURCE; | ||
} | ||
|
||
private void RegisterEvents() | ||
|
@@ -966,7 +968,7 @@ private void connection_CachePopulated(IXenConnection connection) | |
Program.Invoke(Program.MainWindow, delegate | ||
{ | ||
var msg = string.Format(Messages.GUI_OUT_OF_DATE, BrandManager.BrandConsole, Helpers.GetName(coordinator)); | ||
var url = InvisibleMessages.OUT_OF_DATE_WEBSITE; | ||
var url = InvisibleMessages.WEBSITE_DOWNLOADS; | ||
var title = string.Format(Messages.CONNECTION_REFUSED_TITLE, Helpers.GetName(coordinator).Ellipsise(80)); | ||
var error = $"{msg}\n{url}"; | ||
|
||
|
@@ -994,7 +996,7 @@ private void connection_CachePopulated(IXenConnection connection) | |
{ | ||
var msg = string.Format(Messages.GUI_NOT_COMPATIBLE, BrandManager.BrandConsole, BrandManager.ProductVersion712, | ||
BrandManager.ProductVersion80, Helpers.GetName(coordinator)); | ||
var url = InvisibleMessages.OUT_OF_DATE_WEBSITE; | ||
var url = InvisibleMessages.WEBSITE_DOWNLOADS; | ||
var title = string.Format(Messages.CONNECTION_REFUSED_TITLE, Helpers.GetName(coordinator).Ellipsise(80)); | ||
var error = $"{msg}\n{url}"; | ||
|
||
|
@@ -2715,7 +2717,14 @@ private void SetClientUpdateAlert() | |
{ | ||
updateAlert = Updates.ClientUpdateAlerts.FirstOrDefault(); | ||
if (updateAlert != null) | ||
{ | ||
CitrixChris marked this conversation as resolved.
Show resolved
Hide resolved
|
||
relNotesToolStripMenuItem.Text = string.Format(Messages.MAINWINDOW_UPDATE_RELEASE, updateAlert.NewVersion.Version); | ||
downloadSourceToolStripMenuItem.Text = string.Format(Messages.DOWNLOAD_SOURCE, BrandManager.BrandConsole, updateAlert.NewVersion.Version); | ||
} | ||
var clientVersion = Updates.ClientVersions.FirstOrDefault(); | ||
downloadLatestSourceToolStripMenuItem.Text = clientVersion != null | ||
? string.Format(Messages.DOWNLOAD_SOURCE, BrandManager.BrandConsole, clientVersion.Version) | ||
: string.Format(Messages.DOWNLOAD_LATEST_SOURCE, BrandManager.BrandConsole); | ||
updateClientToolStripMenuItem.Visible = updateAlert != null; | ||
} | ||
|
||
|
@@ -3391,5 +3400,15 @@ private void configureUpdatesToolStripMenuItem_Click(object sender, EventArgs e) | |
using (var dialog = new ConfigUpdatesDialog()) | ||
dialog.ShowDialog(this); | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aplogies if I'm missing something, but why have we added two items? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one to be in the alert notification menu one to be in the help menu |
||
private void downloadSourceToolStripMenuItem_Click(object sender, EventArgs e) | ||
{ | ||
ClientUpdateAlert.DownloadSource(this); | ||
} | ||
|
||
private void downloadLatestSourceToolStripMenuItem_Click(object sender, EventArgs e) | ||
{ | ||
ClientUpdateAlert.DownloadSource(this); | ||
} | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's a large number of changes here that are hard to decipher like this. Is this VS22 doing its thing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were added automatically by VS some time ago. I have removed them in this PR #3223 because it was through a PR of mine that were added in the first place. Since you have requested more changes in the current PR, it might be easier to merge the aforementioned one and then rebase again the current one on master. Generally I think the problem is that in the remote past people had the habit to modify the Desginger.cs manually, hence VS tries now to rearrange things every time we open the Designer or change something. Also, there are controls that contain things in the constructor that do not make sense at design time, so I think this also plays a role to what VS changes automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is also called from the item under the help menu when alerts are absent, in which case it won't download the source. Maybe make the clientVersion a parameter and set it accordingly in the item click handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will as the clientVersions is the pre-processed list of updates, it only becomes an update alert if the installed version < update version