Skip to content
Snippets Groups Projects

Resolve TMSS-1964 "Fe"

Merged Reinder Kraaij requested to merge TMSS-1964-FE into master
5 unresolved threads

Merge request reports

Approval is optional

Merged by Reinder KraaijReinder Kraaij 1 year ago (Dec 13, 2023 12:34am UTC)

Merge details

  • Changes merged into master with 8f7000c2 (commits were squashed).
  • Deleted the source branch.
  • Auto-merge enabled

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
28 const [chartData_sub_Issue_total_duration_options, setChartData_sub_Issue_total_duration_options] = useState({});
29 const [chartObservingTimeBarData, setChartObservingTimeBarData] = useState({});
30 const [chartWallTimeData, setChartWallTimeData] = useState({});
31 const [chartWallTimeSubTypeData, setChartWallTimeSubTypeData] = useState({});
32 const [chartOptions, setChartOptions] = useState({});
33
34 useEffect(() => {
35 if (!dates || dates?.length < 2 || dates.length == 2 && dates[1] == null) {
36 setChecked("")
37 } else {
38 console.log(dates)
39 setChecked("pi pi-check")
40 }
41 }, [dates]);
42
43 function formatDuration(seconds) {
  • 91
    92 tooltips: {
    93 enabled: false, // Disable default tooltips
    94 custom: customTooltip, // Use custom tooltip function
    95 }
    96
    97 }
    98 }
    99
    100
    101 function MakePieChart(failureReport) {
    102 let pieelement = failureReport?.system_event_summary?.by_issue_type;
    103 if (pieelement !== null) {
    104 setChartData_Issue_count(MakeChartData(pieelement, "count", "issue_type__value"));
    105 setChartData_Issue_count_options(MakeChartOptions("Issue Type count"));
    106 setChartData_Issue_total_duration(MakeChartData(pieelement, "duration_lost_event", "issue_type__value"));
  • Jörn Künsemöller
  • 118 }
    119 }
    120
    121 useEffect(() => {
    122 const documentStyle = getComputedStyle(document.documentElement);
    123 if (failureReport == null) return
    124
    125 MakePieChart(failureReport);
    126 makeSubTypePieChart(failureReport);
    127 MakeLostTimeBar(failureReport, documentStyle);
    128 MakeWallTimeIssueTypeBar(failureReport, documentStyle);
    129 MakeWallTimeSubIssueBar(failureReport, documentStyle);
    130 }, [failureReport]);
    131
    132 function MakeLostTimeBar(failureReport, documentStyle) {
    133 if (failureReport?.lost_time_histogram_event) {
  • 161 documentStyle.getPropertyValue('--red-' + subfix),
    162 documentStyle.getPropertyValue('--orange-' + subfix),
    163 documentStyle.getPropertyValue('--yellow-' + subfix),
    164 documentStyle.getPropertyValue('--green-' + subfix),
    165 documentStyle.getPropertyValue('--purple-' + subfix),
    166 documentStyle.getPropertyValue('--pink-' + subfix),
    167 documentStyle.getPropertyValue('--teal-' + subfix),
    168 documentStyle.getPropertyValue('--brown-' + subfix),
    169 documentStyle.getPropertyValue('--gray-' + subfix),
    170 ]
    171 }
    172
    173 function MakeWallTimeBarWithType(failureReport, documentStyle, type, title, typelabel) {
    174
    175 let colors = Colors(documentStyle, "500");
    176 if (failureReport?.lost_time_histogram_event) {
  • Jörn Künsemöller
  • 92 tooltips: {
    93 enabled: false, // Disable default tooltips
    94 custom: customTooltip, // Use custom tooltip function
    95 }
    96
    97 }
    98 }
    99
    100
    101 function MakePieChart(failureReport) {
    102 let pieelement = failureReport?.system_event_summary?.by_issue_type;
    103 if (pieelement !== null) {
    104 setChartData_Issue_count(MakeChartData(pieelement, "count", "issue_type__value"));
    105 setChartData_Issue_count_options(MakeChartOptions("Issue Type count"));
    106 setChartData_Issue_total_duration(MakeChartData(pieelement, "duration_lost_event", "issue_type__value"));
    107 setChartData_Issue_total_duration_options({ plugins: { legend: { display: false }, title: { text: "Issue Type Duration Percentage", display: true } } });
    • The label is inconsistent with the one in the other chart (duration percentage vs duration hours). I think duration percentage is what we want here. The tooltip currently gives absolute duration in seconds, I think.

      I just noticed that the mockup shows percentage values, but in the sense of percentage of total failure duration. I think we don't currently calculate that one, we only have percent of wall time and absolute duration. You could either get that from dividing duration_lost_on_sky by the top level total_duration_lost_on_sky. Or I could add that under an additional key like 'percent_of_failure_time_lost_on_sky' in the backend. Also, your pie charts have no labels like the mockup, which I would fin nicer than showing the values just in the tool tips.

    • Please register or sign in to reply
  • Code-wise this looks good, as far as I can tell. I left a few comments (you may have fixed some of the keys already meantime).

    Generally, I like the looks of this, but some things I noticed:

    • Can we have the/a title on top of each section, especially in the bottom sth. like 'Percentages of wall time'/'Observing hours lost per month'/'Affected scheduling units'.
    • Although I like the colors, we have several shades of green, which is not ideal in combination with the 'no failures'
    • The sorting in the table does not work on every column for me
    • Can we link to the scheduling unit from the name? Url is in the report data.
    • The pie charts have no labels (only tooltips). Labels would be great because they provide a better overview and would also show in the PDF.
    • PDF currently cuts of the table for me.
    Edited by Jörn Künsemöller
  • Please register or sign in to reply
    Loading