Move 3rd Party API settings to new tab

This commit is contained in:
JonnyWong16 2019-12-25 11:41:53 -08:00
commit f958de2de6
2 changed files with 72 additions and 50 deletions

View file

@ -56,6 +56,7 @@
<li role="presentation"><a href="#tabs-notifications" aria-controls="tabs-notifications" role="tab" data-toggle="tab">Notifications & Newsletters</a></li> <li role="presentation"><a href="#tabs-notifications" aria-controls="tabs-notifications" role="tab" data-toggle="tab">Notifications & Newsletters</a></li>
<li role="presentation"><a href="#tabs-notification_agents" aria-controls="tabs-notification_agents" role="tab" data-toggle="tab">Notification Agents</a></li> <li role="presentation"><a href="#tabs-notification_agents" aria-controls="tabs-notification_agents" role="tab" data-toggle="tab">Notification Agents</a></li>
<li role="presentation"><a href="#tabs-newsletter_agents" aria-controls="tabs-newsletter_agents" role="tab" data-toggle="tab">Newsletter Agents</a></li> <li role="presentation"><a href="#tabs-newsletter_agents" aria-controls="tabs-newsletter_agents" role="tab" data-toggle="tab">Newsletter Agents</a></li>
<li role="presentation"><a href="#tabs-3rd_party_apis" aria-controls="tabs-3rd_party_apis" role="tab" data-toggle="tab">3rd Party APIs</a></li>
<li role="presentation"><a href="#tabs-import_backups" aria-controls="tabs-import_backups" role="tab" data-toggle="tab">Import & Backups</a></li> <li role="presentation"><a href="#tabs-import_backups" aria-controls="tabs-import_backups" role="tab" data-toggle="tab">Import & Backups</a></li>
<li role="presentation"><a href="#tabs-android_app" aria-controls="tabs-android_app" role="tab" data-toggle="tab">Tautulli Remote Android App <sup><small>beta</small></sup></a></li> <li role="presentation"><a href="#tabs-android_app" aria-controls="tabs-android_app" role="tab" data-toggle="tab">Tautulli Remote Android App <sup><small>beta</small></sup></a></li>
</ul> </ul>
@ -1063,12 +1064,60 @@
<p class="help-block">Enter the full path to where newsletter files will be saved.</p> <p class="help-block">Enter the full path to where newsletter files will be saved.</p>
</div> </div>
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
</div>
<div role="tabpanel" class="tab-pane" id="tabs-notification_agents">
<div class="padded-header"> <div class="padded-header">
<h3>3rd Party APIs</h3> <h3>Notification Agents</h3>
</div> </div>
<p class="help-block">
Add a new notification agent, or configure an existing notification agent by clicking the settings icon on the right.
</p>
<p class="help-block">
Please see the <a target='_blank' href='${anon_url('https://github.com/%s/%s-Wiki/wiki/Notification-Agents-Guide' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_REPO))}'>Notification Agents Guide</a> for instructions on setting up each notification agent.
</p>
<br />
<div id="plexpy-notifiers-table">
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading notification agents...</div>
<br>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tabs-newsletter_agents">
<div class="padded-header">
<h3>Newsletter Agents</h3>
</div>
<p class="help-block">
Add a new newsletter agent, or configure an existing newsletter agent by clicking the settings icon on the right.
</p>
<p class="help-block settings-warning" id="newsletter_upload_warning">
Warning: The <a data-tab-destination="3rd_party_apis" data-target="notify_upload_posters">Image Hosting</a> setting must be enabled for images to display on the newsletter.</span>
</p>
<br/>
<div id="plexpy-newsletters-table">
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading newsletter agents...</div>
<br>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tabs-3rd_party_apis">
<div class="padded-header">
<h3>Image Hosting</h3>
</div>
<p class="help-block">Image hosting is used to provide posters and artwork for some notification agents and newsletters.</p>
<div class="form-group"> <div class="form-group">
<label for="notify_upload_posters">Image Hosting</label> <label for="notify_upload_posters">Image Host</label>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="${'input-group' if config['notify_upload_posters'] in (1, 3) else ''}"> <div class="${'input-group' if config['notify_upload_posters'] in (1, 3) else ''}">
@ -1108,7 +1157,7 @@
<div id="self_host_image_options" style="overlfow: hidden; display: ${'none' if config['notify_upload_posters'] != 2 else 'block'}"> <div id="self_host_image_options" style="overlfow: hidden; display: ${'none' if config['notify_upload_posters'] != 2 else 'block'}">
<div class="form-group"> <div class="form-group">
<p class="help-block" id="self_host_image_message">Note: The <span class="inline-pre">${http_root}image</span> endpoint on your domain must be publicly accessible from the internet.</p> <p class="help-block" id="self_host_image_message">Note: The <span class="inline-pre">${http_root}image</span> endpoint on your domain must be publicly accessible from the internet.</p>
<p class="help-block settings-warning base-url-warning">Warning: Public Tautulli domain not set under <a data-tab-destination="tabs-web_interface" data-target="#http_base_url">Web Interface</a>.</p> <p class="help-block settings-warning base-url-warning">Warning: Public Tautulli domain not set under <a data-tab-destination="web_interface" data-target="http_base_url">Web Interface</a>.</p>
</div> </div>
</div> </div>
<div id="cloudinary_upload_options" style="overlfow: hidden; display: ${'none' if config['notify_upload_posters'] != 3 else 'block'}"> <div id="cloudinary_upload_options" style="overlfow: hidden; display: ${'none' if config['notify_upload_posters'] != 3 else 'block'}">
@ -1151,6 +1200,13 @@
</p> </p>
</div> </div>
</div> </div>
<div class="padded-header">
<h3>Metadata Lookups</h3>
</div>
<p class="help-block">Metadata lookups are used to provide additional metadata for notifications when available.</p>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="themoviedb_lookup" id="themoviedb_lookup" value="1" ${config['themoviedb_lookup']}> Lookup TheMovieDB Links <input type="checkbox" name="themoviedb_lookup" id="themoviedb_lookup" value="1" ${config['themoviedb_lookup']}> Lookup TheMovieDB Links
@ -1170,6 +1226,12 @@
<p class="help-block">Enable to lookup links to MusicBrainz for music when available.</p> <p class="help-block">Enable to lookup links to MusicBrainz for music when available.</p>
</div> </div>
<div class="padded-header">
<h3>Geolocation Database</h3>
</div>
<p class="help-block">TThe GeoLite2 database is used to geolocate IP addresses.</p>
<div class="form-group"> <div class="form-group">
<label for="maxmind_license_key">MaxMind License Key</label> <label for="maxmind_license_key">MaxMind License Key</label>
<div class="row"> <div class="row">
@ -1195,7 +1257,7 @@
</div> </div>
</div> </div>
<p class="help-block"> <p class="help-block">
The GeoLite2 database is used to geolocate IP addresses. Database last updated <strong><span id="geoip_db_updated">never</span></strong>. GeoLite2 Database last updated <strong><span id="geoip_db_updated">never</span></strong>.
</p> </p>
</div> </div>
@ -1203,46 +1265,6 @@
</div> </div>
<div role="tabpanel" class="tab-pane" id="tabs-notification_agents">
<div class="padded-header">
<h3>Notification Agents</h3>
</div>
<p class="help-block">
Add a new notification agent, or configure an existing notification agent by clicking the settings icon on the right.
</p>
<p class="help-block">
Please see the <a target='_blank' href='${anon_url('https://github.com/%s/%s-Wiki/wiki/Notification-Agents-Guide' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_REPO))}'>Notification Agents Guide</a> for instructions on setting up each notification agent.
</p>
<br />
<div id="plexpy-notifiers-table">
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading notification agents...</div>
<br>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tabs-newsletter_agents">
<div class="padded-header">
<h3>Newsletter Agents</h3>
</div>
<p class="help-block">
Add a new newsletter agent, or configure an existing newsletter agent by clicking the settings icon on the right.
</p>
<p class="help-block settings-warning" id="newsletter_upload_warning">
Warning: The <a data-tab-destination="notifications" data-target="notify_upload_posters">Image Hosting</a> setting must be enabled for images to display on the newsletter.</span>
</p>
<br/>
<div id="plexpy-newsletters-table">
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading newsletter agents...</div>
<br>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tabs-import_backups"> <div role="tabpanel" class="tab-pane" id="tabs-import_backups">
<div class="padded-header"> <div class="padded-header">

View file

@ -1264,7 +1264,7 @@ class DISCORD(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'discord_incl_card', 'name': 'discord_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: <a data-tab-destination="notifications" data-dismiss="modal" ' 'Note: <a data-tab-destination="3rd_party_apis" data-dismiss="modal" '
'data-target="notify_upload_posters">Image Hosting</a> ' 'data-target="notify_upload_posters">Image Hosting</a> '
'must be enabled under the notifications settings tab.', 'must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
@ -1639,7 +1639,7 @@ class FACEBOOK(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'facebook_incl_card', 'name': 'facebook_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: <a data-tab-destination="notifications" data-dismiss="modal" ' 'Note: <a data-tab-destination="3rd_party_apis" data-dismiss="modal" '
'data-target="notify_upload_posters">Image Hosting</a> ' 'data-target="notify_upload_posters">Image Hosting</a> '
'must be enabled under the notifications settings tab.', 'must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
@ -1962,7 +1962,7 @@ class HIPCHAT(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'hipchat_incl_card', 'name': 'hipchat_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: <a data-tab-destination="notifications" data-dismiss="modal" ' 'Note: <a data-tab-destination="3rd_party_apis" data-dismiss="modal" '
'data-target="notify_upload_posters">Image Hosting</a> ' 'data-target="notify_upload_posters">Image Hosting</a> '
'must be enabled under the notifications settings tab.<br>' 'must be enabled under the notifications settings tab.<br>'
'Note: This will change the notification type to HTML and emoticons will no longer work.', 'Note: This will change the notification type to HTML and emoticons will no longer work.',
@ -2184,7 +2184,7 @@ class JOIN(Notifier):
'value': self.config['incl_poster'], 'value': self.config['incl_poster'],
'name': 'join_incl_poster', 'name': 'join_incl_poster',
'description': 'Include a poster with the notifications.<br>' 'description': 'Include a poster with the notifications.<br>'
'Note: <a data-tab-destination="notifications" data-dismiss="modal" ' 'Note: <a data-tab-destination="3rd_party_apis" data-dismiss="modal" '
'data-target="notify_upload_posters">Image Hosting</a> ' 'data-target="notify_upload_posters">Image Hosting</a> '
'must be enabled under the notifications settings tab.', 'must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
@ -3348,7 +3348,7 @@ class SLACK(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'slack_incl_card', 'name': 'slack_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: <a data-tab-destination="notifications" data-dismiss="modal" ' 'Note: <a data-tab-destination="3rd_party_apis" data-dismiss="modal" '
'data-target="notify_upload_posters">Image Hosting</a> ' 'data-target="notify_upload_posters">Image Hosting</a> '
'must be enabled under the notifications settings tab.', 'must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
@ -3593,7 +3593,7 @@ class TWITTER(Notifier):
'value': self.config['incl_poster'], 'value': self.config['incl_poster'],
'name': 'twitter_incl_poster', 'name': 'twitter_incl_poster',
'description': 'Include a poster with the notifications.<br>' 'description': 'Include a poster with the notifications.<br>'
'Note: <a data-tab-destination="notifications" data-dismiss="modal" ' 'Note: <a data-tab-destination="3rd_party_apis" data-dismiss="modal" '
'data-target="notify_upload_posters">Image Hosting</a> ' 'data-target="notify_upload_posters">Image Hosting</a> '
'must be enabled under the notifications settings tab.', 'must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'