Ajax headers for dashboard/config forms

This commit is contained in:
pblasquez
2016-04-26 14:47:03 -07:00
parent add7aeba6b
commit d2be07b49c
9 changed files with 9 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
* @package LibreNMS * @package LibreNMS
* @subpackage Dashboards * @subpackage Dashboards
*/ */
header('Content-type: application/json');
$status = 'error'; $status = 'error';
$message = 'unknown error'; $message = 'unknown error';

View File

@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of * option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details. * the source code distribution for details.
*/ */
header('Content-type: text/plain');
// FUA // FUA

View File

@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of * option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details. * the source code distribution for details.
*/ */
header('Content-type: text/plain');
// FUA // FUA

View File

@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of * option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details. * the source code distribution for details.
*/ */
header('Content-type: application/json');
if (is_admin() === false) { if (is_admin() === false) {
$response = array( $response = array(

View File

@@ -21,6 +21,7 @@
* @package LibreNMS * @package LibreNMS
* @subpackage Dashboards * @subpackage Dashboards
*/ */
header('Content-type: application/json');
$status = 'error'; $status = 'error';
$message = 'unknown error'; $message = 'unknown error';

View File

@@ -21,6 +21,7 @@
* @package LibreNMS * @package LibreNMS
* @subpackage Dashboards * @subpackage Dashboards
*/ */
header('Content-type: application/json');
$status = 'error'; $status = 'error';
$message = 'unknown error'; $message = 'unknown error';

View File

@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of * option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details. * the source code distribution for details.
*/ */
header('Content-type: application/json');
if (is_admin() === false) { if (is_admin() === false) {
$response = array( $response = array(

View File

@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of * option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details. * the source code distribution for details.
*/ */
header('Content-type: application/json');
if (is_admin() === false) { if (is_admin() === false) {
die('ERROR: You need to be admin'); die('ERROR: You need to be admin');

View File

@@ -1,4 +1,5 @@
<?php <?php
header('Content-type: application/json');
$status = 'error'; $status = 'error';
$message = 'Error updating user dashboard config'; $message = 'Error updating user dashboard config';