plexpy/data/interfaces/default/plexwatch_import.html
Tim a393d1a50a Add IP modal to info screen.
Display notice for minimum version of PW database import.
Address a bug where a newly added user's watch history would be logged as "Local" until next user list refresh.
2015-08-04 18:34:38 +02:00

67 lines
No EOL
3.1 KiB
HTML

<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title">Import PlexWatch Database</h4>
</div>
<div class="modal-body" id="modal-text">
<p class="help-block">
Please ensure your PlexWatch database is at version 0.3.2 or higher.
</p>
<div class="form-group">
<label for="db_location">Database Location</label>
<div class="row">
<div class="col-xs-8">
<input type="text" class="form-control" id="db_location" name="db_location" value="" required>
</div>
</div>
<p class="help-block">Enter the path and file name for the PlexWatch database you wish to import.</p>
</div>
<div class="form-group">
<label for="table_name">Table Name</label>
<div class="row">
<div class="col-xs-4">
<select id="table_name" class="form-control" name="table_name">
<option value="processed">processed</option>
<option value="processed">grouped</option>
</select>
</div>
</div>
<p class="help-block">The table name from which you wish to import. Only import one of these, importing both will result in duplicated data.</p>
</div>
<div class="form-group">
<label for="import_ignore_interval">Ignore Interval</label>
<div class="row">
<div class="col-xs-2">
<input type="text" class="form-control" id="import_ignore_interval" name="import_ignore_interval" value="120" required>
</div>
</div>
<p class="help-block">Enter the minimum duration (in seconds) an item must have been active for. Set to 0 to import all.</p>
</div>
</div>
<div class="modal-footer">
<div>
<span id="status-message"></span>
<input type="button" id="import_db" class="btn btn-bright" value="Import">
</div>
</div>
</div>
</div>
<script>
// Send database path to import script
$("#import_db").click(function() {
var database_path = $("#db_location").val();
var table_name = $("#table_name").val();
var import_ignore_interval = $("#import_ignore_interval").val();
$.ajax({
url: 'get_plexwatch_export_data',
data: {database_path: database_path, table_name:table_name, import_ignore_interval:import_ignore_interval},
cache: false,
async: true,
success: function(data) {
$("#status-message").html(data);
$("#db_location").val('')
}
});
});
</script>