Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "timelion",
"version": "kibana",
"version": "opensearchDashboards",
"ui": true,
"server": true,
"requiredBundles": [
"kibanaLegacy",
"kibanaUtils",
"opensearchDashboardsLegacy",
"opensearchDashboardsUtils",
"savedObjects",
"visTypeTimelion"
],
Expand All @@ -14,6 +14,6 @@
"data",
"navigation",
"visTypeTimelion",
"kibanaLegacy"
"opensearchDashboardsLegacy"
]
}
18 changes: 9 additions & 9 deletions src/plugins/timelion/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@

import _ from 'lodash';

import { i18n } from '@kbn/i18n';
import { i18n } from '@osd/i18n';

import { createHashHistory } from 'history';

import { createKbnUrlStateStorage, withNotifyOnErrors } from '../../kibana_utils/public';
import { createOsdUrlStateStorage, withNotifyOnErrors } from '../../opensearch_dashboards_utils/public';
import { syncQueryStateWithUrl } from '../../data/public';

import { getSavedSheetBreadcrumbs, getCreateBreadcrumbs } from './breadcrumbs';
import {
addFatalError,
registerListenEventListener,
watchMultiDecorator,
} from '../../kibana_legacy/public';
} from '../../opensearch_dashboards_legacy/public';
import { getTimezone } from '../../vis_type_timelion/public';
import { initCellsDirective } from './directives/cells/cells';
import { initFullscreenDirective } from './directives/fullscreen/fullscreen';
Expand Down Expand Up @@ -60,8 +60,8 @@ export function initTimelionApp(app, deps) {
const savedSheetLoader = initSavedSheetService(app, deps);

app.factory('history', () => createHashHistory());
app.factory('kbnUrlStateStorage', (history) =>
createKbnUrlStateStorage({
app.factory('osdUrlStateStorage', (history) =>
createOsdUrlStateStorage({
history,
useHash: deps.core.uiSettings.get('state:storeInSessionStorage'),
...withNotifyOnErrors(deps.core.notifications.toasts),
Expand Down Expand Up @@ -112,7 +112,7 @@ export function initTimelionApp(app, deps) {
$scope,
$timeout,
history,
kbnUrlStateStorage
osdUrlStateStorage
) {
// Keeping this at app scope allows us to keep the current page when the user
// switches to say, the timepicker.
Expand All @@ -123,12 +123,12 @@ export function initTimelionApp(app, deps) {
timefilter.enableAutoRefreshSelector();
timefilter.enableTimeRangeSelector();

deps.core.chrome.docTitle.change('Timelion - Kibana');
deps.core.chrome.docTitle.change('Timelion - OpenSearch Dashboards');

// starts syncing `_g` portion of url with query services
const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl(
deps.plugins.data.query,
kbnUrlStateStorage
osdUrlStateStorage
);

const savedSheet = $route.current.locals.savedSheet;
Expand All @@ -145,7 +145,7 @@ export function initTimelionApp(app, deps) {

const { stateContainer, stopStateSync } = initTimelionAppState({
stateDefaults: getStateDefaults(),
kbnUrlStateStorage,
osdUrlStateStorage,
});

$scope.state = _.cloneDeep(stateContainer.getState());
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/timelion/public/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ import 'angular-sanitize';
// required for ngRoute
import 'angular-route';
import 'angular-sortable-view';
import { i18nDirective, i18nFilter, I18nProvider } from '@kbn/i18n/angular';
import { i18nDirective, i18nFilter, I18nProvider } from '@osd/i18n/angular';
import {
IUiSettingsClient,
CoreStart,
PluginInitializerContext,
AppMountParameters,
} from 'kibana/public';
} from 'opensearch-dashboards/public';
import { getTimeChart } from './panels/timechart/timechart';
import { Panel } from './panels/panel';

import {
configureAppAngularModule,
createTopNavDirective,
createTopNavHelper,
} from '../../kibana_legacy/public';
} from '../../opensearch_dashboards_legacy/public';
import { TimelionPluginDependencies } from './plugin';
import { DataPublicPluginStart } from '../../data/public';
// @ts-ignore
Expand Down Expand Up @@ -140,8 +140,8 @@ function createLocalIconModule() {
function createLocalTopNavModule(navigation: TimelionPluginDependencies['navigation']) {
angular
.module('app/timelion/TopNav', ['react'])
.directive('kbnTopNav', createTopNavDirective)
.directive('kbnTopNavHelper', createTopNavHelper(navigation.ui));
.directive('osdTopNav', createTopNavDirective)
.directive('osdTopNavHelper', createTopNavHelper(navigation.ui));
}

function createLocalI18nModule() {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timelion/public/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { i18n } from '@osd/i18n';

const ROOT_BREADCRUMB = {
text: i18n.translate('timelion.breadcrumbs.root', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { FormattedMessage } from '@kbn/i18n/react';
import { FormattedMessage } from '@osd/i18n/react';
import { EuiSpacer, EuiCallOut, EuiLink } from '@elastic/eui';
import React from 'react';
import { DocLinksStart } from '../../../../core/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import React from 'react';

import { EuiTabs, EuiTab } from '@elastic/eui';

import { FormattedMessage } from '@kbn/i18n/react';
import { FormattedMessage } from '@osd/i18n/react';

function handleClick(activateTab, tabName) {
activateTab(tabName);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timelion/public/directives/cells/cells.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
timelion-grid timelion-grid-rows="state.rows"
ng-click="onSelect($index)"
ng-class="{active: $index === state.selected}"
kbn-accessible-click
osd-accessible-click
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if I should be updating this directive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How it is been referenced any idea?

aria-label="Timelion chart {{$index + 1}}"
aria-current="{{$index === state.selected}}"
>
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timelion/public/directives/chart/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import { i18n } from '@osd/i18n';

export function Chart(timelionPanels) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
i18n-id="timelion.savedObjectFinder.addNewItemButtonLabel"
i18n-default-message="Add new {item}"
i18n-values="{item: finder.properties.noun}"
i18n-description="{item} can be a type of object in Kibana, like 'visualization', 'dashboard', etc"
i18n-description="{item} can be a type of object in OpenSearch Dashboards, like 'visualization', 'dashboard', etc"
></button>

<button
Expand All @@ -46,7 +46,7 @@
i18n-id="timelion.savedObjectFinder.manageItemsButtonLabel"
i18n-default-message="Manage {items}"
i18n-values="{items: finder.properties.nouns}"
i18n-description="{items} can be a type of object in Kibana, like 'visualizations', 'dashboards', etc"
i18n-description="{items} can be a type of object in OpenSearch Dashboards, like 'visualizations', 'dashboards', etc"
></button>
</div>
</div>
Expand Down Expand Up @@ -111,7 +111,7 @@
<p i18n-id="timelion.savedObjectFinder.noMatchesFoundDescription"
i18n-default-message="No matching {items} found."
i18n-values="{items: finder.properties.nouns}"
i18n-description="{items} can be a type of object in Kibana, like 'visualizations', 'dashboards', etc"
i18n-description="{items} can be a type of object in OpenSearch Dashboards, like 'visualizations', 'dashboards', etc"
></p>
</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/timelion/public/directives/saved_object_finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { keyMap } from './key_map';
import {
PaginateControlsDirectiveProvider,
PaginateDirectiveProvider,
} from '../../../kibana_legacy/public';
} from '../../../opensearch_dashboards_legacy/public';
import { PER_PAGE_SETTING } from '../../../saved_objects/public';
import { VISUALIZE_ENABLE_LABS_SETTING } from '../../../visualizations/public';

Expand Down Expand Up @@ -263,7 +263,7 @@ export function initSavedObjectFinderDirective(app, savedSheetLoader, uiSettings
};

self.manageObjects = function (type) {
$location.url('/management/kibana/objects?_a=' + rison.encode({ tab: type }));
$location.url('/management/opensearch-dashboards/objects?_a=' + rison.encode({ tab: type }));
};

self.hitCountNoun = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ng-hide="!savedObject.isTitleChanged() || savedObject.copyOnSave"
class="kuiLocalDropdownWarning kuiVerticalRhythmSmall"
i18n-id="timelion.savedObjects.howToSaveAsNewDescription"
i18n-default-message="In previous versions of Kibana, changing the name of a {savedObjectName} would make a copy with the new name. Use the 'Save as a new {savedObjectName}' checkbox to do this now."
i18n-default-message="In previous versions of OpenSearch Dashboards, changing the name of a {savedObjectName} would make a copy with the new name. Use the 'Save as a new {savedObjectName}' checkbox to do this now."
i18n-values="{ savedObjectName: savedObject.getDisplayName() }"
i18n-description="'Save as a new {savedObjectName}' refers to timelion.savedObjects.saveAsNewLabel and should be the same text."
></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Timelion at your disposal. Timelion lets you compare, combine, and
combobulate datasets across multiple datasources with one
easy-to-master expression syntax. This tutorial focuses on
Elasticsearch, but you'll quickly discover that what you learn here
OpenSearch, but you'll quickly discover that what you learn here
applies to any datasource Timelion supports."
i18n-values="{ html_emphasizedEverything: '<em>' + translations.emphasizedEverythingText + '</em>' }"
></p>
Expand Down Expand Up @@ -90,7 +90,7 @@
<span
ng-show="es.invalidCount > 0 && !es.valid"
i18n-id="timelion.help.configuration.notValid.notValidSettingsErrorMessage"
i18n-default-message="Could not validate Elasticsearch settings: {reason}.
i18n-default-message="Could not validate OpenSearch settings: {reason}.
Check your Advanced Settings and try again. ({count})"
i18n-values="{
html_reason: '<strong>' + es.invalidReason + '</strong>',
Expand All @@ -99,7 +99,7 @@
></span>

<button
ng-click="recheckElasticsearch()"
ng-click="recheckOpenSearch()"
class="kuiButton kuiButton--primary"
i18n-id="timelion.help.configuration.notValid.validateButtonLabel"
i18n-default-message="Validate Config"
Expand All @@ -111,7 +111,7 @@
<div>
<h2
i18n-id="timelion.help.configuration.validTitle"
i18n-default-message="Good news, Elasticsearch is configured correctly!"
i18n-default-message="Good news, OpenSearch is configured correctly!"
></h2>
<p>
<span
Expand All @@ -137,7 +137,7 @@
></a>
<span
i18n-id="timelion.help.configuration.valid.paragraph1Part2"
i18n-default-message="for information about configuring the Elasticsearch datasource."
i18n-default-message="for information about configuring the OpenSearch datasource."
i18n-description="Part of composite text timelion.help.configuration.valid.paragraph1Part1 +
timelion.help.configuration.firstTimeConfigurationLinkText +
timelion.help.configuration.valid.paragraph1Part2"
Expand Down Expand Up @@ -207,7 +207,7 @@
></strong>
<p
i18n-id="timelion.help.configuration.valid.timeRangeText"
i18n-default-message="Use the timepicker in the Kibana toolbar to select the time period
i18n-default-message="Use the timepicker in the OpenSearch Dashboards toolbar to select the time period
that contains the data you want to visualize. Make sure you select
a time period that includes all or part of the time range shown above."
></p>
Expand Down Expand Up @@ -242,11 +242,11 @@
<div>
<h2
i18n-id="timelion.help.queryingTitle"
i18n-default-message="Querying the Elasticsearch datasource"
i18n-default-message="Querying the OpenSearch datasource"
></h2>
<p
i18n-id="timelion.help.querying.paragraph1"
i18n-default-message="Now that we've validated that you have a working Elasticsearch
i18n-default-message="Now that we've validated that you have a working OpenSearch
datasource, you can start submitting queries. For starters,
enter {esPattern} in the input bar and hit enter."
i18n-values="{
Expand Down Expand Up @@ -309,7 +309,7 @@
characters, you don't need to use quotes. Many functions also have defaults.
For example, {esEmptyQuery} and {esStarQuery} do the same thing.
Arguments also have names, so you don't have to specify them in a specific order.
For example, you can enter {esLogstashQuery} to tell the Elasticsearch datasource
For example, you can enter {esLogstashQuery} to tell the OpenSearch datasource
{esIndexQueryDescription}."
i18n-values="{
html_esEmptyQuery: '<code>.es()</code>',
Expand All @@ -325,7 +325,7 @@
<p>
<span
i18n-id="timelion.help.querying.countTextPart1"
i18n-default-message="Counting events is all well and good, but the Elasticsearch datasource also supports any"
i18n-default-message="Counting events is all well and good, but the OpenSearch datasource also supports any"
i18n-description="Part of composite text
timelion.help.querying.countTextPart1 +
timelion.help.querying.countMetricAggregationLinkText +
Expand All @@ -336,7 +336,7 @@
target="_blank"
rel="noopener noreferrer"
i18n-id="timelion.help.querying.countMetricAggregationLinkText"
i18n-default-message="Elasticsearch metric aggregation"
i18n-default-message="OpenSearch metric aggregation"
i18n-description="Part of composite text
timelion.help.querying.countTextPart1 +
timelion.help.querying.countMetricAggregationLinkText +
Expand Down Expand Up @@ -406,7 +406,7 @@
></p>
<p
i18n-id="timelion.help.expressions.paragraph3"
i18n-default-message="We're going to experiment, so click {strongAdd} in the Kibana toolbar
i18n-default-message="We're going to experiment, so click {strongAdd} in the OpenSearch Dashboards toolbar
to add another chart or three. Then, select a chart,
copy one of the following expressions, paste it into the input bar,
and hit enter. Rinse, repeat to try out the other expressions."
Expand Down Expand Up @@ -574,7 +574,7 @@
i18n-id="timelion.help.dataTransforming.paragraph6Part2"
i18n-default-message="to see how to use all of the available Timelion functions.
You can view the reference at any time by clicking \{Docs\}
in the Kibana toolbar. To get back to this tutorial, click the
in the OpenSearch Dashboards toolbar. To get back to this tutorial, click the
\{Tutorial\} link at the top of the reference."
i18n-description="Part of composite text
timelion.help.dataTransforming.paragraph6Part1 +
Expand Down Expand Up @@ -628,7 +628,7 @@
i18n-default-message="Check out the tutorial"
class="kuiLink"
ng-click="setPage(1)"
kbn-accessible-click
osd-accessible-click
></a>.
</div>

Expand All @@ -641,7 +641,7 @@
ng-click="functions.details =
(functions.details === function.name ?
null : function.name)"
kbn-accessible-click
osd-accessible-click
>
<td><strong>.{{function.name}}()</strong></td>
<td>{{function.help}}</td>
Expand Down
Loading