Suresh Alse 8 years ago
parent
commit
e6cfc15103
  1. 3
      crontab.js
  2. 4
      public/js/script.js

3
crontab.js

@ -175,7 +175,8 @@ exports.import_crontab = function(){
var namePrefix = new Date().getTime();
lines.forEach(function(line, index){
var regex = /^((\@[a-zA-Z]+\s)|(([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s))/;
line = line.replace(/\t+/g, ' ');
var regex = /^((\@[a-zA-Z]+\s+)|(([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+))/;
var command = line.replace(regex, '').trim();
var schedule = line.replace(command, '').trim();

4
public/js/script.js

@ -67,7 +67,7 @@ function setCrontab(){
}
function getCrontab(){
messageBox("<p> Do you want to get the crontab file? </p>", "Confirm crontab retrieval", null, null, function(){
messageBox("<p> Do you want to get the crontab file? <br /> <b style='color:red'>NOTE: It is recommended to take a backup before this.</b> And refresh the page after this.</p>", "Confirm crontab retrieval", null, null, function(){
$.get(routes.import_crontab, { "env_vars": $("#env_vars").val() }, function(){
// TODO show only if success
infoMessageBox("Successfuly got the crontab file!","Information");
@ -183,7 +183,7 @@ function setMailConfig(a){
let data = JSON.parse(a.getAttribute("data-json"));
let container = document.createElement("div");
let message = "<p>This is based on nodemailer. Refer <a href='https://github.com/alseambusher/crontab-ui/tree/master/README/mail.md'>this</a> for more details.</p>";
let message = "<p>This is based on nodemailer. Refer <a href='http://lifepluslinux.blogspot.com/2017/03/introducing-mailing-in-crontab-ui.html'>this</a> for more details.</p>";
container.innerHTML += message;
let transporterLabel = document.createElement("label");

Loading…
Cancel
Save