Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Mon 3291 minor fixes on page load (#7191)
Browse files Browse the repository at this point in the history
* fix(log): graphs template BE's on load error fix

* fix(api): correct the error on the add curve load

* fix(api): correct the error on the add metric load
  • Loading branch information
sc979 authored Feb 18, 2019
1 parent 149b7a0 commit 60965b4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
11 changes: 7 additions & 4 deletions www/include/views/componentTemplates/formComponentTemplate.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -108,8 +108,11 @@
'<br /><br />{remove}</td><td><div class="ams">{label_3}</div>{selected}</td></tr></table>';

$availableRoute = './include/common/webServices/rest/internal.php?object=centreon_configuration_service&action=list';
$defaultRoute = './include/common/webServices/rest/internal.php?object=centreon_configuration_objects' .
'&action=defaultValues&target=graphCurve&field=host_id&id=' . $compo_id;

if ($o !== "a") {
$defaultRoute = './include/common/webServices/rest/internal.php?object=centreon_configuration_objects' .
'&action=defaultValues&target=graphCurve&field=host_id&id=' . $compo_id;
}
$attrServices = array(
'datasourceOrigin' => 'ajax',
'availableDatasetRoute' => $availableRoute,
Expand Down
6 changes: 4 additions & 2 deletions www/include/views/graphTemplates/listGraphTemplates.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -40,6 +40,7 @@
include("./include/common/autoNumLimit.php");

$SearchTool = null;
$queryValues = array();
$search = null;

if (isset($_POST['searchGT'])) {
Expand All @@ -63,6 +64,7 @@
foreach ($queryValues as $key => $value) {
$stmt->bindValue(':' . $key, $value, \PDO::PARAM_STR);
}

$stmt->execute();

$rows = $pearDB->query("SELECT FOUND_ROWS()")->fetchColumn();
Expand Down
14 changes: 9 additions & 5 deletions www/include/views/virtualMetrics/formVirtualMetrics.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -55,7 +55,7 @@
$p_qy->closeCursor();
}
/*
* Database retrieve information for differents elements list we need on the page
* Database retrieve information and list the different elements we need on the page
*
* Existing Data Index List comes from DBO -> Store in $indds Array
*/
Expand Down Expand Up @@ -89,9 +89,12 @@
$attrsAdvSelect = array("style" => "width: 200px; height: 100px;");
$attrsTextarea = array("rows" => "4", "cols" => "60");


$availableRoute = './include/common/webServices/rest/internal.php?object=centreon_configuration_service&action=list';
$defaultRoute = './include/common/webServices/rest/internal.php?object=centreon_configuration_graphvirtualmetric' .
'&action=defaultValues&target=graphVirtualMetric&field=host_id&id=' . $vmetricId;
if ($o !== METRIC_ADD) {
$defaultRoute = './include/common/webServices/rest/internal.php?object=centreon_configuration_graphvirtualmetric' .
'&action=defaultValues&target=graphVirtualMetric&field=host_id&id=' . $vmetricId;
}
$attrServices = array(
'datasourceOrigin' => 'ajax',
'availableDatasetRoute' => $availableRoute,
Expand All @@ -100,6 +103,7 @@
'multiple' => false
);


/*
* Form begin
*/
Expand Down

0 comments on commit 60965b4

Please sign in to comment.