Skip to content

Commit

Permalink
#25. Renamed server url cascades to projects url.
Browse files Browse the repository at this point in the history
  • Loading branch information
zionyx committed Jan 22, 2015
1 parent 9014db2 commit 52f0d9c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
11 changes: 11 additions & 0 deletions HudsonTrayTracker/BusinessComponents/ConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,19 @@ public Server AddServer(string url, string displayName, string username, string
public void UpdateServer(Server server, string url, string displayName, string username, string password, bool ignoreUntrustedCertificate)
{
// note: we need to remove and re-add the server because its hash-code might change
string oldServerUrl = server.Url;
Servers.Remove(server);
BindData(server, url, displayName, username, password, ignoreUntrustedCertificate);

// Update all projects with new server url
if (server.Url.ToUpper().CompareTo(oldServerUrl.ToUpper()) != 0)
{
foreach (Project project in server.Projects)
{
string updatedUrl = project.Url.Replace(oldServerUrl, server.Url);
project.Url = updatedUrl;
}
}
Servers.Add(server);
SaveConfiguration();
}
Expand Down
5 changes: 5 additions & 0 deletions HudsonTrayTracker/UI/EditServerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,10 @@ private void urlTextBox_Leave(object sender, EventArgs e)
ServerAddress = "http://" + url;
}
}

private void EditServerForm_FormClosing(object sender, FormClosingEventArgs e)
{
urlTextBox_Leave(null, null);
}
}
}
1 change: 1 addition & 0 deletions HudsonTrayTracker/UI/EditServerForm.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Stories in Ready](https://badge.waffle.io/zionyx/jenkins-tray-tracker.png?label=ready&title=Ready)](https://waffle.io/zionyx/jenkins-tray-tracker)
Jenkins-tray-tracker
===================
[![Stories in Ready](https://badge.waffle.io/zionyx/jenkins-tray.png?label=ready&title=Ready)](https://waffle.io/zionyx/jenkins-tray)
Jenkins Tray
============

Hudson Tray Tracker forked.

Inherited Issues
==============
================
https://code.google.com/p/hudson-tray-tracker/issues/list

0 comments on commit 52f0d9c

Please sign in to comment.