mirror of
https://github.com/linuxserver/davos.git
synced 2026-04-20 00:01:51 +08:00
296 lines
16 KiB
HTML
296 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<link th:href="@{https://fonts.googleapis.com/icon?family=Material+Icons}" rel="stylesheet" />
|
|
<link type="text/css" rel="stylesheet" th:href="@{/css/materialize.min.css}" media="screen,projection" />
|
|
<link type="text/css" rel="stylesheet" th:href="@{/css/davos.css}" media="screen" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title th:inline="text">Edit [[${schedule.name}]]</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<div id="main-nav">
|
|
|
|
<div id="logo">
|
|
<div id="logo-text" class="center">davos</div>
|
|
</div>
|
|
|
|
<div id="navigation">
|
|
<ul>
|
|
<li><i class="material-icons">home</i><a th:href="@{/}" class="waves-effect waves-teal">Home</a></li>
|
|
<li><i class="material-icons">web</i><a th:href="@{/}" class="waves-effect waves-teal">File Manager</a></li>
|
|
<li class="active"><i class="material-icons">schedule</i><a th:href="@{/scheduling}" class="waves-effect waves-teal">Scheduling</a></li>
|
|
<li><i class="material-icons">settings</i><a class="waves-effect waves-teal">App Settings</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main>
|
|
|
|
<div class="section teal lighten-3">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col s12 m9">
|
|
<h1 class="header light center-on-small-only">Edit</h1>
|
|
<h4 class="light teal-text text-lighten-5 center-on-small-only">Configure your schedule</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
<div class="section">
|
|
<h4 class="light" th:text="${schedule.name}"></h4>
|
|
<input type="hidden" id="schedule_id" th:attr="value=${schedule.id}" />
|
|
<p class="caption light">Click on the list items below to edit the schedule</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<ul class="collapsible" data-collapsible="expandable">
|
|
<li>
|
|
<div class="collapsible-header active"><i class="material-icons">settings_applications</i>General</div>
|
|
<div class="collapsible-body">
|
|
|
|
<div class="row valign-wrapper">
|
|
|
|
<div class="input-field col s4">
|
|
<input id="schedule_name" placeholder="Please choose a name for this schedule" th:attr="value=${schedule.name}" type="text" class="validate" />
|
|
<label for="schedule_name">Schedule name</label>
|
|
</div>
|
|
<div class="col s8">
|
|
<p class="subtext">
|
|
Give this schedule a meaningful name so you know what its purpose is.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row valign-wrapper">
|
|
<div class="switch col s4 ">
|
|
<label>
|
|
<input id="start_automatically" type="checkbox" th:checked="${schedule.startAutomatically}" />
|
|
<span class="lever"></span>
|
|
</label>
|
|
Start Automatically
|
|
</div>
|
|
<div class="col s8">
|
|
<p class="subtext">
|
|
Select this if you want this schedule to automatically start when davos starts. This is a useful option if davos needs to restart and you don't want to have to manually kick off this process.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s4">
|
|
<select class="browser-default" id="interval">
|
|
<option th:selected="${schedule.interval == 15}" th:value="15">Every 15 minutes</option>
|
|
<option th:selected="${schedule.interval == 30}" th:value="30">Every 30 minutes</option>
|
|
<option th:selected="${schedule.interval == 60}" selected="selected" th:value="60">Every hour</option>
|
|
<option th:selected="${schedule.interval == 120}" th:value="120">Every 2 hours</option>
|
|
<option th:selected="${schedule.interval == 720}" th:value="720">Twice a day</option>
|
|
<option th:selected="${schedule.interval == 1440}" th:value="1440">Once a day</option>
|
|
</select>
|
|
</div>
|
|
<div class="col s8">
|
|
<p class="subtext">
|
|
The interval that defines how often this schedule will poll the server to check for new files.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<div class="collapsible-header active"><i class="material-icons">business</i>Server</div>
|
|
<div class="collapsible-body">
|
|
<div class="row valign-wrapper">
|
|
<div class="switch col s2">
|
|
<input name="protocol_type" value="FTP" type="radio" id="protocol_ftp" th:checked="${schedule.connectionType != null and schedule.connectionType.name() == 'FTP'}" />
|
|
<label for="protocol_ftp">FTP</label>
|
|
</div>
|
|
<div class="switch col s2">
|
|
<input name="protocol_type" value="FTPS" type="radio" id="protocol_ftps" th:checked="${schedule.connectionType != null and schedule.connectionType.name() == 'FTPS'}" />
|
|
<label for="protocol_ftps">FTPS</label>
|
|
</div>
|
|
<div class="switch col s2">
|
|
<input name="protocol_type" value="SFTP" type="radio" id="protocol_sftp" th:checked="${schedule.connectionType != null and schedule.connectionType.name() == 'SFTP'}" />
|
|
<label for="protocol_sftp">SFTP</label>
|
|
</div>
|
|
<div class="switch col s6"></div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s6">
|
|
<i class="material-icons prefix">business</i>
|
|
<input id="server_name" type="text" th:attr="value=${schedule.hostName}" />
|
|
<label for="server_name">Server Name (or IP address)</label>
|
|
</div>
|
|
<div class="input-field col s2">
|
|
<i class="material-icons prefix">settings_input_svideo</i>
|
|
<input id="server_port" type="number" th:attr="value=${schedule.port}" />
|
|
<label for="server_port">Port</label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="input-field col s6">
|
|
<i class="material-icons prefix">perm_identity</i>
|
|
<input id="username" type="text" th:attr="value=${schedule.username}" />
|
|
<label for="username">Username</label>
|
|
</div>
|
|
<div class="input-field col s6">
|
|
<i class="material-icons prefix">vpn_key</i>
|
|
<input id="password" type="password" th:attr="value=${schedule.password}" />
|
|
<label for="password">Password</label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="input-field col s6">
|
|
<i class="material-icons prefix">track_changes</i>
|
|
<input id="remote_path" type="text" th:attr="value=${schedule.remoteFilePath}" />
|
|
<label for="remote-path">Remote folder to scan</label>
|
|
</div>
|
|
<div class="input-field col s6">
|
|
<i class="material-icons prefix">play_for_work</i>
|
|
<input id="local_path" type="text" th:attr="value=${schedule.localFilePath}" />
|
|
<label for="local-path">Local destination folder</label>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<div class="collapsible-header active"><i class="material-icons">swap_vert</i>File Transfers</div>
|
|
<div class="collapsible-body">
|
|
<div class="row valign-wrapper">
|
|
<div class="switch col s2">
|
|
<input name="scan_type" value="FILE" type="radio" id="scan_files_only" th:checked="${schedule.transferType != null and schedule.transferType.name() == 'FILE'}" />
|
|
<label for="scan_files_only">Files only</label>
|
|
</div>
|
|
<div class="col s10">
|
|
<p class="subtext">
|
|
Only download files in the remote folder. Ignore sub-folders.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="row valign-wrapper">
|
|
<div class="switch col s2">
|
|
<input name="scan_type" value="RECURSIVE" type="radio" id="scan_recursive" th:checked="${schedule.transferType != null and schedule.transferType.name() == 'RECURSIVE'}" />
|
|
<label for="scan_recursive">Recursive</label>
|
|
</div>
|
|
<div class="col s10">
|
|
<p class="subtext">
|
|
Look inside any sub-folders in the remote folder. If any files are found, download them.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<div class="collapsible-header active"><i class="material-icons">sort_by_alpha</i>Filters</div>
|
|
<div class="collapsible-body">
|
|
<div class="row">
|
|
<form class="col s12">
|
|
<div class="col s12">
|
|
<p class="subtext">
|
|
If you do not want davos to pull down all recent files from the server during the next scheduled run, please define a filter (or more). A filter works by telling davos that a file must adhere to a particular naming structure (file name or extension) before it decides to download it. For example, if you only want the schedule to download <i>.doc</i> files, you should enter a filter of <strong>*.doc</strong>. You may use a question mark (<strong>?</strong>) to denote a single wildcard character, or an asterisk (<strong>*</strong>) to denote any number of wildcard characters.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="input-field col s6">
|
|
<input id="new_filter" type="text" />
|
|
<label for="new_filter">Add filter</label>
|
|
</div>
|
|
<div class="input-field col s6">
|
|
<button class="btn waves-effect waves-light" type="button" id="add_new_filter">Add</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="input-field col s12" id="filter_chips">
|
|
|
|
<div class="chip" th:each="filter : ${schedule.filters}">
|
|
<input type="hidden" class="filter_id" th:attr="value=${filter.id}" />
|
|
<span class="filter_value" th:text="${filter.value}"></span>
|
|
<i class="material-icons">close</i>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<div class="collapsible-header active"><i class="material-icons">code</i>Post-download Actions</div>
|
|
<div class="collapsible-body">
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<p class="subtext">
|
|
Add actions for davos to perform after each file has been successfully downloaded.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s4">
|
|
<select class="browser-default">
|
|
<option value="" disabled="disabled" selected="selected">Add action...</option>
|
|
<option value="pushbullet">Pushbullet Notification</option>
|
|
<option value="move">Move downloaded file</option>
|
|
</select>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="download_actions">
|
|
|
|
<div class="row download_action">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<button class="btn waves-effect waves-light" type="button" id="save_schedule">Save changes</button>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="section">
|
|
<h5 class="light">Schedule Options</h5>
|
|
<button class="btn waves-effect waves-light green lighten-2" id="start_schedule" type="button">Start</button>
|
|
<button class="btn waves-effect waves-light red lighten-2" id="stop_schedule" type="button">Stop</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script type="text/javascript" th:src="@{/js/jquery-2.1.4.min.js}"></script>
|
|
<script type="text/javascript" th:src="@{/js/materialize.min.js}"></script>
|
|
<script type="text/javascript" th:src="@{/js/davos.js}"></script>
|
|
|
|
<script type="text/javascript" th:inline="text">
|
|
var base = "[[@{/}]]"
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|