Index: /branches/amp_3_7_2/extensions/auditing/webui/engine/export/export.controller.js
===================================================================
--- /branches/amp_3_7_2/extensions/auditing/webui/engine/export/export.controller.js	(revision 2825)
+++ /branches/amp_3_7_2/extensions/auditing/webui/engine/export/export.controller.js	(working copy)
@@ -3,8 +3,9 @@
         '$scope',
         '$rootScope',
         'engineService',
+        'storageService',
         '$interval',
-        function ($scope, $rootScope, engineService, $interval) {
+        function ($scope, $rootScope, engineService, storageService, $interval) {
             $rootScope.title = 'Export Logs';
             $scope.exportData = {
                 location: 'primary',
@@ -17,41 +18,70 @@
             $scope.isExporting = false;
             $scope.message = '';
             $scope.error = '';
+            $scope.isSecondaryAvailable = false;
 
             var statusInterval;
 
+            function checkSecondaryDisk() {
+                return storageService.getSecondaryDriveInfo().then(function (res) {
+                    if (res && res.data && res.data.is_disk_available) {
+                        $scope.isSecondaryAvailable = true;
+                        return true;
+                    } else {
+                        $scope.isSecondaryAvailable = false;
+                        return false;
+                    }
+                }, function () {
+                    $scope.isSecondaryAvailable = false;
+                    return false;
+                });
+            }
+            checkSecondaryDisk();
+
             $scope.startExport = function () {
-                $scope.isExporting = true;
-                $scope.message = '';
-                $scope.error = '';
-                $scope.exportStatus = 'unknown';
+                if ($scope.exportData.location === 'secondary') {
+                    checkSecondaryDisk().then(function (isAvailable) {
+                        if (isAvailable) {
+                            proceedExport();
+                        } else {
+                            $scope.error = "Secondary storage is not available.";
+                        }
+                    });
+                } else {
+                    proceedExport();
+                }
 
-                var payload = {
-                    location: $scope.exportData.location
-                };
+                function proceedExport() {
+                    $scope.isExporting = true;
+                    $scope.message = '';
+                    $scope.error = '';
+                    $scope.exportStatus = 'unknown';
 
-                if ($scope.exportData.location === 'custom') {
-                    payload.ip = $scope.exportData.ip;
-                    payload.username = $scope.exportData.username;
-                    payload.password = $scope.exportData.password;
-                    payload.path = $scope.exportData.path;
-                }
+                    var payload = {
+                        location: $scope.exportData.location
+                    };
 
-                engineService.exportSnapshot(payload).then(function (response) {
-                    var msg = response.data && response.data.message;
-                    if (msg && (msg.indexOf("Error") !== -1 || msg.indexOf("ERROR") !== -1)) {
+                    if ($scope.exportData.location === 'custom') {
+                        payload.ip = $scope.exportData.ip;
+                        payload.username = $scope.exportData.username;
+                        payload.password = $scope.exportData.password;
+                        payload.path = $scope.exportData.path;
+                    }
+
+                    engineService.exportSnapshot(payload).then(function (response) {
+                        var msg = response.data && response.data.message;
                         $scope.isExporting = false;
-                        $scope.error = msg;
-                    } else {
+                        if (msg && (msg.indexOf("Error") !== -1 || msg.indexOf("ERROR") !== -1)) {
+                            $scope.error = msg;
+                        } else {
+                            $scope.message = msg;
+                            startStatusPolling();
+                        }
+                    }, function (error) {
                         $scope.isExporting = false;
-                        $scope.exportStatus = 'Successful';
-                        $scope.message = msg;
-                        startStatusPolling();
-                    }
-                }, function (error) {
-                    $scope.isExporting = false;
-                    $scope.error = error.data && error.data.message ? error.data.message : '';
-                });
+                        $scope.error = error.data && error.data.message ? error.data.message : 'Export failed';
+                    });
+                }
             };
 
             function startStatusPolling() {
@@ -60,7 +90,10 @@
                 statusInterval = $interval(function () {
                     engineService.getExportStatus().then(function (response) {
                         $scope.exportStatus = response.data.status;
-                        if ($scope.exportStatus === 'Successful' || $scope.exportStatus === 'Error' || $scope.exportStatus === 'unknown') {
+                        $scope.failedAt = response.data.failed_at;
+                        $scope.completedAt = response.data.completed_at;
+
+                        if ($scope.exportStatus === 'Successful' || $scope.exportStatus === 'Failed' || $scope.exportStatus === 'Error' || $scope.exportStatus === 'unknown') {
                             stopStatusPolling();
                             $scope.isExporting = false;
                         }
Index: /branches/amp_3_7_2/extensions/auditing/webui/engine/export/export.html
===================================================================
--- /branches/amp_3_7_2/extensions/auditing/webui/engine/export/export.html	(revision 2825)
+++ /branches/amp_3_7_2/extensions/auditing/webui/engine/export/export.html	(working copy)
@@ -15,10 +15,11 @@
                                     {{ 'Primary' | T }}
                                 </label>
                             </div>
-                            <div class="radio">
+                            <div class="radio" ng-if="isSecondaryAvailable">
                                 <label>
-                                    <input type="radio" ng-model="exportData.location" value="secondary">
-                                    {{ 'Secondary' | T }}
+                                    <input type="radio" ng-model="exportData.location" value="secondary"
+                                        ng-if="isSecondaryAvailable">
+                                    <span ng-if="isSecondaryAvailable">{{ 'Secondary' | T }}</span>
                                 </label>
                             </div>
                             <div class="radio">
@@ -72,10 +73,12 @@
                 </div>
                 <div class="alert alert-success" style="margin: 20px;" ng-if="exportStatus === 'Successful'">
                     {{ 'Export completed successfully.' | T }}
+                    <div ng-if="completedAt" style="margin-top: 5px;">{{ 'Completed at:' | T }} {{ completedAt }}</div>
                 </div>
                 <div class="alert alert-danger" style="margin: 20px;"
-                    ng-if="!isExporting && exportStatus !== 'Successful' && (exportStatus === 'Error' || error || message)">
+                    ng-if="!isExporting && exportStatus !== 'Successful' && (exportStatus === 'Error' || exportStatus === 'Failed' || error || message)">
                     {{ 'Export failed.' | T }}
+                    <div ng-if="failedAt" style="margin-top: 5px;">{{ 'Failed at:' | T }} {{ failedAt }}</div>
                     <pre ng-if="error" style="margin-top: 10px; white-space: pre-wrap;">{{ error }}</pre>
                 </div>
             </div>
Index: /branches/amp_3_7_2/extensions/auditing/webui/engine/import/import.controller.js
===================================================================
--- /branches/amp_3_7_2/extensions/auditing/webui/engine/import/import.controller.js	(revision 2825)
+++ /branches/amp_3_7_2/extensions/auditing/webui/engine/import/import.controller.js	(working copy)
@@ -3,8 +3,9 @@
         '$scope',
         '$rootScope',
         'engineService',
+        'storageService',
         '$interval',
-        function ($scope, $rootScope, engineService, $interval) {
+        function ($scope, $rootScope, engineService, storageService, $interval) {
             $rootScope.title = 'Import Logs';
             $scope.importData = {
                 type: 'amp', // 'amp' or 'remote'
@@ -20,6 +21,7 @@
             $scope.isImporting = false;
             $scope.message = '';
             $scope.error = '';
+            $scope.isSecondaryAvailable = true;
 
             var statusInterval;
 
@@ -33,43 +35,48 @@
                     return;
                 }
 
-                $scope.isImporting = true;
+                proceedImport();
 
-                var payload = {
-                    ip: $scope.importData.ip,
-                    username: $scope.importData.username,
-                    password: $scope.importData.password
-                };
+                function proceedImport() {
+                    $scope.isImporting = true;
+                    $scope.message = '';
+                    $scope.error = '';
+                    $scope.importStatus = 'unknown';
 
-                if ($scope.importData.type === 'amp') {
-                    payload.location = $scope.importData.location;
-                } else {
-                    payload.location = 'custom';
-                    payload.path = $scope.importData.path;
-                }
+                    var payload = {
+                        ip: $scope.importData.ip,
+                        username: $scope.importData.username,
+                        password: $scope.importData.password
+                    };
 
-                if ($scope.importData.start_date) {
-                    payload.start_date = formatDate($scope.importData.start_date);
-                }
-                if ($scope.importData.end_date) {
-                    payload.end_date = formatDate($scope.importData.end_date);
-                }
+                    if ($scope.importData.type === 'amp') {
+                        payload.location = $scope.importData.location;
+                    } else {
+                        payload.location = 'custom';
+                        payload.path = $scope.importData.path;
+                    }
 
-                engineService.importSnapshot(payload).then(function (response) {
-                    var msg = response.data && response.data.message;
-                    if (msg && (msg.indexOf("Error") !== -1 || msg.indexOf("ERROR") !== -1)) {
+                    if ($scope.importData.start_date) {
+                        payload.start_date = formatDate($scope.importData.start_date);
+                    }
+                    if ($scope.importData.end_date) {
+                        payload.end_date = formatDate($scope.importData.end_date);
+                    }
+
+                    engineService.importSnapshot(payload).then(function (response) {
+                        var msg = response.data && response.data.message;
                         $scope.isImporting = false;
-                        $scope.error = msg;
-                    } else {
+                        if (msg && (msg.indexOf("Error") !== -1 || msg.indexOf("ERROR") !== -1)) {
+                            $scope.error = msg;
+                        } else {
+                            $scope.message = msg;
+                            startStatusPolling();
+                        }
+                    }, function (error) {
                         $scope.isImporting = false;
-                        $scope.importStatus = 'Successful';
-                        $scope.message = msg;
-                        startStatusPolling();
-                    }
-                }, function (error) {
-                    $scope.isImporting = false;
-                    $scope.error = error.data && error.data.message ? error.data.message : '';
-                });
+                        $scope.error = error.data && error.data.message ? error.data.message : 'Import failed';
+                    });
+                }
             };
 
             function formatDate(date) {
@@ -91,7 +98,10 @@
                 statusInterval = $interval(function () {
                     engineService.getImportStatus().then(function (response) {
                         $scope.importStatus = response.data.status;
-                        if ($scope.importStatus === 'Successful' || $scope.importStatus === 'unknown') {
+                        $scope.failedAt = response.data.failed_at;
+                        $scope.completedAt = response.data.completed_at;
+
+                        if ($scope.importStatus === 'Successful' || $scope.importStatus === 'Failed' || $scope.importStatus === 'unknown') {
                             stopStatusPolling();
                             $scope.isImporting = false;
                         }
Index: /branches/amp_3_7_2/extensions/auditing/webui/engine/import/import.html
===================================================================
--- /branches/amp_3_7_2/extensions/auditing/webui/engine/import/import.html	(revision 2825)
+++ /branches/amp_3_7_2/extensions/auditing/webui/engine/import/import.html	(working copy)
@@ -30,7 +30,8 @@
                             <div class="col-sm-8 col-md-5">
                                 <select class="form-control" ng-model="importData.location">
                                     <option value="primary">{{ 'Primary' | T }}</option>
-                                    <option value="secondary">{{ 'Secondary' | T }}</option>
+                                    <option value="secondary" ng-if="isSecondaryAvailable">{{ 'Secondary' | T }}
+                                    </option>
                                 </select>
                             </div>
                         </div>
@@ -95,10 +96,12 @@
                 </div>
                 <div class="alert alert-success" style="margin: 20px;" ng-if="importStatus === 'Successful'">
                     {{ 'Import completed successfully.' | T }}
+                    <div ng-if="completedAt" style="margin-top: 5px;">{{ 'Completed at:' | T }} {{ completedAt }}</div>
                 </div>
                 <div class="alert alert-danger" style="margin: 20px;"
-                    ng-if="!isImporting && importStatus !== 'Successful' && (importStatus === 'Error' || error || message)">
+                    ng-if="!isImporting && importStatus !== 'Successful' && (importStatus === 'Error' || importStatus === 'Failed' || error || message)">
                     {{ 'Import failed.' | T }}
+                    <div ng-if="failedAt" style="margin-top: 5px;">{{ 'Failed at:' | T }} {{ failedAt }}</div>
                     <pre ng-if="error" style="margin-top: 10px; white-space: pre-wrap;">{{ error }}</pre>
                 </div>
             </div>
