-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Extract target name detection based on target type * Allow CheckResultOutline to navigate to specific target check detail * Make CheckResultInfoBox specific on result target type and name, instead of broaded target type * Enable CheckDetailHeader to provide navigation to proper target execution detail * Enable Check Result Detail page for host checks * Revisit warning banners usage
- Loading branch information
1 parent
7ea50d5
commit 04d2040
Showing
15 changed files
with
364 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
assets/js/components/ExecutionResults/CheckResultDetail/BackToTargetExecution.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
|
||
import { TARGET_CLUSTER, TARGET_HOST } from '@lib/model'; | ||
|
||
import BackButton from '@components/BackButton'; | ||
|
||
function BackToTargetExecution({ targetID, targetType }) { | ||
const targetTypeToExecutionURL = { | ||
[TARGET_CLUSTER]: `/clusters/${targetID}/executions/last`, | ||
[TARGET_HOST]: `/hosts/${targetID}/executions/last`, | ||
}; | ||
|
||
const targetExecutionURL = targetTypeToExecutionURL[targetType]; | ||
|
||
return ( | ||
targetExecutionURL && ( | ||
<BackButton url={targetExecutionURL}>Back to Check Results</BackButton> | ||
) | ||
); | ||
} | ||
|
||
export default BackToTargetExecution; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.