[Maps] Remove usage of gis from user-facing api (#29800)

This also renames the gis-folders to maps for consistency.
This commit is contained in:
Thomas Neirynck 2019-02-01 12:07:05 -05:00 committed by GitHub
parent c0f50a17dc
commit 52fed8a52d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
187 changed files with 64 additions and 64 deletions

View file

@ -25,7 +25,7 @@ bower_components
/packages/kbn-ui-framework/dist
/packages/kbn-ui-framework/doc_site/build
/packages/kbn-ui-framework/generator-kui/*/templates/
/x-pack/plugins/gis/public/vendor/**
/x-pack/plugins/maps/public/vendor/**
/x-pack/coverage
/x-pack/build
/x-pack/plugins/**/__tests__/fixtures/**

View file

@ -331,7 +331,7 @@ module.exports = {
* GIS overrides
*/
{
files: ['x-pack/plugins/gis/**/*'],
files: ['x-pack/plugins/maps/**/*'],
rules: {
'react/prefer-stateless-function': [0, { ignorePureComponents: false }],
},

View file

@ -18,7 +18,7 @@ import { dashboardMode } from './plugins/dashboard_mode';
import { logstash } from './plugins/logstash';
import { beats } from './plugins/beats_management';
import { apm } from './plugins/apm';
import { gis } from './plugins/gis';
import { maps } from './plugins/maps';
import { licenseManagement } from './plugins/license_management';
import { cloud } from './plugins/cloud';
import { indexManagement } from './plugins/index_management';
@ -54,7 +54,7 @@ module.exports = function (kibana) {
logstash(kibana),
beats(kibana),
apm(kibana),
gis(kibana),
maps(kibana),
canvas(kibana),
licenseManagement(kibana),
cloud(kibana),

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
export const GIS_API_PATH = 'api/gis';
export const GIS_API_PATH = 'api/maps';
export const DECIMAL_DEGREES_PRECISION = 5; // meters precision

View file

@ -12,25 +12,25 @@ import { checkLicense } from './check_license';
import { watchStatusAndLicenseToInitialize } from
'../../server/lib/watch_status_and_license_to_initialize';
export function gis(kibana) {
export function maps(kibana) {
return new kibana.Plugin({
require: ['kibana', 'elasticsearch', 'xpack_main', 'tile_map'],
id: 'gis',
configPrefix: 'xpack.gis',
id: 'maps',
configPrefix: 'xpack.maps',
publicDir: resolve(__dirname, 'public'),
uiExports: {
app: {
title: 'Maps',
description: 'Map application',
main: 'plugins/gis/index',
icon: 'plugins/gis/icon.svg',
main: 'plugins/maps/index',
icon: 'plugins/maps/icon.svg',
euiIconType: 'gisApp',
},
inspectorViews: [
'plugins/gis/inspector/views/register_views',
'plugins/maps/inspector/views/register_views',
],
home: ['plugins/gis/register_feature'],
home: ['plugins/maps/register_feature'],
styleSheetPaths: `${__dirname}/public/index.scss`,
mappings
},
@ -41,7 +41,7 @@ export function gis(kibana) {
},
init(server) {
const gisEnabled = server.config().get('xpack.gis.enabled');
const gisEnabled = server.config().get('xpack.maps.enabled');
if (gisEnabled) {
const thisPlugin = this;
@ -61,7 +61,7 @@ export function gis(kibana) {
.registerLicenseCheckResultsGenerator(checkLicense);
server.addSavedObjectsToSampleDataset('logs', webLogsSavedObjects);
server.injectUiAppVars('gis', async () => {
server.injectUiAppVars('maps', async () => {
return await server.getInjectedUiAppVars('kibana');
});
} else {

View file

@ -1,5 +1,5 @@
{
"gis-map": {
"map": {
"properties": {
"description": {
"type": "text"

View file

@ -34,7 +34,7 @@ import { getInitialRefreshConfig } from './get_initial_refresh_config';
const REACT_ANCHOR_DOM_ELEMENT_ID = 'react-gis-root';
const app = uiModules.get('app/gis', []);
const app = uiModules.get('app/maps', []);
app.controller('GisMapController', ($scope, $route, config, kbnUrl, localStorage, AppState, globalState) => {
@ -273,7 +273,7 @@ app.controller('GisMapController', ($scope, $route, config, kbnUrl, localStorage
onClose={() => {}}
title={savedMap.title}
showCopyOnSave={savedMap.id ? true : false}
objectType={'gis-map'}
objectType={'map'}
/>);
showSaveModal(saveModal);
}

View file

@ -10,7 +10,7 @@ import { SavedObjectLoader } from 'ui/courier/saved_object/saved_object_loader';
import { SavedObjectRegistryProvider } from 'ui/saved_objects/saved_object_registry';
import { SavedObjectsClientProvider } from 'ui/saved_objects';
const module = uiModules.get('app/gis');
const module = uiModules.get('app/maps');
// Register this service with the saved object registry so it can be
// edited by the object editor.

View file

@ -19,7 +19,7 @@ import {
} from '../../selectors/map_selectors';
import { convertMapExtentToPolygon } from '../../elasticsearch_geo_utils';
const module = uiModules.get('app/gis');
const module = uiModules.get('app/maps');
module.factory('SavedGisMap', function (Private) {
const SavedObject = Private(SavedObjectProvider);
@ -43,7 +43,7 @@ module.factory('SavedGisMap', function (Private) {
this.showInRecentlyAccessed = true;
}
SavedGisMap.type = 'gis-map';
SavedGisMap.type = 'map';
// Mappings are used to place object properties into saved object _source
SavedGisMap.mapping = {
@ -62,7 +62,7 @@ module.factory('SavedGisMap', function (Private) {
SavedGisMap.searchsource = false;
SavedGisMap.prototype.getFullPath = function () {
return `/app/gis#map/${this.id}`;
return `/app/maps#map/${this.id}`;
};
SavedGisMap.prototype.syncWithStore = function (state) {

View file

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 661 B

Before After
Before After

View file

@ -32,7 +32,7 @@ import listingTemplate from './angular/listing_ng_wrapper.html';
import mapTemplate from './angular/map.html';
import { MapListing } from './shared/components/map_listing';
const app = uiModules.get('app/gis', ['ngRoute', 'react']);
const app = uiModules.get('app/maps', ['ngRoute', 'react']);
app.directive('mapListing', function (reactDirective) {
return reactDirective(MapListing);
@ -54,7 +54,7 @@ routes
},
resolve: {
hasMaps: function (kbnUrl) {
chrome.getSavedObjectsClient().find({ type: 'gis-map', perPage: 1 }).then(resp => {
chrome.getSavedObjectsClient().find({ type: 'map', perPage: 1 }).then(resp => {
// Do not show empty listing page, just redirect to a new map
if (resp.savedObjects.length === 0) {
kbnUrl.redirect('/map');

View file

@ -42,7 +42,7 @@ export async function fetchSearchSourceAndRecordWithInspector({ searchSource, re
return resp;
}
uiModules.get('app/gis').run(($injector) => {
uiModules.get('app/maps').run(($injector) => {
indexPatternService = $injector.get('indexPatterns');
const Private = $injector.get('Private');
SearchSource = Private(SearchSourceProvider);

View file

@ -12,11 +12,11 @@ import {
FeatureCatalogueRegistryProvider.register(() => {
return {
id: 'gis',
id: 'maps',
title: 'Maps',
description: 'Explore geospatial data from Elasticsearch and the Elastic Maps Service',
icon: 'gisApp',
path: '/app/gis',
path: '/app/maps',
showOnHomePage: true,
category: FeatureCatalogueCategory.DATA
};

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more