Skip to content

Commit

Permalink
Review feedback. Add redundancy comments to common files redundant in…
Browse files Browse the repository at this point in the history
… legacy and NP
  • Loading branch information
Aaron Caldwell committed Mar 6, 2020
1 parent a148b8e commit 13d78b7
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x-pack/legacy/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

// NP Migration
// Temporarily redundant with x-pack/plugins/maps/common/constants.ts
import { i18n } from '@kbn/i18n';
export const EMS_CATALOGUE_PATH = 'ems/catalogue';

Expand Down Expand Up @@ -172,3 +175,4 @@ export const SYMBOLIZE_AS_TYPES = {
};

export const DEFAULT_ICON = 'airfield';
// End temporary redundancy
3 changes: 3 additions & 0 deletions x-pack/legacy/plugins/maps/common/i18n_getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { i18n } from '@kbn/i18n';
import { $Values } from '@kbn/utility-types';
import { ES_SPATIAL_RELATIONS } from './constants';

// NP Migration
// Temporarily redundant with x-pack/plugins/maps/common/i18n_getters.ts
export function getAppTitle() {
return i18n.translate('xpack.maps.appTitle', {
defaultMessage: 'Maps',
Expand Down Expand Up @@ -50,3 +52,4 @@ export function getEsSpatialRelationLabel(spatialRelation: $Values<typeof ES_SPA
return spatialRelation;
}
}
// End temporary redundancy
3 changes: 3 additions & 0 deletions x-pack/legacy/plugins/maps/common/parse_xml_string.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import { parseString } from 'xml2js';

// NP Migration
// Temporarily redundant with x-pack/plugins/maps/common/parse_xml_string.js
// promise based wrapper around parseString
export async function parseXmlString(xmlString) {
const parsePromise = new Promise((resolve, reject) => {
Expand All @@ -20,3 +22,4 @@ export async function parseXmlString(xmlString) {

return await parsePromise;
}
// End temporary redundancy
3 changes: 3 additions & 0 deletions x-pack/legacy/plugins/maps/common/parse_xml_string.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import { parseXmlString } from './parse_xml_string';

// NP Migration
// Temporarily redundant with x-pack/plugins/maps/common/parse_xml_string.test.js
describe('parseXmlString', () => {
it('Should parse xml string into JS object', async () => {
const xmlAsObject = await parseXmlString('<foo>bar</foo>');
Expand All @@ -14,3 +16,4 @@ describe('parseXmlString', () => {
});
});
});
// End temporary redundancy
4 changes: 4 additions & 0 deletions x-pack/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

// NP Migration
// Temporarily redundant with x-pack/legacy/plugins/maps/common/constants.ts
import { i18n } from '@kbn/i18n';
export const EMS_CATALOGUE_PATH = 'ems/catalogue';

Expand Down Expand Up @@ -170,3 +173,4 @@ export const SYMBOLIZE_AS_TYPES = {
};

export const DEFAULT_ICON = 'airfield';
// End temporary redundancy
3 changes: 3 additions & 0 deletions x-pack/plugins/maps/common/i18n_getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { i18n } from '@kbn/i18n';
import { $Values } from '@kbn/utility-types';
import { ES_SPATIAL_RELATIONS } from './constants';

// NP Migration
// Temporarily redundant with x-pack/legacy/plugins/maps/common/i18n_getters.ts
export function getAppTitle() {
return i18n.translate('xpack.maps.appTitle', {
defaultMessage: 'Maps',
Expand Down Expand Up @@ -50,3 +52,4 @@ export function getEsSpatialRelationLabel(spatialRelation: $Values<typeof ES_SPA
return spatialRelation;
}
}
// End temporary redundancy
3 changes: 3 additions & 0 deletions x-pack/plugins/maps/common/parse_xml_string.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import { parseString } from 'xml2js';

// NP Migration
// Temporarily redundant with x-pack/legacy/plugins/maps/common/parse_xml_string.js
// promise based wrapper around parseString
export async function parseXmlString(xmlString) {
const parsePromise = new Promise((resolve, reject) => {
Expand All @@ -20,3 +22,4 @@ export async function parseXmlString(xmlString) {

return await parsePromise;
}
// End temporary redundancy
3 changes: 3 additions & 0 deletions x-pack/plugins/maps/common/parse_xml_string.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import { parseXmlString } from './parse_xml_string';

// NP Migration
// Temporarily redundant with x-pack/legacy/plugins/maps/common/parse_xml_string.test.js
describe('parseXmlString', () => {
it('Should parse xml string into JS object', async () => {
const xmlAsObject = await parseXmlString('<foo>bar</foo>');
Expand All @@ -14,3 +16,4 @@ describe('parseXmlString', () => {
});
});
});
// End temporary redundancy

0 comments on commit 13d78b7

Please sign in to comment.