diff --git a/diffido.py b/diffido.py index 9ff9d01..0663b6d 100755 --- a/diffido.py +++ b/diffido.py @@ -709,19 +709,19 @@ def serve(): _reset_schedules_path = r'schedules/reset' _schedule_run_path = r'schedules/(?P\d+)/run' _schedules_path = r'schedules/?(?P\d+)?' - _history_path = r'history/?(?P\d+)' - _diff_path = r'diff/(?P\d+)/(?P[0-9a-f]+)/?(?P[0-9a-f]+)?/?' + _history_path = r'schedules/?(?P\d+)/history' + _diff_path = r'schedules/(?P\d+)/diff/(?P[0-9a-f]+)/?(?P[0-9a-f]+)?/?' application = tornado.web.Application([ (r'/api/%s' % _reset_schedules_path, ResetSchedulesHandler, init_params), (r'/api/v%s/%s' % (API_VERSION, _reset_schedules_path), ResetSchedulesHandler, init_params), (r'/api/%s' % _schedule_run_path, RunScheduleHandler, init_params), (r'/api/v%s/%s' % (API_VERSION, _schedule_run_path), RunScheduleHandler, init_params), - (r'/api/%s' % _schedules_path, SchedulesHandler, init_params), - (r'/api/v%s/%s' % (API_VERSION, _schedules_path), SchedulesHandler, init_params), (r'/api/%s' % _history_path, HistoryHandler, init_params), (r'/api/v%s/%s' % (API_VERSION, _history_path), HistoryHandler, init_params), (r'/api/%s' % _diff_path, DiffHandler, init_params), (r'/api/v%s/%s' % (API_VERSION, _diff_path), DiffHandler, init_params), + (r'/api/%s' % _schedules_path, SchedulesHandler, init_params), + (r'/api/v%s/%s' % (API_VERSION, _schedules_path), SchedulesHandler, init_params), (r'/?(.*)', TemplateHandler, init_params), ], static_path=os.path.join(os.path.dirname(__file__), 'dist/static'), diff --git a/dist/diff.html b/dist/diff.html index 69eea19..419ebe2 100644 --- a/dist/diff.html +++ b/dist/diff.html @@ -60,7 +60,7 @@ var app = new Vue({ methods: { getDiff: function() { self = this; - var data = axios.get('/api/diff/' + this.id + '/' + this.diff + '/' + (this.oldid || '')).then(function(response) { + var data = axios.get('/api/schedules/' + this.id + '/diff/' + this.diff + '/' + (this.oldid || '')).then(function(response) { self.schedule = response.data.schedule; self.difftext = response.data.diff; var current_size = document.getElementById('diffpanel').offsetWidth; diff --git a/dist/history.html b/dist/history.html index c6e5fdb..b1cda1c 100644 --- a/dist/history.html +++ b/dist/history.html @@ -63,7 +63,7 @@ var app = new Vue({ methods: { getHistory: function() { self = this; - var data = axios.get('/api/history/' + this.id).then(function(response) { + var data = axios.get('/api/schedules/' + this.id + '/history').then(function(response) { self.history = response.data.history; self.updateFilter(); self.schedule = response.data.schedule;