diff --git a/jsreport/NugetPack.cmd b/jsreport/NugetPack.cmd
index 8abb6eb..7818b9f 100644
--- a/jsreport/NugetPack.cmd
+++ b/jsreport/NugetPack.cmd
@@ -1 +1 @@
-call .\.nuget\nuget pack -sym jsreport.Client.nuspec -Symbols -Version %1 -OutputDirectory Packages
+call .\.nuget\nuget pack -sym jsreport.Embedded.nuspec -Symbols -Version %1 -OutputDirectory Packages
diff --git a/jsreport/jsreport.Client.Test/packages.config b/jsreport/jsreport.Client.Test/packages.config
index 174675a..52d8fdd 100644
--- a/jsreport/jsreport.Client.Test/packages.config
+++ b/jsreport/jsreport.Client.Test/packages.config
@@ -10,6 +10,6 @@
-
+
\ No newline at end of file
diff --git a/jsreport/jsreport.Client.nuspec b/jsreport/jsreport.Client.nuspec
index deb3699..ede7767 100644
--- a/jsreport/jsreport.Client.nuspec
+++ b/jsreport/jsreport.Client.nuspec
@@ -17,7 +17,7 @@
-
+
diff --git a/jsreport/jsreport.Client/Entities/Template.cs b/jsreport/jsreport.Client/Entities/Template.cs
index b3ce0e8..271471e 100644
--- a/jsreport/jsreport.Client/Entities/Template.cs
+++ b/jsreport/jsreport.Client/Entities/Template.cs
@@ -19,11 +19,6 @@ public Template()
///
public string shortid { get; set; }
- ///
- /// Used only when rendering in https://playground.jsreport.nets
- ///
- public int version { get; set; }
-
///
/// Content of report, most often this is html with javasript templating engines
///
diff --git a/jsreport/jsreport.Client/IReportingService.cs b/jsreport/jsreport.Client/IReportingService.cs
index c256d1a..fb34c32 100644
--- a/jsreport/jsreport.Client/IReportingService.cs
+++ b/jsreport/jsreport.Client/IReportingService.cs
@@ -31,16 +31,6 @@ public interface IReportingService
///
/// Report result promise
Task RenderAsync(string templateShortid, string jsonData);
-
- ///
- /// The simpliest rendering using template shortid and input data used with https://playground.jsreport.net
- ///
- /// template shortid can be taken from jsreport playground studio
- /// any json serializable object
- /// template version number taken from playground
- ///
- /// Report result promise
- Task RenderAsync(string templateShortid, int version, object data);
///
/// Overload for more sophisticated rendering.
diff --git a/jsreport/jsreport.Client/JsReportWebHandler.cs b/jsreport/jsreport.Client/JsReportWebHandler.cs
index 5a981b3..950cc93 100644
--- a/jsreport/jsreport.Client/JsReportWebHandler.cs
+++ b/jsreport/jsreport.Client/JsReportWebHandler.cs
@@ -104,6 +104,7 @@ private static void ParseRequestHeaders(HttpContext context, HttpWebRequest requ
if (ReportingService.Username != null)
{
+ request.Headers.Remove("Authorization");
request.Headers.Add("Authorization", "Basic " + System.Convert.ToBase64String(
Encoding.UTF8.GetBytes(String.Format("{0}:{1}", ReportingService.Username, ReportingService.Password))));
}
diff --git a/jsreport/jsreport.Client/Properties/AssemblyInfo.cs b/jsreport/jsreport.Client/Properties/AssemblyInfo.cs
index 8d88252..96c399a 100644
--- a/jsreport/jsreport.Client/Properties/AssemblyInfo.cs
+++ b/jsreport/jsreport.Client/Properties/AssemblyInfo.cs
@@ -26,5 +26,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.3.0")]
-[assembly: AssemblyFileVersion("0.1.3.0")]
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
diff --git a/jsreport/jsreport.Client/RenderRequest.cs b/jsreport/jsreport.Client/RenderRequest.cs
index 59e18db..f2ee032 100644
--- a/jsreport/jsreport.Client/RenderRequest.cs
+++ b/jsreport/jsreport.Client/RenderRequest.cs
@@ -53,8 +53,6 @@ internal void CopyDynamicAttributes()
if (template.phantom != null)
dynamicTemplate.phantom = template.phantom;
- dynamicTemplate.version = template.version;
-
if (template.additional != null)
{
foreach (var p in template.additional.GetType().GetRuntimeProperties())
diff --git a/jsreport/jsreport.Client/ReportingService.cs b/jsreport/jsreport.Client/ReportingService.cs
index 841769a..4a06dd4 100644
--- a/jsreport/jsreport.Client/ReportingService.cs
+++ b/jsreport/jsreport.Client/ReportingService.cs
@@ -87,23 +87,6 @@ public Task RenderAsync(string templateShortid, string jsonData)
return RenderAsync(templateShortid, string.IsNullOrEmpty(jsonData) ? (object) null : JObject.Parse(jsonData));
}
- ///
- /// The simpliest rendering using template shortid and input data used with https://playground.jsreport.net
- ///
- /// template shortid can be taken from jsreport playground studio
- /// any json serializable object
- /// template version number taken from playground
- ///
- /// Report result promise
- public async Task RenderAsync(string templateShortid, int version, object data)
- {
- return await RenderAsync(new RenderRequest()
- {
- template = new Template() { shortid = templateShortid, version = version},
- data = data
- }).ConfigureAwait(false);
- }
-
///
/// Overload for more sophisticated rendering.
///
@@ -241,13 +224,18 @@ public ODataClient CreateODataClient()
public async Task SynchronizeTemplatesAsync()
{
await EnsureVersion();
+ await SynchronizeTemplatesAsyncInner();
+ }
+
+ private async Task SynchronizeTemplatesAsyncInner()
+ {
string path = ReportsDirectory;
ODataClient client = CreateODataClient();
await SynchronizeImagesAsync(client, path).ConfigureAwait(false);
await SynchronizeSchemasAsync(client, path).ConfigureAwait(false);
-
+
foreach (string reportFilePath in ValidateUniquenes(Directory.GetFiles(path, "*.jsrep", SearchOption.AllDirectories)))
{
string reportName = Path.GetFileNameWithoutExtension(reportFilePath);
@@ -270,7 +258,7 @@ public async Task SynchronizeTemplatesAsync()
operation.recipe = reportDefinition.Recipe;
if (!string.IsNullOrEmpty(reportDefinition.SampleData))
- operation.data = new {shortid = reportDefinition.SampleData};
+ operation.data = new { shortid = reportDefinition.SampleData };
operation.content = content;
operation.helpers = helpers;
@@ -357,6 +345,7 @@ private async Task SynchronizeImagesAsync(ODataClient client, string path)
dynamic operation = new ExpandoObject();
operation.content = File.ReadAllBytes(imagePath);
operation.shortid = imageName;
+ operation.contentType = "image/png";
operation.name = operation.shortid;
var image = await (client.For().Filter(x => x.name == imageName).FindEntryAsync()).ConfigureAwait(false);
diff --git a/jsreport/jsreport.Client/jsreport.Client.csproj b/jsreport/jsreport.Client/jsreport.Client.csproj
index 768b3de..0bfcf7c 100644
--- a/jsreport/jsreport.Client/jsreport.Client.csproj
+++ b/jsreport/jsreport.Client/jsreport.Client.csproj
@@ -14,6 +14,7 @@
..\
true
+ 4a4505db
true
@@ -57,6 +58,23 @@
+
+ False
+ ..\packages\Microsoft.Data.Edm.5.6.3\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\packages\Microsoft.Data.OData.5.6.3\lib\net40\Microsoft.Data.OData.dll
+
+
+ ..\packages\Microsoft.OData.Core.6.10.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.OData.Core.dll
+
+
+ ..\packages\Microsoft.OData.Edm.6.10.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.OData.Edm.dll
+
+
+ ..\packages\Microsoft.Spatial.6.10.0\lib\portable-net40+sl5+wp8+win8+wpa\Microsoft.Spatial.dll
+
False
..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -72,9 +90,9 @@
..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll
-
+
False
- ..\packages\Simple.OData.Client.4.2.1\lib\net40\Simple.OData.Client.Net40.dll
+ ..\packages\Simple.OData.Client.4.3.0\lib\net40\Simple.OData.Client.Net40.dll
@@ -82,16 +100,20 @@
-
+
False
- ..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll
+ ..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll
-
+
False
- ..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll
+ ..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
+
+ False
+ ..\packages\System.Spatial.5.6.3\lib\net40\System.Spatial.dll
+
@@ -114,12 +136,9 @@
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
-
-
-
-
-
+