Commit 7e655fcc authored by Julian Bigge's avatar Julian Bigge

Use consistent naming for routes

parent 5626b26c
......@@ -24,13 +24,13 @@ $application = new Application();
$application->registerRoutes($this, [
'routes' => [
['name' => 'page#settings', 'url' => '/settings', 'verb' => 'GET'],
['name' => 'page#save_settings', 'url' => '/save_settings', 'verb' => 'POST'],
['name' => 'page#reset_settings', 'url' => '/reset_settings', 'verb' => 'GET'],
['name' => 'page#load_settings', 'url' => '/load_settings', 'verb' => 'GET'],
['name' => 'page#save_settings', 'url' => '/save-settings', 'verb' => 'POST'],
['name' => 'page#reset_settings', 'url' => '/reset-settings', 'verb' => 'GET'],
['name' => 'page#load_settings', 'url' => '/load-settings', 'verb' => 'GET'],
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'metrics#metrics', 'url' => '/metrics', 'verb' => 'GET'],
['name' => 'metrics#raw_metrics', 'url' => '/metrics/raw', 'verb' => 'GET'],
['name' => 'metrics#raw_histogram', 'url' => '/metrics/raw_histogram', 'verb' => 'GET'],
['name' => 'metrics#raw_histogram', 'url' => '/metrics/raw-histogram', 'verb' => 'GET'],
['name' => 'metrics#metrics_query', 'url' => '/metrics/query', 'verb' => 'POST'],
['name' => 'metrics#metrics_query_save', 'url' => '/metrics/query-save', 'verb' => 'POST'],
['name' => 'metrics#metrics_query_load', 'url' => '/metrics/query-load', 'verb' => 'POST'],
......
......@@ -49,7 +49,7 @@
unit: chartUnit
};
var url = OC.generateUrl('/apps/sccuot/metrics/raw_histogram?operation=' + query['operation'] +
var url = OC.generateUrl('/apps/sccuot/metrics/raw-histogram?operation=' + query['operation'] +
'&histogramBinCount=' + query['histogramBinCount'] + '&unit=' + query['unit']);
window.open(url, '_blank');
});
......
......@@ -13,7 +13,7 @@
$(document).ready(function() {
/* React on save settings button */
$('#settings_button').click(function() {
var url = OC.generateUrl('/apps/sccuot/save_settings');
var url = OC.generateUrl('/apps/sccuot/save-settings');
var settings = {
hostname: $('#settings_hostname').val(),
db: $('#settings_db').val(),
......@@ -38,7 +38,7 @@
});
$('#settings_reset').click(function() {
var url = OC.generateUrl('/apps/sccuot/reset_settings');
var url = OC.generateUrl('/apps/sccuot/reset-settings');
$.get(url).success(function(response) {
$('#settings_hostname').val(response['hostname']);
$('#settings_db').val(response['db']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment