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

Migrate saved_object_save_as_checkbox directive to timelion #56114

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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 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,9 @@
"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} として保存」を使用します。",
"timelion.savedObjects.howToSaveAsNewDescription": "Kibana の以前のバージョンでは、{savedObjectName} の名前を変更すると新しい名前でコピーが作成されました。今後この操作を行うには、「新規 {savedObjectName} として保存」を使用します。",
"common.ui.savedObjects.overwriteRejectedDescription": "上書き確認が拒否されました",
"common.ui.savedObjects.saveAsNewLabel": "新規 {savedObjectName} として保存",
"timelion.savedObjects.saveAsNewLabel": "新規 {savedObjectName} として保存",
"common.ui.savedObjects.saveDuplicateRejectedDescription": "重複ファイルの保存確認が拒否されました",
"common.ui.scriptingLanguages.errorFetchingToastDescription": "Elasticsearch から利用可能なスクリプト言語の取得中にエラーが発生しました",
"common.ui.stateManagement.unableToParseUrlErrorMessage": "URL をパースできません",
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,9 @@
"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}” 复选框可立即达到此目的。",
"timelion.savedObjects.howToSaveAsNewDescription": "在 Kibana 的以前版本中,更改 {savedObjectName} 的名称将创建具有新名称的副本。使用“另存为新的 {savedObjectName}” 复选框可立即达到此目的。",
"common.ui.savedObjects.overwriteRejectedDescription": "已拒绝覆盖确认",
"common.ui.savedObjects.saveAsNewLabel": "另存为新的 {savedObjectName}",
"timelion.savedObjects.saveAsNewLabel": "另存为新的 {savedObjectName}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to move it manually to a group of timelion translations?
Because I did it in my PRs ... 😩

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, thanks for that hint. I've improved that! you did it right 🎁

"common.ui.savedObjects.saveDuplicateRejectedDescription": "已拒绝使用重复标题保存确认",
"common.ui.scriptingLanguages.errorFetchingToastDescription": "从 Elasticsearch 获取可用的脚本语言时出错",
"common.ui.stateManagement.unableToParseUrlErrorMessage": "无法解析 URL",
Expand Down Expand Up @@ -13200,4 +13200,4 @@
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。",
"xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。"
}
}
}