mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
parent
2a1bf7847b
commit
ebe570d42f
5 changed files with 54 additions and 34 deletions
|
@ -79,7 +79,6 @@ select.form-control {
|
||||||
color: #eee !important;
|
color: #eee !important;
|
||||||
border: 0px solid #444 !important;
|
border: 0px solid #444 !important;
|
||||||
background: #555 !important;
|
background: #555 !important;
|
||||||
padding: 1px 2px;
|
|
||||||
transition: background-color .3s;
|
transition: background-color .3s;
|
||||||
}
|
}
|
||||||
.selectize-control.form-control .selectize-input {
|
.selectize-control.form-control .selectize-input {
|
||||||
|
@ -87,7 +86,6 @@ select.form-control {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
padding-left: 5px;
|
|
||||||
}
|
}
|
||||||
.selectize-control.form-control.selectize-pms-ip .selectize-input {
|
.selectize-control.form-control.selectize-pms-ip .selectize-input {
|
||||||
padding-left: 12px !important;
|
padding-left: 12px !important;
|
||||||
|
|
|
@ -142,8 +142,10 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<select class="form-control" id="${item['name']}" name="${item['name']}">
|
<select class="form-control" id="${item['name']}" name="${item['name']}">
|
||||||
|
% if item['select_all']:
|
||||||
<option value="select-all">Select All</option>
|
<option value="select-all">Select All</option>
|
||||||
<option value="remove-all">Remove All</option>
|
<option value="remove-all">Remove All</option>
|
||||||
|
% endif
|
||||||
% if isinstance(item['select_options'], dict):
|
% if isinstance(item['select_options'], dict):
|
||||||
% for section, options in item['select_options'].items():
|
% for section, options in item['select_options'].items():
|
||||||
<optgroup label="${section}">
|
<optgroup label="${section}">
|
||||||
|
@ -153,7 +155,9 @@
|
||||||
</optgroup>
|
</optgroup>
|
||||||
% endfor
|
% endfor
|
||||||
% else:
|
% else:
|
||||||
|
% if item['select_all']:
|
||||||
<option value="border-all"></option>
|
<option value="border-all"></option>
|
||||||
|
% endif
|
||||||
% for option in sorted(item['select_options'], key=lambda x: x['text'].lower()):
|
% for option in sorted(item['select_options'], key=lambda x: x['text'].lower()):
|
||||||
<option value="${option['value']}">${option['text']}</option>
|
<option value="${option['value']}">${option['text']}</option>
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -134,8 +134,10 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<select class="form-control" id="${item['name']}" name="${item['name']}">
|
<select class="form-control" id="${item['name']}" name="${item['name']}">
|
||||||
|
% if item['select_all']:
|
||||||
<option value="select-all">Select All</option>
|
<option value="select-all">Select All</option>
|
||||||
<option value="remove-all">Remove All</option>
|
<option value="remove-all">Remove All</option>
|
||||||
|
% endif
|
||||||
% if isinstance(item['select_options'], dict):
|
% if isinstance(item['select_options'], dict):
|
||||||
% for section, options in item['select_options'].items():
|
% for section, options in item['select_options'].items():
|
||||||
<optgroup label="${section}">
|
<optgroup label="${section}">
|
||||||
|
@ -145,7 +147,9 @@
|
||||||
</optgroup>
|
</optgroup>
|
||||||
% endfor
|
% endfor
|
||||||
% else:
|
% else:
|
||||||
|
% if item['select_all']:
|
||||||
<option value="border-all"></option>
|
<option value="border-all"></option>
|
||||||
|
% endif
|
||||||
% for option in sorted(item['select_options'], key=lambda x: x['text'].lower()):
|
% for option in sorted(item['select_options'], key=lambda x: x['text'].lower()):
|
||||||
<option value="${option['value']}">${option['text']}</option>
|
<option value="${option['value']}">${option['text']}</option>
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -718,6 +722,12 @@
|
||||||
$('#pushover_priority').change( function () {
|
$('#pushover_priority').change( function () {
|
||||||
pushoverPriority();
|
pushoverPriority();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var $pushover_sound = $('#pushover_sound').selectize({
|
||||||
|
create: true
|
||||||
|
});
|
||||||
|
var pushover_sound = $pushover_sound[0].selectize;
|
||||||
|
pushover_sound.setValue(${json.dumps(next((c['value'] for c in notifier['config_options'] if c['name'] == 'pushover_sound'), [])) | n});
|
||||||
|
|
||||||
% elif notifier['agent_name'] == 'plexmobileapp':
|
% elif notifier['agent_name'] == 'plexmobileapp':
|
||||||
var $plexmobileapp_user_ids = $('#plexmobileapp_user_ids').selectize({
|
var $plexmobileapp_user_ids = $('#plexmobileapp_user_ids').selectize({
|
||||||
|
|
|
@ -971,7 +971,8 @@ class RecentlyAdded(Newsletter):
|
||||||
'description': 'Select the libraries to include in the newsletter.',
|
'description': 'Select the libraries to include in the newsletter.',
|
||||||
'name': 'newsletter_config_incl_libraries',
|
'name': 'newsletter_config_incl_libraries',
|
||||||
'input_type': 'selectize',
|
'input_type': 'selectize',
|
||||||
'select_options': self._get_sections_options()
|
'select_options': self._get_sections_options(),
|
||||||
|
'select_all': True
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1435,21 +1435,24 @@ class EMAIL(Notifier):
|
||||||
'name': 'email_to',
|
'name': 'email_to',
|
||||||
'description': 'The email address(es) of the recipients.',
|
'description': 'The email address(es) of the recipients.',
|
||||||
'input_type': 'selectize',
|
'input_type': 'selectize',
|
||||||
'select_options': user_emails_to
|
'select_options': user_emails_to,
|
||||||
|
'select_all': True
|
||||||
},
|
},
|
||||||
{'label': 'CC',
|
{'label': 'CC',
|
||||||
'value': self.config['cc'],
|
'value': self.config['cc'],
|
||||||
'name': 'email_cc',
|
'name': 'email_cc',
|
||||||
'description': 'The email address(es) to CC.',
|
'description': 'The email address(es) to CC.',
|
||||||
'input_type': 'selectize',
|
'input_type': 'selectize',
|
||||||
'select_options': user_emails_cc
|
'select_options': user_emails_cc,
|
||||||
|
'select_all': True
|
||||||
},
|
},
|
||||||
{'label': 'BCC',
|
{'label': 'BCC',
|
||||||
'value': self.config['bcc'],
|
'value': self.config['bcc'],
|
||||||
'name': 'email_bcc',
|
'name': 'email_bcc',
|
||||||
'description': 'The email address(es) to BCC.',
|
'description': 'The email address(es) to BCC.',
|
||||||
'input_type': 'selectize',
|
'input_type': 'selectize',
|
||||||
'select_options': user_emails_bcc
|
'select_options': user_emails_bcc,
|
||||||
|
'select_all': True
|
||||||
},
|
},
|
||||||
{'label': 'SMTP Server',
|
{'label': 'SMTP Server',
|
||||||
'value': self.config['smtp_server'],
|
'value': self.config['smtp_server'],
|
||||||
|
@ -3216,31 +3219,34 @@ class PUSHOVER(Notifier):
|
||||||
return self.make_request('https://api.pushover.net/1/messages.json', headers=headers, data=data, files=files)
|
return self.make_request('https://api.pushover.net/1/messages.json', headers=headers, data=data, files=files)
|
||||||
|
|
||||||
def get_sounds(self):
|
def get_sounds(self):
|
||||||
sounds = {
|
sounds = [
|
||||||
'': '',
|
{'value': '', 'text': ''},
|
||||||
'alien': 'Alien Alarm (long)',
|
{'value': 'alien', 'text': 'Alien Alarm (long)'},
|
||||||
'bike': 'Bike',
|
{'value': 'bike', 'text': 'Bike'},
|
||||||
'bugle': 'Bugle',
|
{'value': 'bugle', 'text': 'Bugle'},
|
||||||
'cashregister': 'Cash Register',
|
{'value': 'cashregister', 'text': 'Cash Register'},
|
||||||
'classical': 'Classical',
|
{'value': 'classical', 'text': 'Classical'},
|
||||||
'climb': 'Climb (long)',
|
{'value': 'climb', 'text': 'Climb (long)'},
|
||||||
'cosmic': 'Cosmic',
|
{'value': 'cosmic', 'text': 'Cosmic'},
|
||||||
'echo': 'Pushover Echo (long)',
|
{'value': 'echo', 'text': 'Pushover Echo (long)'},
|
||||||
'falling': 'Falling',
|
{'value': 'falling', 'text': 'Falling'},
|
||||||
'gamelan': 'Gamelan',
|
{'value': 'gamelan', 'text': 'Gamelan'},
|
||||||
'incoming': 'Incoming',
|
{'value': 'incoming', 'text': 'Incoming'},
|
||||||
'intermission': 'Intermission',
|
{'value': 'intermission', 'text': 'Intermission'},
|
||||||
'magic': 'Magic',
|
{'value': 'magic', 'text': 'Magic'},
|
||||||
'mechanical': 'Mechanical',
|
{'value': 'mechanical', 'text': 'Mechanical'},
|
||||||
'none': 'None (silent)',
|
{'value': 'none', 'text': 'None (silent)'},
|
||||||
'persistent': 'Persistent (long)',
|
{'value': 'persistent', 'text': 'Persistent (long)'},
|
||||||
'pianobar': 'Piano Bar',
|
{'value': 'pianobar', 'text': 'Piano Bar'},
|
||||||
'pushover': 'Pushover (default)',
|
{'value': 'pushover', 'text': 'Pushover (default)'},
|
||||||
'siren': 'Siren',
|
{'value': 'siren', 'text': 'Siren'},
|
||||||
'spacealarm': 'Space Alarm',
|
{'value': 'spacealarm', 'text': 'Space Alarm'},
|
||||||
'tugboat': 'Tug Boat',
|
{'value': 'tugboat', 'text': 'Tug Boat'},
|
||||||
'updown': 'Up Down (long)'
|
{'value': 'updown', 'text': 'Up Down (long)'},
|
||||||
}
|
{'value': 'vibrate', 'text': 'Vibrate Only'},
|
||||||
|
]
|
||||||
|
if self.config['sound'] not in [s['value'] for s in sounds]:
|
||||||
|
sounds.append({'value': self.config['sound'], 'text': self.config['sound']})
|
||||||
|
|
||||||
return sounds
|
return sounds
|
||||||
|
|
||||||
|
@ -3281,9 +3287,10 @@ class PUSHOVER(Notifier):
|
||||||
{'label': 'Sound',
|
{'label': 'Sound',
|
||||||
'value': self.config['sound'],
|
'value': self.config['sound'],
|
||||||
'name': 'pushover_sound',
|
'name': 'pushover_sound',
|
||||||
'description': 'Set the notification sound. Leave blank for the default sound.',
|
'description': 'Select a notification sound or enter a custom sound name. Leave blank for the default sound.',
|
||||||
'input_type': 'select',
|
'input_type': 'selectize',
|
||||||
'select_options': self.get_sounds()
|
'select_options': self.get_sounds(),
|
||||||
|
'select_all': False
|
||||||
},
|
},
|
||||||
{'label': 'Priority',
|
{'label': 'Priority',
|
||||||
'value': self.config['priority'],
|
'value': self.config['priority'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue