From 234531e33063205df2160e711fcccb000862e0ca Mon Sep 17 00:00:00 2001 From: AlexC <40072887+alexdcrane@users.noreply.github.com> Date: Mon, 28 Mar 2022 10:29:32 -0600 Subject: [PATCH] Add default settings to switch status dashboard widget (#6333) * Update app_config.php * Update switch_status.php * Update app_config.php * Update app_config.php --- app/switch/app_config.php | 35 ++++++++++++++++++- .../resources/dashboard/switch_status.php | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/app/switch/app_config.php b/app/switch/app_config.php index 9ccf373f07..e9832b43c0 100644 --- a/app/switch/app_config.php +++ b/app/switch/app_config.php @@ -29,5 +29,38 @@ $apps[$x]['description']['sv-se'] = ""; $apps[$x]['description']['uk-ua'] = ""; + //default settings + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9ff1ed88-76ba-4648-a082-d53f64947d08"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "switch_status_chart_main_background_color"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "#2a9df4"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7d7ba6e6-1616-4082-9f20-774e8ef673c9"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "switch_status_chart_sub_background_color"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "#d4d4d4"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "cad4fdf1-2eb5-4669-8215-2b3dbee5d124"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "switch_status_chart_border_color"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "rgba(0,0,0,0)"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "206d91d0-1ee2-46f3-a30b-977ad49b84cb"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "switch_status_chart_border_width"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; -?> \ No newline at end of file +?> diff --git a/app/switch/resources/dashboard/switch_status.php b/app/switch/resources/dashboard/switch_status.php index 33b2278593..2af47d09ee 100644 --- a/app/switch/resources/dashboard/switch_status.php +++ b/app/switch/resources/dashboard/switch_status.php @@ -86,7 +86,7 @@ datasets: [{ data: ['', 0.00001], backgroundColor: ['', - ''], + ''], borderColor: '', borderWidth: '', cutout: chart_cutout