mirror of
https://github.com/nasa/openmct.git
synced 2025-05-31 14:40:48 +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;
|
this.role = activeRole;
|
||||||
const status = await this.openmct.user.status.getStatusForRole(activeRole);
|
const status = await this.openmct.user.status.getStatusForRole(activeRole);
|
||||||
if (status !== undefined) {
|
if (status !== undefined) {
|
||||||
this.setStatus({ status });
|
this.setStatus({ role: this.role, status });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
subscribeToMyStatus() {
|
subscribeToMyStatus() {
|
||||||
@ -141,7 +141,11 @@ export default {
|
|||||||
subscribeToRoleChange() {
|
subscribeToRoleChange() {
|
||||||
this.openmct.user.on('roleChanged', this.fetchMyStatus);
|
this.openmct.user.on('roleChanged', this.fetchMyStatus);
|
||||||
},
|
},
|
||||||
setStatus({ status }) {
|
setStatus({ role, status }) {
|
||||||
|
if (role !== this.role) {
|
||||||
|
// not my role
|
||||||
|
return;
|
||||||
|
}
|
||||||
status = this.applyStyling(status);
|
status = this.applyStyling(status);
|
||||||
this.selectedStatus = status.key;
|
this.selectedStatus = status.key;
|
||||||
this.indicator.iconClass(status.iconClassPoll);
|
this.indicator.iconClass(status.iconClassPoll);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user