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

Renaming vis_type_tagcloud, vis_type_timeline plugin folder to kebab-case #27

Open
wants to merge 1 commit into
base: kebab-case
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ target
/src/core/lib/osd_internal_native_observable
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
/src/plugins/data/common/opensearch_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timeline/public/_generated_/**
/src/plugins/vis-type-timeline/public/_generated_/**

# package overrides
/packages/opensearch-eslint-config-opensearch-dashboards
Expand Down
4 changes: 2 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
"src/plugins/telemetry_management_section"
],
"tileMap": "src/plugins/tile_map",
"timeline": ["src/plugins/timeline", "src/plugins/vis_type_timeline"],
"timeline": ["src/plugins/timeline", "src/plugins/vis-type-timeline"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/plugins/vis_type_markdown",
"visTypeMetric": "src/plugins/vis_type_metric",
"visTypeTable": "src/plugins/vis_type_table",
"visTypeTagCloud": "src/plugins/vis_type_tagcloud",
"visTypeTagCloud": "src/plugins/vis-type-tagcloud",
"visTypeTimeseries": "src/plugins/vis_type_timeseries",
"visTypeVega": "src/plugins/vis_type_vega",
"visTypeVislib": "src/plugins/vis_type_vislib",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timeline/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Contains the deprecated timeline application. For the timeline visualization,
which also contains the timeline APIs and backend, look at the vis_type_timeline plugin.
which also contains the timeline APIs and backend, look at the vis-type-timeline plugin.
2 changes: 1 addition & 1 deletion src/plugins/timeline/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
registerListenEventListener,
watchMultiDecorator,
} from '../../opensearch_dashboards_legacy/public';
import { getTimezone } from '../../vis_type_timeline/public';
import { getTimezone } from '../../vis-type-timeline/public';
import { initCellsDirective } from './directives/cells/cells';
import { initFullscreenDirective } from './directives/fullscreen/fullscreen';
import { initFixedElementDirective } from './directives/fixed_element';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import _ from 'lodash';
import $ from 'jquery';
import PEG from 'pegjs';
import grammar from 'raw-loader!../../../vis_type_timeline/common/chain.peg';
import grammar from 'raw-loader!../../../vis-type-timeline/common/chain.peg';
import timelineExpressionInputTemplate from './timeline_expression_input.html';
import {
SUGGESTION_TYPE,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timeline/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
// styles for timeline visualization are lazy loaded only while a vis is opened
// this will duplicate styles only if both Timeline app and timeline visualization are loaded
// could be left here as it is since the Timeline app is deprecated
@import '../../vis_type_timeline/public/components/timeline_vis.scss';
@import '../../vis-type-timeline/public/components/timeline_vis.scss';
2 changes: 1 addition & 1 deletion src/plugins/timeline/public/panels/timechart/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
tickFormatters,
xaxisFormatterProvider,
generateTicksProvider,
} from '../../../../vis_type_timeline/public';
} from '../../../../vis-type-timeline/public';
import { TimelineVisualizationDependencies } from '../../application';

const DEBOUNCE_DELAY = 50;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timeline/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { VisualizationsStart } from '../../visualizations/public';
import {
VisTypeTimelinePluginStart,
VisTypeTimelinePluginSetup,
} from '../../vis_type_timeline/public';
} from '../../vis-type-timeline/public';

export interface TimelinePluginDependencies {
data: DataPublicPluginStart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import { i18n } from '@osd/i18n';
import loadFunctions from '../load_functions.js';
const fitFunctions = loadFunctions('fit_functions');
const fitFunctions = loadFunctions('fit-functions');
import TimelineFunction from './timeline_function';
import { offsetTime, preprocessOffset } from '../offset_time';
import _ from 'lodash';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import _ from 'lodash';
import loadFunctions from '../load_functions.js';
const fitFunctions = loadFunctions('fit_functions');
const fitFunctions = loadFunctions('fit-functions');

export default class TimelineFunction {
constructor(name, config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

import loadFunctions from './load_functions.js';
const functions = loadFunctions('series_functions/');
const functions = loadFunctions('series-functions/');
import _ from 'lodash';

export default (function () {
Expand Down Expand Up @@ -75,7 +75,7 @@ export default (function () {
help +=
'This document is auto generated from the timeline code. ' +
'Do not submit pulls against this document. You want to submit a pull against something in the ' +
'`series_functions/` directory.\n\n';
'`series-functions/` directory.\n\n';

help += '### Data sources\n';
help +=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* GitHub history for details.
*/

const fn = require(`src/plugins/vis_type_timeline/server/lib/load_functions`);
const fn = require(`src/plugins/vis-type-timeline/server/lib/load_functions`);

const expect = require('chai').expect;

Expand All @@ -40,14 +40,14 @@ describe('load_functions.js', () => {
});

it('returns an object with keys named for the javascript files in the directory', () => {
const fnList = fn('series_functions');
const fnList = fn('series-functions');

expect(fnList).to.be.an('object');
expect(fnList.sum).to.be.a('object');
});

it('also includes index.js files in direct subdirectories, and names the keys for the directory', () => {
const fnList = fn('series_functions');
const fnList = fn('series-functions');

expect(fnList).to.be.an('object');
expect(fnList.es).to.be.a('object');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class Plugin {

const configManager = new ConfigManager(this.initializerContext.config);

const functions = loadFunctions('series_functions');
const functions = loadFunctions('series-functions');

const getFunction = (name: string) => {
if (functions[name]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import alter from '../lib/alter.js';
import _ from 'lodash';
import Chainable from '../lib/classes/chainable';
import loadFunctions from '../lib/load_functions.js';
const fitFunctions = loadFunctions('fit_functions');
const fitFunctions = loadFunctions('fit-functions');

export default new Chainable('fit', {
args: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* GitHub history for details.
*/

const fn = require(`src/plugins/vis_type_timeline/server/series_functions/fit`);
const fn = require(`src/plugins/vis-type-timeline/server/series-functions/fit`);
import moment from 'moment';
const expect = require('chai').expect;
import invoke from './helpers/invoke_series_fn.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import timelineDefaults from '../../lib/get_namespaced_settings';
import opensearchResponse from './opensearch_response';

export default function () {
const functions = require('../../lib/load_functions')('series_functions');
const functions = require('../../lib/load_functions')('series-functions');

const tlConfig = require('../../handlers/lib/tl_config.js')({
getFunction: (name) => {
Expand Down
4 changes: 2 additions & 2 deletions tasks/config/peg.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {
},
},
timeline_chain: {
src: 'src/plugins/vis_type_timeline/public/chain.peg',
dest: 'src/plugins/vis_type_timeline/public/_generated_/chain.js',
src: 'src/plugins/vis-type-timeline/public/chain.peg',
dest: 'src/plugins/vis-type-timeline/public/_generated_/chain.js',
},
};