diff --git a/DataCenter_Windows/WindowsDataCenter/NDP452-KB2901907-x86-x64-AllOS-ENU.exe b/DataCenter_Windows/WindowsDataCenter/NDP452-KB2901907-x86-x64-AllOS-ENU.exe new file mode 100644 index 0000000..980d238 Binary files /dev/null and b/DataCenter_Windows/WindowsDataCenter/NDP452-KB2901907-x86-x64-AllOS-ENU.exe differ diff --git a/DataCenter_Windows/WindowsDataCenter/NLogLogger/NLogger.cs b/DataCenter_Windows/WindowsDataCenter/NLogLogger/NLogger.cs index e310011..f297156 100644 --- a/DataCenter_Windows/WindowsDataCenter/NLogLogger/NLogger.cs +++ b/DataCenter_Windows/WindowsDataCenter/NLogLogger/NLogger.cs @@ -1,5 +1,7 @@ using System; using System.Configuration; +using System.IO; +using System.Reflection; using NLog; using NLog.Config; using ILogger = Interfaces.ILogger; @@ -11,7 +13,7 @@ namespace NLogLogger private NLog.Logger _logger; public NLogger() { - var nlogConfigPath = ConfigurationManager.AppSettings["NLogConfigFilePath"]; + var nlogConfigPath = new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase), ConfigurationManager.AppSettings["NLogConfigFilePath"])).LocalPath; if (nlogConfigPath == null) { throw new ArgumentNullException("nlogConfigPath"); diff --git a/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs b/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs index 55a878e..cd248eb 100644 --- a/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs +++ b/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.IO; using System.Linq; +using System.Reflection; using System.Security.Cryptography.X509Certificates; using Interfaces; using SQLite.Net; @@ -17,6 +19,9 @@ namespace SQLiteRepository public SQLiteRepository(ILogger logger) { + _path = + new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase), "flexitimedb.db")) + .LocalPath; if (logger == null) throw new ArgumentNullException(nameof(logger)); _logger = logger; diff --git a/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.csproj b/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.csproj index de10722..337b41c 100644 --- a/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.csproj +++ b/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.csproj @@ -11,6 +11,8 @@ SQLiteRepository v4.5.2 512 + + true @@ -44,6 +46,10 @@ + + ..\packages\System.Data.SQLite.Core.1.0.104.0\lib\net451\System.Data.SQLite.dll + True + @@ -71,6 +77,13 @@ + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + In Out @@ -220,14 +220,14 @@ - + - Weekly Total + Weekly Total diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js index 5b0771b..282d3fa 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js @@ -140,6 +140,15 @@ var date = new Date(dateValue); return date.getHours() + ":" + (date.getMinutes() < 10 ? '0' : '') + date.getMinutes(); }; + self.correctLogOffset = function (logCount) { + if (logCount % 2 !== 0) { + logCount += 1; + } + return logCount; + } + self.getTimeLogEntryArrayLength = function(maxDailyLogs) { + return Math.round(maxDailyLogs/2); + }; self.dismissAlert = function(data, event) { self.errorData(null); }; diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataServiceHost/WindowsDataServiceHost.csproj b/DataCenter_Windows/WindowsDataCenter/WindowsDataServiceHost/WindowsDataServiceHost.csproj index 87e4d2e..8b8049d 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataServiceHost/WindowsDataServiceHost.csproj +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataServiceHost/WindowsDataServiceHost.csproj @@ -49,10 +49,6 @@ ..\packages\Owin.1.0\lib\net40\Owin.dll True - - ..\packages\RazorEngine.3.7.2\lib\net45\RazorEngine.dll - True - @@ -101,7 +97,9 @@ copy "$(SolutionDir)NLogLogger\$(OutDir)NLog.dll" "$(TargetDir)" copy "$(SolutionDir)NLogLogger\$(OutDir)NLogLogger.dll.config" "$(TargetDir)" copy "$(SolutionDir)NLogLogger\$(OutDir)NLogConfig.xml" "$(TargetDir)Configs\" -copy "$(SolutionDir)WindowsDataCenter\$(OutDir)Ninject.Extensions.Xml.dll" "$(TargetDir)" +copy "$(SolutionDir)WindowsDataCenter\$(OutDir)Ninject.Extensions.Xml.dll" "$(TargetDir)" + +copy "$(SolutionDir)WindowsDataCenter\$(OutDir)RazorEngine.dll" "$(TargetDir)"