Skip to content

Commit

Permalink
Migrate saved_object_save_as_checkbox directive to timelion (elastic#…
Browse files Browse the repository at this point in the history
…56114)

- since it's only used there
  • Loading branch information
kertal committed Jan 29, 2020
1 parent 5ce3bd8 commit d48d68e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/timelion/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div
ng-hide="!savedObject.isTitleChanged() || savedObject.copyOnSave"
class="kuiLocalDropdownWarning kuiVerticalRhythmSmall"
i18n-id="common.ui.savedObjects.howToSaveAsNewDescription"
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-values="{ savedObjectName: savedObject.getDisplayName() }"
i18n-description="'Save as a new {savedObjectName}' refers to common.ui.savedObjects.saveAsNewLabel and should be the same text."
Expand All @@ -19,7 +19,7 @@

<span
class="kuiCheckBoxLabel__text"
i18n-id="common.ui.savedObjects.saveAsNewLabel"
i18n-id="timelion.savedObjects.saveAsNewLabel"
i18n-default-message="Save as a new {savedObjectName}"
i18n-values="{ savedObjectName: savedObject.getDisplayName() }"
></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
11 changes: 0 additions & 11 deletions src/legacy/ui/public/saved_objects/saved_object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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);
}
6 changes: 3 additions & 3 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 をパースできません",
Expand Down Expand Up @@ -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": "検索",
Expand Down Expand Up @@ -13201,4 +13201,4 @@
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。",
"xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。"
}
}
}
6 changes: 3 additions & 3 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": "搜索",
Expand Down Expand Up @@ -13200,4 +13200,4 @@
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。",
"xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。"
}
}
}

0 comments on commit d48d68e

Please sign in to comment.