diff --git a/src/plugins/duplicate/DuplicateAction.js b/src/plugins/duplicate/DuplicateAction.js index 353ce94b62..daf44862b6 100644 --- a/src/plugins/duplicate/DuplicateAction.js +++ b/src/plugins/duplicate/DuplicateAction.js @@ -71,7 +71,8 @@ export default class DuplicateAction { updateNameCheck(object, name) { if (object.name !== name) { - this.openmct.objects.mutate(object, 'name', name); + object.name = name; + this.openmct.objects.save(object); } } @@ -95,7 +96,7 @@ export default class DuplicateAction { cssClass: "l-input-lg" }, { - name: "location", + name: "Location", cssClass: "grows", control: "locator", validate: this.validate(object, parent), diff --git a/src/plugins/move/MoveAction.js b/src/plugins/move/MoveAction.js index 8295e2e8ee..df8cf5fda4 100644 --- a/src/plugins/move/MoveAction.js +++ b/src/plugins/move/MoveAction.js @@ -37,7 +37,14 @@ export default class MoveAction { let oldParent = objectPath[1]; let dialogService = this.openmct.$injector.get('dialogService'); let dialogForm = this.getDialogForm(object, oldParent); - let userInput = await dialogService.getUserInput(dialogForm, { name: object.name }); + let userInput; + + try { + userInput = await dialogService.getUserInput(dialogForm, { name: object.name }); + } catch (err) { + // user canceled, most likely + return; + } // if we need to update name if (object.name !== userInput.name) { @@ -104,13 +111,13 @@ export default class MoveAction { { key: "name", control: "textfield", - name: "Folder Name", + name: "Name", pattern: "\\S+", required: true, cssClass: "l-input-lg" }, { - name: "location", + name: "Location", control: "locator", validate: this.validate(object, parent), key: 'location'