{
+ return {
+ start: from,
+ end: to,
+ label: display,
+ };
+ });
return (
@@ -220,7 +229,7 @@ export function TimeRangeSelect(props) {
end={end}
onTimeChange={onTimeChange}
showUpdateButton={false}
- commonlyUsedRanges={commonTimeRanges}
+ commonlyUsedRanges={commonlyUsedRanges}
/>
diff --git a/dashboards-reports/public/plugin.ts b/dashboards-reports/public/plugin.ts
index 707e9dd4..afe7da10 100644
--- a/dashboards-reports/public/plugin.ts
+++ b/dashboards-reports/public/plugin.ts
@@ -42,7 +42,9 @@ export class ReportsDashboardsPlugin
implements
Plugin<
ReportsDashboardsPluginSetup,
- ReportsDashboardsPluginStart
+ ReportsDashboardsPluginStart,
+ AppPluginStartDependencies,
+ any
> {
public setup(core: CoreSetup): ReportsDashboardsPluginSetup {
// Register an application into the side navigation menu
diff --git a/dashboards-reports/public/types.ts b/dashboards-reports/public/types.ts
index 4c1c9b71..cdba3fb1 100644
--- a/dashboards-reports/public/types.ts
+++ b/dashboards-reports/public/types.ts
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-import { NavigationPublicPluginStart } from '../../../src/plugins/navigation/public';
+import { DataPublicPluginStart } from '../../../src/plugins/data/public';
export interface ReportsDashboardsPluginSetup {}
@@ -32,5 +32,5 @@ export interface ReportsDashboardsPluginSetup {}
export interface ReportsDashboardsPluginStart {}
export interface AppPluginStartDependencies {
- navigation: NavigationPublicPluginStart;
+ data: DataPublicPluginStart;
}
diff --git a/dashboards-reports/test/uiSettingsMock.js b/dashboards-reports/test/uiSettingsMock.js
new file mode 100644
index 00000000..14fd3a09
--- /dev/null
+++ b/dashboards-reports/test/uiSettingsMock.js
@@ -0,0 +1,31 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * The OpenSearch Contributors require contributions made to
+ * this file be licensed under the Apache-2.0 license or a
+ * compatible open source license.
+ *
+ * Modifications Copyright OpenSearch Contributors. See
+ * GitHub history for details.
+ */
+
+/*
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+const uiSettingsMock = jest.fn();
+
+uiSettingsMock.get = jest.fn((key) => ([]));
+
+export default uiSettingsMock;