Commit 987c17de authored by Efthymia Bika's avatar Efthymia Bika

Use child_process.spawn instead of exec

This allows better activity report by streaming output data on screen
and preventing buffer issues.
Also refactored in order to call duplicity from one place only
parent 617a8ba8
...@@ -473,13 +473,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -473,13 +473,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="small-4 columns"> <div class="small-4 columns">
<a id="remove-all-button" class="button radius right small" <a id="remove-all-button" class="button radius right small"
onclick="if(check_remove_all()) { onclick="if(check_remove_all()) {
remove_all($('#remove-all').val(), false); remove_all(false);
$(this).hide()}"> $(this).hide()}">
<i class="fa fa-trash-o"></i>&nbsp;Remove All</a> <i class="fa fa-trash-o"></i>&nbsp;Remove All</a>
</div> </div>
<div class="small-4 columns hide" id="force-delete"> <div class="small-4 columns hide" id="force-delete">
<a id="remove-all-button-force" class="button radius right small alert" <a id="remove-all-button-force" class="button radius right small alert"
onclick="if(check_remove_all()) remove_all($('#remove-all').val(), true)"> onclick="if(check_remove_all()) remove_all(true)">
<i class="fa fa-trash-o"></i>&nbsp;Force Delete</a> <i class="fa fa-trash-o"></i>&nbsp;Force Delete</a>
</div> </div>
</div> </div>
......
...@@ -19,6 +19,7 @@ var mkdirp = require("mkdirp"); ...@@ -19,6 +19,7 @@ var mkdirp = require("mkdirp");
var exec = require('child_process').exec; var exec = require('child_process').exec;
var execFileSync = require('child_process').execFileSync; var execFileSync = require('child_process').execFileSync;
var execFile = require('child_process').execFile; var execFile = require('child_process').execFile;
var spawn = require('child_process').spawn;
var BAAS_HOME_DIR = '.baas'; var BAAS_HOME_DIR = '.baas';
var CLOUDS_CONF_FILE = 'clouds.rc'; var CLOUDS_CONF_FILE = 'clouds.rc';
......
This diff is collapsed.
...@@ -88,6 +88,8 @@ body legend, .template-list-title { ...@@ -88,6 +88,8 @@ body legend, .template-list-title {
#msg, #cleanup-msg { #msg, #cleanup-msg {
word-break: break-word; word-break: break-word;
margin-right: 15px; margin-right: 15px;
overflow: auto;
max-height: 200px;
} }
.dir-field { .dir-field {
overflow-x: auto; overflow-x: auto;
......
...@@ -177,7 +177,7 @@ function load_timeview() { ...@@ -177,7 +177,7 @@ function load_timeview() {
function puts(error, stdout, stderr) { function puts(error, stdout, stderr) {
$("#loader").hide(); $("#loader").hide();
toggle_error(error, stderr); toggle_error(error, stderr);
if(!error) { if(!parse_cloud_error(stderr) && !error) {
var datetime_reg = /\d{4}-\d{2}-\d{2}.\d{2}:\d{2}:\d{2}\s+\d+/g; var datetime_reg = /\d{4}-\d{2}-\d{2}.\d{2}:\d{2}:\d{2}\s+\d+/g;
var dates = stdout.match(datetime_reg); var dates = stdout.match(datetime_reg);
var dates_list = ""; var dates_list = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment