HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux mail.btech-izolacje.pl 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
User: pewna6876 (1017)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/backup/templates/backup/backupDestinations.html
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Set up Backup Destinations" %}{% endblock %}
{% block content %}

    {% load static %}


    {% get_current_language as LANGUAGE_CODE %}
    <!-- Current language: {{ LANGUAGE_CODE }} -->

    <div class="container">
        <div id="page-title">
            <h2>{% trans "Set up Backup Destinations" %} - <a target="_blank"
                                                              href="https://cyberpanel.net/KnowledgeBase/home/add-destination-scheduled-local-sftp-remote-backups/"
                                                              style="height: 23px;line-height: 21px;"
                                                              class="btn btn-border btn-alt border-red btn-link font-red"
                                                              title=""><span>{% trans "Remote Backups" %}</span></a>
            </h2>
            <p>{% trans "On this page you can set up your Backup destinations. (SFTP)" %}</p>
        </div>

        <div ng-controller="backupDestinations" class="panel">
            <div class="panel-body">
                <h3 class="title-hero">
                    {% trans "Set up Backup Destinations." %} <img ng-hide="cyberpanelLoading"
                                                                   src="{% static 'images/loading.gif' %}">
                </h3>
                <div class="alert alert-warning">
                    <p>Configure automatic backups to our secure servers in 60 seconds. <a
                            href="/backup/OneClickBackups">Set-up now.</a></p>
                </div>
                <div class="example-box-wrapper">


                    <form action="/" class="form-horizontal bordered-row">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Select Type" %} </label>
                            <div class="col-sm-6">
                                <select ng-change="fetchDetails()" ng-model="destinationType" class="form-control">
                                    <option>local</option>
                                    <option>SFTP</option>
                                </select>
                            </div>
                        </div>

                        <!--- SFTP --->

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Name" %}</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" ng-model="name" required>
                            </div>
                        </div>

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "IP Address" %}</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" ng-model="IPAddress" required>
                            </div>
                        </div>

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Username" %}</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" ng-model="userName" required>
                            </div>
                        </div>

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Password" %}</label>
                            <div class="col-sm-6">
                                <input placeholder="" type="password" class="form-control" ng-model="password" required>
                            </div>
                        </div>

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Port" %}</label>
                            <div class="col-sm-6">
                                <input placeholder="{% trans "Backup server SSH Port, leave empty for 22." %}"
                                       type="text" class="form-control" ng-model="backupSSHPort" required>
                            </div>
                        </div>

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Path" %}</label>
                            <div class="col-sm-6">
                                <input placeholder="Path on remote server to store backups." type="text"
                                       class="form-control" ng-model="path" required>
                            </div>
                        </div>

                        <div ng-hide="sftpHide" class="form-group">
                            <label class="col-sm-3 control-label"></label>
                            <div class="col-sm-4">
                                <button type="button" ng-click="addDestination('SFTP')"
                                        class="btn btn-primary btn-lg btn-block">{% trans "Add Destination" %}</button>

                            </div>
                        </div>

                        <!--- SFTP --->


                        <!------ List of Destinations --------------->

                        <div ng-hide="sftpHide" class="form-group">

                            <div class="col-sm-12">

                                <table class="table">
                                    <thead>
                                    <tr>
                                        <th>{% trans "Name" %}</th>
                                        <th>{% trans "IP" %}</th>
                                        <th>{% trans "Username" %}</th>
                                        <th>{% trans "Path" %}</th>
                                        <th>{% trans "Port" %}</th>
                                        <th>{% trans "Delete" %}</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="record in records track by $index">
                                        <td ng-bind="record.name"></td>
                                        <td ng-bind="record.ip"></td>
                                        <td ng-bind="record.username"></td>
                                        <td ng-bind="record.path"></td>
                                        <td ng-bind="record.port"></td>
                                        <td ng-click="removeDestination('SFTP', record.name)"><img
                                                src="{% static 'images/delete.png' %}">
                                        </td>

                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                        <!------ List of records --------------->


                        <!--- SFTP  End --->

                        <!--- AWS Start --->

                        <div ng-hide="localHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Name" %}</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" ng-model="name" required>
                            </div>
                        </div>

                        <div ng-hide="localHide" class="form-group">
                            <label class="col-sm-3 control-label">{% trans "Local Path" %}</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" ng-model="localPath" required>
                            </div>
                        </div>

                        <div ng-hide="localHide" class="form-group">
                            <label class="col-sm-3 control-label"></label>
                            <div class="col-sm-4">
                                <button type="button" ng-click="addDestination('local')"
                                        class="btn btn-primary btn-lg btn-block">{% trans "Add Destination" %}</button>

                            </div>
                        </div>

                        <!--- SFTP --->


                        <!------ List of Destinations --------------->

                        <div ng-hide="localHide" class="form-group">

                            <div class="col-sm-12">

                                <table class="table">
                                    <thead>
                                    <tr>
                                        <th>{% trans "Name" %}</th>
                                        <th>{% trans "Path" %}</th>
                                        <th>{% trans "Delete" %}</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="record in records track by $index">
                                        <td ng-bind="record.name"></td>
                                        <td ng-bind="record.path"></td>
                                        <td ng-click="removeDestination('local', record.name)"><img
                                                src="{% static 'images/delete.png' %}">
                                        </td>

                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                        <!------ List of records --------------->


                        <!--- AWS  End --->


                    </form>


                </div>
            </div>
        </div>


    </div>


{% endblock %}