Mini Shell

Direktori : /usr/local/jetapps/var/www/jetbackup5/docroot/app/views/
Upload File :
Current File : //usr/local/jetapps/var/www/jetbackup5/docroot/app/views/backupJobManage.htm

<div ng-controller="backupJobManage" class="controller-box">
    <h1 ng-if="saveData._id">{{ lang.t("Modify Backup Job \"%s\"", details.name) }}</h1>
    <h1 ng-if="!saveData._id">{{ lang.t("Create New Backup Job") }}</h1>
    
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_content">
                    <br>
                    <form data-parsley-validate="" class="form-horizontal form-label-left" novalidate>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">{{ lang.t("Job Name") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <input id="name" class="form-control col-md-7 col-xs-12" type="text" ng-model="saveData.name" value="saveData.name" />
                                <p class="help-block">{{ lang.t("Specify an internal name for your job") }}</p>
                            </div>
                        </div>
                        <div class="form-group" ng-hide="saveData.type == const.BACKUP_TYPE_JB_CONFIG">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Owner") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <md-autocomplete
                                        md-search-text="autocomplete.accountText"
                                        md-no-cache="true"
                                        md-clear-button="false"
                                        md-input-id="accountSelection"
                                        md-menu-class="account-selection-results"
                                        md-selected-item-change="selectAccount(account)"
                                        md-items="account in searchAccounts(autocomplete.accountText)"
                                        md-min-length="2"
                                        placeholder="{{ lang.t('Start typing the requested account...') }}">
                                    <md-item-template>
                                        <div ng-include="includePath('accountDropdown')"></div>
                                    </md-item-template>
                                    <md-not-found>
                                        {{ lang.t("No account matching \"%s\" were found.", autocomplete.accountText) }}
                                    </md-not-found>
                                </md-autocomplete>
                                <!--input id="owner" class="form-control col-md-7 col-xs-12" type="text" ng-model="saveData.owner_name" value="saveData.owner_name" /-->
                                <p class="help-block">{{ lang.t("Specify the owner of this job. The owner and his parent will have permissions to modify/delete this backup job") }}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Destinations") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <ul class="list-unstyled schedules timeline">
                                    <li ng-repeat="destination_id in saveData.destination" style="padding: 5px;">
                                        <div class="block_content">
                                            <h2 class="title">
                                                <em aria-hidden="true"  class="fas fa-cloud"></em>
                                                {{ destinations[destination_id].name }}
                                                <span ng-hide="saveData.type == const.BACKUP_TYPE_JB_CONFIG">
                                                    |
                                                    <a href="" ng-click="removeDestination(destination_id)" uib-tooltip="{{ lang.t('Remove Destination') }}"><em aria-hidden="true"  class="fas fa-times"></em></a>
                                                </span>
                                            </h2>
                                            <div class="byline"><span>
                                                {{ destinations[destination_id].display }}
                                                <span ng-show="destinations[destination_id].disabled"> | <span style="color: #cc0000;">{{lang.t("Disabled")}}</span></span>
                                            </span></div>
                                        </div>
                                    </li>
                                    <li ng-if="!saveData.destination.length">{{ lang.t("No destinations was set for this backup job") }}</li>
                                </ul>
                                <button ng-hide="saveData.type == const.BACKUP_TYPE_JB_CONFIG" type="button" ng-click="manageDestination()" class="btn btn-primary" style="margin-bottom: 10px;">
                                    <em aria-hidden="true"  class="fas fa-plus"></em>
                                    {{ lang.t("Add Destination") }}
                                </button>
                                <p class="help-block">{{ lang.t("Choose a backup destinations for this job. You can find more details about backup destinations in the following link:") }}
                                    <a href="{{const.DOCS_ADMIN_URL}}/Destinations/destination.html" target="_blank">{{const.DOCS_ADMIN_URL}}/Destinations/destination.html</a>
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Backup Type") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12" ng-hide="saveData.type == const.BACKUP_TYPE_JB_CONFIG">
                                <div class="pretty p-default p-round p-smooth" ng-repeat="type in types">
                                    <input type="radio" ng-model="saveData.type" id="backuptype_{{type.value}}" ng-checked="saveData.type == type.value" ng-click="toggleBackupType(type.value)" value="{{ type.value }}" />
                                    <div class="state p-primary"><label for="backuptype_{{type.value}}">{{ type.label }}</label></div>
                                </div>
                                <p class="help-block">{{type_description}}</p>
                                <div ng-if="type_experimental" class='alert alert-danger' style="margin-top: 20px;">
                                    <div class='alert-message'>
                                        <strong class="alert-title" style="font-size: 20px;">{{lang.t("WARNING - EXPERIMENTAL")}}</strong>
                                        <div class="alert-body">{{type_experimental}}</div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6 col-sm-6 col-xs-12" ng-show="saveData.type == const.BACKUP_TYPE_JB_CONFIG">
                                {{const.BACKUP_TYPE_JB_CONFIG_NAMES[const.BACKUP_TYPE_JB_CONFIG_FULL]}}
                            </div>
                        </div>
                        <div class="form-group" ng-show="saveData.type == const.BACKUP_TYPE_ACCOUNT">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Backup Contains") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12 text-left">
                                <div ng-repeat="type in account_types" style="margin-bottom: 3px;">
                                    <div class="pretty p-default p-curve p-smooth">
                                        <input aria-label="{{ type.label }} checkbox" type="checkbox" id="contains_{{type.value}}" ng-checked="typeChecked(type.value, saveData.contains)" ng-click="toggleContains(type.value)" value="{{ type.value }}" ng-disabled="backupTypesDisabled[type.value]" />
                                        <div aria-label="{{ type.label }} checkbox" class="state p-primary"><label for="contains_{{type.value}}">{{ type.label }}</label></div>
                                    </div>
                                    <div class="pretty p-default p-curve p-smooth" ng-show="type.value == const.BACKUP_TYPE_ACCOUNT_DATABASES && typeChecked(const.BACKUP_TYPE_ACCOUNT_DATABASES, saveData.contains)">
                                        <div class="pretty p-default p-curve p-smooth">
                                            <input id="op_exclude_databases" type="checkbox" ng-checked="typeChecked(const.ACCOUNT_BACKUP_OPTION_EXCLUDE_DATABASES, saveData.options)" ng-click="toggleOptionsTypes(const.ACCOUNT_BACKUP_OPTION_EXCLUDE_DATABASES)" />
                                            <div class="state p-primary"><label for="op_exclude_databases">{{ lang.t("Exclude Databases") }}</label></div>
                                        </div>
                                        <div ng-show="typeChecked(const.ACCOUNT_BACKUP_OPTION_EXCLUDE_DATABASES, saveData.options)" class="pretty p-default p-curve p-smooth" style="top: -4px;">
                                            <button type="button" ng-click="databasesExcludes()" class="btn btn-xxs btn-primary">
                                                {{ lang.t("Edit Excludes") }}
                                            </button>
                                        </div>
                                    </div>
                                    <div class="pretty p-default p-curve p-smooth" ng-show="type.value == const.BACKUP_TYPE_ACCOUNT_EMAILS && typeChecked(const.BACKUP_TYPE_ACCOUNT_EMAILS, saveData.contains)">
                                        <input id="dontkeepstructure" type="checkbox" ng-checked="!typeChecked(const.ACCOUNT_BACKUP_OPTION_EMAIL_STRUCTURE_ONLY, saveData.options)" ng-click="toggleOptionsTypes(const.ACCOUNT_BACKUP_OPTION_EMAIL_STRUCTURE_ONLY)" />
                                        <div class="state p-primary"><label for="dontkeepstructure">{{ lang.t("Include Emails Contents") }}</label></div>
                                    </div>
                                    <div class="pretty p-default p-curve p-smooth" ng-show="type.value == const.BACKUP_TYPE_ACCOUNT_EMAILS && typeChecked(const.BACKUP_TYPE_ACCOUNT_EMAILS, saveData.contains) && !typeChecked(const.ACCOUNT_BACKUP_OPTION_EMAIL_STRUCTURE_ONLY, saveData.options)" tooltip="top|Will exclude trash, spam, junk and drafts directories">
                                        <input id="excludejunk" type="checkbox" ng-checked="!typeChecked(const.ACCOUNT_BACKUP_OPTION_EMAIL_INCLUDE_JUNK, saveData.options)" ng-click="toggleOptionsTypes(const.ACCOUNT_BACKUP_OPTION_EMAIL_INCLUDE_JUNK)" />
                                        <div class="state p-primary"><label for="excludejunk">{{ lang.t("Exclude Junk") }}</label></div>
                                    </div>

                                    <p class="help-block" style="font-size: 11px; color: #cc0000;" ng-show="type.value == const.BACKUP_TYPE_ACCOUNT_EMAILS && typeChecked(const.BACKUP_TYPE_ACCOUNT_EMAILS, saveData.contains) && typeChecked(const.ACCOUNT_BACKUP_OPTION_EMAIL_STRUCTURE_ONLY, saveData.options)">{{lang.t("Warning: Not including email contents will include ONLY email structure, all Emails contents won't be backed up")}}</p>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Backup Structure") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="pretty p-default p-round p-smooth" ng-repeat="structure in structures">
                                    <input type="radio" ng-disabled="saveData.type == const.BACKUP_TYPE_JB_CONFIG" ng-model="saveData.structure" id="structure_{{structure.value}}" ng-checked="saveData.structure === structure.value" value="{{ structure.value }}" />
                                    <div class="state p-primary"><label for="structure_{{structure.value}}">{{ structure.label }}</label></div>
                                </div>
                                <p class="help-block">{{ lang.t("Incremental - Copy only files that have changed or are new since the last full incremental backup.") }}</p>
                            </div>
                        </div>
                        <div class="form-group" ng-show="saveData.structure == const.BACKUP_STRUCTURE_ARCHIVED || saveData.structure == const.BACKUP_STRUCTURE_COMPRESSED">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Encrypted Backups") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="pretty p-default p-round p-smooth">
                                    <input ng-disabled="saveData.type == const.BACKUP_TYPE_JB_CONFIG" aria-label="{{ lang.t('Radio button, Enable encrypted mode, no') }}" type="radio" ng-model="saveData.encrypted" id="enabled_0" ng-checked="saveData.encrypted == 0" value="0" />
                                    <div class="state p-primary"><label for="enabled_0">{{ lang.t("No") }}</label></div>
                                </div>
                                <div class="pretty p-default p-round p-smooth">
                                    <input ng-disabled="saveData.type == const.BACKUP_TYPE_JB_CONFIG" aria-label="{{ lang.t('Radio button, Enable encrypted mode, yes') }}" type="radio" ng-model="saveData.encrypted" id="enabled_1" ng-checked="saveData.encrypted == 1" value="1" />
                                    <div class="state p-primary"><label for="enabled_1">{{ lang.t("Yes") }}</label></div>
                                </div>
                                <p class="help-block">
                                    {{ lang.t("Choose whether the backups will be encrypted on backup destination or not. Please note that all accounts with encrypted backups enabled will be automatically excluded from unencrypted backup jobs") }}
                                    <span ng-show="saveData.encrypted == 1" style="color: #e14f4f; font-weight: bold;"><br />{{ lang.t("WARNING: Please remember to enable \"Export JB Config\" on a Destination and save your Master Encryption Key to restore Encrypted backups in Disaster Recovery!") }}</span>
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Retry failed items") }}</label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="pretty p-default p-round p-smooth">
                                    <input aria-label="{{ lang.t('Radio button, Retry failed items, no') }}" type="radio" ng-model="saveData.retry_failed" id="retry_failed_0" ng-checked="saveData.retry_failed == 0" value="0" />
                                    <div class="state p-primary"><label for="retry_failed_0">{{ lang.t("No") }}</label></div>
                                </div>
                                <div class="pretty p-default p-round p-smooth">
                                    <input aria-label="{{ lang.t('Radio button, Retry failed items, yes') }}" type="radio" ng-model="saveData.retry_failed" id="retry_failed_1" ng-checked="saveData.retry_failed == 1" value="1" />
                                    <div class="state p-primary"><label for="retry_failed_1">{{ lang.t("Yes") }}</label></div>
                                </div>
                                <p class="help-block">{{ lang.t("Choose whether you want to retry backing up failed items for one more time.") }}</p>
                            </div>
                        </div>
                        <div class="form-group" ng-show="saveData.type == const.BACKUP_TYPE_ACCOUNT">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Account Filters") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <ul class="list-unstyled schedules timeline">
                                    <li ng-repeat="filter in filtersStructure track by $index" style="border: 0;">
                                        <div class="filter-separator" ng-show="filter.cond">
                                            <select id="filter_{{filter._id}}" class="form-control" style="width: 100px;" data-ng-options="condition._id as condition.name for condition in filtersConditions" data-ng-model="filter.cond"></select>
                                        </div>
                                        <div class="block_content" style="padding: 10px 0;">
                                            <h2 class="title">
                                                <em aria-hidden="true"  class="fas fa-filter"></em>
                                                <label for="filter_{{filter._id}}">{{ filters[filter._id].name }}</label>
                                                |
                                                <a href="" class="filter-sort"  ng-click="upFilter($index)" uib-tooltip="{{ lang.t('Move Filter Up') }}" ng-class="{ 'disabled': $index == 0 }"><em aria-hidden="true"  class="fas fa-arrow-circle-up"></em></a>
                                                <a href="" class="filter-sort"  ng-click="downFilter($index)" uib-tooltip="{{ lang.t('Move Filter Down') }}" ng-class="{ 'disabled': $index == (filtersStructure.length-1) }"><em aria-hidden="true"  class="fas fa-arrow-circle-down"></em></a>
                                                <a href="" ng-click="removeFilter($index)" uib-tooltip="{{ lang.t('Remove Filter') }}"><em aria-hidden="true"  class="fas fa-times"></em></a>
                                            </h2>
                                            <!--div class="byline"><span>{{ filters[filter._id].type }}</span></div-->
                                        </div>
                                    </li>
                                    <li ng-if="!saveData.filters.length">{{ lang.t("Backup all accounts. (add account filters to filter out accounts)") }}</li>
                                </ul>
                                <button type="button" ng-click="filterSelection()" class="btn btn-primary" style="margin-bottom: 10px;">
                                    <em aria-hidden="true"  class="fas fa-plus"></em>
                                    {{ lang.t("Add another Account Filter") }}
                                </button>
                            </div>
                        </div>
                        <div class="form-group" ng-show="saveData.type == const.BACKUP_TYPE_DIRECTORY">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Directories and Files to include") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">

                                <a href="" class="btn btn-primary" ng-click="fileBrowse()">{{ lang.t("Select Files") }}</a>
                                <button type="button" class="btn btn-primary" ng-click="addMultiListRow('include', saveData.include_list)">{{ lang.t("Insert Multiple") }}</button>

                                <p class="help-block">{{ lang.t("The include path must not contains a symlink within the path tree. Only paths ending in a symlink are allowed.") }}</p>
                                <div class="include-btns">
                                    <button type="button" ng-click="saveData.include_list.splice($index, 1)" class="btn btn-primary btn-xs" ng-repeat="include in saveData.include_list track by $index">
                                        <em aria-hidden="true"  class="fas fa-times"></em> &nbsp;
                                        {{ include }}
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="form-group" ng-hide="saveData.type == const.BACKUP_TYPE_JB_CONFIG">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="exclude_list">{{ lang.t("Directories and Files to exclude") }}</label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="input-group">
                                    <input id="exclude_list" class="form-control" ng-model="excluderow" type="text" value="" />
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-primary" ng-click="addListRow('excluderow', saveData.exclude_list)">{{ lang.t("Add Path") }}</button>
                                        <button type="button" class="btn btn-primary" ng-click="addMultiListRow('exclude', saveData.exclude_list)">{{ lang.t("Insert Multiple") }}</button>
                                    </div>
                                </div>
                                <p class="help-block">
                                    <button ng-show="saveData.type == const.BACKUP_TYPE_ACCOUNT" class="btn btn-primary btn-xs" style="margin-bottom: 3px;" ng-click="addRecommendedExcludes('basic')">{{lang.t("Add Recommended Excludes")}}</button><br />
                                    {{ lang.t("Recommendations for files / folders to exclude in the following link:") }}<a href="{{const.DOCS_ADMIN_URL}}/backupJobs.html#directories-and-files-to-include" target="_blank">{{const.DOCS_ADMIN_URL}}/backupJobs.html#directories-and-files-to-include</a>
                                </p>
                                <div class="include-btns">
                                    <button type="button" ng-click="saveData.exclude_list.splice($index, 1)" class="btn btn-primary btn-xs" ng-repeat="exclude in saveData.exclude_list track by $index">
                                        <em aria-hidden="true"  class="fas fa-times"></em>&nbsp;&nbsp;
                                        {{ exclude }}
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Schedules") }} <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="alert alert-danger" ng-show="scheduleTimeMismatch">
                                    {{ lang.t("Please note that your selected schedules is not set to run in the same time. This will cause in generating multiple snapshots in the same day. It is highly recommended to setup schedules with the same execution time.") }}
                                </div>
                                <ul class="list-unstyled schedules timeline">
                                    <li ng-repeat="schedule in saveData.schedules" style="padding: 5px;">
                                        <div class="block_content">
                                            <h2 class="title">
                                                <em aria-hidden="true"  class="fas fa-calendar"></em>
                                                {{ schedules[schedule._id].name }}
                                                <span style="font-size: 10px;">{{ lang.t("Retain %s Backups", schedule.retain) }}</span>
                                                |
                                                <a href="" ng-click="scheduleSelection(schedule)" uib-tooltip="{{ lang.t('Manage Schedule') }}"><em aria-hidden="true"  class="fas fa-cog"></em></a>
                                                <a href="" ng-click="removeSchedule(schedule)" uib-tooltip="{{ lang.t('Remove Schedule') }}"><em aria-hidden="true"  class="fas fa-times"></em></a>
                                            </h2>
                                            <div class="byline"><span>{{ schedules[schedule._id].display }}</span></div>
                                        </div>
                                    </li>
                                    <li ng-if="!saveData.schedules.length">{{ lang.t("No schedules was set for this backup job") }}</li>
                                </ul>
                                <button type="button" ng-click="scheduleSelection()" class="btn btn-primary" style="margin-bottom: 10px;">
                                    <em aria-hidden="true"  class="fas fa-plus"></em>
                                    {{ lang.t("Add another Schedule") }}
                                </button>
                            </div>
                        </div>
                        <div class="form-group" ng-hide="hideTime()">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="time">{{ lang.t("Schedule Time") }}</label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <div class="input-group" moment-picker="saveData.time_parsed" format="hh:mm A" show-header="false">
                                    <span class="input-group-addon">
                                        <em aria-hidden="true"  class="far fa-clock"></em>
                                    </span>
                                    <input class="form-control" id="time" placeholder="{{ lang.t('Select a time') }}" ng-model="saveData.time_parsed" ng-model-options="{ updateOn: 'blur' }">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">{{ lang.t("Monitor") }}</label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <input-dropdown options="{0:lang.t('Disabled'),1:1,2:2,3:3,5:5}" ng-model="saveData.monitor.notran" prefix="{{lang.t('Notify me if there were no backups for')}}" addon="{{lang.t('Days')}}">
                                    <input validate-field="int" min="0" class="form-control" ng-model="saveData.monitor.notran" id="monitor_notran" type="text" value="" />
                                </input-dropdown>
                                <input-dropdown options="{0:lang.t('Disabled'),1:1,2:2,3:3,5:5}" ng-model="saveData.monitor.ranfor" prefix="{{lang.t('Notify me if backup runs more than')}}" addon="{{lang.t('Days')}}">
                                    <input validate-field="int" min="0" class="form-control" ng-model="saveData.monitor.ranfor" id="monitor_ranfor" type="text" value="" />
                                </input-dropdown>
                            </div>
                        </div>

                        <div class="ln_solid"></div>
                        <div class="form-group">
                            <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" ng-if="changed">
                                <button type="button" class="btn btn-default" ng-click="cancel()">{{ lang.t("Cancel") }}</button>
                                <button type="button" class="btn btn-primary" ng-click="saveChanges(true)" ng-disabled="saveing">{{ lang.t("Apply") }}</button>
                                <button type="button" class="btn btn-primary" ng-click="saveChanges()" ng-disabled="saveing">{{ lang.t("Save") }}</button>
                            </div>
                            <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" ng-if="!changed">
                                <a href="{{primaryURL}}/backupJobs" class="btn btn-default"  ng-click="changeView('/backupJobs')">{{ lang.t("Back to Backup Jobs") }}</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

Zerion Mini Shell 1.0