Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions api/utils/requestProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,17 +828,6 @@ const processRequest = (params) => {
});
});
break;
case 'stop':
validateUserForWrite(params, () => {
taskmanager.stopTask({
db: common.db,
id: params.qstring.task_id,
op_id: params.qstring.op_id
}, (err, res) => {
common.returnMessage(params, 200, res);
});
});
break;
case 'delete':
validateUserForWrite(params, () => {
taskmanager.deleteResult({
Expand Down
9 changes: 1 addition & 8 deletions api/utils/taskmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const log = require('./log.js')('core:taskmanager');
* }, outputData:function(err, data){
* common.returnOutput(params, data);
* }
* }));
* }));
*/
taskmanager.longtask = function(options) {
options.db = options.db || common.db;
Expand Down Expand Up @@ -224,9 +224,6 @@ taskmanager.createTask = function(options, callback) {
update.subtask_key = options.subtask_key || "";
update.taskgroup = options.taskgroup || false;
update.linked_to = options.linked_to;
if (options.comment_id) {
update.comment_id = options.comment_id;
}
if (options.subtask && options.subtask !== "") {
update.subtask = options.subtask;
var updateSub = {$set: {}};
Expand Down Expand Up @@ -1043,10 +1040,6 @@ taskmanager.rerunTask = function(options, callback) {
});
};

taskmanager.stopTask = function(options, callback) {
callback(null, "Operation could not be stopped");
};

/**
* Create a callback for getting result, including checking gridfs
* @param {function} callback - callback for the result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@
canDeleteReport: function() {
return countlyGlobal.member.global_admin || countlyGlobal.admin_apps[countlyCommon.ACTIVE_APP_ID];
},
canStopReport: function() {
return countlyGlobal.member.global_admin || countlyGlobal.admin_apps[countlyCommon.ACTIVE_APP_ID];
},
query: function() {
var q = {};
if (this.fixedOrigin) {
Expand Down Expand Up @@ -316,14 +313,6 @@
isDownloadable: function(row) {
return ["views", "dbviewer", "tableExport"].includes(row.type);
},
isStopable: function(row) {
if (row.status === "running" && row.op_id && row.comment_id) {
return true;
}
else {
return false;
}
},
isReadyForView: function(row) {
if (row.linked_to) {
if (row.have_dashboard_widget) {
Expand All @@ -342,7 +331,6 @@
},
handleCommand: function(command, row) {
var id = row._id,
op_id = row.op_id,
self = this;

if (id) {
Expand Down Expand Up @@ -378,23 +366,6 @@
});
}, [CV.i18n("common.no-dont-do-that"), CV.i18n("taskmanager.yes-rerun-task")], {title: CV.i18n("taskmanager.confirm-rerun-title"), image: "rerunning-task"});
}
else if (command === "stop-task") {
CountlyHelpers.confirm(CV.i18n("taskmanager.confirm-stop"), "popStyleGreen", function(result) {
if (!result) {
return true;
}
self.refresh();
countlyTaskManager.stop(id, op_id, function(res, error) {
if (res.result === "Success") {
countlyTaskManager.monitor(id, true);
self.refresh();
}
else {
CountlyHelpers.alert(error, "red");
}
});
}, [CV.i18n("common.no-dont-do-that"), CV.i18n("taskmanager.yes-stop-task")], {title: CV.i18n("taskmanager.confirm-stop-title"), image: "rerunning-task"});
}
else if (command === "view-task") {
self.$emit("view-task", row);
if (!this.disableAutoNavigationToTask) {
Expand Down
Loading