From 48a8500da88a38451cb1a9cb2c74209469bd2440 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Wed, 29 Jan 2020 15:05:23 +0100 Subject: [PATCH] Migrate saved_object_save_as_checkbox directive to timelion (#56114) (#56286) - since it's only used there --- src/legacy/core_plugins/timelion/public/app.js | 2 +- .../directives}/saved_object_save_as_checkbox.html | 4 ++-- .../directives}/saved_object_save_as_checkbox.js | 2 +- src/legacy/ui/public/saved_objects/saved_object.ts | 11 ----------- x-pack/plugins/translations/translations/ja-JP.json | 6 +++--- x-pack/plugins/translations/translations/zh-CN.json | 6 +++--- 6 files changed, 10 insertions(+), 21 deletions(-) rename src/legacy/{ui/public/saved_objects/ui => core_plugins/timelion/public/directives}/saved_object_save_as_checkbox.html (90%) rename src/legacy/{ui/public/saved_objects/ui => core_plugins/timelion/public/directives}/saved_object_save_as_checkbox.js (96%) diff --git a/src/legacy/core_plugins/timelion/public/app.js b/src/legacy/core_plugins/timelion/public/app.js index e9f8e3496acf40..a7fa9e0290a1c5 100644 --- a/src/legacy/core_plugins/timelion/public/app.js +++ b/src/legacy/core_plugins/timelion/public/app.js @@ -38,7 +38,7 @@ import 'ui/directives/input_focus'; import './directives/saved_object_finder'; import 'ui/directives/listen'; import 'ui/kbn_top_nav'; -import 'ui/saved_objects/ui/saved_object_save_as_checkbox'; +import './directives/saved_object_save_as_checkbox'; import '../../data/public/legacy'; import './services/saved_sheet_register'; diff --git a/src/legacy/ui/public/saved_objects/ui/saved_object_save_as_checkbox.html b/src/legacy/core_plugins/timelion/public/directives/saved_object_save_as_checkbox.html similarity index 90% rename from src/legacy/ui/public/saved_objects/ui/saved_object_save_as_checkbox.html rename to src/legacy/core_plugins/timelion/public/directives/saved_object_save_as_checkbox.html index 77b4489f0c1d70..3e4a1526113c3e 100644 --- a/src/legacy/ui/public/saved_objects/ui/saved_object_save_as_checkbox.html +++ b/src/legacy/core_plugins/timelion/public/directives/saved_object_save_as_checkbox.html @@ -2,7 +2,7 @@
diff --git a/src/legacy/ui/public/saved_objects/ui/saved_object_save_as_checkbox.js b/src/legacy/core_plugins/timelion/public/directives/saved_object_save_as_checkbox.js similarity index 96% rename from src/legacy/ui/public/saved_objects/ui/saved_object_save_as_checkbox.js rename to src/legacy/core_plugins/timelion/public/directives/saved_object_save_as_checkbox.js index f67b36bcdfc995..ac830092ce6706 100644 --- a/src/legacy/ui/public/saved_objects/ui/saved_object_save_as_checkbox.js +++ b/src/legacy/core_plugins/timelion/public/directives/saved_object_save_as_checkbox.js @@ -17,7 +17,7 @@ * under the License. */ -import { uiModules } from '../../modules'; +import { uiModules } from 'ui/modules'; import saveObjectSaveAsCheckboxTemplate from './saved_object_save_as_checkbox.html'; uiModules.get('kibana').directive('savedObjectSaveAsCheckBox', function() { diff --git a/src/legacy/ui/public/saved_objects/saved_object.ts b/src/legacy/ui/public/saved_objects/saved_object.ts index 91182e67aac0d1..ca0746410a7ddf 100644 --- a/src/legacy/ui/public/saved_objects/saved_object.ts +++ b/src/legacy/ui/public/saved_objects/saved_object.ts @@ -27,7 +27,6 @@ * This class seems to interface with ES primarily through the es Angular * service and the saved object api. */ -import { npStart } from 'ui/new_platform'; import { SavedObject, SavedObjectConfig, SavedObjectKibanaServices } from './types'; import { buildSavedObject } from './helpers/build_saved_object'; @@ -51,13 +50,3 @@ export function createSavedObjectClass(services: SavedObjectKibanaServices) { return SavedObjectClass as new (config: SavedObjectConfig) => SavedObject; } -// the old angular way, should be removed once no longer used -export function SavedObjectProvider() { - const services = { - savedObjectsClient: npStart.core.savedObjects.client, - indexPatterns: npStart.plugins.data.indexPatterns, - chrome: npStart.core.chrome, - overlays: npStart.core.overlays, - }; - return createSavedObjectClass(services); -} diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index bf59568ba71b0a..c8827c4d784529 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -463,9 +463,7 @@ "common.ui.savedObjects.confirmModal.overwriteTitle": "{name} を上書きしますか?", "common.ui.savedObjects.confirmModal.saveDuplicateButtonLabel": "{name} を保存", "common.ui.savedObjects.confirmModal.saveDuplicateConfirmationMessage": "「{title}」というタイトルの {name} が既に存在します。保存を続けますか?", - "common.ui.savedObjects.howToSaveAsNewDescription": "Kibana の以前のバージョンでは、{savedObjectName} の名前を変更すると新しい名前でコピーが作成されました。今後この操作を行うには、「新規 {savedObjectName} として保存」を使用します。", "common.ui.savedObjects.overwriteRejectedDescription": "上書き確認が拒否されました", - "common.ui.savedObjects.saveAsNewLabel": "新規 {savedObjectName} として保存", "common.ui.savedObjects.saveDuplicateRejectedDescription": "重複ファイルの保存確認が拒否されました", "common.ui.scriptingLanguages.errorFetchingToastDescription": "Elasticsearch から利用可能なスクリプト言語の取得中にエラーが発生しました", "common.ui.stateManagement.unableToParseUrlErrorMessage": "URL をパースできません", @@ -2930,6 +2928,8 @@ "timelion.panels.timechart.unknownIntervalErrorMessage": "不明な間隔", "timelion.registerFeatureDescription": "時系列データを分析して結果を可視化するには、式言語を使用してください。", "timelion.requestHandlerErrorTitle": "Timelion リクエストエラー", + "timelion.savedObjects.howToSaveAsNewDescription": "Kibana の以前のバージョンでは、{savedObjectName} の名前を変更すると新しい名前でコピーが作成されました。今後この操作を行うには、「新規 {savedObjectName} として保存」を使用します。", + "timelion.savedObjects.saveAsNewLabel": "新規 {savedObjectName} として保存", "timelion.saveExpression.successNotificationText": "保存された式「{title}」", "timelion.saveSheet.successNotificationText": "保存されたシート「{title}」", "timelion.search.submitAriaLabel": "検索", @@ -13201,4 +13201,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。", "xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 829b42845c0ab1..b32f7d2183d192 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -463,9 +463,7 @@ "common.ui.savedObjects.confirmModal.overwriteTitle": "覆盖“{name}”?", "common.ui.savedObjects.confirmModal.saveDuplicateButtonLabel": "保存“{name}”", "common.ui.savedObjects.confirmModal.saveDuplicateConfirmationMessage": "具有标题 “{title}” 的 “{name}” 已存在。是否确定要保存?", - "common.ui.savedObjects.howToSaveAsNewDescription": "在 Kibana 的以前版本中,更改 {savedObjectName} 的名称将创建具有新名称的副本。使用“另存为新的 {savedObjectName}” 复选框可立即达到此目的。", "common.ui.savedObjects.overwriteRejectedDescription": "已拒绝覆盖确认", - "common.ui.savedObjects.saveAsNewLabel": "另存为新的 {savedObjectName}", "common.ui.savedObjects.saveDuplicateRejectedDescription": "已拒绝使用重复标题保存确认", "common.ui.scriptingLanguages.errorFetchingToastDescription": "从 Elasticsearch 获取可用的脚本语言时出错", "common.ui.stateManagement.unableToParseUrlErrorMessage": "无法解析 URL", @@ -2930,6 +2928,8 @@ "timelion.panels.timechart.unknownIntervalErrorMessage": "时间间隔未知", "timelion.registerFeatureDescription": "使用表达式语言分析时间序列数据,并将结果可视化。", "timelion.requestHandlerErrorTitle": "Timelion 请求错误", + "timelion.savedObjects.howToSaveAsNewDescription": "在 Kibana 的以前版本中,更改 {savedObjectName} 的名称将创建具有新名称的副本。使用“另存为新的 {savedObjectName}” 复选框可立即达到此目的。", + "timelion.savedObjects.saveAsNewLabel": "另存为新的 {savedObjectName}", "timelion.saveExpression.successNotificationText": "已保存表达式“{title}”", "timelion.saveSheet.successNotificationText": "已保存工作表“{title}”", "timelion.search.submitAriaLabel": "搜索", @@ -13200,4 +13200,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。", "xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。" } -} \ No newline at end of file +}