mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Maps] Rename gis variable names to maps (#29867)
This commit is contained in:
parent
d91809d7de
commit
9f1408f42c
42 changed files with 169 additions and 169 deletions
|
@ -12,7 +12,7 @@
|
|||
export function checkLicense(xPackInfo) {
|
||||
if (!xPackInfo.isAvailable()) {
|
||||
return {
|
||||
gis: false,
|
||||
maps: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -26,12 +26,12 @@ export function checkLicense(xPackInfo) {
|
|||
|
||||
if (!isAnyXpackLicense) {
|
||||
return {
|
||||
gis: false,
|
||||
maps: false,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
gis: true,
|
||||
maps: true,
|
||||
uid: xPackInfo.license.getUid(),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -41,16 +41,16 @@ export function maps(kibana) {
|
|||
},
|
||||
|
||||
init(server) {
|
||||
const gisEnabled = server.config().get('xpack.maps.enabled');
|
||||
const mapsEnabled = server.config().get('xpack.maps.enabled');
|
||||
|
||||
if (gisEnabled) {
|
||||
if (mapsEnabled) {
|
||||
const thisPlugin = this;
|
||||
const xpackMainPlugin = server.plugins.xpack_main;
|
||||
let routesInitialized = false;
|
||||
|
||||
watchStatusAndLicenseToInitialize(xpackMainPlugin, thisPlugin,
|
||||
async license => {
|
||||
if (license && license.gis && !routesInitialized) {
|
||||
if (license && license.maps && !routesInitialized) {
|
||||
routesInitialized = true;
|
||||
initRoutes(server, license.uid);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import '@elastic/eui/src/components/header/variables';
|
||||
|
||||
#gis-plugin {
|
||||
#maps-plugin {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - #{$euiHeaderChildSize});
|
||||
|
@ -8,7 +8,7 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#react-gis-root {
|
||||
#react-maps-root {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div id="gis-plugin">
|
||||
<div id="gis-top-nav">
|
||||
<div id="maps-plugin">
|
||||
<div id="maps-top-nav">
|
||||
<div>
|
||||
<kbn-top-nav name="gis" config="topNavMenu">
|
||||
<kbn-top-nav name="map" config="topNavMenu">
|
||||
<div data-transclude-slots>
|
||||
<!-- Title. -->
|
||||
<div data-transclude-slot="topLeftCorner">
|
||||
|
@ -41,6 +41,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="react-gis-root"></div>
|
||||
<div id="react-maps-root"></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@ import { getInitialQuery } from './get_initial_query';
|
|||
import { getInitialTimeFilters } from './get_initial_time_filters';
|
||||
import { getInitialRefreshConfig } from './get_initial_refresh_config';
|
||||
|
||||
const REACT_ANCHOR_DOM_ELEMENT_ID = 'react-gis-root';
|
||||
const REACT_ANCHOR_DOM_ELEMENT_ID = 'react-maps-root';
|
||||
|
||||
|
||||
const app = uiModules.get('app/maps', []);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
.gisMapWrapper {
|
||||
.mapMapWrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.gisMapLayerPanel {
|
||||
.mapMapLayerPanel {
|
||||
background-color: $euiColorLightestShade;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -68,22 +68,22 @@ export class GisMap extends Component {
|
|||
if (noFlyoutVisible) {
|
||||
currentPanel = null;
|
||||
} else if (addLayerVisible) {
|
||||
currentPanelClassName = "gisMapLayerPanel-isVisible";
|
||||
currentPanelClassName = "mapMapLayerPanel-isVisible";
|
||||
currentPanel = <AddLayerPanel/>;
|
||||
} else if (layerDetailsVisible) {
|
||||
currentPanelClassName = "gisMapLayerPanel-isVisible";
|
||||
currentPanelClassName = "mapMapLayerPanel-isVisible";
|
||||
currentPanel = (
|
||||
<LayerPanel/>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<EuiFlexGroup gutterSize="none" responsive={false}>
|
||||
<EuiFlexItem className="gisMapWrapper">
|
||||
<EuiFlexItem className="mapMapWrapper">
|
||||
<MBMapContainer/>
|
||||
<WidgetOverlay/>
|
||||
</EuiFlexItem>
|
||||
|
||||
<EuiFlexItem className={`gisMapLayerPanel ${currentPanelClassName}`} grow={false}>
|
||||
<EuiFlexItem className={`mapMapLayerPanel ${currentPanelClassName}`} grow={false}>
|
||||
{currentPanel}
|
||||
</EuiFlexItem>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisLayerAddpanel__card {
|
||||
.mapLayerAddpanel__card {
|
||||
// EUITODO: Fix horizontal layout so it works with any size icon
|
||||
.euiCard__content {
|
||||
padding-top: 0 !important;
|
||||
|
|
|
@ -83,7 +83,7 @@ export class AddLayerPanel extends Component {
|
|||
<Fragment key={Source.type}>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCard
|
||||
className="gisLayerAddpanel__card"
|
||||
className="mapLayerAddpanel__card"
|
||||
title={Source.title}
|
||||
icon={icon}
|
||||
onClick={() => this._onSourceTypeChange(Source.type)}
|
||||
|
@ -150,17 +150,17 @@ export class AddLayerPanel extends Component {
|
|||
direction="column"
|
||||
gutterSize="none"
|
||||
>
|
||||
<EuiFlyoutHeader hasBorder className="gisLayerPanel__header">
|
||||
<EuiFlyoutHeader hasBorder className="mapLayerPanel__header">
|
||||
<EuiTitle size="s">
|
||||
<h2>Add layer</h2>
|
||||
</EuiTitle>
|
||||
</EuiFlyoutHeader>
|
||||
|
||||
<EuiFlyoutBody className="gisLayerPanel__body">
|
||||
<EuiFlyoutBody className="mapLayerPanel__body">
|
||||
{this._renderAddLayerForm()}
|
||||
</EuiFlyoutBody>
|
||||
|
||||
<EuiFlyoutFooter className="gisLayerPanel__footer">
|
||||
<EuiFlyoutFooter className="mapLayerPanel__footer">
|
||||
<EuiFlexGroup justifyContent="spaceBetween" responsive={false}>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonEmpty
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
* to the last child element.
|
||||
*/
|
||||
|
||||
.gisLayerPanel__header,
|
||||
.gisLayerPanel__body,
|
||||
.gisLayerPanel__footer {
|
||||
.mapLayerPanel__header,
|
||||
.mapLayerPanel__body,
|
||||
.mapLayerPanel__footer {
|
||||
padding: $euiSize;
|
||||
}
|
||||
|
||||
.gisLayerPanel__body {
|
||||
.mapLayerPanel__body {
|
||||
flex-basis: 1px; /* Fixes scrolling for Firefox */
|
||||
padding-bottom: 0; /* 1 */
|
||||
|
||||
|
@ -19,19 +19,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
.gisLayerPanel__header {
|
||||
.mapLayerPanel__header {
|
||||
box-shadow: 0 $euiSize $euiSize (-$euiSize / 2) $euiColorLightestShade;
|
||||
}
|
||||
|
||||
.gisLayerPanel__sourceDetails {
|
||||
.mapLayerPanel__sourceDetails {
|
||||
margin-left: $euiSizeXL;
|
||||
}
|
||||
|
||||
.gisLayerPanel__sourceDetail {
|
||||
.mapLayerPanel__sourceDetail {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.gisLayerPanel__footer {
|
||||
.mapLayerPanel__footer {
|
||||
border-top: $euiBorderThin;
|
||||
box-shadow: 0 ($euiSize *-1) $euiSize (-$euiSize / 2) $euiColorLightestShade;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisJoinItem {
|
||||
.mapJoinItem {
|
||||
background: tintOrShade($euiColorLightShade, 85%, 0);
|
||||
border-radius: $euiBorderRadius;
|
||||
padding: $euiSizeXS;
|
||||
|
@ -6,14 +6,14 @@
|
|||
|
||||
&:hover,
|
||||
&:focus {
|
||||
.gisJoinItem__delete {
|
||||
.mapJoinItem__delete {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gisJoinItem__delete {
|
||||
.mapJoinItem__delete {
|
||||
@include euiBottomShadowSmall;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
|
|
@ -173,7 +173,7 @@ export class Join extends Component {
|
|||
}
|
||||
|
||||
return (
|
||||
<EuiFlexGroup className="gisJoinItem" responsive={false} wrap={true} gutterSize="s">
|
||||
<EuiFlexGroup className="mapJoinItem" responsive={false} wrap={true} gutterSize="s">
|
||||
|
||||
<EuiFlexItem grow={false}>
|
||||
<JoinExpression
|
||||
|
@ -195,7 +195,7 @@ export class Join extends Component {
|
|||
{metricsExpression}
|
||||
|
||||
<EuiButtonIcon
|
||||
className="gisJoinItem__delete"
|
||||
className="mapJoinItem__delete"
|
||||
iconType="trash"
|
||||
color="danger"
|
||||
aria-label="Delete join"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisAlphaRange {
|
||||
.mapAlphaRange {
|
||||
// EUITODO: Fix range slider to calculate the max digits available
|
||||
.euiFieldNumber {
|
||||
max-width: 5.5em !important;
|
||||
|
|
|
@ -100,7 +100,7 @@ export function SettingsPanel(props) {
|
|||
<EuiFormRow
|
||||
label="Layer transparency"
|
||||
>
|
||||
<div className="gisAlphaRange">
|
||||
<div className="mapAlphaRange">
|
||||
<ValidatedRange
|
||||
min={.00}
|
||||
max={1.00}
|
||||
|
|
|
@ -106,7 +106,7 @@ export class LayerPanel extends React.Component {
|
|||
return (<span>{value}</span>);
|
||||
}
|
||||
return (
|
||||
<p key={label} className="gisLayerPanel__sourceDetail">
|
||||
<p key={label} className="mapLayerPanel__sourceDetail">
|
||||
<strong>{label}</strong>{' '}
|
||||
{renderValue()}
|
||||
</p>
|
||||
|
@ -122,7 +122,7 @@ export class LayerPanel extends React.Component {
|
|||
direction="column"
|
||||
gutterSize="none"
|
||||
>
|
||||
<EuiFlyoutHeader hasBorder className="gisLayerPanel__header">
|
||||
<EuiFlyoutHeader hasBorder className="mapLayerPanel__header">
|
||||
<EuiFlexGroup responsive={false} alignItems="center" gutterSize="s">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonIcon
|
||||
|
@ -140,7 +140,7 @@ export class LayerPanel extends React.Component {
|
|||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<EuiSpacer size="xs" />
|
||||
<div className="gisLayerPanel__sourceDetails">
|
||||
<div className="mapLayerPanel__sourceDetails">
|
||||
<EuiAccordion
|
||||
id="accordion1"
|
||||
buttonContent="Source details"
|
||||
|
@ -153,14 +153,14 @@ export class LayerPanel extends React.Component {
|
|||
</div>
|
||||
</EuiFlyoutHeader>
|
||||
|
||||
<EuiFlyoutBody className="gisLayerPanel__body">
|
||||
<EuiFlyoutBody className="mapLayerPanel__body">
|
||||
<SettingsPanel/>
|
||||
<EuiSpacer size="s" />
|
||||
{this._renderJoinSection()}
|
||||
<StyleTabs layer={selectedLayer}/>
|
||||
</EuiFlyoutBody>
|
||||
|
||||
<EuiFlyoutFooter className="gisLayerPanel__footer">
|
||||
<EuiFlyoutFooter className="mapLayerPanel__footer">
|
||||
<FlyoutFooter/>
|
||||
</EuiFlyoutFooter>
|
||||
</EuiFlexGroup>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisLayerToast {
|
||||
.mapLayerToast {
|
||||
margin-top: -150px !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
|
@ -10,15 +10,15 @@ export function Toasts({ layerLoadToast, clearLayerLoadToast }) {
|
|||
if (layerLoadToast === 'success') {
|
||||
toastNotifications.add({
|
||||
title: 'Layer added',
|
||||
className: 'gisLayerToast'
|
||||
className: 'mapLayerToast'
|
||||
}) && clearLayerLoadToast();
|
||||
} else if (layerLoadToast === 'error') {
|
||||
toastNotifications.addDanger({
|
||||
title: 'Error adding layer',
|
||||
className: 'gisLayerToast'
|
||||
className: 'mapLayerToast'
|
||||
}) && clearLayerLoadToast();
|
||||
} else {
|
||||
// Do nothing
|
||||
}
|
||||
return null; // renderless component
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* individual widgets.
|
||||
*/
|
||||
|
||||
.gisWidgetOverlay {
|
||||
.mapWidgetOverlay {
|
||||
position: absolute;
|
||||
z-index: $euiZLevel1;
|
||||
top: $euiSizeM;
|
||||
|
@ -13,12 +13,12 @@
|
|||
pointer-events: none; /* 1 */
|
||||
}
|
||||
|
||||
.gisWidgetOverlay__rightSide {
|
||||
.mapWidgetOverlay__rightSide {
|
||||
min-width: 17rem;
|
||||
max-width: 24rem;
|
||||
}
|
||||
|
||||
.gisWidgetControl {
|
||||
.mapWidgetControl {
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
padding-bottom: $euiSizeS; // ensures the scrollbar doesn't appear unnecessarily because of flex group negative margins
|
||||
|
@ -27,11 +27,11 @@
|
|||
display: flex;
|
||||
pointer-events: all; /* 1 */
|
||||
|
||||
&.gisWidgetControl-hasShadow {
|
||||
&.mapWidgetControl-hasShadow {
|
||||
@include euiBottomShadowLarge;
|
||||
}
|
||||
|
||||
.gisWidgetControl__header {
|
||||
.mapWidgetControl__header {
|
||||
padding: $euiSizeS $euiSize;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.gisAttributionControl {
|
||||
.mapAttributionControl {
|
||||
padding: 0 $euiSizeXS;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ export class AttributionControl extends React.Component {
|
|||
return null;
|
||||
}
|
||||
return (
|
||||
<EuiPanel className="gisWidgetControl gisAttributionControl" paddingSize="none" grow={false}>
|
||||
<EuiPanel className="mapWidgetControl mapAttributionControl" paddingSize="none" grow={false}>
|
||||
<EuiText color="subdued" size="xs">
|
||||
<small>{this._renderAttributions()}</small>
|
||||
</EuiText>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisLayerControl {
|
||||
.mapLayerControl {
|
||||
@include euiScrollBar;
|
||||
overflow-y: auto;
|
||||
flex-basis: auto !important; // Fixes IE and ensures the layer items are visible
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
.gisTocEntry {
|
||||
.mapTocEntry {
|
||||
padding: $euiSizeS $euiSize;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.gisTocEntry-visible {
|
||||
.mapTocEntry-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.gisTocEntry-notVisible {
|
||||
.mapTocEntry-notVisible {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.gisTocEntry__grab {
|
||||
.mapTocEntry__grab {
|
||||
margin-left: $euiSizeXS;
|
||||
}
|
||||
|
||||
.gisTocEntry__grab:hover {
|
||||
.mapTocEntry__grab:hover {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ export class TOCEntry extends React.Component {
|
|||
|
||||
return (
|
||||
<div
|
||||
className="gisTocEntry"
|
||||
className="mapTocEntry"
|
||||
id={layer.getId()}
|
||||
data-layerid={layer.getId()}
|
||||
>
|
||||
|
@ -83,7 +83,7 @@ export class TOCEntry extends React.Component {
|
|||
responsive={false}
|
||||
className={
|
||||
layer.isVisible() && layer.showAtZoomLevel(zoom)
|
||||
&& !layer.hasErrors() ? 'gisTocEntry-visible' : 'gisTocEntry-notVisible'
|
||||
&& !layer.hasErrors() ? 'mapTocEntry-visible' : 'mapTocEntry-notVisible'
|
||||
}
|
||||
>
|
||||
<EuiFlexItem grow={false}>
|
||||
|
@ -100,7 +100,7 @@ export class TOCEntry extends React.Component {
|
|||
</button>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<span className="gisTocEntry__grab"><EuiIcon type="grab"/></span>
|
||||
<span className="mapTocEntry__grab"><EuiIcon type="grab"/></span>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
{tocDetails}
|
||||
|
|
|
@ -21,8 +21,8 @@ export function LayerControl(props) {
|
|||
</EuiButtonEmpty>);
|
||||
|
||||
return (
|
||||
<EuiPanel className="gisWidgetControl gisWidgetControl-hasShadow" paddingSize="none" grow={false}>
|
||||
<EuiFlexItem className="gisWidgetControl__header" grow={false}>
|
||||
<EuiPanel className="mapWidgetControl mapWidgetControl-hasShadow" paddingSize="none" grow={false}>
|
||||
<EuiFlexItem className="mapWidgetControl__header" grow={false}>
|
||||
<EuiFlexGroup
|
||||
justifyContent="spaceBetween"
|
||||
alignItems="center"
|
||||
|
@ -40,7 +40,7 @@ export function LayerControl(props) {
|
|||
</EuiFlexGroup>
|
||||
</EuiFlexItem>
|
||||
|
||||
<EuiFlexItem className="gisLayerControl">
|
||||
<EuiFlexItem className="mapLayerControl">
|
||||
<LayerTOC />
|
||||
</EuiFlexItem>
|
||||
</EuiPanel>
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
* individual widgets.
|
||||
*/
|
||||
|
||||
.gisViewControl__coordinates {
|
||||
.mapViewControl__coordinates {
|
||||
padding: $euiSizeXS $euiSizeS;
|
||||
justify-content: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.gisViewControl__gotoButton {
|
||||
.mapViewControl__gotoButton {
|
||||
min-width: 0;
|
||||
pointer-events: all; /* 1 */
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ export function ViewControl({ isSetViewOpen, closeSetView, openSetView, mouseCoo
|
|||
anchorPosition="upRight"
|
||||
button={(
|
||||
<EuiButton
|
||||
className="gisViewControl__gotoButton"
|
||||
className="mapViewControl__gotoButton"
|
||||
fill
|
||||
size="s"
|
||||
onClick={toggleSetViewVisibility}
|
||||
|
@ -54,7 +54,7 @@ export function ViewControl({ isSetViewOpen, closeSetView, openSetView, mouseCoo
|
|||
? _.round(mouseCoordinates.lon, DECIMAL_DEGREES_PRECISION)
|
||||
: '';
|
||||
return (
|
||||
<EuiPanel className="gisWidgetControl gisViewControl__coordinates" paddingSize="none">
|
||||
<EuiPanel className="mapWidgetControl mapViewControl__coordinates" paddingSize="none">
|
||||
<EuiText size="xs">
|
||||
<p>
|
||||
<strong>lat:</strong> {lat},{' '}
|
||||
|
|
|
@ -15,10 +15,10 @@ import { AttributionControl } from './attribution_control';
|
|||
|
||||
export function WidgetOverlay() {
|
||||
return (
|
||||
<EuiFlexGroup className="gisWidgetOverlay" responsive={false} direction="column" alignItems="flexEnd" gutterSize="s">
|
||||
<EuiFlexGroup className="mapWidgetOverlay" responsive={false} direction="column" alignItems="flexEnd" gutterSize="s">
|
||||
<EuiFlexItem>
|
||||
<EuiFlexGroup
|
||||
className="gisWidgetOverlay__rightSide"
|
||||
className="mapWidgetOverlay__rightSide"
|
||||
direction="column"
|
||||
justifyContent="spaceBetween"
|
||||
responsive={false}
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
/* GIS plugin styles */
|
||||
|
||||
// Prefix all styles with "gis" to avoid conflicts.
|
||||
// Prefix all styles with "map" to avoid conflicts.
|
||||
// Examples
|
||||
// gisChart
|
||||
// gisChart__legend
|
||||
// gisChart__legend--small
|
||||
// gisChart__legend-isLoading
|
||||
// mapChart
|
||||
// mapChart__legend
|
||||
// mapChart__legend--small
|
||||
// mapChart__legend-isLoading
|
||||
|
||||
@import './main';
|
||||
@import './components/index';
|
||||
|
|
|
@ -373,7 +373,7 @@ export class MapListing extends React.Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<EuiPage data-test-subj="gisListingPage" restrictWidth>
|
||||
<EuiPage data-test-subj="mapsListingPage" restrictWidth>
|
||||
<EuiPageBody>
|
||||
{this.renderPageContent()}
|
||||
</EuiPageBody>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisColorGradient {
|
||||
.mapColorGradient {
|
||||
width: 100%;
|
||||
height: $euiSize;
|
||||
position: relative;
|
||||
|
|
|
@ -19,7 +19,7 @@ export const ColorGradient = ({ color }) => {
|
|||
const background = getLinearGradient(rgbColorStrings, GRADIENT_INTERVALS);
|
||||
return (
|
||||
<div
|
||||
className="gisColorGradient"
|
||||
className="mapColorGradient"
|
||||
style={{ background }}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.gisStaticDynamicSylingOption__dynamicSizeHack {
|
||||
.mapStaticDynamicSylingOption__dynamicSizeHack {
|
||||
width: calc(100% - #{$euiSizeXXL + $euiSizeS});
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ export class StaticDynamicStyleRow extends React.Component {
|
|||
|
||||
return (
|
||||
<EuiFlexGroup gutterSize="s">
|
||||
<EuiFlexItem className={isDynamic ? 'gisStaticDynamicSylingOption__dynamicSizeHack' : undefined}>
|
||||
<EuiFlexItem className={isDynamic ? 'mapStaticDynamicSylingOption__dynamicSizeHack' : undefined}>
|
||||
<EuiFormRow label={this.props.name && this.props.name}>
|
||||
{this._renderStyleSelector()}
|
||||
</EuiFormRow>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.gisColorPicker {
|
||||
.mapColorPicker {
|
||||
padding-top: 9px;
|
||||
|
||||
.euiColorPickerPopUp {
|
||||
|
|
|
@ -21,7 +21,7 @@ export function StaticColorSelection({ onChange, styleOptions }) {
|
|||
<EuiColorPicker
|
||||
onChange={onColorChange}
|
||||
color={styleOptions.color}
|
||||
className="gisColorPicker euiFieldText"
|
||||
className="mapColorPicker euiFieldText"
|
||||
/>
|
||||
</EuiFormControlLayout>
|
||||
);
|
||||
|
|
|
@ -8,7 +8,7 @@ import expect from 'expect.js';
|
|||
|
||||
export default function ({ getPageObjects, getService }) {
|
||||
|
||||
const PageObjects = getPageObjects(['gis']);
|
||||
const PageObjects = getPageObjects(['maps']);
|
||||
const queryBar = getService('queryBar');
|
||||
const inspector = getService('inspector');
|
||||
const DOC_COUNT_PROP_NAME = 'doc_count';
|
||||
|
@ -20,9 +20,9 @@ export default function ({ getPageObjects, getService }) {
|
|||
const DATA_CENTER_LAT = 38;
|
||||
|
||||
async function getRequestTimestamp() {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const requestTimestamp = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Request timestamp');
|
||||
const requestTimestamp = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Request timestamp');
|
||||
await inspector.close();
|
||||
return requestTimestamp;
|
||||
}
|
||||
|
@ -32,18 +32,18 @@ export default function ({ getPageObjects, getService }) {
|
|||
describe('geoprecision - requests', async () => {
|
||||
let beforeTimestamp;
|
||||
beforeEach(async () => {
|
||||
await PageObjects.gis.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1);
|
||||
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1);
|
||||
beforeTimestamp = await getRequestTimestamp();
|
||||
});
|
||||
|
||||
it('should not rerequest when zoom changes do not cause geohash precision to change', async () => {
|
||||
await PageObjects.gis.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 2);
|
||||
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 2);
|
||||
const afterTimestamp = await getRequestTimestamp();
|
||||
expect(afterTimestamp).to.equal(beforeTimestamp);
|
||||
});
|
||||
|
||||
it('should rerequest when zoom changes causes the geohash precision to change', async () => {
|
||||
await PageObjects.gis.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 4);
|
||||
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 4);
|
||||
const afterTimestamp = await getRequestTimestamp();
|
||||
expect(afterTimestamp).not.to.equal(beforeTimestamp);
|
||||
});
|
||||
|
@ -52,24 +52,24 @@ export default function ({ getPageObjects, getService }) {
|
|||
describe('geoprecision - data', async ()=> {
|
||||
|
||||
beforeEach(async () => {
|
||||
await PageObjects.gis.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1);
|
||||
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1);
|
||||
});
|
||||
|
||||
it ('should not return any data when the extent does not cover the data bounds', async () => {
|
||||
await PageObjects.gis.setView(64, 179, 5);
|
||||
const mapboxStyle = await PageObjects.gis.getMapboxStyle();
|
||||
await PageObjects.maps.setView(64, 179, 5);
|
||||
const mapboxStyle = await PageObjects.maps.getMapboxStyle();
|
||||
expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(0);
|
||||
});
|
||||
|
||||
it ('should request the data when the map covers the databounds', async () => {
|
||||
const mapboxStyle = await PageObjects.gis.getMapboxStyle();
|
||||
const mapboxStyle = await PageObjects.maps.getMapboxStyle();
|
||||
expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(EXPECTED_NUMBER_FEATURES);
|
||||
});
|
||||
|
||||
it ('should request only partial data when the map only covers part of the databounds', async () => {
|
||||
//todo this verifies the extent-filtering behavior (not really the correct application of geohash-precision), and should ideally be moved to its own section
|
||||
await PageObjects.gis.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 6);
|
||||
const mapboxStyle = await PageObjects.gis.getMapboxStyle();
|
||||
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 6);
|
||||
const mapboxStyle = await PageObjects.maps.getMapboxStyle();
|
||||
expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(2);
|
||||
});
|
||||
});
|
||||
|
@ -77,7 +77,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
describe('heatmap', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.loadSavedMap('geohashgrid heatmap example');
|
||||
await PageObjects.maps.loadSavedMap('geohashgrid heatmap example');
|
||||
});
|
||||
|
||||
const LAYER_ID = '3xlvm';
|
||||
|
@ -86,13 +86,13 @@ export default function ({ getPageObjects, getService }) {
|
|||
it('should re-fetch geohashgrid aggregation with refresh timer', async () => {
|
||||
const beforeRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp.length).to.be(24);
|
||||
await PageObjects.gis.triggerSingleRefresh(1000);
|
||||
await PageObjects.maps.triggerSingleRefresh(1000);
|
||||
const afterRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp).not.to.equal(afterRefreshTimerTimestamp);
|
||||
});
|
||||
|
||||
it('should decorate feature properties with scaled doc_count property', async () => {
|
||||
const mapboxStyle = await PageObjects.gis.getMapboxStyle();
|
||||
const mapboxStyle = await PageObjects.maps.getMapboxStyle();
|
||||
expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(EXPECTED_NUMBER_FEATURES);
|
||||
|
||||
mapboxStyle.sources[LAYER_ID].data.features.forEach(({ properties }) => {
|
||||
|
@ -107,7 +107,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
before(async () => {
|
||||
await queryBar.setQuery('machine.os.raw : "win 8"');
|
||||
await queryBar.submitQuery();
|
||||
await PageObjects.gis.setView(0, 0, 0);
|
||||
await PageObjects.maps.setView(0, 0, 0);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -116,9 +116,9 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should apply query to geohashgrid aggregation request', async () => {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
await inspector.close();
|
||||
expect(hits).to.equal('1');
|
||||
});
|
||||
|
@ -130,19 +130,19 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should contain geohashgrid aggregation elasticsearch request', async () => {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const totalHits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
const totalHits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
expect(totalHits).to.equal('6');
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
expect(hits).to.equal('0'); // aggregation requests do not return any documents
|
||||
const indexPatternName = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Index pattern');
|
||||
const indexPatternName = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Index pattern');
|
||||
expect(indexPatternName).to.equal('logstash-*');
|
||||
});
|
||||
|
||||
it('should not contain any elasticsearch request after layer is deleted', async () => {
|
||||
await PageObjects.gis.removeLayer('logstash-*');
|
||||
const noRequests = await PageObjects.gis.doesInspectorHaveRequests();
|
||||
await PageObjects.maps.removeLayer('logstash-*');
|
||||
const noRequests = await PageObjects.maps.doesInspectorHaveRequests();
|
||||
expect(noRequests).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
@ -150,7 +150,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
describe('vector(grid)', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.loadSavedMap('geohashgrid vector grid example');
|
||||
await PageObjects.maps.loadSavedMap('geohashgrid vector grid example');
|
||||
});
|
||||
|
||||
const LAYER_ID = 'g1xkv';
|
||||
|
@ -160,13 +160,13 @@ export default function ({ getPageObjects, getService }) {
|
|||
it('should re-fetch geohashgrid aggregation with refresh timer', async () => {
|
||||
const beforeRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp.length).to.be(24);
|
||||
await PageObjects.gis.triggerSingleRefresh(1000);
|
||||
await PageObjects.maps.triggerSingleRefresh(1000);
|
||||
const afterRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp).not.to.equal(afterRefreshTimerTimestamp);
|
||||
});
|
||||
|
||||
it('should decorate feature properties with metrics properterties', async () => {
|
||||
const mapboxStyle = await PageObjects.gis.getMapboxStyle();
|
||||
const mapboxStyle = await PageObjects.maps.getMapboxStyle();
|
||||
expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(EXPECTED_NUMBER_FEATURES);
|
||||
|
||||
mapboxStyle.sources[LAYER_ID].data.features.forEach(({ properties }) => {
|
||||
|
@ -180,7 +180,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
describe('query bar', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.setView(0, 0, 0);
|
||||
await PageObjects.maps.setView(0, 0, 0);
|
||||
await queryBar.setQuery('machine.os.raw : "win 8"');
|
||||
await queryBar.submitQuery();
|
||||
});
|
||||
|
@ -191,9 +191,9 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should apply query to geohashgrid aggregation request', async () => {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
await inspector.close();
|
||||
expect(hits).to.equal('1');
|
||||
});
|
||||
|
@ -205,19 +205,19 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should contain geohashgrid aggregation elasticsearch request', async () => {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const totalHits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
const totalHits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
expect(totalHits).to.equal('6');
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
expect(hits).to.equal('0'); // aggregation requests do not return any documents
|
||||
const indexPatternName = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Index pattern');
|
||||
const indexPatternName = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Index pattern');
|
||||
expect(indexPatternName).to.equal('logstash-*');
|
||||
});
|
||||
|
||||
it('should not contain any elasticsearch request after layer is deleted', async () => {
|
||||
await PageObjects.gis.removeLayer('logstash-*');
|
||||
const noRequests = await PageObjects.gis.doesInspectorHaveRequests();
|
||||
await PageObjects.maps.removeLayer('logstash-*');
|
||||
const noRequests = await PageObjects.maps.doesInspectorHaveRequests();
|
||||
expect(noRequests).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,27 +7,27 @@
|
|||
import expect from 'expect.js';
|
||||
|
||||
export default function ({ getPageObjects, getService }) {
|
||||
const PageObjects = getPageObjects(['gis']);
|
||||
const PageObjects = getPageObjects(['maps']);
|
||||
const queryBar = getService('queryBar');
|
||||
const inspector = getService('inspector');
|
||||
|
||||
describe('elasticsearch document layer', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.loadSavedMap('document example');
|
||||
await PageObjects.maps.loadSavedMap('document example');
|
||||
});
|
||||
|
||||
async function getRequestTimestamp() {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const requestTimestamp = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Request timestamp');
|
||||
const requestTimestamp = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Request timestamp');
|
||||
await inspector.close();
|
||||
return requestTimestamp;
|
||||
}
|
||||
|
||||
async function getHits() {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
await inspector.close();
|
||||
return hits;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
it('should re-fetch geohashgrid aggregation with refresh timer', async () => {
|
||||
const beforeRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp.length).to.be(24);
|
||||
await PageObjects.gis.triggerSingleRefresh(1000);
|
||||
await PageObjects.maps.triggerSingleRefresh(1000);
|
||||
const afterRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp).not.to.equal(afterRefreshTimerTimestamp);
|
||||
});
|
||||
|
@ -52,9 +52,9 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should apply query to search request', async () => {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
await inspector.close();
|
||||
expect(hits).to.equal('1');
|
||||
});
|
||||
|
@ -76,13 +76,13 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
describe('filter by extent', () => {
|
||||
it('should handle geo_point filtering with extents that cross antimeridian', async () => {
|
||||
await PageObjects.gis.loadSavedMap('antimeridian points example');
|
||||
await PageObjects.maps.loadSavedMap('antimeridian points example');
|
||||
const hits = await getHits();
|
||||
expect(hits).to.equal('2');
|
||||
});
|
||||
|
||||
it('should handle geo_shape filtering with extents that cross antimeridian', async () => {
|
||||
await PageObjects.gis.loadSavedMap('antimeridian shapes example');
|
||||
await PageObjects.maps.loadSavedMap('antimeridian shapes example');
|
||||
const hits = await getHits();
|
||||
expect(hits).to.equal('2');
|
||||
});
|
||||
|
|
|
@ -14,12 +14,12 @@ const EXPECTED_JOIN_VALUES = {
|
|||
};
|
||||
|
||||
export default function ({ getPageObjects, getService }) {
|
||||
const PageObjects = getPageObjects(['gis']);
|
||||
const PageObjects = getPageObjects(['maps']);
|
||||
const inspector = getService('inspector');
|
||||
|
||||
describe('layer with joins', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.loadSavedMap('join example');
|
||||
await PageObjects.maps.loadSavedMap('join example');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -28,22 +28,22 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
it('should re-fetch join with refresh timer', async () => {
|
||||
async function getRequestTimestamp() {
|
||||
await PageObjects.gis.openInspectorRequest('meta_for_geo_shapes*.shape_name');
|
||||
await PageObjects.maps.openInspectorRequest('meta_for_geo_shapes*.shape_name');
|
||||
const requestStats = await inspector.getTableData();
|
||||
const requestTimestamp = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Request timestamp');
|
||||
const requestTimestamp = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Request timestamp');
|
||||
await inspector.close();
|
||||
return requestTimestamp;
|
||||
}
|
||||
|
||||
const beforeRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp.length).to.be(24);
|
||||
await PageObjects.gis.triggerSingleRefresh(1000);
|
||||
await PageObjects.maps.triggerSingleRefresh(1000);
|
||||
const afterRefreshTimerTimestamp = await getRequestTimestamp();
|
||||
expect(beforeRefreshTimerTimestamp).not.to.equal(afterRefreshTimerTimestamp);
|
||||
});
|
||||
|
||||
it('should decorate feature properties with join property', async () => {
|
||||
const mapboxStyle = await PageObjects.gis.getMapboxStyle();
|
||||
const mapboxStyle = await PageObjects.maps.getMapboxStyle();
|
||||
expect(mapboxStyle.sources.n1t6f.data.features.length).to.equal(3);
|
||||
|
||||
mapboxStyle.sources.n1t6f.data.features.forEach(({ properties }) => {
|
||||
|
@ -58,19 +58,19 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should contain terms aggregation elasticsearch request', async () => {
|
||||
await PageObjects.gis.openInspectorRequest('meta_for_geo_shapes*.shape_name');
|
||||
await PageObjects.maps.openInspectorRequest('meta_for_geo_shapes*.shape_name');
|
||||
const requestStats = await inspector.getTableData();
|
||||
const totalHits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
const totalHits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits (total)');
|
||||
expect(totalHits).to.equal('6');
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
expect(hits).to.equal('0'); // aggregation requests do not return any documents
|
||||
const indexPatternName = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Index pattern');
|
||||
const indexPatternName = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Index pattern');
|
||||
expect(indexPatternName).to.equal('meta_for_geo_shapes*');
|
||||
});
|
||||
|
||||
it('should not contain any elasticsearch request after layer is deleted', async () => {
|
||||
await PageObjects.gis.removeLayer('geo_shapes*');
|
||||
const noRequests = await PageObjects.gis.doesInspectorHaveRequests();
|
||||
await PageObjects.maps.removeLayer('geo_shapes*');
|
||||
const noRequests = await PageObjects.maps.doesInspectorHaveRequests();
|
||||
expect(noRequests).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import expect from 'expect.js';
|
||||
|
||||
export default function ({ getPageObjects }) {
|
||||
const PageObjects = getPageObjects(['common', 'gis', 'header', 'home']);
|
||||
const PageObjects = getPageObjects(['common', 'maps', 'header', 'home']);
|
||||
|
||||
describe('maps loaded from sample data', () => {
|
||||
describe('web logs', () => {
|
||||
|
@ -16,7 +16,7 @@ export default function ({ getPageObjects }) {
|
|||
await PageObjects.common.navigateToUrl('home', 'tutorial_directory/sampleData');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.home.addSampleDataSet('logs');
|
||||
await PageObjects.gis.loadSavedMap('[Logs] Web Traffic');
|
||||
await PageObjects.maps.loadSavedMap('[Logs] Web Traffic');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -26,12 +26,12 @@ export default function ({ getPageObjects }) {
|
|||
});
|
||||
|
||||
it('should contain web log heatmap layer', async () => {
|
||||
const exists = await PageObjects.gis.doesLayerExist('logs(heatmap)');
|
||||
const exists = await PageObjects.maps.doesLayerExist('logs(heatmap)');
|
||||
expect(exists).to.be(true);
|
||||
});
|
||||
|
||||
it('should contain web log document layer', async () => {
|
||||
const exists = await PageObjects.gis.doesLayerExist('logs(documents)');
|
||||
const exists = await PageObjects.maps.doesLayerExist('logs(documents)');
|
||||
expect(exists).to.be(true);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@ import expect from 'expect.js';
|
|||
|
||||
export default function ({ getPageObjects, getService }) {
|
||||
|
||||
const PageObjects = getPageObjects(['gis', 'header', 'timePicker']);
|
||||
const PageObjects = getPageObjects(['maps', 'header', 'timePicker']);
|
||||
const queryBar = getService('queryBar');
|
||||
const browser = getService('browser');
|
||||
const inspector = getService('inspector');
|
||||
|
@ -21,7 +21,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
describe('read', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.loadSavedMap('join example');
|
||||
await PageObjects.maps.loadSavedMap('join example');
|
||||
});
|
||||
|
||||
it('should update global Kibana time to value stored with map', async () => {
|
||||
|
@ -38,20 +38,20 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should set map location to value stored with map', async () => {
|
||||
const { lat, lon, zoom } = await PageObjects.gis.getView();
|
||||
const { lat, lon, zoom } = await PageObjects.maps.getView();
|
||||
expect(lat).to.equal('-0.04647');
|
||||
expect(lon).to.equal('77.33426');
|
||||
expect(zoom).to.equal('3.02');
|
||||
});
|
||||
|
||||
it('should load map layers stored with map', async () => {
|
||||
const layerExists = await PageObjects.gis.doesLayerExist('geo_shapes*');
|
||||
const layerExists = await PageObjects.maps.doesLayerExist('geo_shapes*');
|
||||
expect(layerExists).to.equal(true);
|
||||
});
|
||||
|
||||
describe('mapState contains query', () => {
|
||||
before(async () => {
|
||||
await PageObjects.gis.loadSavedMap('document example with query');
|
||||
await PageObjects.maps.loadSavedMap('document example with query');
|
||||
});
|
||||
|
||||
it('should update query bar with query stored with map', async () => {
|
||||
|
@ -66,9 +66,9 @@ export default function ({ getPageObjects, getService }) {
|
|||
});
|
||||
|
||||
it('should apply query stored with map', async () => {
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
await inspector.close();
|
||||
expect(hits).to.equal('2');
|
||||
});
|
||||
|
@ -84,10 +84,10 @@ export default function ({ getPageObjects, getService }) {
|
|||
const query = await queryBar.getQueryString();
|
||||
expect(query).to.equal('machine.os.raw : "win 8"');
|
||||
|
||||
await PageObjects.gis.openInspectorRequestsView();
|
||||
await PageObjects.maps.openInspectorRequestsView();
|
||||
const requestStats = await inspector.getTableData();
|
||||
await inspector.close();
|
||||
const hits = PageObjects.gis.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
const hits = PageObjects.maps.getInspectorStatRowHit(requestStats, 'Hits');
|
||||
expect(hits).to.equal('1');
|
||||
});
|
||||
});
|
||||
|
@ -95,31 +95,31 @@ export default function ({ getPageObjects, getService }) {
|
|||
|
||||
describe('create', () => {
|
||||
it('should allow saving map', async () => {
|
||||
await PageObjects.gis.openNewMap();
|
||||
await PageObjects.maps.openNewMap();
|
||||
|
||||
await PageObjects.gis.saveMap(MAP1_NAME);
|
||||
const count = await PageObjects.gis.getMapCountWithName(MAP1_NAME);
|
||||
await PageObjects.maps.saveMap(MAP1_NAME);
|
||||
const count = await PageObjects.maps.getMapCountWithName(MAP1_NAME);
|
||||
expect(count).to.equal(1);
|
||||
});
|
||||
|
||||
it('should allow saving map that crosses dateline', async () => {
|
||||
await PageObjects.gis.openNewMap();
|
||||
await PageObjects.gis.setView('64', '179', '5');
|
||||
await PageObjects.maps.openNewMap();
|
||||
await PageObjects.maps.setView('64', '179', '5');
|
||||
|
||||
await PageObjects.gis.saveMap(MAP2_NAME);
|
||||
const count = await PageObjects.gis.getMapCountWithName(MAP2_NAME);
|
||||
await PageObjects.maps.saveMap(MAP2_NAME);
|
||||
const count = await PageObjects.maps.getMapCountWithName(MAP2_NAME);
|
||||
expect(count).to.equal(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('delete', () => {
|
||||
it('should delete selected saved objects', async () => {
|
||||
await PageObjects.gis.deleteSavedMaps(MAP_NAME_PREFIX);
|
||||
await PageObjects.maps.deleteSavedMaps(MAP_NAME_PREFIX);
|
||||
|
||||
const map1Count = await PageObjects.gis.getMapCountWithName(MAP1_NAME);
|
||||
const map1Count = await PageObjects.maps.getMapCountWithName(MAP1_NAME);
|
||||
expect(map1Count).to.equal(0);
|
||||
|
||||
const map2Count = await PageObjects.gis.getMapCountWithName(MAP2_NAME);
|
||||
const map2Count = await PageObjects.maps.getMapCountWithName(MAP2_NAME);
|
||||
expect(map2Count).to.equal(0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -138,7 +138,7 @@ export default async function ({ readConfigFile }) {
|
|||
reporting: ReportingPageProvider,
|
||||
spaceSelector: SpaceSelectorPageProvider,
|
||||
infraHome: InfraHomePageProvider,
|
||||
gis: GisPageProvider,
|
||||
maps: GisPageProvider,
|
||||
statusPage: StatusPagePageProvider,
|
||||
upgradeAssistant: UpgradeAssistantProvider,
|
||||
uptime: UptimePageProvider,
|
||||
|
|
|
@ -56,7 +56,7 @@ export function GisPageProvider({ getService, getPageObjects }) {
|
|||
|
||||
async onMapListingPage() {
|
||||
log.debug(`onMapListingPage`);
|
||||
const exists = await testSubjects.exists('gisListingPage');
|
||||
const exists = await testSubjects.exists('mapsListingPage');
|
||||
return exists;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue