From 775a397395db47086b09bad831fbc6f7735b780b Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 19 May 2022 11:09:53 +0800 Subject: [PATCH] * Finish task #54484,#54485,#54486. --- module/bug/config.php | 16 ++++++++++++++++ module/bug/model.php | 2 +- module/bug/view/report.html.php | 13 ++++++++++++- module/testreport/view/blockbugreport.html.php | 3 ++- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/module/bug/config.php b/module/bug/config.php index a2a00b49c6..901a95ca52 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -338,3 +338,19 @@ $config->bug->datatable->fieldList['actions']['title'] = 'actions'; $config->bug->datatable->fieldList['actions']['fixed'] = 'right'; $config->bug->datatable->fieldList['actions']['width'] = '150'; $config->bug->datatable->fieldList['actions']['required'] = 'yes'; + +$config->bug->colorList = new stdclass(); +$config->bug->colorList->pri[1] = '#d50000'; +$config->bug->colorList->pri[2] = '#ff9800'; +$config->bug->colorList->pri[3] = '#2098ee'; +$config->bug->colorList->pri[4] = '#009688'; +$config->bug->colorList->pri[5] = '#919090'; +$config->bug->colorList->pri[6] = '#B6B6B6'; +$config->bug->colorList->pri[7] = '#E6E6E6'; +$config->bug->colorList->severity[1] = '#c62828'; +$config->bug->colorList->severity[2] = '#ff8f00'; +$config->bug->colorList->severity[3] = '#fdd835'; +$config->bug->colorList->severity[4] = '#cddc39'; +$config->bug->colorList->severity[5] = '#8bc34a'; +$config->bug->colorList->severity[6] = '#B6B6B6'; +$config->bug->colorList->severity[7] = '#E6E6E6'; diff --git a/module/bug/model.php b/module/bug/model.php index d49fd2da3f..a98a034349 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2328,7 +2328,7 @@ class bugModel extends model $commonOption = $this->lang->bug->report->options; $chartOption->graph->caption = $this->lang->bug->report->charts[$chartType]; - if(!isset($chartOption->type)) $chartOption->type = $commonOption->type; + if(!isset($chartOption->type)) $chartOption->type = $commonOption->type; if(!isset($chartOption->width)) $chartOption->width = $commonOption->width; if(!isset($chartOption->height)) $chartOption->height = $commonOption->height; diff --git a/module/bug/view/report.html.php b/module/bug/view/report.html.php index 118c64ed1a..97f86cd809 100644 --- a/module/bug/view/report.html.php +++ b/module/bug/view/report.html.php @@ -65,8 +65,19 @@ report->percent;?> + bug->colorList->pri; + } + elseif(strpos(strtolower($chartType), 'severity') !== false) + { + $colorList = $config->bug->colorList->severity; + } + ?> $data):?> - + name;?> value;?> diff --git a/module/testreport/view/blockbugreport.html.php b/module/testreport/view/blockbugreport.html.php index fe56eab565..4c539d8bdb 100644 --- a/module/testreport/view/blockbugreport.html.php +++ b/module/testreport/view/blockbugreport.html.php @@ -177,7 +177,8 @@ } if(empty($label) and empty($data)) continue; ?> - + bug->colorList->severity : array();?> +