More flight like status role names and parameter names

This commit is contained in:
Michael Rogers 2023-06-20 17:41:12 -05:00
parent 528f87e930
commit 71d8ffdd80
3 changed files with 7 additions and 7 deletions

View File

@ -67,8 +67,8 @@ export default class ExampleUserProvider extends EventEmitter {
this.user = undefined; this.user = undefined;
this.loggedIn = false; this.loggedIn = false;
this.autoLoginUser = undefined; this.autoLoginUser = undefined;
this.statusRoleValues = statusRoles.map(x => ({ this.statusRoleValues = statusRoles.map(role => ({
role: x, role: role,
status: STATUSES[0] status: STATUSES[0]
})); }));
this.pollQuestion = undefined; this.pollQuestion = undefined;
@ -183,7 +183,7 @@ export default class ExampleUserProvider extends EventEmitter {
// for testing purposes, this will skip the form, this wouldn't be used in // for testing purposes, this will skip the form, this wouldn't be used in
// a normal authentication process // a normal authentication process
if (this.autoLoginUser) { if (this.autoLoginUser) {
this.user = new this.ExampleUser(id, this.autoLoginUser, ['test-role-1', 'test-role-2', 'test-role-3', 'test-role-4']); this.user = new this.ExampleUser(id, this.autoLoginUser, ['flight', 'driver', 'observer']);
this.loggedIn = true; this.loggedIn = true;
return Promise.resolve(); return Promise.resolve();

View File

@ -22,7 +22,7 @@
import ExampleUserProvider from './ExampleUserProvider'; import ExampleUserProvider from './ExampleUserProvider';
const AUTO_LOGIN_USER = 'guest'; const AUTO_LOGIN_USER = 'guest';
const STATUS_ROLES = ['test-role-1', 'test-role-2', 'test-role-3']; const STATUS_ROLES = ['flight', 'driver'];
export default function ExampleUserPlugin({autoLoginUser, statusRoles} = { export default function ExampleUserPlugin({autoLoginUser, statusRoles} = {
autoLoginUser: AUTO_LOGIN_USER, autoLoginUser: AUTO_LOGIN_USER,

View File

@ -71,9 +71,9 @@ export default {
}, },
promptForRoleSelection() { promptForRoleSelection() {
const allRoles = this.openmct.user.getPossibleRoles(); const allRoles = this.openmct.user.getPossibleRoles();
const selectionOptions = allRoles.map(x => ({ const selectionOptions = allRoles.map(role => ({
key: x, key: role,
name: x name: role
})).filter(this.openmct.user.canProvideStatusForRole); })).filter(this.openmct.user.canProvideStatusForRole);
const dialog = this.openmct.overlays.selection({ const dialog = this.openmct.overlays.selection({