versione pre-stable
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
<div class="plugin-urbackup-asset-tab">
|
||||
{% if not linked %}
|
||||
<div class="alert alert-info">
|
||||
{{ __('No UrBackup server linked.', 'urbackup') }}
|
||||
</div>
|
||||
<table class="tab_cadre_fixe">
|
||||
<tr>
|
||||
<th colspan="2">{{ __('UrBackup server selection', 'urbackup') }}</th>
|
||||
</tr>
|
||||
{% if is_sub_location %}
|
||||
<tr class="tab_bg_1">
|
||||
<td colspan="2"><em>
|
||||
{{ __('The asset is in a sub-location. The plugin will use the server assigned to the root location.', 'urbackup') }}
|
||||
</em></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if servers|length == 0 %}
|
||||
<tr class="tab_bg_1">
|
||||
<td colspan="2">
|
||||
<div class="alert alert-warning">
|
||||
{{ __('No UrBackup server available for the root location of this asset.', 'urbackup') }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% elseif can_connect %}
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Available servers for root location', 'urbackup') }}</td>
|
||||
<td>
|
||||
<form method="post" action="{{ path('urbackup_asset_action') }}">
|
||||
<input type="hidden" name="_glpi_csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="itemtype" value="{{ itemtype }}">
|
||||
<input type="hidden" name="items_id" value="{{ items_id }}">
|
||||
<select name="plugin_urbackup_servers_id">
|
||||
{% for id, name in servers %}
|
||||
<option value="{{ id }}">{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" name="connect" class="btn btn-primary">{{ __('Connect', 'urbackup') }}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="tab_bg_1">
|
||||
<td colspan="2">
|
||||
{{ __('A server is available, but you do not have permission to link this asset.', 'urbackup') }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% else %}
|
||||
<table class="tab_cadre_fixe">
|
||||
<tr>
|
||||
<th colspan="4">{{ __('UrBackup status', 'urbackup') }}</th>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Linked server', 'urbackup') }}</td>
|
||||
<td>{{ server_link }}</td>
|
||||
<td>{{ __('IP address', 'urbackup') }}</td>
|
||||
<td>{{ server_ip }}</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('UrBackup server version', 'urbackup') }}</td>
|
||||
<td>{{ server_version }}</td>
|
||||
<td>{{ __('Client name', 'urbackup') }}</td>
|
||||
<td>{{ client_name }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,18 +0,0 @@
|
||||
<form method="post" action="{{ path('urbackup_config') }}">
|
||||
<div class="center">
|
||||
<table class="tab_cadre_fixe">
|
||||
<tr>
|
||||
<th colspan="2">{{ __('UrBackup configuration', 'urbackup') }}</th>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td><strong>{{ __('Computer', 'urbackup') }}</strong></td>
|
||||
<td><span class="badge bg-success">{{ __('Always enabled', 'urbackup') }}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<div class="alert alert-info">
|
||||
{{ __('For Asset Definition types, enable/disable UrBackup via Config > Asset definitions > Capacities.', 'urbackup') }}
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="_glpi_csrf_token" value="{{ csrf_token() }}">
|
||||
</form>
|
||||
@@ -1,118 +0,0 @@
|
||||
{% extends 'layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<form method="post" action="{{ path('urbackup_server_save') }}">
|
||||
<table class="tab_cadre_fixe">
|
||||
<tr>
|
||||
<th colspan="4">{{ __('UrBackup server', 'urbackup') }}</th>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Name') }}</td>
|
||||
<td>
|
||||
<input type="text" name="name" value="{{ server.name ?? '' }}" size="40">
|
||||
</td>
|
||||
<td>{{ __('Active') }}</td>
|
||||
<td>
|
||||
<select name="is_active">
|
||||
<option value="1"{% if server.is_active ?? true %} selected{% endif %}>{{ __('Yes') }}</option>
|
||||
<option value="0"{% if not (server.is_active ?? true) %} selected{% endif %}>{{ __('No') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Entity') }}</td>
|
||||
<td>
|
||||
{{ render_entity_dropdown('entities_id', server.entities_id ?? 0) }}
|
||||
</td>
|
||||
<td>{{ __('Recursive') }}</td>
|
||||
<td>
|
||||
<select name="is_recursive">
|
||||
<option value="1"{% if server.is_recursive ?? false %} selected{% endif %}>{{ __('Yes') }}</option>
|
||||
<option value="0"{% if not (server.is_recursive ?? false) %} selected{% endif %}>{{ __('No') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Location') }}</td>
|
||||
<td>
|
||||
{{ render_location_dropdown('locations_id', server.locations_id ?? 0) }}
|
||||
<br><small>{{ __('Associate the server with the main/root location. Assets in sub-locations will use this root location server.', 'urbackup') }}</small>
|
||||
</td>
|
||||
<td>{{ __('Protocol', 'urbackup') }}</td>
|
||||
<td>
|
||||
<select name="protocol">
|
||||
<option value="http"{% if server.protocol == 'http' %} selected{% endif %}>HTTP</option>
|
||||
<option value="https"{% if server.protocol == 'https' %} selected{% endif %}>HTTPS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('IP address', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="text" name="ip_address" value="{{ server.ip_address ?? '' }}" size="40">
|
||||
</td>
|
||||
<td>{{ __('Network port', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="number" name="port" value="{{ server.port ?? 55414 }}" min="1" max="65535">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('UrBackup server version', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="text" name="server_version" value="{{ server.server_version ?? '' }}" size="30">
|
||||
</td>
|
||||
<td>{{ __('Ignore SSL verification', 'urbackup') }}</td>
|
||||
<td>
|
||||
<select name="ignore_ssl">
|
||||
<option value="1"{% if server.ignore_ssl ?? false %} selected{% endif %}>{{ __('Yes') }}</option>
|
||||
<option value="0"{% if not (server.ignore_ssl ?? false) %} selected{% endif %}>{{ __('No') }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('API username', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="text" name="api_username" value="{{ server.api_username ?? '' }}" size="40" autocomplete="off">
|
||||
</td>
|
||||
<td>{{ __('API password', 'urbackup') }}</td>
|
||||
<td>
|
||||
<input type="password" name="api_password" value="{{ server.api_password ?? '' }}" autocomplete="new-password">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('Comments') }}</td>
|
||||
<td colspan="3">
|
||||
<textarea name="comment" rows="5" cols="100">{{ server.comment ?? '' }}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
{% if server.id > 0 %}
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('UrBackup web interface', 'urbackup') }}</td>
|
||||
<td colspan="3">
|
||||
{% if server.url %}
|
||||
<a href="{{ server.url }}" target="_blank" rel="noopener" class="btn btn-secondary">
|
||||
{{ __('Open UrBackup interface', 'urbackup') }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ __('No URL available', 'urbackup') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ __('API test', 'urbackup') }}</td>
|
||||
<td colspan="3">
|
||||
<button type="button" class="btn btn-primary plugin-urbackup-test-api" data-server-id="{{ server.id }}">
|
||||
{{ __('Test API connection', 'urbackup') }}
|
||||
</button>
|
||||
<span id="plugin-urbackup-api-test-result"></span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{{ server.id ?? 0 }}">
|
||||
<input type="hidden" name="_glpi_csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" name="save" class="btn btn-primary">{{ __('Save') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,51 +0,0 @@
|
||||
{% extends 'layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<table class="tab_cadre_fixe">
|
||||
<tr>
|
||||
<th colspan="6">{{ __('UrBackup servers', 'urbackup') }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('IP address', 'urbackup') }}</th>
|
||||
<th>{{ __('Port') }}</th>
|
||||
<th>{{ __('Version') }}</th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th>{{ __('Actions') }}</th>
|
||||
</tr>
|
||||
{% for server in servers %}
|
||||
<tr class="tab_bg_1">
|
||||
<td>{{ server.name }}</td>
|
||||
<td>{{ server.ip_address }}</td>
|
||||
<td>{{ server.port }}</td>
|
||||
<td>{{ server.server_version }}</td>
|
||||
<td>
|
||||
{% if server.last_api_status %}
|
||||
<span class="badge bg-success">{{ __('OK', 'urbackup') }}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">{{ __('Failed', 'urbackup') }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('urbackup_server_show', {'id': server.id}) }}" class="btn btn-sm btn-primary">
|
||||
{{ __('View') }}
|
||||
</a>
|
||||
<button class="btn btn-sm btn-secondary plugin-urbackup-test-api" data-server-id="{{ server.id }}">
|
||||
{{ __('Test API', 'urbackup') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="tab_bg_1">
|
||||
<td colspan="6" class="center">{{ __('No records found', 'urbackup') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if can_create %}
|
||||
<a href="{{ path('urbackup_server_show', {'id': 0}) }}" class="btn btn-success">
|
||||
{{ __('Add') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user