Current File : //usr/local/jetapps/var/www/jetbackup5/docroot/app/views/destinations.htm
<div ng-controller="destinations" class="controller-box">
    <h1>{{ lang.t("Destinations") }}</h1>
    <p>{{ lang.t("For a full list of supported destination types, please visit the")}} <a href="{{const.DOCS_ADMIN_URL}}/Destinations/destination.html" style="color: #fd6b2b;" target="_blank">{{ lang.t("Destination Overview documentation.") }}</a></p>
    <br />

    <div class="row search-page-container">
        <div class="col-xs-12 col-sm-5 col-md-4 col-lg-6">
            <button class="btn btn-default" ng-click="fetch()" title="{{ lang.t('Refresh Records') }}">
                <em aria-hidden="true" class="fas fa-redo"></em>
            </button>
            <a href="{{primaryURL}}/destinationManage" class="btn btn-primary" ng-click="changeView('/destinationManage')">
                <em aria-hidden="true" class="fas fa-plus"></em>
                {{ lang.t("Create New Destination") }}
            </a>
        </div>
        <div class="col-xs-12 col-sm-4 col-md-4 col-lg-2">
            <filter-box
                    box-options="filterOptions"
                    ng-model="filter"
                    ng-change="fetch()">
            </filter-box>
        </div>
        <div class="col-xs-12 col-sm-3 col-md-4 col-lg-4">
            <search ng-model="metaData.filterValue" ng-change="fetch()"></search>
        </div>
    </div>

    <div class="table-responsive">
        <table class="table table-striped content-table">
            <thead>
            <tr>
                <th class="col-sm-3 col-md-3 col-lg-3 column-title">
                    <button sort-by sort-meta="meta" sort-field="name" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Name')) }}">{{ lang.t("Name") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title">
                    <button sort-by sort-meta="meta" sort-field="job_type" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Job Type')) }}">{{ lang.t("Job Type") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title">
                    <button sort-by sort-meta="meta" sort-field="type" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Type')) }}">{{ lang.t("Type") }}</button>
                </th>
                <th class="col-sm-3 col-md-3 col-lg-3 column-title">
                    {{ lang.t("Disk Info") }}
                </th>
                <th class="col-sm-3 col-md-3 col-lg-3 column-title">
                    {{ lang.t("Speed Test") }}
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title">
                    <button sort-by sort-meta="meta" sort-field="owner" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Owner')) }}">{{ lang.t("Owner") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title" style="text-align: center;">
                    <button sort-by sort-meta="meta" sort-field="count" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Jobs Assigned')) }}">{{ lang.t("Jobs Assigned") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title" style="text-align: center;">
                    <button sort-by sort-meta="meta" sort-field="readonly" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Read Only')) }}">{{ lang.t("Read Only") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title" style="text-align: center;">
                    <button sort-by sort-meta="meta" sort-field="disabled" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Enabled')) }}">{{ lang.t("Enabled") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title" style="text-align: center;">
                    <button sort-by sort-meta="meta" sort-field="hidden" onSort="fetch()" title="{{ lang.t('Sort by %s.', lang.t('Visibility')) }}">{{ lang.t("Visibility") }}</button>
                </th>
                <th class="col-sm-1 col-md-1 col-lg-1 column-title" ng-show="perm.isRoot" style="text-align: center;">
                    <button sort-by sort-meta="meta" sort-field="dr" onSort="fetch()" tooltip="bottom|Exporting the JetBackup configuration will allow you to quickly recover from a disaster and will restore all your JetBackup configurations.  We highly recommend you enable “Export JB Config” on at least one of your destinations." title="{{ lang.t('Sort by %s.', lang.t('JB Config')) }}">{{ lang.t("JB Config") }}</button>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr ng-hide="loadingDestinations" ng-repeat-start="destination in destinations track by $index" id="destination_row_{{$index}}" ng-click="openActions(destination)" class="pointer">
                <td data-title="{{ lang.t('Name') }}">
                    {{ destination.name }}
                    <div ng-show="destination.reindex" style="font-size: 11px;"><span class="fas fa-spin fa-circle-notch"></span> {{ lang.t("Reindex in process") }}</div>
                </td>
                <td data-title="{{ lang.t('Job Type') }}">
                    {{ const.DESTINATION_JOB_TYPE_NAMES[destination.job_type] }}
                </td>
                <td data-title="{{ lang.t('Type') }}">
                    {{ destination.type_name }}
                </td>
                <td data-title="{{ lang.t('Disk Info') }}">
                    <div ng-show="destination.job_type == const.DESTINATION_JOB_TYPE_BACKUP">
                        <span ng-hide="destination.disk_usage" style="font-size: 11px;">{{ lang.t("N/A") }}</span>
                        <span ng-show="destination.disk_usage" style="font-size: 11px;">{{ lang.t("%s used / %s total (%s free)", util.sizeToHumanReadable(destination.disk_usage.usage), util.sizeToHumanReadable(destination.disk_usage.total), util.sizeToHumanReadable(destination.disk_usage.free)) }}</span>
                        <p style="margin: 0; padding: 0; font-size: 11px; font-weight: bold;">{{ lang.t("Last Updated at %s", destination.update_date ? lang.d(destination.update_date, 'shorttime') : lang.t("Never")) }}</p>
                    </div>
                    <span ng-show="destination.job_type != const.DESTINATION_JOB_TYPE_BACKUP">-</span>
                </td>
                <td data-title="{{ lang.t('Speed Test') }}">
                    <div ng-show="destination.job_type == const.DESTINATION_JOB_TYPE_BACKUP && destination.speed.download">
                        <span class="fas fa-arrow-circle-down"></span> {{destination.speed.download}} Mbps <span class="fas fa-arrow-circle-up"></span> {{destination.speed.upload}} Mbps
                        <p style="margin: 0; padding: 0; font-size: 11px; font-weight: bold;">{{ lang.t("Last Updated at %s", destination.speed.date ? lang.d(destination.speed.date, 'shorttime') : lang.t("Never")) }}</p>
                    </div>
                    <div ng-show="destination.job_type != const.DESTINATION_JOB_TYPE_BACKUP || !destination.speed.download">-</div>
                </td>
                <td data-title="{{ lang.t('Owner') }}">
                    {{ destination.owner_name }}
                </td>
                <td data-title="{{ lang.t('Jobs Assigned') }}" style="text-align: center;">
                    <div uib-tooltip-template="'destinationJobsAssigned.htm'" tooltip-placement="auto" tooltip-class="job-tooltip">
                        {{ destination.count }}
                    </div>
                </td>
                <td data-title="{{ lang.t('Read Only') }}" style="text-align: center;">
                    {{ (destination.job_type == const.DESTINATION_JOB_TYPE_BACKUP ? (destination.readonly ? lang.t("Yes") : lang.t("No")) : '-') }}
                </td>
                <td data-title="{{ lang.t('Enabled') }}" ng-click="$event.stopPropagation();" style="text-align: center;">
                    <button ng-click="toggleStatus(destination)" class="toggle-switch"><em class="fas toggle-icon" ng-class="{ 'fa-toggle-on text-green': !destination.disabled, 'fa-toggle-on text-gray': destination.disabled }"></em></button>
                </td>
                <td data-title="{{ lang.t('Hidden') }}" ng-click="$event.stopPropagation();" style="text-align: center;">
                    <button ng-show="destination.job_type == const.DESTINATION_JOB_TYPE_BACKUP" ng-click="toggleHidden(destination)" class="toggle-switch"><em class="fas toggle-icon" ng-class="{ 'fa-toggle-on text-green': !destination.hidden, 'fa-toggle-on text-gray': destination.hidden }"></em></button>
                    <span ng-show="destination.job_type != const.DESTINATION_JOB_TYPE_BACKUP">-</span>
                </td>
                <td data-title="{{ lang.t('DR') }}" ng-click="$event.stopPropagation();" ng-show="perm.isRoot" style="text-align: center;">
                    <button ng-hide="destination.readonly || destination.job_type != const.DESTINATION_JOB_TYPE_BACKUP" ng-click="toggleDR(destination)" class="toggle-switch"><em class="fas toggle-icon" ng-class="{ 'fa-toggle-on text-green': destination.dr, 'fa-toggle-on text-gray': !destination.dr }"></em></button>
                    <span ng-show="destination.readonly || destination.job_type != const.DESTINATION_JOB_TYPE_BACKUP">-</span>
                </td>
            </tr>
            <tr ng-hide="loadingDestinations" ng-repeat-end id="dt_module_row_{{$index}}">
                <td colspan="11" class="actions-cell">
                    <div class="action-module" ng-if="isOpenedActions(destination)" ng-include="includePath('destinationActions')"></div>
                </td>
            </tr>
            <tr ng-hide="!loadingDestinations">
                <td colspan="11">
                    <loading-box><span>{{ lang.t("Loading Destinations") }}</span></loading-box>
                </td>
            </tr>
            <tr ng-hide="destinations.length > 0 || loadingDestinations">
                <td colspan="11">
                    <span>{{ lang.t("No Destinations Found") }}</span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <pagination fetch="fetch" meta="meta"></pagination>
</div>
<script type="text/ng-template" id="destinationJobsAssigned.htm">
    <div style="text-align: left; padding: 10px 0;">
        <h5 style="margin: 0 20px 5px 20px; font-weight: bold;">{{ lang.t("Jobs Assigned") }}</h5>
        <span style="margin: 0 20px;" ng-hide="jobs[destination._id].length">{{ lang.t("No jobs assigned to this destination") }}</span>
        <ul style="margin-bottom: 0;" ng-show="jobs[destination._id].length">
            <li ng-repeat="job in jobs[destination._id]">{{ job.name }}</li>
        </ul>

    </div>
</script>