-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Monitoring] Metricbeat Migration Wizard (last step!!) #45799
Merged
chrisronline
merged 49 commits into
elastic:master
from
chrisronline:monitoring/mb_setup_wizard_step5
Oct 2, 2019
Merged
Changes from 32 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
bc66425
Enable setup mode UI toggles
chrisronline 3f0c65a
We want to keep the no data page but update the copy
chrisronline 8c7e679
More updated copy
chrisronline 10aeb2b
Remove manual checks for logstash, beats, apm and kibana
chrisronline 3b33637
Hide the setup mode controls on the no data page. There is nothing di…
chrisronline 100da8b
Setup mode test
chrisronline 236b08b
Fix bug with disabling internal collection for ES
chrisronline fa80d10
First steps towards the redesign of setup mode
chrisronline cfb67e6
Consolidate UI code, design changes, use constants defined in our plugin
chrisronline 2e72734
Fix tooltips
chrisronline 679ff23
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline da0e658
Design/copy feedback
chrisronline 2241135
Use badge and onClick
chrisronline faea4c2
More feedback
chrisronline 7bc14c8
Only detect usage on the live cluster
chrisronline 17991ab
Fix existing tests, remove test that will be added in other PR
chrisronline bfe2b49
Merge in master
chrisronline af03ab4
Fix failing test
chrisronline 1b75c94
Fix issue with wrong callout showing
chrisronline cdc25ea
Ensure we check for live nodes if no cluster uuid is provided
chrisronline 207c0c7
We need a custom listing callout for ES
chrisronline 46ef2af
Custom callout for kibana instances
chrisronline 7ba9bf1
More space from the bottom bar
chrisronline 2d83d88
Disable switching if they enabled internal collection
chrisronline 079d44c
Copy updates
chrisronline 7454702
Fix broken tests
chrisronline 6af3a07
Fix more tests
chrisronline b83a1d4
Fix i18n
chrisronline 7facf47
Update copy
chrisronline e0b6806
Merge in master
chrisronline b9c29a8
Fix a couple i18n issues
chrisronline d86ebba
Fixing a couple of missing scenarios
chrisronline 3f57210
Fix translations
chrisronline a92d02d
Update snapshots
chrisronline 7bd565c
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline 23860df
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline a7dda51
PR feedback
chrisronline b9cfc26
PR feedback
chrisronline a82dd8a
We also need totalUniqueInternallyCollectedCount to identify when we …
chrisronline afa5751
Remove why documentation link until we have the resource available
chrisronline 3c88753
Ensure tabs are properly disabled
chrisronline cf32128
Address issue with the ES nodes callout not working at times
chrisronline 906c254
Ensure we check if setup mode is enabled
chrisronline 05279cf
Change internal collection to self monitoring, and remove the word 'c…
chrisronline 309acef
Merge in master
chrisronline 82c03e3
Only show Enter setup mode on pages with valid setup mode options
chrisronline 76f3ae2
Copy updates
chrisronline 997de3e
Copy updates
chrisronline ed27251
Ensure we update the top nav item when we toggle setup mode on or off
chrisronline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,34 +4,64 @@ | |
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { PureComponent, Fragment } from 'react'; | ||
import React, { PureComponent } from 'react'; | ||
import { uniq, get } from 'lodash'; | ||
import { EuiPage, EuiPageBody, EuiPageContent, EuiSpacer, EuiLink, EuiCallOut } from '@elastic/eui'; | ||
import { EuiPage, EuiPageBody, EuiPageContent, EuiSpacer, EuiLink } from '@elastic/eui'; | ||
import { Stats } from 'plugins/monitoring/components/beats'; | ||
import { formatMetric } from 'plugins/monitoring/lib/format_number'; | ||
import { EuiMonitoringTable } from 'plugins/monitoring/components/table'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { BEATS_SYSTEM_ID } from '../../../../common/constants'; | ||
import { ListingCallOut } from '../../setup_mode/listing_callout'; | ||
import { SetupModeBadge } from '../../setup_mode/badge'; | ||
|
||
export class Listing extends PureComponent { | ||
getColumns() { | ||
const { kbnUrl, scope } = this.props.angular; | ||
const setupMode = this.props.setupMode; | ||
|
||
return [ | ||
{ | ||
name: i18n.translate('xpack.monitoring.beats.instances.nameTitle', { defaultMessage: 'Name' }), | ||
field: 'name', | ||
render: (name, beat) => ( | ||
<EuiLink | ||
onClick={() => { | ||
scope.$evalAsync(() => { | ||
kbnUrl.changePath(`/beats/beat/${beat.uuid}`); | ||
}); | ||
}} | ||
data-test-subj={`beatLink-${name}`} | ||
> | ||
{name} | ||
</EuiLink> | ||
) | ||
render: (name, beat) => { | ||
let setupModeStatus = null; | ||
if (setupMode && setupMode.enabled) { | ||
const list = get(setupMode, 'data.byUuid', {}); | ||
const status = list[beat.uuid] || {}; | ||
const instance = { | ||
uuid: beat.uuid, | ||
name: beat.name | ||
}; | ||
|
||
setupModeStatus = ( | ||
<div className="monTableCell__setupModeStatus"> | ||
<SetupModeBadge | ||
setupMode={setupMode} | ||
status={status} | ||
instance={instance} | ||
productName={BEATS_SYSTEM_ID} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div> | ||
<EuiLink | ||
onClick={() => { | ||
scope.$evalAsync(() => { | ||
kbnUrl.changePath(`/beats/beat/${beat.uuid}`); | ||
}); | ||
}} | ||
data-test-subj={`beatLink-${name}`} | ||
> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
{name} | ||
</EuiLink> | ||
{setupModeStatus} | ||
</div> | ||
); | ||
} | ||
}, | ||
{ | ||
name: i18n.translate('xpack.monitoring.beats.instances.typeTitle', { defaultMessage: 'Type' }), | ||
|
@@ -78,26 +108,14 @@ export class Listing extends PureComponent { | |
setupMode | ||
} = this.props; | ||
|
||
let detectedInstanceMessage = null; | ||
if (setupMode.enabled && setupMode.data && get(setupMode.data, 'detected.mightExist')) { | ||
detectedInstanceMessage = ( | ||
<Fragment> | ||
<EuiCallOut | ||
title={i18n.translate('xpack.monitoring.beats.instances.metricbeatMigration.detectedInstanceTitle', { | ||
defaultMessage: 'Beats instance detected', | ||
})} | ||
color="warning" | ||
iconType="help" | ||
> | ||
<p> | ||
{i18n.translate('xpack.monitoring.beats.instances.metricbeatMigration.detectedInstanceDescription', { | ||
defaultMessage: `Based on your indices, we think you might have a beats instance. Click the 'Setup monitoring' | ||
button below to start monitoring this instance.` | ||
})} | ||
</p> | ||
</EuiCallOut> | ||
<EuiSpacer size="m"/> | ||
</Fragment> | ||
let setupModeCallOut = null; | ||
if (setupMode.enabled && setupMode.data) { | ||
setupModeCallOut = ( | ||
<ListingCallOut | ||
setupModeData={setupMode.data} | ||
useNodeIdentifier={false} | ||
productName={BEATS_SYSTEM_ID} | ||
/> | ||
); | ||
} | ||
|
||
|
@@ -115,16 +133,12 @@ export class Listing extends PureComponent { | |
<EuiPageContent> | ||
<Stats stats={stats} /> | ||
<EuiSpacer size="m"/> | ||
{detectedInstanceMessage} | ||
{setupModeCallOut} | ||
<EuiMonitoringTable | ||
className="beatsTable" | ||
rows={data} | ||
setupMode={setupMode} | ||
uuidField="uuid" | ||
nameField="name" | ||
setupNewButtonLabel={i18n.translate('xpack.monitoring.beats.metricbeatMigration.setupNewButtonLabel', { | ||
defaultMessage: 'Setup monitoring for new Beats instance' | ||
})} | ||
productName={BEATS_SYSTEM_ID} | ||
columns={this.getColumns()} | ||
sorting={sorting} | ||
pagination={pagination} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following? There is a child component so we shouldn't use
/>