Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show meta device as active #509

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion submodules/devices/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,9 @@ define(function(require) {
.map(function(device) {
var staticStatusClasses = ['unregistered', 'registered'],
deviceType = device.device_type,
isRegistered = device.registrable ? device.registered : true,
// TODO: this validation should be removed once the backend returns the actual meta device status.
isRegistered = device.device_type === 'meta' ? true :
device.registrable ? device.registered : true,
isEnabled = _.get(device, 'enabled', false),
userName = _
.chain(usersById)
Expand Down
4 changes: 4 additions & 0 deletions submodules/users/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ define(function(require) {
};
},
isRegistered = function(device) {
// TODO: this validation should be removed once the backend returns the actual meta device status.
if (device.device_type === 'meta') {
return true;
}
return _.every([
device.enabled,
device.registrable ? device.registered : true
Expand Down