From 00a491d93733d4625ad329b2ba8237f445364b3f Mon Sep 17 00:00:00 2001 From: Mirta Date: Wed, 30 Dec 2020 16:39:52 +0200 Subject: merge --- .../Tango.PPC.BugReporting/BugReportingModule.cs | 2 +- .../TFS/TeamFoundationServicePPCClient.cs | 73 ++----- .../Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj | 235 --------------------- .../Tango.PPC.BugReporting/ViewModelLocator.cs | 2 +- 4 files changed, 18 insertions(+), 294 deletions(-) delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs index 659ffe732..e65b44698 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs @@ -17,7 +17,7 @@ namespace Tango.PPC.BugReporting /// Represents a PPC . /// /// - [PPCModule(6)] + [PPCModule(5)] public class BugReportingModule : PPCModuleBase { /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs index b84d11c37..26d6425bf 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs @@ -13,8 +13,6 @@ using Tango.PPC.Common.Connection; using Tango.TFS; using Tango.Core.ExtensionMethods; using Tango.Core.Helpers; -using Tango.Settings; -using Tango.PPC.Common; namespace Tango.PPC.BugReporting.TFS { @@ -55,21 +53,6 @@ namespace Tango.PPC.BugReporting.TFS } } - private string[] GetLogFiles(FileLogger logger) - { - string[] fileEntries = new string[1]; - fileEntries[0] = logger.LogFile; - string fileName = Path.GetFileNameWithoutExtension(logger.LogFile); - int indexPos = fileName.IndexOf(FileLogger.FILE_SET_EXTENSION); - if (indexPos > 0) - { - string extension = Path.GetExtension(logger.LogFile); - fileName = fileName.Substring(0, indexPos); - fileEntries = Directory.GetFiles(logger.Folder, $"{fileName}*{extension}").Where(x => Path.GetFileName(x).StartsWith(logger.Tag)).OrderBy(x => x.Length).ThenBy(x => x).ToArray(); - } - return fileEntries; - } - public async Task SubmitBug(String title, String steps, TeamMember createdBy, TeamMember assignedTo, Severity severity) { LogManager.Log("Submitting bug report..."); @@ -97,7 +80,6 @@ namespace Tango.PPC.BugReporting.TFS item.Severity = severity; item.State = State.New; item.Type = WorkItemType.Bug; - item.Environment = SettingsManager.Default.GetOrCreate().DeploymentSlot.ToDescription(); FileLogger appFileLogger = LogManager.Default.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger; FileLogger embeddedFileLogger = MachineOperator.EmbeddedLogManager.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger; @@ -105,54 +87,31 @@ namespace Tango.PPC.BugReporting.TFS if (appFileLogger != null) { LogManager.Log($"Attaching application log file ${appFileLogger.LogFile}"); - string[] logFiles = GetLogFiles(appFileLogger); - foreach (string file in logFiles) + + var appLogFile = tempFolder.CreateImaginaryFile(); + File.Copy(appFileLogger.LogFile, appLogFile.Path); + + item.Attachments.Add(new Attachment() { - var appLogFile = tempFolder.CreateImaginaryFile(); - File.Copy(file, appLogFile.Path); - item.Attachments.Add(new Attachment() - { - Description = "Application Log File", - FilePath = appLogFile.Path, - Name = Path.GetFileName(file), - }); - } + Description = "Application Log File", + FilePath = appLogFile.Path, + Name = Path.GetFileName(appFileLogger.LogFile), + }); } if (embeddedFileLogger != null && File.Exists(embeddedFileLogger.LogFile)) { LogManager.Log($"Attaching embedded log file ${embeddedFileLogger.LogFile}"); - string[] logFiles = GetLogFiles(embeddedFileLogger); - foreach (string file in logFiles) - { - var embeddedLogFile = tempFolder.CreateImaginaryFile(); - File.Copy(file, embeddedLogFile.Path); - item.Attachments.Add(new Attachment() - { - Description = "Embedded Log File", - FilePath = embeddedLogFile.Path, - Name = Path.GetFileName(file), - }); - } - } + var embeddedLogFile = tempFolder.CreateImaginaryFile(); + File.Copy(embeddedFileLogger.LogFile, embeddedLogFile.Path); - //Add session log file.. - if (MachineOperator.EnableSessionLogFile) - { - var file = MachineOperator.SessionLogger.LogFile; - - if (file != null && File.Exists(file)) + item.Attachments.Add(new Attachment() { - var sessionLogFile = tempFolder.CreateImaginaryFile(); - File.Copy(file, sessionLogFile.Path); - item.Attachments.Add(new Attachment() - { - Description = "Session Log File", - FilePath = sessionLogFile.Path, - Name = Path.GetFileName(file), - }); - } + Description = "Embedded Log File", + FilePath = embeddedLogFile.Path, + Name = Path.GetFileName(embeddedFileLogger.LogFile), + }); } SystemInformationModel sysModel = new SystemInformationModel(); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj deleted file mode 100644 index 3b897aa71..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting_txujxqrg_wpftmp.csproj +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Debug - AnyCPU - {8146FA0A-0725-4A1A-82E6-696C58F33A2B} - library - Tango.PPC.BugReporting - Tango.PPC.BugReporting - v4.6.1 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - true - full - false - ..\..\..\Build\PPC\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\Build\PPC\Release\ - TRACE - prompt - 4 - - - - - - - - GlobalVersionInfo.cs - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - MainView.xaml - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - {f441feee-322a-4943-b566-110e12fd3b72} - Tango.BL - - - {caedae94-11ed-473c-888a-268a6d38cd20} - Tango.CodeGeneration - - - {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} - Tango.Core - - - {b112d89a-a106-41ae-a0c1-4abc84c477f5} - Tango.DragAndDrop - - - {4206ac58-3b57-4699-8835-90bf6db01a61} - Tango.Integration - - - {bc932dbd-7cdb-488c-99e4-f02cf441f55e} - Tango.Logging - - - {e4927038-348d-4295-aaf4-861c58cb3943} - Tango.PMR - - - {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} - Tango.Settings - - - {8491d07b-c1f6-4b62-a412-41b9fd2d6538} - Tango.SharedUI - - - {998f8471-dc1b-41b6-9d96-354e1b4e7a32} - Tango.TFS - - - {fd86424c-6e84-491b-8df9-3d0f5c236a2a} - Tango.Touch - - - {74e700b0-1156-4126-be40-ee450d3c3026} - Tango.Transport - - - {5001990f-977b-48ff-b217-0236a5022ad8} - Tango.Web - - - {0be74eee-22cb-4dba-b896-793b9e1a3ac0} - Tango.PPC.Common - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs index 24b222370..1f71ca2c1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs @@ -16,7 +16,7 @@ namespace Tango.PPC.BugReporting /// static ViewModelLocator() { - TangoIOC.Default.Register(new TeamFoundationServicePPCClient("https://twinetfs.visualstudio.com", String.Empty, "pyulwgs7m3v7pizz3oxusypdkdfw43txggo5mjwu2ouyv2qwprhq")); + TangoIOC.Default.Register(new TeamFoundationServicePPCClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa")); TangoIOC.Default.Register(); } -- cgit v1.3.1