Skip to content

Commit a2fa6b3

Browse files
committed
fixed typo, added save and return label to origin save modal
1 parent f09d67e commit a2fa6b3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/plugins/saved_objects/public/save_modal/saved_object_save_modal_origin.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,20 @@ export function SavedObjectSaveModalOrigin(props: OriginSaveModalProps) {
9494
props.onSave({ ...onSaveProps, returnToOrigin: returnToOriginMode });
9595
};
9696

97+
const confirmButtonLabel = returnToOriginMode
98+
? i18n.translate('savedObjects.saveModalOrigin.saveAndReturnLabel', {
99+
defaultMessage: 'Save and return',
100+
})
101+
: null;
102+
97103
return (
98104
<SavedObjectSaveModal
99105
onSave={onModalSave}
100106
onClose={props.onClose}
101107
title={documentInfo.title}
102108
showCopyOnSave={documentInfo.id ? true : false}
103109
initialCopyOnSave={Boolean(documentInfo.id) && returnToOriginMode}
110+
confirmButtonLabel={confirmButtonLabel}
104111
objectType={props.objectType}
105112
options={getReturnToOriginSwitch}
106113
description={documentInfo.description}

src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ export class VisualizeEmbeddableFactory
137137
public async create() {
138138
// TODO: This is a bit of a hack to preserve the original functionality. Ideally we will clean this up
139139
// to allow for in place creation of visualizations without having to navigate away to a new URL.
140-
let originitingAppParam = this.currentAppId;
140+
let originatingAppParam = this.currentAppId;
141141
// TODO: Remove this after https://github.com/elastic/kibana/pull/63443
142-
if (originitingAppParam === 'kibana') {
143-
originitingAppParam += `:${window.location.hash.split(/[\/\?]/)[1]}`;
142+
if (originatingAppParam === 'kibana') {
143+
originatingAppParam += `:${window.location.hash.split(/[\/\?]/)[1]}`;
144144
}
145145
showNewVisModal({
146-
editorParams: [`${EMBEDDABLE_ORIGINATING_APP_PARAM}=${originitingAppParam}`],
146+
editorParams: [`${EMBEDDABLE_ORIGINATING_APP_PARAM}=${originatingAppParam}`],
147147
});
148148
return undefined;
149149
}

0 commit comments

Comments
 (0)