-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Uptime]Refactor header and action menu (#83779)
Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
9d8dd6d
commit 2a8c609
Showing
23 changed files
with
722 additions
and
411 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
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
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
51 changes: 51 additions & 0 deletions
51
x-pack/plugins/uptime/public/components/certificates/cert_refresh_btn.tsx
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,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { useContext } from 'react'; | ||
import { | ||
EuiButton, | ||
EuiButtonEmpty, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiHideFor, | ||
EuiShowFor, | ||
} from '@elastic/eui'; | ||
import * as labels from '../../pages/translations'; | ||
import { UptimeRefreshContext } from '../../contexts'; | ||
|
||
export const CertRefreshBtn = () => { | ||
const { refreshApp } = useContext(UptimeRefreshContext); | ||
|
||
return ( | ||
<EuiFlexItem style={{ alignItems: 'flex-end' }} grow={false}> | ||
<EuiFlexGroup responsive={false} gutterSize="s"> | ||
<EuiFlexItem grow={false}> | ||
<EuiHideFor sizes={['xs']}> | ||
<EuiButton | ||
fill | ||
iconType="refresh" | ||
onClick={() => { | ||
refreshApp(); | ||
}} | ||
data-test-subj="superDatePickerApplyTimeButton" | ||
> | ||
{labels.REFRESH_CERT} | ||
</EuiButton> | ||
</EuiHideFor> | ||
<EuiShowFor sizes={['xs']}> | ||
<EuiButtonEmpty | ||
iconType="refresh" | ||
onClick={() => { | ||
refreshApp(); | ||
}} | ||
data-test-subj="superDatePickerApplyTimeButton" | ||
/> | ||
</EuiShowFor> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiFlexItem> | ||
); | ||
}; |
Oops, something went wrong.