Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/mon 13349 Trendsgraph on wkhtmltopdf #318

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
83ff7a9
Replace trends graph js
euniceremoquillo Apr 11, 2024
65bd3e2
Add hover on new trends graph report
euniceremoquillo Apr 12, 2024
5869d9d
Fix bar positions
euniceremoquillo Apr 12, 2024
3874342
Fix date time labels
euniceremoquillo Apr 12, 2024
283768c
Update details on hover
euniceremoquillo Apr 15, 2024
0f0305f
Update availability test
euniceremoquillo Apr 21, 2024
136fb9c
Revert "Update availability test"
euniceremoquillo Apr 22, 2024
29d0251
Remove checks for transparent object
euniceremoquillo Apr 22, 2024
43e1312
Update test to hexadecimal color code
euniceremoquillo Apr 22, 2024
b8ed535
Added Scaling function
euniceremoquillo Apr 25, 2024
947b28e
Adjusted minimum width of a scaled bar
euniceremoquillo Apr 26, 2024
8ab9d32
Added test on re-scalling trends graph
euniceremoquillo May 2, 2024
1e2752a
Added report data entry on test
euniceremoquillo May 3, 2024
f2916cf
Replace to check scaled color instead
euniceremoquillo May 3, 2024
ceb8a61
Change Service Description for test host
euniceremoquillo May 3, 2024
dcee7e4
Updated rescalling test
euniceremoquillo May 3, 2024
e26ee59
Replace trends graph js
euniceremoquillo Apr 11, 2024
8d42756
Add hover on new trends graph report
euniceremoquillo Apr 12, 2024
28307cd
Fix bar positions
euniceremoquillo Apr 12, 2024
c4707d4
Fix date time labels
euniceremoquillo Apr 12, 2024
cfa6b2a
Update details on hover
euniceremoquillo Apr 15, 2024
f532460
Update availability test
euniceremoquillo Apr 21, 2024
dfe3b58
Revert "Update availability test"
euniceremoquillo Apr 22, 2024
a783c54
Remove checks for transparent object
euniceremoquillo Apr 22, 2024
9085178
Update test to hexadecimal color code
euniceremoquillo Apr 22, 2024
f63917b
Added Scaling function
euniceremoquillo Apr 25, 2024
32e4b62
Adjusted minimum width of a scaled bar
euniceremoquillo Apr 26, 2024
09a5cc5
Added test on re-scalling trends graph
euniceremoquillo May 2, 2024
159dafc
Added report data entry on test
euniceremoquillo May 3, 2024
bde8d39
Replace to check scaled color instead
euniceremoquillo May 3, 2024
be1051b
Change Service Description for test host
euniceremoquillo May 3, 2024
31e523a
Updated rescalling test
euniceremoquillo May 3, 2024
43b4d7a
Updated report data
euniceremoquillo May 3, 2024
29f9bd3
Merge branch 'bugfix/MON-13349-Trendsgraph-on-Wkhtmltopdf' of https:/…
euniceremoquillo May 3, 2024
bac047d
Removed gray object on test
euniceremoquillo May 3, 2024
ee65047
Adjusted block size
euniceremoquillo May 17, 2024
7dc6df7
Added check host and hover
euniceremoquillo May 20, 2024
94c30fb
Revert "Adjusted block size"
euniceremoquillo May 22, 2024
bc11995
Improve tgraph readability
euniceremoquillo May 22, 2024
71f4150
Bar length adjustment
euniceremoquillo May 28, 2024
b72ae46
Handling number of allowable display limit
euniceremoquillo May 30, 2024
cd5fddb
Revert "Handling number of allowable display limit"
euniceremoquillo May 30, 2024
d65f2f2
Style adjustments
euniceremoquillo May 30, 2024
f075fdf
Update trendgraph.css
euniceremoquillo May 30, 2024
14bd2a6
Update availability.feature
euniceremoquillo May 30, 2024
a1bfc3b
Update availability.feature
euniceremoquillo May 30, 2024
82a82e3
Updated rounding precision
euniceremoquillo May 31, 2024
4a857a1
Displaying slice adjustments
euniceremoquillo May 31, 2024
6a21113
Adjust display items from left to right
euniceremoquillo May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 37 additions & 3 deletions features/availability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,40 @@ Feature: Availability reports
Then I should see "workhours"
And I should see "2013-03-04"
And I should see "2013-03-10"
And I should see trend graph have background color "rgb(161, 158, 149)"
And I should see trend graph have background color "transparent"
And I should see trend graph have background color "rgb(170, 222, 83)"
And I should see trend graph have background color "#a19e95"
And I should see trend graph have background color "#aade53"
euniceremoquillo marked this conversation as resolved.
Show resolved Hide resolved

Scenario: Create availability report with re-scalling
Given I am on the Host details page
And I have these report data entries:
| timestamp | event_type | flags | attrib | host_name | service_description | state | hard | retry | downtime_depth | output |
| 2013-03-01 00:01:00 | 801 | NULL | NULL | linux-server2 | | 0 | 1 | 1 | 0 | OK - linux-server2 |
| 2013-03-01 12:00:00 | 801 | NULL | NULL | linux-server1 | | 0 | 1 | 1 | NULL | OK - Sven Melander |
| 2013-03-03 00:01:00 | 801 | NULL | NULL | linux-server2 | | 0 | 1 | 1 | 0 | OK - linux-server2 |
| 2013-03-05 00:03:00 | 801 | NULL | NULL | linux-server2 | | 0 | 1 | 1 | NULL | ERROR - cannot find linux-server2 |
| 2013-03-05 10:20:00 | 801 | NULL | NULL | linux-server2 | | 0 | 1 | 1 | 0 | OK - linux-server2 |
And I hover over the "Report" menu
And I hover over the "Availability" menu
When I click "Create Availability Report"
And I select "Hosts" from "Report type"
And I select "linux-server1" from the multiselect "objects_tmp"
And I select "linux-server2" from the multiselect "objects_tmp"
Then "objects" should have option "linux-server1"
Then "objects" should have option "linux-server2"
When I select "Custom" from "Reporting period"
And I enter "2013-03-01" into "Start date"
And I enter "23:31" into "time_start"
And I enter "2013-04-01" into "End date"
And I enter "22:32" into "time_end"
And I check "Include trends graph"
Then I check "Show trends re-scaling"
And I click "Show report"
And I should see "linux-server1"
And I should see "linux-server2"
And I should see "2013-03-01"
And I should see "2013-03-11"
And I should see "2013-03-21"
And I should see trend graph have background color "#aade53"
And I should see trend graph have background color "#333"
When I hover over "bar"
Then I should see css "#tooltip"
4 changes: 2 additions & 2 deletions modules/reports/controllers/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function generate($input=false) {
$this->template->current_skin = $this->options['skin'];
}

$this->template->css[] = $this->add_path('reports/css/tgraph.css');
jdumalaonITRS marked this conversation as resolved.
Show resolved Hide resolved
$this->template->css[] = $this->add_path('reports/css/trendgraph.css');
$this->template->css[] = $this->add_path('reports/css/datePicker.css');

$this->template->content = $this->add_view('reports/index'); # base template with placeholders for all parts
Expand Down Expand Up @@ -346,7 +346,7 @@ public function generate($input=false) {
}
}

$template->trends_graph = $this->add_view('trends/new_report');
$template->trends_graph = $this->add_view('trends/tgraph_report');

/* New JS trend graph */

Expand Down
100 changes: 0 additions & 100 deletions modules/reports/views/reports/css/tgraph.css

This file was deleted.

83 changes: 83 additions & 0 deletions modules/reports/views/reports/css/trendgraph.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.x-item {
overflow: hidden;
width: 100%;
}
.tgraph-row {
position: relative;
width: 84%;
height: 40px;
color: #333;
float: left;
padding-left: 1%;
font: normal normal 8pt Helvetica, Arial, Verdana, sans-serif;
}
.tgraph-blockline {
margin: 2px 0;
position: relative;
width: 100%;
overflow: hidden;
direction: ltr;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
.tgraph-blockline .bar {
height: 20px;
margin: 0;
color: white;
}
.tgraph-sub-blockline {
position: relative;
width: 100%;
overflow: hidden;
align-items: center;
direction: ltr;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
.tgraph-sub-blockline .bar {
position: relative;
margin: 0 auto;
height: 10px;
min-width: 10px;
color: white;
}
.tgraph-sub-blockline .bar-transparent {
position: relative;
margin: 0;
height: 10px;
color: white;
background: 'transparent';
}
.tgraph-time {
float: left;
text-align: left;
font-size: 7pt;
}
.tgraph-timeline {
margin: 0 0;
border-left: 1px solid #000;
opacity: 0.1;
z-index: 0;
width: 0;
}
.y-label {
float: left;
width: 15%;
padding: 10px 0 0 0;
min-height: 30px;
font-size: 8pt;
text-align: right;
}
#tooltip {
position: absolute;
background: #fff;
border: 1px solid #aaa;
padding: 5px;
display: none;
}