Set an order on metrics via the API. Closes #1874
This commit is contained in:
@@ -85,6 +85,13 @@ final class UpdateMetricCommand
|
||||
*/
|
||||
public $threshold;
|
||||
|
||||
/**
|
||||
* The order of which to place the metric in.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $order;
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
@@ -101,6 +108,7 @@ final class UpdateMetricCommand
|
||||
'places' => 'numeric|between:0,4',
|
||||
'default_view' => 'numeric|between:0,4',
|
||||
'threshold' => 'numeric|between:0,10',
|
||||
'order' => 'int',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -116,10 +124,11 @@ final class UpdateMetricCommand
|
||||
* @param int $places
|
||||
* @param int $default_view
|
||||
* @param int $threshold
|
||||
* @param int $order
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view, $threshold)
|
||||
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view, $threshold, $order)
|
||||
{
|
||||
$this->metric = $metric;
|
||||
$this->name = $name;
|
||||
@@ -131,5 +140,6 @@ final class UpdateMetricCommand
|
||||
$this->places = $places;
|
||||
$this->default_view = $default_view;
|
||||
$this->threshold = $threshold;
|
||||
$this->order = $order;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user