Skip to content

Commit

Permalink
Merge pull request #449 from tengattack/patch/createorupdatejob
Browse files Browse the repository at this point in the history
Update create or update job api endpoint
  • Loading branch information
Victor Castell authored Oct 16, 2018
2 parents 046b1a8 + 5bcea4c commit 8ef00d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dkron.controller('JobListCtrl', function ($scope, $http, $interval, hideDelay) {
return
}
$scope["creating_" + job.name] = true;
var response = $http.post(DKRON_API_PATH + '/jobs/', job);
var response = $http.post(DKRON_API_PATH + '/jobs', job);
response.success(function(data, status, headers, config) {
$('#message').html('<div class="alert alert-success fade in">Success created job ' + job.name + '</div>');

Expand All @@ -100,7 +100,7 @@ dkron.controller('JobListCtrl', function ($scope, $http, $interval, hideDelay) {
return
}
$scope["updating_" + job.name] = true;
var response = $http.post(DKRON_API_PATH + '/jobs/', job);
var response = $http.post(DKRON_API_PATH + '/jobs', job);
response.success(function(data, status, headers, config) {
$('#message').html('<div class="alert alert-success fade in">Success updating job ' + job.name + '</div>');

Expand Down Expand Up @@ -167,7 +167,7 @@ dkron.controller('JobListCtrl', function ($scope, $http, $interval, hideDelay) {
$scope.groupToPages = function () {
$scope.gap = Math.round($scope.jobs.length / $scope.itemsPerPage);
$scope.pagedItems = [];

for (var i = 0; i < $scope.jobs.length; i++) {
if (i % $scope.itemsPerPage === 0) {
$scope.pagedItems[Math.floor(i / $scope.itemsPerPage)] = [ $scope.jobs[i] ];
Expand Down Expand Up @@ -212,7 +212,7 @@ dkron.controller('JobListCtrl', function ($scope, $http, $interval, hideDelay) {
$scope.itemsPerPage = 15;
$scope.pagedItems = [];
$scope.currentPage = 0;

$scope.success_count = 0;
$scope.error_count = 0;
$scope.failed_jobs = 0;
Expand Down

0 comments on commit 8ef00d2

Please sign in to comment.