Search in sources :

Example 1 with WaterfallTab

use of com.att.aro.ui.view.waterfalltab.WaterfallTab in project VideoOptimzer by attdevsupport.

the class ARODiagnosticsOverviewRouteImpl method updateDiagnosticsTab.

@Override
public void updateDiagnosticsTab(Object routeInfo) {
    int oldPanelIndex = jtabbedPane.getSelectedIndex();
    jtabbedPane.setSelectedIndex(DIAGNOSTIC_INDEX);
    DiagnosticsTab diagnosticsTab = (DiagnosticsTab) jtabbedPane.getSelectedComponent();
    if (routeInfo == null) {
        jtabbedPane.setSelectedIndex(oldPanelIndex);
        LOG.error("Diagnostics Tab needs a type for updating");
        return;
    }
    LOG.debug("Type used to route to Diagnostics Tab: " + routeInfo.getClass().getSimpleName());
    if (routeInfo instanceof CacheEntry) {
        diagnosticsTab.setHighlightedTCP(((CacheEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof Session) {
        diagnosticsTab.setHighlightedTCP(((Session) routeInfo));
    } else if (routeInfo instanceof HttpRequestResponseInfo) {
        diagnosticsTab.setHighlightedTCP((HttpRequestResponseInfo) routeInfo);
    } else if (routeInfo instanceof HttpEntry) {
        diagnosticsTab.setHighlightedTCP(((HttpEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof DisplayNoneInCSSEntry) {
        diagnosticsTab.setHighlightedTCP(((DisplayNoneInCSSEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof ImageMdataEntry) {
        diagnosticsTab.setHighlightedTCP(((ImageMdataEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof ImageCompressionEntry) {
        diagnosticsTab.setHighlightedTCP(((ImageCompressionEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof MultipleConnectionsEntry) {
        if (((MultipleConnectionsEntry) routeInfo).isMultiple()) {
            jtabbedPane.setSelectedIndex(WATERFALL_INDEX);
            WaterfallTab waterfallTab = (WaterfallTab) jtabbedPane.getSelectedComponent();
            waterfallTab.updateGraph(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
        } else {
            if (((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo().getSession() != null) {
                diagnosticsTab.setHighlightedSessionTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
            } else {
                diagnosticsTab.setHighlightedTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
            }
        }
    } else if (routeInfo instanceof SpriteImageEntry) {
        diagnosticsTab.setHighlightedTCP(((SpriteImageEntry) routeInfo).getHttpRequestResponse());
    } else if (routeInfo instanceof UnnecessaryConnectionEntry) {
        UnnecessaryConnectionEntry unConnectionEntry = (UnnecessaryConnectionEntry) routeInfo;
        diagnosticsTab.setHighlightedTCP(unConnectionEntry.getLowTime());
    } else if (routeInfo instanceof TransmissionPrivateDataEntry || routeInfo instanceof UnsecureSSLVersionEntry || routeInfo instanceof ForwardSecrecyEntry) {
        diagnosticsTab.setHighlightedTCP(routeInfo);
    } else if (routeInfo instanceof VideoStall) {
        double timestamp = ((VideoStall) routeInfo).getSegmentTryingToPlay().getStartTS();
        diagnosticsTab.getGraphPanel().setGraphView(timestamp, true);
        diagnosticsTab.getVideoPlayer().setMediaTime(timestamp);
    } else {
        jtabbedPane.setSelectedIndex(oldPanelIndex);
        LOG.error("Diagnostics Tab cannot handle a type of " + routeInfo.getClass().getSimpleName() + " for updating");
    }
}
Also used : ImageMdataEntry(com.att.aro.core.bestpractice.pojo.ImageMdataEntry) TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) HttpRequestResponseInfo(com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo) DisplayNoneInCSSEntry(com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry) DiagnosticsTab(com.att.aro.ui.view.diagnostictab.DiagnosticsTab) CacheEntry(com.att.aro.core.packetanalysis.pojo.CacheEntry) UnnecessaryConnectionEntry(com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionEntry) ForwardSecrecyEntry(com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry) HttpEntry(com.att.aro.core.bestpractice.pojo.HttpEntry) ImageCompressionEntry(com.att.aro.core.bestpractice.pojo.ImageCompressionEntry) UnsecureSSLVersionEntry(com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionEntry) WaterfallTab(com.att.aro.ui.view.waterfalltab.WaterfallTab) SpriteImageEntry(com.att.aro.core.bestpractice.pojo.SpriteImageEntry) Session(com.att.aro.core.packetanalysis.pojo.Session) VideoStall(com.att.aro.core.packetanalysis.pojo.VideoStall)

Example 2 with WaterfallTab

use of com.att.aro.ui.view.waterfalltab.WaterfallTab in project VideoOptimzer by attdevsupport.

the class MainFrame method getJTabbedPane.

private JTabbedPane getJTabbedPane() {
    if (jMainTabbedPane == null) {
        UIManager.getDefaults().put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
        UIManager.getDefaults().put("TabbedPane.tabsOverlapBorder", true);
        jMainTabbedPane = new JTabbedPane();
        route = new ARODiagnosticsOverviewRouteImpl(jMainTabbedPane);
        bestPracticesTab = new BestPracticesTab(this, route);
        jMainTabbedPane.add(BUNDLE.getString("aro.tab.bestpractices"), bestPracticesTab);
        modelObserver.registerObserver(bestPracticesTab);
        overviewTab = new OverviewTab(route);
        jMainTabbedPane.add(BUNDLE.getString("aro.tab.overview"), overviewTab.layoutDataPanel());
        modelObserver.registerObserver(overviewTab);
        diagnosticsTab = new DiagnosticsTab(this, route);
        jMainTabbedPane.add(BUNDLE.getString("aro.tab.advanced"), diagnosticsTab);
        modelObserver.registerObserver(diagnosticsTab);
        videoTab = new VideoTab(this, route);
        jMainTabbedPane.add(BUNDLE.getString("aro.tab.video"), videoTab);
        modelObserver.registerObserver(videoTab);
        statisticsTab = new StatisticsTab(this);
        jMainTabbedPane.add(BUNDLE.getString("aro.tab.statistics"), statisticsTab);
        modelObserver.registerObserver(statisticsTab);
        waterfallTab = new WaterfallTab(route);
        jMainTabbedPane.add(BUNDLE.getString("aro.tab.waterfall"), waterfallTab.layoutDataPanel());
        modelObserver.registerObserver(waterfallTab);
        jMainTabbedPane.addChangeListener(new ChangeListener() {

            @Override
            public void stateChanged(ChangeEvent event) {
                onTabChanged(event);
            }
        });
    }
    return jMainTabbedPane;
}
Also used : ARODiagnosticsOverviewRouteImpl(com.att.aro.ui.commonui.ARODiagnosticsOverviewRouteImpl) VideoTab(com.att.aro.ui.view.videotab.VideoTab) Insets(java.awt.Insets) ChangeEvent(javax.swing.event.ChangeEvent) JTabbedPane(javax.swing.JTabbedPane) StatisticsTab(com.att.aro.ui.view.statistics.StatisticsTab) OverviewTab(com.att.aro.ui.view.overviewtab.OverviewTab) WaterfallTab(com.att.aro.ui.view.waterfalltab.WaterfallTab) ChangeListener(javax.swing.event.ChangeListener) PropertyChangeListener(java.beans.PropertyChangeListener) BestPracticesTab(com.att.aro.ui.view.bestpracticestab.BestPracticesTab) DiagnosticsTab(com.att.aro.ui.view.diagnostictab.DiagnosticsTab)

Aggregations

DiagnosticsTab (com.att.aro.ui.view.diagnostictab.DiagnosticsTab)2 WaterfallTab (com.att.aro.ui.view.waterfalltab.WaterfallTab)2 DisplayNoneInCSSEntry (com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry)1 ForwardSecrecyEntry (com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry)1 HttpEntry (com.att.aro.core.bestpractice.pojo.HttpEntry)1 ImageCompressionEntry (com.att.aro.core.bestpractice.pojo.ImageCompressionEntry)1 ImageMdataEntry (com.att.aro.core.bestpractice.pojo.ImageMdataEntry)1 MultipleConnectionsEntry (com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry)1 SpriteImageEntry (com.att.aro.core.bestpractice.pojo.SpriteImageEntry)1 TransmissionPrivateDataEntry (com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry)1 UnnecessaryConnectionEntry (com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionEntry)1 UnsecureSSLVersionEntry (com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionEntry)1 CacheEntry (com.att.aro.core.packetanalysis.pojo.CacheEntry)1 HttpRequestResponseInfo (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo)1 Session (com.att.aro.core.packetanalysis.pojo.Session)1 VideoStall (com.att.aro.core.packetanalysis.pojo.VideoStall)1 ARODiagnosticsOverviewRouteImpl (com.att.aro.ui.commonui.ARODiagnosticsOverviewRouteImpl)1 BestPracticesTab (com.att.aro.ui.view.bestpracticestab.BestPracticesTab)1 OverviewTab (com.att.aro.ui.view.overviewtab.OverviewTab)1 StatisticsTab (com.att.aro.ui.view.statistics.StatisticsTab)1