Skip to content

Add ProjectId to triggerUseageLogArgs and check if set and update ProjectId #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions UI_Engine/Compute/LogUsage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/*************************************/

[PreviousVersion("8.1", "BH.Engine.UI.Compute.LogUsage(System.String, System.String, System.Guid, System.String, System.Object, System.Collections.Generic.List<BH.oM.Base.Debugging.Event>, System.String, System.String)")]
public static void LogUsage(string uiName, string uiVersion, Guid componentId, string callerName, object selectedItem, List<Event> events = null, string fileId = "", string fileName = "", string projectId = "")

Check warning on line 53 in UI_Engine/Compute/LogUsage.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

UI_Engine/Compute/LogUsage.cs#L53

Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent
{
//Special case for a component setting the project ID explicitly
HandleSetProjectId(uiName, fileId, events);
Expand Down Expand Up @@ -79,6 +79,12 @@
};

TriggerUsageLog(args);
//Check if the projectID has been set to the args
if (!string.IsNullOrWhiteSpace(args.ProjectID))
{
projectId = args.ProjectID; //Set the project ID
UpdateProjectId(uiName, fileId, projectId); //Ensure the project ID is udpated
}
}
}
}
Expand All @@ -90,7 +96,7 @@

/*************************************/

public static void UpdateProjectId(string uiName, string fileId, string projectId)

Check warning on line 99 in UI_Engine/Compute/LogUsage.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

UI_Engine/Compute/LogUsage.cs#L99

Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent
{
if (string.IsNullOrWhiteSpace(uiName) || string.IsNullOrWhiteSpace(fileId))
return;
Expand All @@ -111,7 +117,7 @@

/*************************************/

public static void CheckLogOnUiEndOpening(string uiName, string fileId, string fileName)

Check warning on line 120 in UI_Engine/Compute/LogUsage.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

UI_Engine/Compute/LogUsage.cs#L120

Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent
{
if (string.IsNullOrWhiteSpace(uiName) || string.IsNullOrWhiteSpace(fileId))
return;
Expand Down Expand Up @@ -301,7 +307,7 @@

/*************************************/

public static string BHoMVersion()

Check warning on line 310 in UI_Engine/Compute/LogUsage.cs

View check run for this annotation

BHoMBot-CI / documentation-compliance

UI_Engine/Compute/LogUsage.cs#L310

Method must contain an Output or MultiOutput attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/HasOutputAttribute
{
if (m_BHoMVersion == null)
m_BHoMVersion = Engine.Base.Query.BHoMVersion();
Expand Down
1 change: 1 addition & 0 deletions UI_oM/TriggerLogUsageArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class TriggerLogUsageArgs : EventArgs, IObject
public virtual Guid ComponentID { get; set; } = Guid.Empty;
public virtual string FileID { get; set; } = "";
public virtual string FileName { get; set; } = "";
public virtual string ProjectID { get; set; } = null;
}
}

Expand Down