use of com.att.aro.ui.view.diagnostictab.DiagnosticsTab in project VideoOptimzer by attdevsupport.
the class ARODiagnosticsOverviewRouteImpl method routeHyperlink.
@Override
public void routeHyperlink(BestPracticeType bpType) {
if (bpType.equals(BestPracticeType.DUPLICATE_CONTENT)) {
jtabbedPane.setSelectedIndex(OVERVIEW_INDEX);
} else {
jtabbedPane.setSelectedIndex(DIAGNOSTIC_INDEX);
DiagnosticsTab diagnosticsTab = (DiagnosticsTab) jtabbedPane.getSelectedComponent();
switch(bpType) {
case FILE_COMPRESSION:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof FileCompressionResult) {
// diagnosticsTab.setHighlightedTCP(((FileCompressionResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
// break;
case USING_CACHE:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof UsingCacheResult) {
diagnosticsTab.setHighlightedTCP(((UsingCacheResult) result).getNoCacheHeaderFirstPacket().getTimeStamp());
break;
}
}
}
break;
case CACHE_CONTROL:
{
// cant not find cache control start time in
// CacheControlResult
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof CacheControlResult) {
// diagnosticsTab.setHighlightedTCP(((CacheControlResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case COMBINE_CS_JSS:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof CombineCsJssResult) {
diagnosticsTab.setHighlightedTCP(((CombineCsJssResult) result).getConsecutiveCssJsFirstPacket().getTimeStamp());
break;
}
}
}
break;
case IMAGE_SIZE:
{
}
break;
case IMAGE_MDATA:
{
}
break;
case IMAGE_CMPRS:
{
}
break;
case IMAGE_FORMAT:
{
}
break;
case IMAGE_COMPARE:
{
}
break;
case MINIFICATION:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof CombineCsJssResult) {
// diagnosticsTab.setHighlightedTCP(((MinificationResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case SPRITEIMAGE:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof SpriteImageResult) {
// diagnosticsTab.setHighlightedTCP(((SpriteImageResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case UNNECESSARY_CONNECTIONS:
{
// to test
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof UnnecessaryConnectionResult) {
diagnosticsTab.setHighlightedTCP(((UnnecessaryConnectionResult) result).getTightlyCoupledBurstTime());
break;
}
}
}
break;
case SCRIPTS_URL:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof ScriptsResult) {
diagnosticsTab.setHighlightedTCP(((ScriptsResult) result).getFirstFailedHtml());
break;
}
}
}
break;
case SCREEN_ROTATION:
{
}
break;
case SIMUL_CONN:
{
}
break;
case MULTI_SIMULCONN:
{
}
break;
case PERIODIC_TRANSFER:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof PeriodicTransferResult) {
diagnosticsTab.setHighlightedTCP(((PeriodicTransferResult) result).getMinimumPeriodicRepeatTime());
break;
}
}
}
break;
case HTTP_4XX_5XX:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof Http4xx5xxResult) {
// diagnosticsTab.setHighlightedTCP(((Http4xx5xxResult)result).getHttpResCodelist()ConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case HTTP_3XX_CODE:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof Http3xxCodeResult) {
// diagnosticsTab.setHighlightedTCP(((Http3xxCodeResult)result).getFirstResMap()ConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case HTTP_1_0_USAGE:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof Http10UsageResult) {
diagnosticsTab.setHighlightedTCP(((Http10UsageResult) result).getHttp10Session());
break;
}
}
}
break;
case FILE_ORDER:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof FileOrderResult) {
// diagnosticsTab.setHighlightedTCP(((FileOrderResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case EMPTY_URL:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof EmptyUrlResult) {
diagnosticsTab.setHighlightedTCP(((EmptyUrlResult) result).getFirstFailedHtml());
break;
}
}
}
break;
case DISPLAY_NONE_IN_CSS:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof DisplayNoneInCSSResult) {
// diagnosticsTab.setHighlightedTCP(((DisplayNoneInCSSResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case CONNECTION_OPENING:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof ConnectionOpeningResult) {
// diagnosticsTab.setHighlightedTCP(((ConnectionOpeningResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case CONNECTION_CLOSING:
{
// done
for (AbstractBestPracticeResult result : diagnosticsTab.getAnalyzerResult().getBestPracticeResults()) {
if (result instanceof ConnectionClosingResult) {
diagnosticsTab.setHighlightedTCP(((ConnectionClosingResult) result).getLargestEnergyTime());
break;
}
}
}
break;
case ASYNC_CHECK:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof AsyncCheckInScriptResult) {
// diagnosticsTab.setHighlightedTCP(((AsyncCheckInScriptResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
case ACCESSING_PERIPHERALS:
{
// for (AbstractBestPracticeResult result :
// diagnosticsTab.getAnalyzerResult().getBestPracticeResults())
// {
// if (result instanceof AccessingPeripheralResult) {
// diagnosticsTab.setHighlightedTCP(((AccessingPeripheralResult)result).getConsecutiveCssJsFirstPacket().getTimeStamp());
// break;
// }
// }
}
break;
default:
break;
}
// switch
}
}
use of com.att.aro.ui.view.diagnostictab.DiagnosticsTab in project VideoOptimzer by attdevsupport.
the class ChartPlotOptionsDialog method getOkButton.
/**
* Initializes and returns the OK Button
*/
private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText(ResourceBundleHelper.getMessageString(DialogItem.chart_options_dialog_button_ok));
okButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
currentCheckedOptionList = getCheckedOptions();
if (!validateSelectedOptions(currentCheckedOptionList)) {
return;
}
guiPreferences.setChartPlotOptions(currentCheckedOptionList);
new Thread(() -> sendGAViews(currentCheckedOptionList)).start();
Component currentTab = parent.getCurrentTabComponent();
if (currentTab != null && currentTab instanceof DiagnosticsTab) {
parent.updateChartSelection(currentCheckedOptionList);
}
setVisible(false);
callerMenuItem.setEnabled(true);
}
});
}
return okButton;
}
use of com.att.aro.ui.view.diagnostictab.DiagnosticsTab 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");
}
}
use of com.att.aro.ui.view.diagnostictab.DiagnosticsTab 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;
}
Aggregations