mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Add maintenance banner on UI (#797)
* fix bug on email separator Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * allow group name change Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * add maintenance banner on UI Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * removes unnecessary comments Signed-off-by: Denis barbaron <denis.barbaron@orange.com> --------- Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
* Copyright © 2019-2024 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
const timeutil = require('../../../util/timeutil')
|
||||
@@ -33,8 +33,9 @@ module.exports = function(pushdev) {
|
||||
'email'
|
||||
, 'name'
|
||||
, 'privilege'
|
||||
, {groups: ['quotas', 'subscribed']
|
||||
})
|
||||
, {groups: ['quotas', 'subscribed']}
|
||||
, {settings: ['alertMessage']}
|
||||
)
|
||||
.changes(), function(err, cursor) {
|
||||
if (err) {
|
||||
throw err
|
||||
@@ -77,6 +78,11 @@ module.exports = function(pushdev) {
|
||||
!_.isEqual(data.new_val.groups.subscribed, data.old_val.groups.subscribed)) {
|
||||
targets.push('settings')
|
||||
}
|
||||
else if (!_.isEqual(
|
||||
data.new_val.settings.alertMessage
|
||||
, data.old_val.settings.alertMessage)) {
|
||||
targets.push('menu')
|
||||
}
|
||||
if (targets.length) {
|
||||
sendUserChange(
|
||||
data.new_val
|
||||
|
||||
Reference in New Issue
Block a user