From 09b1dd03e5d67453e673789fe0826e7a25d881ab Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 24 Sep 2020 22:28:15 +0300 Subject: Allow null user on jobs. Dropped use of any user on PPC. --- .../Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 2 +- .../Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml | 2 +- .../Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 8f02749da..fc0680d9c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -1257,7 +1257,7 @@ namespace Tango.MachineStudio.Developer.ViewModels || j.Name.ToLower().Contains(filter) //Job name || - j.User.Contact.FirstName.ToLower().Contains(filter) // User first name + (j.User != null && j.User.Contact.FirstName.ToLower().Contains(filter)) // User first name || j.Length.ToString().Contains(filter); //Job length }; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index 78a7551c0..c7e1d4130 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -193,7 +193,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml index de506bab8..862f48793 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml @@ -493,7 +493,7 @@ - + -- cgit v1.3.1 From 73d68112321587add7e22d89175fd1f12c34c6d1 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 25 Sep 2020 04:04:52 +0300 Subject: Improved Auth2 package and tested. Dropped "Stack trace not provided" message from TangoController. Retained job user round-trip from MS. --- .../PPC Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../Advanced Installer Projects/PPC Installer.aip | 125 +++++++++++++-------- .../Views/MachineJobSelectionView.xaml | 2 +- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- .../Tango.PPC.Packages.Auth2/Auth2.cs | 37 +++++- .../Tango.PPC.Packages.Auth2.csproj | 4 + .../SQLExaminer/Configurations/UpdateMachine.xml | Bin 72920 -> 77930 bytes .../Tango.Web/Controllers/TangoController.cs | 2 +- .../Controllers/PPCController.cs | 4 +- .../Properties/AssemblyInfo.cs | 2 +- 11 files changed, 119 insertions(+), 61 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules') diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt index a603ff06b..5fe5afe5a 100644 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt and b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index d1e783e61..7cd6c02b1 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip @@ -18,10 +18,10 @@ - + - + @@ -73,7 +73,9 @@ + + @@ -156,7 +158,6 @@ - @@ -164,6 +165,7 @@ + @@ -194,12 +196,14 @@ + + @@ -221,26 +225,28 @@ - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - @@ -312,7 +318,6 @@ - @@ -502,6 +507,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -511,7 +548,7 @@ - + @@ -579,20 +616,6 @@ - - - - - - - - - - - - - - @@ -707,7 +730,6 @@ - @@ -791,20 +813,27 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index c7e1d4130..a3d2dbd68 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -193,7 +193,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index de58aa679..b95219ad0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("1.1.28.0")] +[assembly: AssemblyVersion("1.2.3.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs index c27391d90..6ba278511 100644 --- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs +++ b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using Tango.BL; using Tango.Core; @@ -10,7 +11,7 @@ using Tango.PPC.Shared.Updates; namespace Tango.PPC.Packages.Auth2 { - [PPCPackage(PackageType.Pre, "Auth 2", false)] + [PPCPackage(PackageType.Pre, "Applying Auth2 Patch", false)] public class Auth2 : ExtendedObject, IPPCPackage { public Task Run(PackageContext context) @@ -23,23 +24,49 @@ namespace Tango.PPC.Packages.Auth2 { using (var transaction = db.Database.BeginTransaction()) { - LogManager.Log("Removing all users..."); - context.ReportProgress("Modifying users..."); - db.Database.ExecuteSqlCommand("DELETE FROM USERS"); - LogManager.Log("Setting all jobs users to null..."); context.ReportProgress("Modifying jobs..."); db.Database.ExecuteSqlCommand("ALTER TABLE JOBS ALTER COLUMN USER_GUID VARCHAR(36) NULL"); db.Database.ExecuteSqlCommand("UPDATE JOBS SET USER_GUID = NULL"); + Thread.Sleep(1000); + LogManager.Log("Setting all job runs users to null..."); context.ReportProgress("Modifying job runs..."); db.Database.ExecuteSqlCommand("UPDATE JOB_RUNS SET USER_GUID = NULL"); + Thread.Sleep(1000); + LogManager.Log("Setting all events users to null..."); context.ReportProgress("Modifying events..."); db.Database.ExecuteSqlCommand("UPDATE MACHINES_EVENTS SET USER_GUID = NULL"); + Thread.Sleep(1000); + + LogManager.Log("Removing all users..."); + context.ReportProgress("Modifying users..."); + db.Database.ExecuteSqlCommand("DELETE FROM USERS"); + + Thread.Sleep(1000); + + LogManager.Log("Removing redundant addresses..."); + context.ReportProgress("Modifying addresses..."); + db.Database.ExecuteSqlCommand(@" +DELETE ADDRESSES FROM ADDRESSES +FULL JOIN ORGANIZATIONS ON ORGANIZATIONS.ADDRESS_GUID = ADDRESSES.GUID +WHERE ORGANIZATIONS.ADDRESS_GUID IS NULL"); + + Thread.Sleep(1000); + + LogManager.Log("Removing redundant contacts..."); + context.ReportProgress("Modifying contacts..."); + db.Database.ExecuteSqlCommand(@" +DELETE CONTACTS FROM CONTACTS +FULL JOIN ORGANIZATIONS ON ORGANIZATIONS.CONTACT_GUID = CONTACTS.GUID +WHERE ORGANIZATIONS.CONTACT_GUID IS NULL"); + + Thread.Sleep(1000); + LogManager.Log("Committing transaction..."); context.ReportProgress("Committing transaction..."); transaction.Commit(); diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj index 721c61654..bd91c2b60 100644 --- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj +++ b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj @@ -33,9 +33,11 @@ ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + False ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + False @@ -55,6 +57,7 @@ {F441FEEE-322A-4943-B566-110E12FD3B72} Tango.BL + False {A34EE0F0-649D-41C8-8489-B6F1CC6924EE} @@ -74,6 +77,7 @@ {208c8bd8-72c6-4e3c-acaa-351091a2acc7} Tango.PPC.Shared + False diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml index 260448394..b70bc1ff4 100644 Binary files a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml and b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml differ diff --git a/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs b/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs index 3fd3d469e..b3df0373e 100644 --- a/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs +++ b/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs @@ -84,7 +84,7 @@ namespace Tango.Web.Controllers if (expandedExceptionValues != null) { - expandedExceptionValues["StackTrace"] = "StackTrace not provided."; + expandedExceptionValues["StackTrace"] = ""; } } #endif diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs index 601438d67..2c1c27f52 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs @@ -533,7 +533,6 @@ namespace Tango.MachineService.Controllers var job = dto.ToObservable(); job.ID = 0; - job.UserGuid = dto.UserGuid; job.CustomerGuid = null; job.IsSynchronized = true; @@ -546,6 +545,7 @@ namespace Tango.MachineService.Controllers } else if (job.LastUpdated > existingJob.LastUpdated) { + job.UserGuid = existingJob.UserGuid; existingJob.Delete(db); db.Jobs.Add(job); db.SaveChanges(); @@ -571,7 +571,6 @@ namespace Tango.MachineService.Controllers { var run = dto.ToObservable(); run.ID = 0; - run.UserGuid = dto.UserGuid; run.IsSynchronized = true; if (db.JobRuns.SingleOrDefault(x => x.Guid == run.Guid) == null) @@ -600,7 +599,6 @@ namespace Tango.MachineService.Controllers { var ev = dto.ToObservable(); ev.ID = 0; - ev.UserGuid = dto.UserGuid; ev.IsSynchronized = true; if (db.MachinesEvents.SingleOrDefault(x => x.Guid == ev.Guid) == null) diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs index efa53fcdd..11c9ee72a 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs @@ -24,4 +24,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.4.0")] +[assembly: AssemblyVersion("3.0.5.0")] -- cgit v1.3.1 From 0476dcfa43b3fa43997d8c763463350b81448107 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 25 Sep 2020 14:17:17 +0300 Subject: Changed JobRuns grid null user to "PPC". --- .../Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml index 862f48793..bc99c1bfa 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml @@ -493,7 +493,7 @@ - + -- cgit v1.3.1