1. fixed commands with quotes bug

2. Changed Startup macro from @startup to @reboot
This commit is contained in:
Suresh Alse
2015-06-13 22:10:37 +05:30
parent 848bf44f3a
commit 41ca8a72c7
6 changed files with 11 additions and 7 deletions

View File

@@ -11,8 +11,7 @@
$(function () {
// initialize tooltips
$('[data-toggle="tooltip"]').tooltip();
// TODO handle the commands with quotes
crontabs = JSON.parse('<%- crontabs %>');
crontabs = JSON.parse('<%- crontabs.replace(/\\\"/g,"\\\\\"") %>');
routes = JSON.parse('<%- routes %>');
})
</script>

View File

@@ -45,7 +45,7 @@
<label>Command</label>
<input type='text' class='form-control' id='job-command' onkeyup="job_command = $(this).val(); job_string();"/><br />
<label>Quick Schedule</label><br />
<a class="btn btn-primary" onclick="schedule = '@startup'; job_string();">Startup</a>
<a class="btn btn-primary" onclick="schedule = '@reboot'; job_string();">Startup</a>
<a class="btn btn-primary" onclick="schedule = '@hourly'; job_string();">Hourly</a>
<a class="btn btn-primary" onclick="schedule = '@daily'; job_string();">Daily</a>
<a class="btn btn-primary" onclick="schedule = '@monthly'; job_string();">Monthly</a>

View File

@@ -11,8 +11,7 @@
$(function () {
// initialize tooltips
$('[data-toggle="tooltip"]').tooltip();
// TODO handle the commands with quotes
crontabs = JSON.parse('<%- crontabs %>');
crontabs = JSON.parse('<%- crontabs.replace(/\\\"/g,"\\\\\"") %>');
routes = JSON.parse('<%- routes %>');
})
</script>