-
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.
fix: Add "View Logs" button to Manage Bot Run Dialog (#1152)
* Add "View Logs" button to Manage Bot Run Dialog * Remove superfluous aria-label
- Loading branch information
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
client/components/ManageBotRunDialog/ViewLogsButton/index.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,27 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Button } from 'react-bootstrap'; | ||
|
||
const ViewLogsButton = ({ externalLogsUrl }) => { | ||
const onClick = () => { | ||
window.open(externalLogsUrl, '_blank'); | ||
}; | ||
|
||
return ( | ||
<Button | ||
disabled={!externalLogsUrl} | ||
aria-disabled={!externalLogsUrl} | ||
onClick={onClick} | ||
role="link" | ||
variant="secondary" | ||
> | ||
View Log | ||
</Button> | ||
); | ||
}; | ||
|
||
ViewLogsButton.propTypes = { | ||
externalLogsUrl: PropTypes.string | ||
}; | ||
|
||
export default ViewLogsButton; |
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