Skip to content

Commit

Permalink
Merge branch 'statisticssweden:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
runejo authored Jan 23, 2023
2 parents 80e144f + 88c941c commit 90f4b56
Show file tree
Hide file tree
Showing 25 changed files with 62 additions and 55 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
=== Release of PxWeb 2023 v1 ===
- Updated template web.config with new assembly reference and new version number
- JSON format, added text for the variable values
=== Release of PxWeb 2022 v1 ===
- Changed Referrer-Policy to same-origin
- Added security header for Strict Transport and change value on header referrer-policy
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Api/PCAxis.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Sql, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Sql.1.1.4\lib\netstandard2.0\PCAxis.Sql.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.4\lib\netstandard2.0\Serializers.dll</HintPath>
<HintPath>..\packages\PCAxis.Serializers.1.1.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down
6 changes: 3 additions & 3 deletions PCAxis.Api/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net48" />
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
<package id="Microsoft.Data.SqlClient" version="1.1.3" targetFramework="net48" />
<package id="Microsoft.Data.SqlClient" version="1.1.4" targetFramework="net48" />
<package id="Microsoft.Data.SqlClient.SNI" version="1.1.0" targetFramework="net48" />
<package id="Microsoft.Identity.Client" version="3.0.8" targetFramework="net48" />
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.5.0" targetFramework="net48" />
Expand All @@ -22,8 +22,8 @@
<package id="PCAxis.Menu.MsSqlDatamodelMenu" version="1.0.1" targetFramework="net48" />
<package id="PCAxis.Menu.OracleDatamodelMenu" version="1.0.1" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.1.0" targetFramework="net48" />
<package id="PcAxis.Sql" version="1.1.4" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.Data.Common" version="4.3.0" targetFramework="net48" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Excel.Web.Controls/PCAxis.Excel.Web.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.4\lib\netstandard2.0\Serializers.dll</HintPath>
<HintPath>..\packages\PCAxis.Serializers.1.1.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Excel.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.1.0" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net48" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net48" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.4\lib\netstandard2.0\Serializers.dll</HintPath>
<HintPath>..\packages\PCAxis.Serializers.1.1.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.Html5Table.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.1.0" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net48" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net48" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.4\lib\netstandard2.0\Serializers.dll</HintPath>
<HintPath>..\packages\PCAxis.Serializers.1.1.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.JsonStat.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.1.0" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net48" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net48" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.4\lib\netstandard2.0\Serializers.dll</HintPath>
<HintPath>..\packages\PCAxis.Serializers.1.1.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.JsonStat2.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.1.0" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net48" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net48" />
Expand Down
4 changes: 2 additions & 2 deletions PCAxis.PX-Web.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29709.97
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PCAxis.Web.Core", "PCAxis.Web.Core\PCAxis.Web.Core.vbproj", "{BC004D40-DDC6-446E-A3DF-5D4BA0AE92B8}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Search/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Lucene.Net" version="3.0.3" targetFramework="net48" />
<package id="Microsoft.Data.SqlClient" version="1.1.3" targetFramework="net48" />
<package id="Microsoft.Data.SqlClient" version="1.1.4" targetFramework="net48" />
<package id="Microsoft.Data.SqlClient.SNI" version="1.1.0" targetFramework="net48" />
<package id="Microsoft.Identity.Client" version="3.0.8" targetFramework="net48" />
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.5.0" targetFramework="net48" />
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Web.Controls/PCAxis.Web.Controls.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PCAxis.Menu" version="1.0.1" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.Security.AccessControl" version="5.0.0" targetFramework="net48" />
<package id="System.Security.Permissions" version="5.0.0" targetFramework="net48" />
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Web.Core/PCAxis.Web.Core.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<HintPath>..\packages\PcAxis.Core.1.2.2\lib\netstandard2.0\PCAxis.Core.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down
2 changes: 1 addition & 1 deletion PCAxis.Web.Core/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.Security.AccessControl" version="5.0.0" targetFramework="net48" />
<package id="System.Security.Permissions" version="5.0.0" targetFramework="net48" />
Expand Down
4 changes: 2 additions & 2 deletions PX.Json.Web.Controls/PX.Json.Web.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
<HintPath>..\packages\PCAxis.Metadata.1.0.1\lib\netstandard2.0\PCAxis.Metadata.dll</HintPath>
</Reference>
<Reference Include="PCAxis.Query, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PcAxis.Query.1.0.4\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
<HintPath>..\packages\PcAxis.Query.1.0.5\lib\netstandard2.0\PCAxis.Query.dll</HintPath>
</Reference>
<Reference Include="Serializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PCAxis.Serializers.1.0.4\lib\netstandard2.0\Serializers.dll</HintPath>
<HintPath>..\packages\PCAxis.Serializers.1.1.0\lib\netstandard2.0\Serializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions PX.Json.Web.Controls/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="PcAxis.Core" version="1.2.2" targetFramework="net48" />
<package id="PCAxis.Metadata" version="1.0.1" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.4" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.0.4" targetFramework="net48" />
<package id="PcAxis.Query" version="1.0.5" targetFramework="net48" />
<package id="PCAxis.Serializers" version="1.1.0" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net48" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net48" />
Expand Down
7 changes: 3 additions & 4 deletions PXWeb/Admin/Tools-XMLGenerator.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@ protected void btnGenerateXML_Click(object sender, EventArgs e)
}
string themeMapping = HttpContext.Current.Server.MapPath("~/TMapping.json");
string dbType = cboSelectDbType.SelectedItem.Value;
string dbid = "";
string dbid;
IFetcher fetcher;

string currPath = HttpContext.Current.Server.MapPath("~");

string savePath = HttpContext.Current.Server.MapPath(PXWeb.Settings.Current.General.Paths.PxDatabasesPath + cboSelectDb.SelectedItem.Value + "/dcat-ap.xml");
switch (dbType) {
case "PX":
dbid = HttpContext.Current.Server.MapPath("~/Resources/PX/Databases/") + cboSelectDb.SelectedItem.Value + "/Menu.xml";
Expand Down Expand Up @@ -212,7 +211,7 @@ protected void btnGenerateXML_Click(object sender, EventArgs e)
};
try
{
XML.WriteToFile(HttpContext.Current.Server.MapPath("~/dcat-ap.xml"), settings);
XML.WriteToFile(savePath, settings);
}
catch(PCAxis.Menu.Exceptions.InvalidMenuFromXMLException)
{
Expand Down
9 changes: 5 additions & 4 deletions PXWeb/Code/API/Controllers/DcatController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ public HttpResponseMessage buildXML(string databaseType, string database, string
}
else if(databaseTypeLower == "px")
{
settings.DBid = HttpContext.Current.Server.MapPath("~/Resources/PX/Databases/") + database + "/Menu.xml";
settings.DBid = HttpContext.Current.Server.MapPath(PXWeb.Settings.Current.General.Paths.PxDatabasesPath) + database + "/Menu.xml";
if (!File.Exists(settings.DBid)) return Request.CreateResponse(HttpStatusCode.BadRequest, $"Database does not exist: {database}");
string localThemeMapping = HttpContext.Current.Server.MapPath("~/Resources/PX/Databases/") + database + "/TMapping.json";
string localThemeMapping = HttpContext.Current.Server.MapPath(PXWeb.Settings.Current.General.Paths.PxDatabasesPath) + database + "/TMapping.json";
if (File.Exists(localThemeMapping)) settings.ThemeMapping = localThemeMapping;
settings.Fetcher = new PXFetcher(HttpContext.Current.Server.MapPath("~/Resources/PX/Databases/"));
settings.Fetcher = new PXFetcher(HttpContext.Current.Server.MapPath(PXWeb.Settings.Current.General.Paths.PxDatabasesPath));
}
else
{
return Request.CreateResponse(HttpStatusCode.BadRequest, $"Invalid database type");
}
XML.WriteToFile(HttpContext.Current.Server.MapPath("~/dcat-ap.xml"), settings);
string savePath = HttpContext.Current.Server.MapPath(PXWeb.Settings.Current.General.Paths.PxDatabasesPath + database + "/dcat-ap.xml");
XML.WriteToFile(savePath, settings);
return Request.CreateResponse(HttpStatusCode.OK, $"Xml file created successfully, {databaseType}");
}
}
Expand Down
Loading

0 comments on commit 90f4b56

Please sign in to comment.