Fix change dashboard domain UI issues

This commit is contained in:
Girish Ramakrishnan
2019-01-06 14:52:36 -08:00
parent 67415ff715
commit 428bd43d60
4 changed files with 44 additions and 25 deletions
+2 -2
View File
@@ -662,7 +662,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.tasks[0] || null);
callback(null, data.tasks.length ? data.tasks[0] : null);
});
};
@@ -701,7 +701,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Client.prototype.stopTask = function (taskId, callback) {
post('/api/v1/tasks/' + taskId + '/stop', {}, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));
if (status !== 204) return callback(new ClientError(status, data));
callback(null, data);
});