Skip to content

Commit 5ab95ce

Browse files
committed
Merge branch 'development' into 'master'
Development See merge request !6
2 parents 3b66046 + 46c7f5c commit 5ab95ce

File tree

92 files changed

+3244
-895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3244
-895
lines changed

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,15 @@ __pycache__/
293293
*.btm.cs
294294
*.odx.cs
295295
*.xsd.cs
296+
297+
## Project Specific
298+
299+
# Client dist folders
300+
**/Clients/**/dist
301+
302+
# Temporarily ignore assets folder until it's moved.
303+
**/Clients/assets
304+
305+
# Compiled LESS
306+
**/css/**/*.css
307+

DeployClient/API.cs

+9-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private static HttpClient BuildClient()
2626

2727
public static string CreateSession()
2828
{
29-
string endpoint = "CI/CreateSession";
29+
string endpoint = "Remote/CreateSession";
3030

3131
using (HttpClient client = BuildClient())
3232
{
@@ -49,7 +49,7 @@ public static string CreateSession()
4949

5050
public static Dictionary<string, dynamic> GetSession(string sessionGuid)
5151
{
52-
string endpoint = string.Format("CI/GetSession?sessionGuid={0}", sessionGuid);
52+
string endpoint = string.Format("Remote/GetSession?sessionGuid={0}", sessionGuid);
5353

5454
JavaScriptSerializer jsonSer = new JavaScriptSerializer();
5555

@@ -63,7 +63,7 @@ public static Dictionary<string, dynamic> GetSession(string sessionGuid)
6363

6464
public static void AddPackages(string sessionGuid, List<KeyValuePair<string, Stream>> streams)
6565
{
66-
string endpoint = string.Format("CI/AddPackages?sessionGuid={0}", sessionGuid);
66+
string endpoint = string.Format("Remote/AddPackages?sessionGuid={0}", sessionGuid);
6767

6868
using (HttpClient client = BuildClient())
6969
{
@@ -80,7 +80,7 @@ public static void AddPackages(string sessionGuid, List<KeyValuePair<string, Str
8080

8181
public static void AddPackageAsync(string sessionGuid, Stream stream, string filename)
8282
{
83-
string endpoint = string.Format("CI/AddPackages?sessionGuid={0}", sessionGuid);
83+
string endpoint = string.Format("Remote/AddPackages?sessionGuid={0}", sessionGuid);
8484

8585
using (HttpClient client = BuildClient())
8686
{
@@ -92,9 +92,9 @@ public static void AddPackageAsync(string sessionGuid, Stream stream, string fil
9292
}
9393
}
9494

95-
public static bool Install(string sessionGuid, out Dictionary<string, dynamic> response)
95+
public static bool Install(string sessionGuid, out SortedList<string, dynamic> response)
9696
{
97-
string endpoint = string.Format("CI/Install?sessionGuid={0}", sessionGuid);
97+
string endpoint = string.Format("Remote/Install?sessionGuid={0}", sessionGuid);
9898

9999
bool success = false;
100100

@@ -112,15 +112,16 @@ public static bool Install(string sessionGuid, out Dictionary<string, dynamic> r
112112
{
113113
success = true;
114114
string json = httpResponse.Content.ReadAsStringAsync().Result;
115-
response = jsonSer.Deserialize<Dictionary<string, dynamic>>(json);
115+
response = jsonSer.Deserialize<SortedList<string, dynamic>>(json);
116116
}
117117
}
118118
catch (Exception ex)
119119
{
120120
// Nothing to do.
121121
}
122122

123-
return success;
123+
// Always fail.
124+
return false;
124125
}
125126
}
126127
}

DeployClient/Program.cs

+40-15
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void Main(string[] args)
145145
JavaScriptSerializer jsonSer = new JavaScriptSerializer();
146146

147147
// Start.
148-
Dictionary<string, dynamic> results = null;
148+
SortedList<string, dynamic> results = null;
149149

150150
if (!API.Install(sessionGuid, out results))
151151
{
@@ -172,19 +172,16 @@ static void Main(string[] args)
172172
if (response.ContainsKey("Response"))
173173
{
174174
// Yes, get the response.
175-
results = jsonSer.Deserialize<Dictionary<string, dynamic>>(response["Response"]);
175+
results = jsonSer.Deserialize<SortedList<string, dynamic>>(response["Response"]);
176176
}
177177

178178
// As long as we have something.
179179
if (status != -1 && results != null)
180-
{
181-
// Get the installed and failed lists.
182-
ArrayList installed = results.ContainsKey("Installed") ? results["Installed"] : null;
183-
ArrayList failed = results.ContainsKey("Failed") ? results["Failed"] : null;
184-
185-
// Give some feedback on it, only if it's changed.
186-
string print = string.Format("\t{0} module archives processed, {0}/{1} succeeded.", installed.Count + failed.Count, installed.Count);
180+
{
181+
// Build feedback.
182+
string print = BuildUpdateString(results);
187183

184+
// Same as previous feedback?
188185
if (print != previousPrint)
189186
{
190187
WriteLine(print);
@@ -204,15 +201,14 @@ static void Main(string[] args)
204201
}
205202
else
206203
{
207-
// Get the installed and failed lists.
208-
ArrayList installed = results.ContainsKey("Installed") ? results["Installed"] : null;
209-
ArrayList failed = results.ContainsKey("Failed") ? results["Failed"] : null;
204+
// Build feedback.
205+
string print = BuildUpdateString(results);
210206

211-
// Give some feedback on it.
212-
WriteLine(string.Format("\t{0} module archives processed, {0}/{1} succeeded.", installed.Count + failed.Count, installed.Count));
213-
207+
// Print feedback.
208+
WriteLine(print);
214209
}
215210

211+
// Finished install.
216212
WriteLine(string.Format("Finished installation in {0} ms.", (DateTime.Now - installStartTime).TotalMilliseconds));
217213
ReadLine();
218214
}
@@ -227,6 +223,35 @@ static void Main(string[] args)
227223
}
228224
}
229225

226+
private static string BuildUpdateString(SortedList<string, dynamic> results)
227+
{
228+
// Get counts.
229+
int attempted = 0;
230+
int succeeded = 0;
231+
int failed = 0;
232+
233+
foreach (KeyValuePair<string, dynamic> kvp in results)
234+
{
235+
Dictionary<string, dynamic> module = kvp.Value;
236+
237+
if (module.ContainsKey("Attempted") && (bool)module["Attempted"])
238+
{
239+
attempted++;
240+
241+
if (module.ContainsKey("Success") && (bool)module["Success"])
242+
{
243+
succeeded++;
244+
}
245+
else
246+
{
247+
failed++;
248+
}
249+
}
250+
}
251+
252+
return string.Format("\t{0}/{1} module archives processed, {2}/{0} succeeded.", attempted, results.Count, succeeded);
253+
}
254+
230255
private static void WriteException(Exception ex, int maxDepth = 10, int depth = 0)
231256
{
232257
WriteLine(ex.Message);

PolyDeploy.sln

+7
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,25 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeployClient", "DeployClien
1111
EndProject
1212
Global
1313
GlobalSection(SolutionConfigurationPlatforms) = preSolution
14+
Clients|Any CPU = Clients|Any CPU
1415
Debug|Any CPU = Debug|Any CPU
1516
Release|Any CPU = Release|Any CPU
1617
EndGlobalSection
1718
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{B15D41DD-2D1A-490C-977F-2F14E56447D5}.Clients|Any CPU.ActiveCfg = Clients|Any CPU
20+
{B15D41DD-2D1A-490C-977F-2F14E56447D5}.Clients|Any CPU.Build.0 = Clients|Any CPU
1821
{B15D41DD-2D1A-490C-977F-2F14E56447D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1922
{B15D41DD-2D1A-490C-977F-2F14E56447D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
2023
{B15D41DD-2D1A-490C-977F-2F14E56447D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
2124
{B15D41DD-2D1A-490C-977F-2F14E56447D5}.Release|Any CPU.Build.0 = Release|Any CPU
25+
{AB5A3320-F260-42EE-8F19-CCF7546CA511}.Clients|Any CPU.ActiveCfg = Release|Any CPU
26+
{AB5A3320-F260-42EE-8F19-CCF7546CA511}.Clients|Any CPU.Build.0 = Release|Any CPU
2227
{AB5A3320-F260-42EE-8F19-CCF7546CA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2328
{AB5A3320-F260-42EE-8F19-CCF7546CA511}.Debug|Any CPU.Build.0 = Debug|Any CPU
2429
{AB5A3320-F260-42EE-8F19-CCF7546CA511}.Release|Any CPU.ActiveCfg = Release|Any CPU
2530
{AB5A3320-F260-42EE-8F19-CCF7546CA511}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{B6122CCD-75F9-4DEF-8DAA-E11789D6D6D8}.Clients|Any CPU.ActiveCfg = Release|Any CPU
32+
{B6122CCD-75F9-4DEF-8DAA-E11789D6D6D8}.Clients|Any CPU.Build.0 = Release|Any CPU
2633
{B6122CCD-75F9-4DEF-8DAA-E11789D6D6D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2734
{B6122CCD-75F9-4DEF-8DAA-E11789D6D6D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
2835
{B6122CCD-75F9-4DEF-8DAA-E11789D6D6D8}.Release|Any CPU.ActiveCfg = Release|Any CPU

PolyDeploy/.babelrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"plugins": ["transform-object-rest-spread"],
3+
"presets": ["es2015"]
4+
}

PolyDeploy/App_LocalResources/Settings.ascx.resx

-129
This file was deleted.

0 commit comments

Comments
 (0)