Merge pull request #3433 from pblasquez/ajax_headers_2

Ajax headers for dashboard/config forms
This commit is contained in:
Neil Lathwood
2016-04-30 00:39:10 +01:00
9 changed files with 10 additions and 0 deletions
@@ -21,6 +21,7 @@
* @package LibreNMS
* @subpackage Dashboards
*/
header('Content-type: application/json');
$status = 'error';
$message = 'unknown error';
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
// FUA
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
// FUA
+1
View File
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: application/json');
if (is_admin() === false) {
$response = array(
@@ -21,6 +21,7 @@
* @package LibreNMS
* @subpackage Dashboards
*/
header('Content-type: application/json');
$status = 'error';
$message = 'unknown error';
@@ -21,6 +21,7 @@
* @package LibreNMS
* @subpackage Dashboards
*/
header('Content-type: application/json');
$status = 'error';
$message = 'unknown error';
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: application/json');
if (is_admin() === false) {
$response = array(
@@ -13,6 +13,7 @@
*/
if (is_admin() === false) {
header('Content-type: text/plain');
die('ERROR: You need to be admin');
}
@@ -99,4 +100,5 @@ $response = array(
'status' => $status,
'message' => $message,
);
header('Content-type: application/json');
echo _json_encode($response);
@@ -1,4 +1,5 @@
<?php
header('Content-type: application/json');
$status = 'error';
$message = 'Error updating user dashboard config';