Esempio n. 1
0
    def _generateGraph(self, oSet, sIdBase, aidSortedRaw):
        """
        Generates graph.
        """
        sHtml = u''
        fGenerateGraph = len(aidSortedRaw) <= 6 and len(aidSortedRaw) > 0
        ## Make this configurable.
        if fGenerateGraph:
            # Figure the graph width for all of them.
            uPctMax = max(oSet.uMaxPct, oSet.cMaxHits * 100 // oSet.cMaxTotal)
            uPctMax = max(uPctMax + 2, 10)

            for _, aidSorted in enumerate(
                    self._splitSeriesIntoMultipleGraphs(aidSortedRaw, 8)):
                asNames = []
                for idKey in aidSorted:
                    oSubject = oSet.dSubjects[idKey]
                    asNames.append(self._formatSeriedNameForGraph(oSubject))

                oTable = WuiHlpGraphDataTable('Period', asNames)

                for _, oPeriod in enumerate(reversed(oSet.aoPeriods)):
                    aiValues = []
                    asValues = []

                    for idKey in aidSorted:
                        oRow = oPeriod.dRowsById.get(idKey, None)
                        if oRow is not None:
                            aiValues.append(oRow.cHits * 100 // oRow.cTotal)
                            asValues.append(
                                self.fmtPctWithHitsAndTotal(
                                    oRow.cHits, oRow.cTotal))
                        else:
                            aiValues.append(0)
                            asValues.append('0')

                    oTable.addRow(oPeriod.sDesc, aiValues, asValues)

                if True:  # pylint: disable=using-constant-test
                    aiValues = []
                    asValues = []
                    for idKey in aidSorted:
                        uPct = oSet.dcHitsPerId[
                            idKey] * 100 // oSet.dcTotalPerId[idKey]
                        aiValues.append(uPct)
                        asValues.append(
                            self.fmtPctWithHitsAndTotal(
                                oSet.dcHitsPerId[idKey],
                                oSet.dcTotalPerId[idKey]))
                    oTable.addRow('Totals', aiValues, asValues)

                oGraph = WuiHlpBarGraph(sIdBase, oTable, self._oDisp)
                oGraph.setRangeMax(uPctMax)
                sHtml += '<br>\n'
                sHtml += oGraph.renderGraph()
        return sHtml
Esempio n. 2
0
    def generateReportBody(self):
        self._sTitle = 'Success rate'

        adPeriods = self._oModel.getSuccessRates()

        sReport = ''

        oTable = WuiHlpGraphDataTable('Period',
                                      ['Succeeded', 'Skipped', 'Failed'])

        #for i in range(len(adPeriods) - 1, -1, -1):
        for i in range(len(adPeriods)):
            dStatuses = adPeriods[i]
            cSuccess = dStatuses[
                ReportModelBase.ksTestStatus_Success] + dStatuses[
                    ReportModelBase.ksTestStatus_Skipped]
            cTotal = cSuccess + dStatuses[ReportModelBase.ksTestStatus_Failure]
            sPeriod = self._oModel.getPeriodDesc(i)
            if cTotal > 0:
                iPctSuccess = dStatuses[
                    ReportModelBase.ksTestStatus_Success] * 100 / cTotal
                iPctSkipped = dStatuses[
                    ReportModelBase.ksTestStatus_Skipped] * 100 / cTotal
                iPctFailure = dStatuses[
                    ReportModelBase.ksTestStatus_Failure] * 100 / cTotal
                oTable.addRow(
                    sPeriod, [iPctSuccess, iPctSkipped, iPctFailure], [
                        '%s%% (%d)' %
                        (iPctSuccess,
                         dStatuses[ReportModelBase.ksTestStatus_Success]),
                        '%s%% (%d)' %
                        (iPctSkipped,
                         dStatuses[ReportModelBase.ksTestStatus_Skipped]),
                        '%s%% (%d)' %
                        (iPctFailure,
                         dStatuses[ReportModelBase.ksTestStatus_Failure]),
                    ])
            else:
                oTable.addRow(sPeriod, [0, 0, 0], ['0%', '0%', '0%'])

        cTotalNow = adPeriods[0][ReportModelBase.ksTestStatus_Success]
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Skipped]
        cSuccessNow = cTotalNow
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Failure]
        sReport += '<p>Current success rate: '
        if cTotalNow > 0:
            sReport += '%s%% (thereof %s%% skipped)</p>\n' \
                     % ( cSuccessNow * 100 / cTotalNow, adPeriods[0][ReportModelBase.ksTestStatus_Skipped] * 100 / cTotalNow)
        else:
            sReport += 'N/A</p>\n'

        oGraph = WuiHlpBarGraph('success-rate', oTable, self._oDisp)
        oGraph.setRangeMax(100)
        sReport += oGraph.renderGraph()

        return sReport
Esempio n. 3
0
    def generateReportBody(self):
        self._sTitle = "Success rate"

        adPeriods = self._oModel.getSuccessRates()

        sReport = ""

        oTable = WuiHlpGraphDataTable("Period", ["Succeeded", "Skipped", "Failed"])

        # for i in range(len(adPeriods) - 1, -1, -1):
        for i in range(len(adPeriods)):
            dStatuses = adPeriods[i]
            cSuccess = dStatuses[ReportModelBase.ksTestStatus_Success] + dStatuses[ReportModelBase.ksTestStatus_Skipped]
            cTotal = cSuccess + dStatuses[ReportModelBase.ksTestStatus_Failure]
            sPeriod = self._oModel.getPeriodDesc(i)
            if cTotal > 0:
                iPctSuccess = dStatuses[ReportModelBase.ksTestStatus_Success] * 100 / cTotal
                iPctSkipped = dStatuses[ReportModelBase.ksTestStatus_Skipped] * 100 / cTotal
                iPctFailure = dStatuses[ReportModelBase.ksTestStatus_Failure] * 100 / cTotal
                oTable.addRow(
                    sPeriod,
                    [iPctSuccess, iPctSkipped, iPctFailure],
                    [
                        "%s%% (%d)" % (iPctSuccess, dStatuses[ReportModelBase.ksTestStatus_Success]),
                        "%s%% (%d)" % (iPctSkipped, dStatuses[ReportModelBase.ksTestStatus_Skipped]),
                        "%s%% (%d)" % (iPctFailure, dStatuses[ReportModelBase.ksTestStatus_Failure]),
                    ],
                )
            else:
                oTable.addRow(sPeriod, [0, 0, 0], ["0%", "0%", "0%"])

        cTotalNow = adPeriods[0][ReportModelBase.ksTestStatus_Success]
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Skipped]
        cSuccessNow = cTotalNow
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Failure]
        sReport += "<p>Current success rate: "
        if cTotalNow > 0:
            sReport += "%s%% (thereof %s%% skipped)</p>\n" % (
                cSuccessNow * 100 / cTotalNow,
                adPeriods[0][ReportModelBase.ksTestStatus_Skipped] * 100 / cTotalNow,
            )
        else:
            sReport += "N/A</p>\n"

        oGraph = WuiHlpBarGraph("success-rate", oTable, self._oDisp)
        oGraph.setRangeMax(100)
        sReport += oGraph.renderGraph()

        return sReport
Esempio n. 4
0
    def _generateGraph(self, oSet, sIdBase, aidSortedRaw):
        """
        Generates graph.
        """
        sHtml = u'';
        fGenerateGraph = len(aidSortedRaw) <= 6 and len(aidSortedRaw) > 0; ## Make this configurable.
        if fGenerateGraph:
            # Figure the graph width for all of them.
            uPctMax = max(oSet.uMaxPct, oSet.cMaxHits * 100 / oSet.cMaxTotal);
            uPctMax = max(uPctMax + 2, 10);

            for _, aidSorted in enumerate(self._splitSeriesIntoMultipleGraphs(aidSortedRaw, 8)):
                asNames = [];
                for idKey in aidSorted:
                    oSubject = oSet.dSubjects[idKey];
                    asNames.append(self._formatSeriedNameForGraph(oSubject));

                oTable = WuiHlpGraphDataTable('Period', asNames);

                for _, oPeriod in enumerate(reversed(oSet.aoPeriods)):
                    aiValues = [];
                    asValues = [];

                    for idKey in aidSorted:
                        oRow = oPeriod.dRowsById.get(idKey, None);
                        if oRow is not None:
                            uPct = oRow.cHits * 100 / oRow.cTotal;
                            aiValues.append(uPct);
                            asValues.append('%u%% (%u/%u)' % (uPct, oRow.cHits, oRow.cTotal));
                        else:
                            aiValues.append(0);
                            asValues.append('0');

                    oTable.addRow(oPeriod.sDesc, aiValues, asValues);

                if True: # pylint: disable=W0125
                    aiValues = [];
                    asValues = [];
                    for idKey in aidSorted:
                        uPct = oSet.dcHitsPerId[idKey] * 100 / oSet.dcTotalPerId[idKey];
                        aiValues.append(uPct);
                        asValues.append('%u%% (%u/%u)' % (uPct, oSet.dcHitsPerId[idKey], oSet.dcTotalPerId[idKey]));
                    oTable.addRow('Totals', aiValues, asValues);

                oGraph = WuiHlpBarGraph(sIdBase, oTable, self._oDisp);
                oGraph.setRangeMax(uPctMax);
                sHtml += '<br>\n';
                sHtml += oGraph.renderGraph();
        return sHtml;
Esempio n. 5
0
    def generateReportBody(self):
        self._sTitle = 'Success rate';

        adPeriods = self._oModel.getSuccessRates();

        sReport = '';

        oTable = WuiHlpGraphDataTable('Period', [ 'Succeeded', 'Skipped', 'Failed' ]);

        #for i in range(len(adPeriods) - 1, -1, -1):
        for i in range(len(adPeriods)):
            dStatuses = adPeriods[i];
            cSuccess  = dStatuses[ReportModelBase.ksTestStatus_Success] + dStatuses[ReportModelBase.ksTestStatus_Skipped];
            cTotal    = cSuccess + dStatuses[ReportModelBase.ksTestStatus_Failure];
            sPeriod   = self._oModel.getPeriodDesc(i);
            if cTotal > 0:
                iPctSuccess = dStatuses[ReportModelBase.ksTestStatus_Success] * 100 / cTotal;
                iPctSkipped = dStatuses[ReportModelBase.ksTestStatus_Skipped] * 100 / cTotal;
                iPctFailure = dStatuses[ReportModelBase.ksTestStatus_Failure] * 100 / cTotal;
                oTable.addRow(sPeriod, [ iPctSuccess, iPctSkipped, iPctFailure ],
                              [ '%s%% (%d)' % (iPctSuccess, dStatuses[ReportModelBase.ksTestStatus_Success]),
                                '%s%% (%d)' % (iPctSkipped, dStatuses[ReportModelBase.ksTestStatus_Skipped]),
                                '%s%% (%d)' % (iPctFailure, dStatuses[ReportModelBase.ksTestStatus_Failure]), ]);
            else:
                oTable.addRow(sPeriod, [ 0, 0, 0 ], [ '0%', '0%', '0%' ]);

        cTotalNow  = adPeriods[0][ReportModelBase.ksTestStatus_Success];
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Skipped];
        cSuccessNow = cTotalNow;
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Failure];
        sReport += '<p>Current success rate: ';
        if cTotalNow > 0:
            sReport += '%s%% (thereof %s%% skipped)</p>\n' \
                     % ( cSuccessNow * 100 / cTotalNow, adPeriods[0][ReportModelBase.ksTestStatus_Skipped] * 100 / cTotalNow);
        else:
            sReport += 'N/A</p>\n'

        oGraph = WuiHlpBarGraph('success-rate', oTable, self._oDisp);
        oGraph.setRangeMax(100);
        sReport += oGraph.renderGraph();

        return sReport;
Esempio n. 6
0
    def generateReportBody(self):
        self._sTitle = 'Success rate';

        adPeriods = self._oModel.getSuccessRates();

        sReport = '';

        oTable = WuiHlpGraphDataTable('Period', [ 'Succeeded', 'Skipped', 'Failed' ]);

        #for i in range(len(adPeriods) - 1, -1, -1):
        for i, dStatuses in enumerate(adPeriods):
            cSuccess  = dStatuses[ReportModelBase.ksTestStatus_Success] + dStatuses[ReportModelBase.ksTestStatus_Skipped];
            cTotal    = cSuccess + dStatuses[ReportModelBase.ksTestStatus_Failure];
            sPeriod   = self._oModel.getPeriodDesc(i);
            if cTotal > 0:
                oTable.addRow(sPeriod,
                              [ dStatuses[ReportModelBase.ksTestStatus_Success] * 100 / cTotal,
                                dStatuses[ReportModelBase.ksTestStatus_Skipped] * 100 / cTotal,
                                dStatuses[ReportModelBase.ksTestStatus_Failure] * 100 / cTotal, ],
                              [ self.fmtPctWithHits(dStatuses[ReportModelBase.ksTestStatus_Success], cTotal),
                                self.fmtPctWithHits(dStatuses[ReportModelBase.ksTestStatus_Skipped], cTotal),
                                self.fmtPctWithHits(dStatuses[ReportModelBase.ksTestStatus_Failure], cTotal), ]);
            else:
                oTable.addRow(sPeriod, [ 0, 0, 0 ], [ '0%', '0%', '0%' ]);

        cTotalNow  = adPeriods[0][ReportModelBase.ksTestStatus_Success];
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Skipped];
        cSuccessNow = cTotalNow;
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Failure];
        sReport += '<p>Current success rate: ';
        if cTotalNow > 0:
            sReport += '%s%% (thereof %s%% skipped)</p>\n' \
                     % ( cSuccessNow * 100 / cTotalNow, adPeriods[0][ReportModelBase.ksTestStatus_Skipped] * 100 / cTotalNow);
        else:
            sReport += 'N/A</p>\n'

        oGraph = WuiHlpBarGraph('success-rate', oTable, self._oDisp);
        oGraph.setRangeMax(100);
        sReport += oGraph.renderGraph();

        return sReport;
Esempio n. 7
0
    def generateReportBody(self):
        self._sTitle = 'Failure reasons'

        #
        # Get the data and sort the data series in descending order of badness.
        #
        oSet = self._oModel.getFailureReasons()
        aidSortedRaw = sorted(oSet.dSubjects,
                              key=lambda idReason: oSet.dcHitsPerId[idReason],
                              reverse=True)

        #
        # Generate table and transition list. These are the most useful ones with the current graph machinery.
        #
        sHtml = self._generateTableForSet(oSet, aidSortedRaw,
                                          len(oSet.aoPeriods))
        sHtml += self._generateTransitionList(oSet)

        #
        # Check if most of the stuff is without any assign reason, if so, skip
        # that part of the graph so it doesn't offset the interesting bits.
        #
        fIncludeWithoutReason = True
        for oPeriod in reversed(oSet.aoPeriods):
            if oPeriod.cWithoutReason > oSet.cMaxHits * 4:
                fIncludeWithoutReason = False
                sHtml += '<p>Warning: Many failures without assigned reason!</p>\n'
                break

        #
        # Generate the graph.
        #
        fGenerateGraph = len(aidSortedRaw) <= 9 and len(aidSortedRaw) > 0
        ## Make this configurable.
        if fGenerateGraph:
            aidSorted = aidSortedRaw

            asNames = []
            for idReason in aidSorted:
                oReason = oSet.dSubjects[idReason]
                asNames.append('%s / %s' % (
                    oReason.oCategory.sShort,
                    oReason.sShort,
                ))
            if fIncludeWithoutReason:
                asNames.append('No reason')

            oTable = WuiHlpGraphDataTable('Period', asNames)

            cMax = oSet.cMaxHits
            for _, oPeriod in enumerate(reversed(oSet.aoPeriods)):
                aiValues = []

                for idReason in aidSorted:
                    oRow = oPeriod.dRowsById.get(idReason, None)
                    iValue = oRow.cHits if oRow is not None else 0
                    aiValues.append(iValue)

                if fIncludeWithoutReason:
                    aiValues.append(oPeriod.cWithoutReason)
                    if oPeriod.cWithoutReason > cMax:
                        cMax = oPeriod.cWithoutReason

                oTable.addRow(oPeriod.sDesc, aiValues)

            oGraph = WuiHlpBarGraph('failure-reason', oTable, self._oDisp)
            oGraph.setRangeMax(max(cMax + 1, 3))
            sHtml += oGraph.renderGraph()
        return sHtml
Esempio n. 8
0
    def generateReportBody(self):
        self._sTitle = 'Success rate'
        fTailoredForGoogleCharts = True

        #
        # Get the data and check if we have anything in the 'skipped' category.
        #
        adPeriods = self._oModel.getSuccessRates()

        cTotalSkipped = 0
        for dStatuses in adPeriods:
            cTotalSkipped += dStatuses[ReportModelBase.ksTestStatus_Skipped]

        #
        # Output some general stats before the graphs.
        #
        cTotalNow = adPeriods[0][ReportModelBase.ksTestStatus_Success]
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Skipped]
        cSuccessNow = cTotalNow
        cTotalNow += adPeriods[0][ReportModelBase.ksTestStatus_Failure]

        sReport = '<p>Current success rate: '
        if cTotalNow > 0:
            cSkippedNow = adPeriods[0][ReportModelBase.ksTestStatus_Skipped]
            if cSkippedNow > 0:
                sReport += '%s (thereof %s skipped)</p>\n' \
                         % (self.fmtPct(cSuccessNow, cTotalNow), self.fmtPct(cSkippedNow, cTotalNow),)
            else:
                sReport += '%s (none skipped)</p>\n' % (self.fmtPct(
                    cSuccessNow, cTotalNow), )
        else:
            sReport += 'N/A</p>\n'

        #
        # Create the data table.
        #
        if fTailoredForGoogleCharts:
            if cTotalSkipped > 0:
                oTable = WuiHlpGraphDataTable(
                    None, ['Succeeded', 'Skipped', 'Failed'])
            else:
                oTable = WuiHlpGraphDataTable(None, ['Succeeded', 'Failed'])
        else:
            if cTotalSkipped > 0:
                oTable = WuiHlpGraphDataTable(
                    'When', ['Succeeded', 'Skipped', 'Failed'])
            else:
                oTable = WuiHlpGraphDataTable('When', ['Succeeded', 'Failed'])

        for i, dStatuses in enumerate(adPeriods):
            cSuccesses = dStatuses[ReportModelBase.ksTestStatus_Success]
            cFailures = dStatuses[ReportModelBase.ksTestStatus_Failure]
            cSkipped = dStatuses[ReportModelBase.ksTestStatus_Skipped]

            cSuccess = cSuccesses + cSkipped
            cTotal = cSuccess + cFailures
            sPeriod = self._oModel.getPeriodDesc(i)
            if fTailoredForGoogleCharts:
                if cTotalSkipped > 0:
                    oTable.addRow(sPeriod, [
                        cSuccesses * 100 // cTotal if cTotal else 0,
                        cSkipped * 100 // cTotal if cTotal else 0,
                        cFailures * 100 // cTotal if cTotal else 0,
                    ], [
                        self.fmtPct(cSuccesses, cTotal)
                        if cSuccesses else None,
                        self.fmtPct(cSkipped, cTotal) if cSkipped else None,
                        self.fmtPct(cFailures, cTotal) if cFailures else None,
                    ])
                else:
                    oTable.addRow(sPeriod, [
                        cSuccesses * 100 // cTotal if cTotal else 0,
                        cFailures * 100 // cTotal if cTotal else 0,
                    ], [
                        self.fmtPct(cSuccesses, cTotal)
                        if cSuccesses else None,
                        self.fmtPct(cFailures, cTotal) if cFailures else None,
                    ])
            elif cTotal > 0:
                if cTotalSkipped > 0:
                    oTable.addRow(sPeriod, [
                        cSuccesses * 100 // cTotal,
                        cSkipped * 100 // cTotal,
                        cFailures * 100 // cTotal,
                    ], [
                        self.fmtPctWithHits(cSuccesses, cTotal),
                        self.fmtPctWithHits(cSkipped, cTotal),
                        self.fmtPctWithHits(cFailures, cTotal),
                    ])
                else:
                    oTable.addRow(sPeriod, [
                        cSuccesses * 100 // cTotal,
                        cFailures * 100 // cTotal,
                    ], [
                        self.fmtPctWithHits(cSuccesses, cTotal),
                        self.fmtPctWithHits(cFailures, cTotal),
                    ])
            elif cTotalSkipped > 0:
                oTable.addRow(sPeriod, [0, 0, 0], ['0%', '0%', '0%'])
            else:
                oTable.addRow(sPeriod, [0, 0], ['0%', '0%'])

        #
        # Render the graph.
        #
        oGraph = WuiHlpBarGraph('success-rate', oTable, self._oDisp)
        oGraph.setRangeMax(100)
        sReport += oGraph.renderGraph()

        #
        # Graph with absolute counts.
        #
        if fTailoredForGoogleCharts:
            if cTotalSkipped > 0:
                oTable = WuiHlpGraphDataTable(
                    None, ['Succeeded', 'Skipped', 'Failed'])
            else:
                oTable = WuiHlpGraphDataTable(None, ['Succeeded', 'Failed'])
            for i, dStatuses in enumerate(adPeriods):
                cSuccesses = dStatuses[ReportModelBase.ksTestStatus_Success]
                cFailures = dStatuses[ReportModelBase.ksTestStatus_Failure]
                cSkipped = dStatuses[ReportModelBase.ksTestStatus_Skipped]

                if cTotalSkipped > 0:
                    oTable.addRow(
                        None,  #self._oModel.getPeriodDesc(i),
                        [
                            cSuccesses,
                            cSkipped,
                            cFailures,
                        ],
                        [
                            str(cSuccesses) if cSuccesses > 0 else None,
                            str(cSkipped) if cSkipped > 0 else None,
                            str(cFailures) if cFailures > 0 else None,
                        ])
                else:
                    oTable.addRow(
                        None,  #self._oModel.getPeriodDesc(i),
                        [
                            cSuccesses,
                            cFailures,
                        ],
                        [
                            str(cSuccesses) if cSuccesses > 0 else None,
                            str(cFailures) if cFailures > 0 else None,
                        ])
            oGraph = WuiHlpBarGraph('success-numbers', oTable, self._oDisp)
            oGraph.invertYDirection()
            sReport += oGraph.renderGraph()

        return sReport
    def generateReportBody(self):
        self._sTitle = 'Failure reasons';

        #
        # Get the data and sort the data series in descending order of badness.
        #
        oSet = self._oModel.getFailureReasons();
        aidSortedRaw = sorted(oSet.dSubjects, key = lambda idReason: oSet.dcHitsPerId[idReason], reverse = True);

        #
        # Generate table and transition list. These are the most useful ones with the current graph machinery.
        #
        sHtml  = self._generateTableForSet(oSet, aidSortedRaw, len(oSet.aoPeriods));
        sHtml += self._generateTransitionList(oSet);

        #
        # Check if most of the stuff is without any assign reason, if so, skip
        # that part of the graph so it doesn't offset the interesting bits.
        #
        fIncludeWithoutReason = True;
        for oPeriod in reversed(oSet.aoPeriods):
            if oPeriod.cWithoutReason > oSet.cMaxHits * 4:
                fIncludeWithoutReason = False;
                sHtml += '<p>Warning: Many failures without assigned reason!</p>\n';
                break;

        #
        # Generate the graph.
        #
        fGenerateGraph = len(aidSortedRaw) <= 9 and len(aidSortedRaw) > 0; ## Make this configurable.
        if fGenerateGraph:
            aidSorted = aidSortedRaw;

            asNames = [];
            for idReason in aidSorted:
                oReason = oSet.dSubjects[idReason];
                asNames.append('%s / %s' % (oReason.oCategory.sShort, oReason.sShort,) )
            if fIncludeWithoutReason:
                asNames.append('No reason');

            oTable = WuiHlpGraphDataTable('Period', asNames);

            cMax = oSet.cMaxHits;
            for _, oPeriod in enumerate(reversed(oSet.aoPeriods)):
                aiValues = [];

                for idReason in aidSorted:
                    oRow = oPeriod.dRowsById.get(idReason, None);
                    iValue = oRow.cHits if oRow is not None else 0;
                    aiValues.append(iValue);

                if fIncludeWithoutReason:
                    aiValues.append(oPeriod.cWithoutReason);
                    if oPeriod.cWithoutReason > cMax:
                        cMax = oPeriod.cWithoutReason;

                oTable.addRow(oPeriod.sDesc, aiValues);

            oGraph = WuiHlpBarGraph('failure-reason', oTable, self._oDisp);
            oGraph.setRangeMax(max(cMax + 1, 3));
            sHtml += oGraph.renderGraph();
        return sHtml;