Merge branch 'feature/new_relic_open_page_tracking' into 'release/11_0_0'
NSA migration tracking changes ### Summary Track bridge open page destinations for NSA migration tracking. Co-authored-by: Hedden, Kyle Matthew <kyle.hedden@verizonwireless.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core/-/merge_requests/284
This commit is contained in:
commit
223ff22612
@ -97,14 +97,14 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol {
|
||||
do {
|
||||
let handlerType = try ModelRegistry.getHandler(model) as! MVMCoreActionHandlerProtocol.Type
|
||||
let handler = handlerType.init()
|
||||
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionInvoked(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid))
|
||||
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionInvoked(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, model: model))
|
||||
if let handler = handler as? MVMCoreJSONActionHandlerProtocol {
|
||||
// Needed until we can remove legacy delegate functions.
|
||||
try await handler.performAction(with: json, model: model, delegateObject: delegateObject, additionalData: additionalData)
|
||||
} else {
|
||||
try await handler.execute(with: model, delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionComplete(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid))
|
||||
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionComplete(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, model: model))
|
||||
} catch ModelRegistry.Error.handlerNotMapped {
|
||||
try Task.checkCancellation()
|
||||
// Allows custom handling if there no handler for the action.
|
||||
@ -114,7 +114,7 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol {
|
||||
throw ActionError.unknownAction(type: model.actionType)
|
||||
}
|
||||
} catch {
|
||||
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionFailed(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, error: error))
|
||||
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionFailed(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, model: model, error: error))
|
||||
MVMCoreActionHandler.log(string: "Failed Action \(error)", additionalData: additionalData)
|
||||
throw error
|
||||
}
|
||||
|
||||
@ -23,32 +23,35 @@ public enum MVMCoreEvent {
|
||||
error: Error?
|
||||
)
|
||||
|
||||
/// Could not find the action specified..
|
||||
/// Could not find the action specified.
|
||||
case actionNotFound(
|
||||
name: String,
|
||||
pageType: String
|
||||
)
|
||||
|
||||
/// The webview bridge action handler was invoked and is in progress.
|
||||
/// The core action handler was invoked and is in progress.
|
||||
case actionInvoked(
|
||||
name: String,
|
||||
pageType: String,
|
||||
uuid: String
|
||||
uuid: String,
|
||||
model: ActionModelProtocol
|
||||
)
|
||||
|
||||
/// The action failed..
|
||||
/// The core action handler failed to complete the action.
|
||||
case actionFailed(
|
||||
name: String,
|
||||
pageType: String,
|
||||
uuid: String,
|
||||
model: ActionModelProtocol,
|
||||
error: Error?
|
||||
)
|
||||
|
||||
/// The action is completed.
|
||||
/// The core action handler completed an action.
|
||||
case actionComplete(
|
||||
name: String,
|
||||
pageType: String,
|
||||
uuid: String
|
||||
uuid: String,
|
||||
model: ActionModelProtocol
|
||||
)
|
||||
|
||||
// ----------------------------
|
||||
@ -61,7 +64,7 @@ public enum MVMCoreEvent {
|
||||
actionId: String
|
||||
)
|
||||
|
||||
/// The client perameter handler was invoked and is in progress.
|
||||
/// The client parameter handler was invoked and is in progress.
|
||||
case clientParameterStartFetch(
|
||||
name: String,
|
||||
uuid: String,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user