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

Adds link for Cloud deployment settings #66486

Merged
merged 19 commits into from
Jun 24, 2020

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented May 13, 2020

Summary

Closes #65089.
Related to https://github.com/elastic/cloud/issues/57690.

This adds a link to the Cloud deployment page to the left nav when the cloud plugin is enabled, i.e Kibana is running on cloud. This link will show for all Kibana users on cloud, but only cloud users that authenticate with admin privileges to their cloud deployment will be able to access the cloud deployment page.

Note: This is a temporary solution for redirecting Cloud users from Kibana back to the Cloud console. This component will be removed in favor of the redesign work described in #65787.

Screen Shot 2020-06-02 at 10 58 51 AM

To test

You can mock enabling the cloud plugin locally by defining a cloud ID and deployment url in your kibana.dev.yml, like so:

# Enable cloud plugin
xpack.cloud.id: 'eastus2.azure.elastic-cloud.com:9243$59ef636c6917463db140321484d63cfa$a8b109c08adc43279ef48f29af1a3911'
xpack.cloud.deploymentUrl: 'https://cloud.elastic.co/deployments/resolve/cluster/eastus2/9243$59ef636c6917463db140321484d63cfa/'

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cqliu1 cqliu1 requested a review from a team as a code owner May 13, 2020 21:32
@cqliu1 cqliu1 added the WIP Work in progress label May 13, 2020
@cqliu1 cqliu1 force-pushed the cloud-deployment-link branch 2 times, most recently from d016513 to dc53e8c Compare May 14, 2020 17:43
@pgayvallet pgayvallet requested a review from a team May 15, 2020 20:59
@pgayvallet
Copy link
Contributor

Ping @elastic/kibana-core-ui for review on header components

@cqliu1 cqliu1 changed the title [Canvas] Adds link for Cloud deployment settings Adds link for Cloud deployment settings May 15, 2020
/**
* Override the current set of custom nav link
*/
setCustomLink(newCustomLink?: ChromeCustomLink): void;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not more extendable version:Chrome CustomLink[]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After discussing with @ryankeairns, we didn't want to allow for multiple links to be registered by plugins and potentially flood the left nav. This is also a temporary addition to the collapsible nav to provide cloud users a link that redirects them to the cloud console and should really only be used by the cloud plugin until the redesign work in #65787 relocates this link.

@myasonik
Copy link
Contributor

Catherine and I just talked over slack and came up with a plan to move away from using a new ChromeCustomLink type and instead rely on the existing ChromeNavLink.

ChromeNavLink is a little more bloated but shouldn't actually cause any problems and introducing yet another Link type doesn't seem to be a great way forward (can see people next year rewriting the nav trying to figure out which of the 12 link types to use).

Reusing ChromeNavLink also seems to make sense with the work going on in #66685 which gets rid of the NavLink and RecentNavLink types so we can hopefully get to a more streamlined future some day.

@elastic/kibana-platform Shout out if this doesn't seem right to y'all and if you'd prefer to see a new type added for this after all.

@pgayvallet
Copy link
Contributor

@myasonik As long as this doesn't mean introducing additional fields to ChromeNavLink for 'custom link' exclusive needs, this SGTM.

@ryankeairns
Copy link
Contributor

@cqliu1 similar to the Cloud profile links PR, can you provide a snippet for the kibana.yml file so that I can test this out with a hardcoded value(s)? Thanks!

@cqliu1
Copy link
Contributor Author

cqliu1 commented May 28, 2020

similar to the Cloud profile links PR, can you provide a snippet for the kibana.yml file so that I can test this out with a hardcoded value(s)? Thanks!

@ryankeairns Sure! All you need to do is a define a cloud ID and a deployment url in your kibana.dev.yml like this:

# Enable cloud plugin
xpack.cloud.id: 'eastus2.azure.elastic-cloud.com:9243$59ef636c6917463db140321484d63cfa$a8b109c08adc43279ef48f29af1a3911'
xpack.cloud.deploymentUrl: 'https://cloud.elastic.co/deployments/resolve/cluster/eastus2/9243$59ef636c6917463db140321484d63cfa/'

@ryankeairns
Copy link
Contributor

The UI design looks good; sample config works as expected.

Accesses deploymentUrl config property

Added i18n support for deployment link

Resolved merge conflict

Use existing ChromeNavLink type

Added external link option to createNavLink
@cqliu1 cqliu1 added enhancement New value added to drive a business result release_note:enhancement v7.9.0 v8.0.0 labels Jun 2, 2020
@cqliu1 cqliu1 added review and removed WIP Work in progress labels Jun 3, 2020
@cqliu1 cqliu1 added the REASSIGN from Team:Core UI Deprecated label for old Core UI team label Jun 3, 2020
@cqliu1 cqliu1 requested a review from a team June 3, 2020 18:14
@ryankeairns ryankeairns self-requested a review June 4, 2020 18:40
Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Tested it out, looks and works as expected!

@cqliu1
Copy link
Contributor Author

cqliu1 commented Jun 4, 2020

@elasticmachine merge upstream

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM, as long a showing the link only in modern nav mode is the expected behavior.

src/core/public/chrome/ui/header/header.tsx Show resolved Hide resolved
Comment on lines 73 to +74
if (
!externalLink && // ignore external links
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: by using the new navigateToUrl API instead of navigateToApp, we could get rid of this additional check and externalLink parameter. But platform can do it later.

x-pack/plugins/cloud/public/plugin.ts Outdated Show resolved Hide resolved
@cqliu1
Copy link
Contributor Author

cqliu1 commented Jun 23, 2020

@elasticmachine merge upstream

@cqliu1
Copy link
Contributor Author

cqliu1 commented Jun 24, 2020

@elasticmachine merge upstream

@cqliu1 cqliu1 merged commit 8ed4f7f into elastic:master Jun 24, 2020
@cqliu1 cqliu1 deleted the cloud-deployment-link branch June 24, 2020 22:08
cqliu1 added a commit to cqliu1/kibana that referenced this pull request Jun 25, 2020
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

page load asset size

beta
id value diff baseline
/bundles/app/core/bootstrap.js - -13.8KB 13.8KB
/bundles/core/core.entry.js - -1.1MB 1.1MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.@elastic.js - -4.0MB 4.0MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.css - -183.7KB 183.7KB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js - -4.6MB 4.6MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.v7.light.css - -511.3KB 511.3KB
/bundles/light_theme.style.css - -95.9KB 95.9KB
/bundles/plugin/advancedSettings/advancedSettings.plugin.js - -941.3KB 941.3KB
/bundles/plugin/alerts/alerts.plugin.js - -89.5KB 89.5KB
/bundles/plugin/apm/apm.plugin.js - -215.2KB 215.2KB
/bundles/plugin/apmOss/apmOss.plugin.js - -4.2KB 4.2KB
/bundles/plugin/beats_management/beats_management.plugin.js - -522.9KB 522.9KB
/bundles/plugin/bfetch/bfetch.plugin.js - -28.7KB 28.7KB
/bundles/plugin/canvas/canvas.plugin.js - -2.0MB 2.0MB
/bundles/plugin/charts/charts.plugin.js - -833.9KB 833.9KB
/bundles/plugin/cloud/cloud.plugin.js - -5.7KB 5.7KB
/bundles/plugin/console/console.plugin.js - -28.0KB 28.0KB
/bundles/plugin/crossClusterReplication/crossClusterReplication.plugin.js - -152.3KB 152.3KB
/bundles/plugin/dashboard/dashboard.plugin.js - -634.0KB 634.0KB
/bundles/plugin/dashboardEnhanced/dashboardEnhanced.plugin.js - -143.5KB 143.5KB
/bundles/plugin/dashboardMode/dashboardMode.plugin.js - -109.3KB 109.3KB
/bundles/plugin/data/data.plugin.js - -1.3MB 1.3MB
/bundles/plugin/dataEnhanced/dataEnhanced.plugin.js - -138.1KB 138.1KB
/bundles/plugin/devTools/devTools.plugin.js - -123.9KB 123.9KB
/bundles/plugin/discover/discover.plugin.js - -221.1KB 221.1KB
/bundles/plugin/discoverEnhanced/discoverEnhanced.plugin.js - -13.8KB 13.8KB
/bundles/plugin/embeddable/embeddable.plugin.js - -387.2KB 387.2KB
/bundles/plugin/embeddableEnhanced/embeddableEnhanced.plugin.js - -26.3KB 26.3KB
/bundles/plugin/esUiShared/esUiShared.plugin.js - -927.8KB 927.8KB
/bundles/plugin/expressions/expressions.plugin.js - -314.9KB 314.9KB
/bundles/plugin/features/features.plugin.js - -13.4KB 13.4KB
/bundles/plugin/fileUpload/fileUpload.plugin.js - -688.0KB 688.0KB
/bundles/plugin/globalSearch/globalSearch.plugin.js - -29.0KB 29.0KB
/bundles/plugin/graph/graph.plugin.js - -15.3KB 15.3KB
/bundles/plugin/grokdebugger/grokdebugger.plugin.js - -11.2KB 11.2KB
/bundles/plugin/home/home.plugin.js - -24.6KB 24.6KB
/bundles/plugin/indexLifecycleManagement/indexLifecycleManagement.plugin.js - -184.2KB 184.2KB
/bundles/plugin/indexManagement/indexManagement.plugin.js - -200.8KB 200.8KB
/bundles/plugin/indexPatternManagement/indexPatternManagement.plugin.js - -137.3KB 137.3KB
/bundles/plugin/infra/infra.plugin.js - -92.6KB 92.6KB
/bundles/plugin/ingestPipelines/ingestPipelines.plugin.js - -30.3KB 30.3KB
/bundles/plugin/inputControlVis/inputControlVis.plugin.js - -258.9KB 258.9KB
/bundles/plugin/inspector/inspector.plugin.js - -238.3KB 238.3KB
/bundles/plugin/kibanaLegacy/kibanaLegacy.plugin.js - -174.7KB 174.7KB
/bundles/plugin/kibanaReact/kibanaReact.plugin.js - -575.3KB 575.3KB
/bundles/plugin/kibanaUtils/kibanaUtils.plugin.js - -432.8KB 432.8KB
/bundles/plugin/lens/lens.plugin.js - -746.9KB 746.9KB
/bundles/plugin/licenseManagement/licenseManagement.plugin.js - -26.2KB 26.2KB
/bundles/plugin/licensing/licensing.plugin.js - -21.6KB 21.6KB
/bundles/plugin/logstash/logstash.plugin.js - -141.8KB 141.8KB
/bundles/plugin/management/management.plugin.js - -25.9KB 25.9KB
/bundles/plugin/maps/maps.plugin.js - -220.0KB 220.0KB
/bundles/plugin/mapsLegacy/mapsLegacy.plugin.js - -1.0MB 1.0MB
/bundles/plugin/mapsLegacyLicensing/mapsLegacyLicensing.plugin.js - -3.9KB 3.9KB
/bundles/plugin/ml/ml.plugin.js - -1.3MB 1.3MB
/bundles/plugin/monitoring/monitoring.plugin.js - -22.8KB 22.8KB
/bundles/plugin/navigation/navigation.plugin.js - -122.2KB 122.2KB
/bundles/plugin/newsfeed/newsfeed.plugin.js - -22.7KB 22.7KB
/bundles/plugin/observability/observability.plugin.js - -103.3KB 103.3KB
/bundles/plugin/painlessLab/painlessLab.plugin.js - -158.8KB 158.8KB
/bundles/plugin/regionMap/regionMap.plugin.js - -791.7KB 791.7KB
/bundles/plugin/remoteClusters/remoteClusters.plugin.js - -35.2KB 35.2KB
/bundles/plugin/reporting/reporting.plugin.js - -257.7KB 257.7KB
/bundles/plugin/rollup/rollup.plugin.js - -186.0KB 186.0KB
/bundles/plugin/savedObjects/savedObjects.plugin.js - -196.2KB 196.2KB
/bundles/plugin/savedObjectsManagement/savedObjectsManagement.plugin.js - -176.6KB 176.6KB
/bundles/plugin/searchprofiler/searchprofiler.plugin.js - -42.8KB 42.8KB
/bundles/plugin/security/security.plugin.js - -248.0KB 248.0KB
/bundles/plugin/share/share.plugin.js - -80.5KB 80.5KB
/bundles/plugin/snapshotRestore/snapshotRestore.plugin.js - -57.5KB 57.5KB
/bundles/plugin/spaces/spaces.plugin.js - -367.3KB 367.3KB
/bundles/plugin/statusPage/statusPage.plugin.js - -3.6KB 3.6KB
/bundles/plugin/telemetry/telemetry.plugin.js - -77.2KB 77.2KB
/bundles/plugin/telemetryManagementSection/telemetryManagementSection.plugin.js - -27.5KB 27.5KB
/bundles/plugin/tileMap/tileMap.plugin.js - -807.1KB 807.1KB
/bundles/plugin/transform/transform.plugin.js - -21.6KB 21.6KB
/bundles/plugin/triggers_actions_ui/triggers_actions_ui.plugin.js - -102.9KB 102.9KB
/bundles/plugin/uiActions/uiActions.plugin.js - -162.5KB 162.5KB
/bundles/plugin/uiActionsEnhanced/uiActionsEnhanced.plugin.js - -124.1KB 124.1KB
/bundles/plugin/upgradeAssistant/upgradeAssistant.plugin.js - -46.6KB 46.6KB
/bundles/plugin/uptime/uptime.plugin.js - -327.3KB 327.3KB
/bundles/plugin/usageCollection/usageCollection.plugin.js - -24.3KB 24.3KB
/bundles/plugin/visTypeMarkdown/visTypeMarkdown.plugin.js - -512.5KB 512.5KB
/bundles/plugin/visTypeMetric/visTypeMetric.plugin.js - -536.7KB 536.7KB
/bundles/plugin/visTypeTable/visTypeTable.plugin.js - -563.0KB 563.0KB
/bundles/plugin/visTypeTagcloud/visTypeTagcloud.plugin.js - -797.1KB 797.1KB
/bundles/plugin/visTypeTimelion/visTypeTimelion.plugin.js - -670.7KB 670.7KB
/bundles/plugin/visTypeTimeseries/visTypeTimeseries.plugin.js - -212.2KB 212.2KB
/bundles/plugin/visTypeVega/visTypeVega.plugin.js - -580.3KB 580.3KB
/bundles/plugin/visTypeVislib/visTypeVislib.plugin.js - -1.2MB 1.2MB
/bundles/plugin/visualizations/visualizations.plugin.js - -343.4KB 343.4KB
/bundles/plugin/visualize/visualize.plugin.js - -18.2KB 18.2KB
/bundles/plugin/watcher/watcher.plugin.js - -35.2KB 35.2KB
/node_modules/@kbn/ui-framework/dist/kui_light.css - -62.1KB 62.1KB
/translations/en.json - -29.0B 29.0B
/ui/fonts/inter_ui/Inter-UI-Medium.woff2 - -92.2KB 92.2KB
/ui/fonts/inter_ui/Inter-UI-Regular.woff2 - -86.4KB 86.4KB
total - -36.1MB -

History

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

cqliu1 added a commit that referenced this pull request Jun 25, 2020
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result REASSIGN from Team:Core UI Deprecated label for old Core UI team release_note:enhancement review v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add link for Cloud deployment settings
7 participants