Skip to content

Commit afa70da

Browse files
authored
remove hight for favgraph (#336)
1 parent 5e2e63a commit afa70da

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/functions.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ function intropage_actions() {
357357
array($_SESSION['sess_user_id']));
358358

359359
db_execute_prepared('INSERT INTO plugin_intropage_panel_data
360-
(user_id, panel_id, fav_graph_id, fav_graph_timespan, priority)
361-
VALUES (?, "favourite_graph", ?, ?, ?)',
360+
(user_id, panel_id, height, fav_graph_id, fav_graph_timespan, priority)
361+
VALUES (?, "favourite_graph", "normal", ?, ?, ?)',
362362
array($_SESSION['sess_user_id'], get_request_var('graph_id'), $span, $prio));
363363

364364
$id = db_fetch_insert_id();
@@ -776,6 +776,7 @@ function intropage_reload_panel() {
776776

777777
if ($panel['fav_graph_id'] > 0) {
778778
$data = intropage_favourite_graph($panel['fav_graph_id'], $panel['fav_graph_timespan']);
779+
$panels[$panel['panel_id']]['height_fixed'] = true;
779780
} elseif (isset($spanel) && cacti_sizeof($spanel) > 0) {
780781
$function = $spanel['update_func'];
781782
$user_id = ($spanel['level'] == PANEL_SYSTEM ? 0 : $_SESSION['sess_user_id']);
@@ -1245,9 +1246,9 @@ function intropage_favourite_graph($fav_graph_id, $fav_graph_timespan) {
12451246

12461247
if (isset($fav_graph_id)) {
12471248
$result = array(
1248-
'name' => '', // we don't need name here
1249-
'alarm' => 'grey',
1250-
'data' => '',
1249+
'name' => '', // we don't need name here
1250+
'alarm' => 'grey',
1251+
'data' => '',
12511252
);
12521253

12531254
include_once($config['base_path'] . '/lib/time.php');
@@ -1642,6 +1643,7 @@ function intropage_create_panel($panel_id, $dashboard_id) {
16421643

16431644
if ($panel_type == 'favourite_graph') {
16441645
$width = 'quarter-panel';
1646+
$height = 'normal';
16451647
} else {
16461648
$width = $panels[$panel_type]['width'];
16471649
// we need actual height from db not from panel definition
@@ -1674,8 +1676,6 @@ function intropage_create_panel($panel_id, $dashboard_id) {
16741676
}
16751677

16761678

1677-
1678-
16791679
function intropage_addpanel_select($dashboard_id) {
16801680

16811681
$add_panels = db_fetch_assoc_prepared('SELECT DISTINCT pd.panel_id, pd.name

0 commit comments

Comments
 (0)