diff --git a/src/api/user/StatusAPI.js b/src/api/user/StatusAPI.js index b4cfea42e3..4b1e588432 100644 --- a/src/api/user/StatusAPI.js +++ b/src/api/user/StatusAPI.js @@ -114,23 +114,23 @@ export default class StatusAPI extends EventEmitter { } } - setMissionStatusForRole(role, status) { + setStatusForMissionRole(role, status) { const provider = this.#userAPI.getProvider(); - if (provider.setMissionStatusForRole) { - return provider.setMissionStatusForRole(role, status); + if (provider.setStatusForMissionRole) { + return provider.setStatusForMissionRole(role, status); } else { - this.#userAPI.error('User provider does not support setting mission status'); + this.#userAPI.error('User provider does not support setting mission role status'); } } - getMissionStatusForRole(role) { + getStatusForMissionRole(role) { const provider = this.#userAPI.getProvider(); - if (provider.getMissionStatusForRole) { - return provider.getMissionStatusForRole(role); + if (provider.getStatusForMissionRole) { + return provider.getStatusForMissionRole(role); } else { - this.#userAPI.error('User provider does not support getting mission status'); + this.#userAPI.error('User provider does not support getting mission role status'); } } @@ -138,11 +138,11 @@ export default class StatusAPI extends EventEmitter { * Fetch the list of possible mission status options * @returns {Promise} the current mission status */ - async getPossibleMissionStatusOptions() { + async getPossibleMissionRoleStatuses() { const provider = this.#userAPI.getProvider(); - if (provider.getPossibleMissionStatusOptions) { - const possibleOptions = await provider.getPossibleMissionStatusOptions(); + if (provider.getPossibleMissionRoleStatuses) { + const possibleOptions = await provider.getPossibleMissionRoleStatuses(); return possibleOptions; } else { diff --git a/src/plugins/userIndicator/components/MissionStatusPopup.vue b/src/plugins/userIndicator/components/MissionStatusPopup.vue index 91d3a5dd9f..1bc45d6327 100644 --- a/src/plugins/userIndicator/components/MissionStatusPopup.vue +++ b/src/plugins/userIndicator/components/MissionStatusPopup.vue @@ -48,17 +48,17 @@ export default { }, async created() { try { - // Fetch missionStatuses and missionStatusOptions simultaneously + // Fetch missionStatuses and missionRoleStatuses simultaneously const [missionRoles, missionRoleStatusOptions] = await Promise.all([ this.openmct.user.status.getPossibleMissionRoles(), - this.openmct.user.status.getPossibleMissionStatusOptions() + this.openmct.user.status.getPossibleMissionRoleStatuses() ]); this.missionRoles = missionRoles; this.missionRoleStatusOptions = missionRoleStatusOptions; - const statusPromises = missionRoles.map((status) => - this.openmct.user.status.getMissionStatusForRole(status) + const statusPromises = missionRoles.map((role) => + this.openmct.user.status.getStatusForMissionRole(role) ); // Fetch all mission role statuses simultaneously @@ -89,7 +89,7 @@ export default { if (this.missionRoleStatusMap !== undefined) { const statusObject = this.findOptionByKey(this.missionRoleStatusMap[status]); - const result = await this.openmct.user.status.setMissionStatusForRole(status, statusObject); + const result = await this.openmct.user.status.setStatusForMissionRole(status, statusObject); if (result === true) { this.openmct.notifications.info('Successfully set mission status'); } else {