mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[APM] Remove service map fullscreen control (#56351)
This commit is contained in:
parent
27dd6dda38
commit
900af8262b
4 changed files with 2 additions and 64 deletions
|
@ -11,7 +11,6 @@ import React, { useContext, useEffect, useState } from 'react';
|
|||
import styled from 'styled-components';
|
||||
import { CytoscapeContext } from './Cytoscape';
|
||||
import { animationOptions, nodeHeight } from './cytoscapeOptions';
|
||||
import { FullscreenPanel } from './FullscreenPanel';
|
||||
|
||||
const ControlsContainer = styled('div')`
|
||||
left: ${theme.gutterTypes.gutterMedium};
|
||||
|
@ -87,7 +86,6 @@ export function Controls() {
|
|||
const minZoom = cy.minZoom();
|
||||
const isMinZoom = zoom === minZoom;
|
||||
const increment = (maxZoom - minZoom) / steps;
|
||||
const mapDomElement = cy.container();
|
||||
const zoomInLabel = i18n.translate('xpack.apm.serviceMap.zoomIn', {
|
||||
defaultMessage: 'Zoom in'
|
||||
});
|
||||
|
@ -127,7 +125,6 @@ export function Controls() {
|
|||
title={centerLabel}
|
||||
/>
|
||||
</EuiPanel>
|
||||
<FullscreenPanel element={mapDomElement} />
|
||||
</ControlsContainer>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* 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 from 'react';
|
||||
import { EuiButtonIcon, EuiPanel } from '@elastic/eui';
|
||||
import styled from 'styled-components';
|
||||
import theme from '@elastic/eui/dist/eui_theme_light.json';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
const Button = styled(EuiButtonIcon)`
|
||||
display: block;
|
||||
margin: ${theme.paddingSizes.xs};
|
||||
`;
|
||||
|
||||
interface FullscreenPanelProps {
|
||||
element: Element | null;
|
||||
}
|
||||
|
||||
export function FullscreenPanel({ element }: FullscreenPanelProps) {
|
||||
const canDoFullscreen =
|
||||
element && element.ownerDocument && element.ownerDocument.fullscreenEnabled;
|
||||
|
||||
if (!canDoFullscreen) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function doFullscreen() {
|
||||
if (element && element.ownerDocument && canDoFullscreen) {
|
||||
const isFullscreen = element.ownerDocument.fullscreenElement !== null;
|
||||
|
||||
if (isFullscreen) {
|
||||
element.ownerDocument.exitFullscreen();
|
||||
} else {
|
||||
element.requestFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const label = i18n.translate('xpack.apm.serviceMap.fullscreen', {
|
||||
defaultMessage: 'Full screen'
|
||||
});
|
||||
|
||||
return (
|
||||
<EuiPanel hasShadow={true} paddingSize="none">
|
||||
<Button
|
||||
aria-label={label}
|
||||
color="text"
|
||||
iconType="fullScreen"
|
||||
onClick={doFullscreen}
|
||||
title={label}
|
||||
/>
|
||||
</EuiPanel>
|
||||
);
|
||||
}
|
|
@ -3873,7 +3873,6 @@
|
|||
"xpack.apm.serviceDetails.metricsTabLabel": "メトリック",
|
||||
"xpack.apm.serviceDetails.nodesTabLabel": "JVM",
|
||||
"xpack.apm.serviceDetails.transactionsTabLabel": "トランザクション",
|
||||
"xpack.apm.serviceMap.fullscreen": "全画面",
|
||||
"xpack.apm.serviceMap.zoomIn": "ズームイン",
|
||||
"xpack.apm.serviceMap.zoomOut": "ズームアウト",
|
||||
"xpack.apm.serviceNodeMetrics.containerId": "コンテナー ID",
|
||||
|
@ -13198,4 +13197,4 @@
|
|||
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。",
|
||||
"xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3873,7 +3873,6 @@
|
|||
"xpack.apm.serviceDetails.metricsTabLabel": "指标",
|
||||
"xpack.apm.serviceDetails.nodesTabLabel": "JVM",
|
||||
"xpack.apm.serviceDetails.transactionsTabLabel": "事务",
|
||||
"xpack.apm.serviceMap.fullscreen": "全屏",
|
||||
"xpack.apm.serviceMap.zoomIn": "放大",
|
||||
"xpack.apm.serviceMap.zoomOut": "缩小",
|
||||
"xpack.apm.serviceNodeMetrics.containerId": "容器 ID",
|
||||
|
@ -13197,4 +13196,4 @@
|
|||
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。",
|
||||
"xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue