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

Commit

Permalink
enh(charts): add new methods in graph backend (#8170)
Browse files Browse the repository at this point in the history
Refs: MON-4397
  • Loading branch information
garnier-quentin authored and kduret committed Jan 24, 2020
1 parent c371813 commit 082d6ba
Show file tree
Hide file tree
Showing 7 changed files with 558 additions and 248 deletions.
152 changes: 0 additions & 152 deletions www/api/class/centreon_customview.class.php

This file was deleted.

19 changes: 19 additions & 0 deletions www/api/class/centreon_home_customview.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,25 @@ public function getPreferences()
return $tpl->fetch("widgetParam.html");
}

/**
* Get preferences by widget id
*
* @return array The widget preferences
* @throws \Exception When missing argument
*/
public function getPreferencesByWidgetId()
{
global $centreon;

if (!isset($this->arguments['widgetId'])) {
throw new \Exception('Missing argument : widgetId');
}
$widgetId = $this->arguments['widgetId'];
$widgetObj = new CentreonWidget($centreon, $this->pearDB);

return $widgetObj->getWidgetPreferences($widgetId);
}

/**
* Authorize to access to the action
*
Expand Down
Loading

0 comments on commit 082d6ba

Please sign in to comment.