Explorar o código

Added 7th option

Henry Whitaker %!s(int64=6) %!d(string=hai) anos
pai
achega
9818d0d848
Modificáronse 2 ficheiros con 52 adicións e 0 borrados
  1. 5 0
      api/config/default.php
  2. 47 0
      api/functions/homepage-functions.php

+ 5 - 0
api/config/default.php

@@ -349,6 +349,11 @@ return array(
 	'netdata6Data' => '',
 	'netdata6Colour' => '',
 	'netdata6Size' => '',
+	'netdata7Title' => '',
+	'netdata7Chart' => '',
+	'netdata7Data' => '',
+	'netdata7Colour' => '',
+	'netdata7Size' => '',
 	'netdata1Enabled' => false,
 	'netdata2Enabled' => false,
 	'netdata3Enabled' => false,

+ 47 - 0
api/functions/homepage-functions.php

@@ -3305,6 +3305,53 @@ function getHomepageList()
 						'options' => netdataSizeOptions(),
 					),
 				),
+				'Chart 7' => array(
+					array(
+						'type' => 'switch',
+						'name' => 'netdata7Enabled',
+						'label' => 'Enable',
+						'value' => $GLOBALS['netdata7Enabled']
+					),
+					array(
+						'type' => 'blank',
+						'label' => ''
+					),
+					array(
+						'type' => 'input',
+						'name' => 'netdata7Title',
+						'label' => 'Title',
+						'value' => $GLOBALS['netdata7Title'],
+						'help' => 'Title for the netdata graph'
+					),
+					array(
+						'type' => 'select',
+						'name' => 'netdata7Data',
+						'label' => 'Data',
+						'value' => $GLOBALS['netdata7Data'],
+						'options' => netdataOptions(),
+					),
+					array(
+						'type' => 'select',
+						'name' => 'netdata7Chart',
+						'label' => 'Chart',
+						'value' => $GLOBALS['netdata7Chart'],
+						'options' => netdataChartOptions(),
+					),
+					array(
+						'type' => 'select',
+						'name' => 'netdata7Colour',
+						'label' => 'Colour',
+						'value' => $GLOBALS['netdata7Colour'],
+						'options' => netdataColourOptions(),
+					),
+					array(
+						'type' => 'select',
+						'name' => 'netdata7Size',
+						'label' => 'Size',
+						'value' => $GLOBALS['netdata7Size'],
+						'options' => netdataSizeOptions(),
+					),
+				),
 				'Options' => array(
 					array(
 						'type' => 'select',