mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 02:39:56 +00:00
Check role when receiving status updates in the Operator Status Indicator (#7509)
* check role when receiving status updates * pass role to get status
This commit is contained in:
parent
317ea8c275
commit
9870a6bc9c
@ -129,7 +129,7 @@ export default {
|
||||
this.role = activeRole;
|
||||
const status = await this.openmct.user.status.getStatusForRole(activeRole);
|
||||
if (status !== undefined) {
|
||||
this.setStatus({ status });
|
||||
this.setStatus({ role: this.role, status });
|
||||
}
|
||||
},
|
||||
subscribeToMyStatus() {
|
||||
@ -141,7 +141,11 @@ export default {
|
||||
subscribeToRoleChange() {
|
||||
this.openmct.user.on('roleChanged', this.fetchMyStatus);
|
||||
},
|
||||
setStatus({ status }) {
|
||||
setStatus({ role, status }) {
|
||||
if (role !== this.role) {
|
||||
// not my role
|
||||
return;
|
||||
}
|
||||
status = this.applyStyling(status);
|
||||
this.selectedStatus = status.key;
|
||||
this.indicator.iconClass(status.iconClassPoll);
|
||||
|
Loading…
Reference in New Issue
Block a user