Skip to content
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

[APM] Hide anomaly detection APM settings links when ml plugin is disabled #73638

Merged
merged 3 commits into from
Jul 30, 2020

Conversation

ogupte
Copy link
Contributor

@ogupte ogupte commented Jul 29, 2020

Closes #72914 by hiding anomaly detection settings links when the ml plugin is disabled.

Screen Shot 2020-07-29 at 1 09 01 AM
Screen Shot 2020-07-29 at 1 09 09 AM

@ogupte ogupte added release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v7.9.0 labels Jul 29, 2020
@ogupte ogupte requested a review from a team as a code owner July 29, 2020 08:31
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Jul 29, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@ogupte
Copy link
Contributor Author

ogupte commented Jul 29, 2020

retest

@ogupte
Copy link
Contributor Author

ogupte commented Jul 30, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
apm 3.7MB +1.5KB 3.7MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@ogupte ogupte merged commit 5e86d2f into elastic:master Jul 30, 2020
@kibanamachine
Copy link
Contributor

💔 Backport was not successful

The PR was attempted backported to the following branches:

  • ❌ 7.x: Commit could not be cherrypicked due to conflicts
  • ❌ 7.9: Commit could not be cherrypicked due to conflicts

ogupte added a commit to ogupte/kibana that referenced this pull request Jul 30, 2020
…the ml plugin is disabled. (elastic#73638)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/index.tsx
ogupte added a commit to ogupte/kibana that referenced this pull request Jul 30, 2020
…the ml plugin is disabled. (elastic#73638)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/index.tsx
#	x-pack/plugins/apm/public/components/app/Settings/index.tsx
@@ -83,7 +83,8 @@ interface Props {
}

export function Home({ tab }: Props) {
const { config } = useApmPluginContext();
const { config, core } = useApmPluginContext();
const isMLEnabled = !!core.application.capabilities.ml;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ML is disabled in elasticsearch or disabled in the current space, this check will still be true.
I'd suggest looking for !!core.application.capabilities.ml?.canAccessML
canAccessML is the very minimum ML capability and is true on a basic license, so the current link to the start trial page will still work correctly.

gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 31, 2020
* master: (54 commits)
  [ML] Migrate to React BrowserRouter and Kibana provided History. (elastic#71941)
  [Discover] Improve  saveSearch functional test handling (elastic#73626)
  [Metrics UI] Fix all threshold alert conditions disappearing due to alert prefill (elastic#73708)
  [Metrics UI] Fix alert previews of ungrouped alerts (elastic#73735)
  [SIEM] Fixes "include building block button" to operate (elastic#73900)
  [Metrics UI] Fix alert management to open without refresh (elastic#73739)
  [Security Solution][Lists] - Tests cleanup and remove unnecessary import (elastic#73865)
  [Ingest Management] main branch uses epr-snapshot. Others production (elastic#73555)
  [Canvas][tech-debt] Fix SVG not shrinking vertically properly (elastic#73867)
  [Maps] upgrade turf (elastic#73816)
  [Security Solution][Telemetry] Concurrent telemetry requests (elastic#73558)
  [Security Solution][Exceptions] - Update how nested entries are displayed in exceptions viewer (elastic#73745)
  [Security Solution][Exceptions] Adds autocomplete workaround for .text fields (elastic#73761)
  [Metrics UI] Fix previewing of No Data results (elastic#73753)
  Closes elastic#72914 by hiding anomaly detection settings links when the ml plugin is disabled. (elastic#73638)
  [Ingest Manager] Fix config selection in enrollment flyout from config list page (elastic#73833)
  [DOCS] Fixes typo in Alerting actions (elastic#73756)
  [APM] fixes linking errors to ML and Discover (elastic#73758)
  Handle promise rejections when building artifacts (elastic#73831)
  [Security Solution][Detections] Change from sha1 to sha256 (elastic#73741)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 31, 2020
* master: (38 commits)
  [Discover] Context unskip date nanos functional tests (elastic#73781)
  [ML] Migrate to React BrowserRouter and Kibana provided History. (elastic#71941)
  [Discover] Improve  saveSearch functional test handling (elastic#73626)
  [Metrics UI] Fix all threshold alert conditions disappearing due to alert prefill (elastic#73708)
  [Metrics UI] Fix alert previews of ungrouped alerts (elastic#73735)
  [SIEM] Fixes "include building block button" to operate (elastic#73900)
  [Metrics UI] Fix alert management to open without refresh (elastic#73739)
  [Security Solution][Lists] - Tests cleanup and remove unnecessary import (elastic#73865)
  [Ingest Management] main branch uses epr-snapshot. Others production (elastic#73555)
  [Canvas][tech-debt] Fix SVG not shrinking vertically properly (elastic#73867)
  [Maps] upgrade turf (elastic#73816)
  [Security Solution][Telemetry] Concurrent telemetry requests (elastic#73558)
  [Security Solution][Exceptions] - Update how nested entries are displayed in exceptions viewer (elastic#73745)
  [Security Solution][Exceptions] Adds autocomplete workaround for .text fields (elastic#73761)
  [Metrics UI] Fix previewing of No Data results (elastic#73753)
  Closes elastic#72914 by hiding anomaly detection settings links when the ml plugin is disabled. (elastic#73638)
  [Ingest Manager] Fix config selection in enrollment flyout from config list page (elastic#73833)
  [DOCS] Fixes typo in Alerting actions (elastic#73756)
  [APM] fixes linking errors to ML and Discover (elastic#73758)
  Handle promise rejections when building artifacts (elastic#73831)
  ...
ogupte added a commit that referenced this pull request Jul 31, 2020
…plugin is disabled. (#73638) (#73890)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/index.tsx
ogupte added a commit that referenced this pull request Jul 31, 2020
…plugin is disabled. (#73638) (#73892)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx
#	x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/index.tsx
#	x-pack/plugins/apm/public/components/app/Settings/index.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.9.0 v7.10.0
Projects
None yet
5 participants