Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/backup_configuration/views/GoogleTransport.ptt

<h4 class="section-heading">[% locale.maketext("[output,url,_1,Google Drive™,target,_blank] Destination",'https://drive.google.com/') %]</a></h4>
<p class="documentation-info" id="documentation-info">
    [% locale.maketext("For more information on how to properly configure Google Drive as a remote backup destination, read [output,url,_1,our documentation,target,_2].", 'https://go.cpanel.net/GoogleDrive', 'googledrivedoc') %]
    <span class='fas fa-external-link-alt fa-sm'></span>
</p>
<form name="google_transport_config" ng-if="!destinationState.fetching_data" ng-disabled="destinationState.savingDestination || destinationState.validatingDestination" novalidate>
    <div class="section-body">
        <div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <label for="googledrive_name">[% locale.maketext('Destination Name') %]</label>
                    <span class="info-block">[% locale.maketext('Enter a name for this destination.') %]</span>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input ng-model="destinationState.destination.googledrive.name" type="text" name="name" id="googledrive_name" class="form-control" minlength="1" ng-maxlength="256" required/>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6" ng-if="google_transport_config.name.$dirty && (google_transport_config.name.$error.required || google_transport_config.name.$error.maxlength)">
                    <ul class="validation-container">
                        <li class="validation validation-error" ng-if="google_transport_config.name.$error.required">
                            <span class="glyphicon glyphicon-exclamation-sign"></span>
                            <span class="validation-message">
                                [% locale.maketext('You must enter a destination name.') %]
                            </span>
                        </li>
                        <li class="validation validation-error" ng-if="google_transport_config.name.$error.maxlength">
                            <span class="glyphicon glyphicon-exclamation-sign"></span>
                            <span class="validation-message">
                               [% locale.maketext('The destination name must contain between [numf,1] and [numf,256] characters.') %]
                            </span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input ng-model="destinationState.destination.googledrive.upload_system_backup" type="checkbox" name="upload_system_backup" id="googledrive_system"/>
                    <label for="googledrive_system">[% locale.maketext('Transfer System Backups to this Destination') %]</label>
                    <div class="callout callout-warning">[% locale.maketext('[output,strong,Warning:] System Backups contain sensitive security details.') %] [% locale.maketext('You should transfer System Backups over encrypted methods.') %]</div>
                </div>
            </div>
        </div>

		<div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input ng-model="destinationState.destination.googledrive.only_used_for_logs" type="checkbox" name="only_used_for_logs" id="googledrive_logsonly"/>
                    <label for="googledrive_logsonly">[% locale.maketext('Only use this destination for log file transfers[comment,title of option like one above, but looks wrong title cased]') %]</label>
                    <div class="callout callout-warning">[% locale.maketext('[output,strong,Warning:] Enabling this option will prevent it from being used for account and/or system backups.') %] [% locale.maketext('Only enable this option if this destination will only be used for log backups. If it will be used for all backups, leave this unchecked.') %]</div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <label for="googledrive_folder">[% locale.maketext('Folder') %]</label>
                    <span class="info-block">[% locale.maketext('Optional. Specify the path, relative to the account’s home directory, where the system stores backups.') %]</span>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input
                        ng-model="destinationState.destination.googledrive.folder"
                        type="text"
                        name="folder"
                        id="googledrive_folder"
                        class="form-control"
                        backup-location />
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <ul validation-container field-name="folder">
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <label for="googledrive_client_id">[% locale.maketext('Client [asis,ID]') %]</label>
                    <span class="info-block">[% locale.maketext('Enter the client [asis,ID] for the access credentials.') %]</span>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input
                        ng-model="destinationState.destination.googledrive.client_id"
                        type="text"
                        name="client_id"
                        id="googledrive_client_id"
                        class="form-control"
                        ng-trim="false"
                        nospaces
                        required/>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <ul validation-container field-name="client_id">
                        <validation-item
                            field-name="client_id"
                            validation-name="required">
                            [% locale.maketext('You must enter a client [asis,ID] for the remote destination.') %]
			</validation-item>
		    </ul>
		</div>
           </div>
	   <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <label for="googledrive_client_secret">[% locale.maketext('Client secret') %]</label>
                    <span class="info-block">[% locale.maketext('Enter the client secret for the access credentials.') %]</span>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input
                        ng-model="destinationState.destination.googledrive.client_secret"
                        type="password"
                        name="client_secret"
                        id="googledrive_client_secret"
                        class="form-control"
                        ng-trim="false"
                        required
                        nospaces />
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <ul validation-container field-name="client_secret">
                        <validation-item
                            field-name="client_secret"
                            validation-name="required">
                            [% locale.maketext('You must enter a client secret for the remote destination.') %]
                        </validation-item>
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="row">
                <div id="generate_google_credentials_container" class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <button type="button"
                        cp-action="checkCredentials(destinationState.destination.googledrive.client_id, destinationState.destination.googledrive.client_secret, destinationState.checkCredentialsOnSave)"
                        id="generate_google_credentials"
                        uib-tooltip="[% locale.maketext('Generate the necessary credentials from your client [asis,ID] and client secret.') %]"
                        tooltip-placement="auto right"
                        ng-disabled="!destinationState.destination.googledrive.client_secret.trim().length || !destinationState.destination.googledrive.client_id.trim().length"
                        button-class="btn-default">
                        [% locale.maketext('Generate Credentials') %]
                    </button>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <label for="googledrive_timeout">[% locale.maketext('Timeout') %]</label>
                    <span class="info-block">[% locale.maketext('The number of seconds that the system will wait for a response from the remote server.') %]</span>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <input
                        ng-model="destinationState.destination.googledrive.timeout"
                        type="number"
                        name="timeout"
                        id="googledrive_timeout"
                        ng-keydown="noDecimalPoints($event)"
                        ng-paste="onlyNumbers($event)"
                        class="form-control"
                        min="30"
                        max="300"
                        positive-integer />
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <ul validation-container field-name="timeout">
                        <li validation-item field-name="timeout" validation-name="number">
                            [% std_timeout_number_message %]
                        </li>
                         <li validation-item field-name="timeout" validation-name="min">
                            [% std_timeout_validation_message %]
                        </li>
                        <li validation-item field-name="timeout" validation-name="max">
                            [% std_timeout_validation_message %]
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    <div id="save_config">
                        <button type="submit" id="google_save_destination_btn" cp-action="saveDestination(destinationState.destination)" ng-disabled="google_transport_config.$pristine || google_transport_config.$invalid || destinationState.savingDestination || destinationState.validatingDestination">[% locale.maketext('Save Destination') %]</button>
                        <button type="button" id="google_save_and_validate_destination" button-class="btn-default" cp-action="saveAndValidateDestination(destinationState.destination)" ng-disabled="google_transport_config.$pristine || google_transport_config.$invalid || destinationState.savingDestination || destinationState.validatingDestination">[% locale.maketext('Save and Validate Destination') %]</button>
                        <button type="button" class="btn btn-link" id="cancel_destination" ng-click="cancelDestination()" ng-disabled="destinationState.savingDestination || destinationState.validatingDestination">[% locale.maketext('Cancel') %]</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
Back to Directory File Manager