Package com.eviware.soapui.support.components.MetricsPanel

Examples of com.eviware.soapui.support.components.MetricsPanel.MetricsSection


      this.iface = iface;
    }

    public Object construct( XProgressMonitor monitor )
    {
      MetricsSection section = metrics.getSection( DEFINITION_PARTS_SECTION );
      section.clear();

      try
      {
        WadlDefinitionContext wadlContext = iface.getWadlContext();
        if( iface.isGenerated() )
          wadlContext.regenerateWadl();
        List<InterfaceDefinitionPart> parts = wadlContext.getDefinitionParts();

        int tabCount = partTabs.getTabCount();

        for( InterfaceDefinitionPart part : parts )
        {
          addTab( part.getUrl(), part.getContent() );
        }

        while( tabCount-- > 0 )
          partTabs.remove( 0 );

        return null;
      }
      catch( Exception e )
      {
        logger.error( "Failed to load WSDL; " + e.getClass().getSimpleName() + "; " + e.getMessage() );
        add( new JLabel( "Failed to load WSDL; " + e.toString() ), BorderLayout.NORTH );

        SoapUI.logError( e );

        return e;
      }
      finally
      {
        section.finish();
      }
    }
View Full Code Here


    JXToolBar toolbar = UISupport.createSmallToolbar();
    toolbar.addGlue();
    toolbar.addFixed( UISupport
        .createToolbarButton( new ShowOnlineHelpAction( HelpUrls.INTERFACE_OVERVIEW_HELP_URL ) ) );
    metrics.add( toolbar, BorderLayout.NORTH );
    MetricsSection section = metrics.addSection( "WSDL Definition" );

    try
    {
      section.addMetric( "WSDL URL", MetricType.URL ).set( iface.getDefinition() );
      section.addMetric( "Namespace" ).set( iface.getBindingName().getNamespaceURI() );
      section.addMetric( "Binding" ).set( iface.getBindingName().getLocalPart() );
      section.addMetric( "SOAP Version" ).set( iface.getSoapVersion().toString() );
      section.addMetric( "Style" ).set( iface.getStyle() );
      section.addMetric( "WS-A version" ).set( iface.getWsaVersion() );
    }
    catch( Exception e )
    {
      UISupport.showErrorMessage( e );
    }

    section.finish();

    metrics.addSection( "Definition Parts" );
    section = metrics.addSection( "Operations" );
    operationsTableModel = new OperationsTableModel();
    JXTable table = section.addTable( operationsTableModel );
    table.getColumn( 1 ).setPreferredWidth( 60 );
    table.getColumn( 2 ).setPreferredWidth( 60 );
    section.finish();

    table.packColumn( 3, 10 );
    if( table.getColumn( 3 ).getPreferredWidth() < 250 )
      table.getColumn( 3 ).setPreferredWidth( 250 );
View Full Code Here

      this.iface = iface;
    }

    public Object construct( XProgressMonitor monitor )
    {
      MetricsSection section = metrics.getSection( DEFINITION_PARTS_SECTION );
      section.clear();

      try
      {
        List<InterfaceDefinitionPart> schemas = iface.getWsdlContext().getDefinitionParts();
        int tabCount = partTabs.getTabCount();

        for( InterfaceDefinitionPart part : schemas )
        {
          addTab( part.getUrl(), part.getContent() );
        }

        while( tabCount-- > 0 )
          partTabs.remove( 0 );

        return null;
      }
      catch( Exception e )
      {
        logger.error( "Failed to load WSDL; " + e.getClass().getSimpleName() + "; " + e.getMessage() );
        add( new JLabel( "Failed to load WSDL; " + e.toString() ), BorderLayout.NORTH );

        SoapUI.logError( e );

        return e;
      }
      finally
      {
        section.finish();
      }

    }
View Full Code Here

  }

  private Component buildServiceOverviewTab()
  {
    metrics = new MetricsPanel();
    MetricsSection section = metrics.addSection( "WSDL Definition" );

    try
    {
      section.addMetric( "WADL URL", MetricType.URL ).set(
          restService.getWadlUrl() + ( restService.isGenerated() ? " - generated" : "" ) );

      // section.addMetric( "Namespace" ).set(
      // iface.getBindingName().getNamespaceURI() );
      // section.addMetric( "Binding" ).set(
      // iface.getBindingName().getLocalPart() );
      // section.addMetric( "SOAP Version" ).set(
      // iface.getSoapVersion().toString() );
      // section.addMetric( "Style" ).set( iface.getStyle() );
      // section.addMetric( "WS-A version" ).set( iface.getWsaVersion());
    }
    catch( Exception e )
    {
      UISupport.showErrorMessage( e );
    }

    section.finish();

    metrics.addSection( "Definition Parts" );
    section = metrics.addSection( "Resources" );
    operationsTableModel = new ResourcesTableModel();
    JXTable table = section.addTable( operationsTableModel );
    table.getColumn( 1 ).setPreferredWidth( 60 );
    section.finish();

    return new JScrollPane( metrics );
  }
View Full Code Here

    boolean rebuilt = false;
    for( Interface iface : getModelItem().getInterfaceList() )
    {
      if( !metrics.hasMetric( iface.getName() ) )
      {
        MetricsSection section = metrics.getSection( "Interface Summary" );
        buildInterfaceSummary( section.clear() );
        rebuilt = true;
        break;
      }

      newNames.add( iface.getName() );
      interfaceNameSet.remove( iface.getName() );
    }

    if( !rebuilt )
    {
      if( !interfaceNameSet.isEmpty() )
      {
        MetricsSection section = metrics.getSection( "Interface Summary" );
        buildInterfaceSummary( section.clear() );
      }

      interfaceNameSet = newNames;
    }
View Full Code Here

    metrics = new MetricsPanel();

    JXToolBar toolbar = buildOverviewToolbar();
    metrics.add( toolbar, BorderLayout.NORTH );

    MetricsSection section = metrics.addSection( "Project Summary" );
    section.addMetric( ModelItemIconFactory.getIcon( Project.class ), "File Path", MetricType.URL );
    section.finish();

    section = metrics.addSection( "Interface Summary" );
    buildInterfaceSummary( section );

    section = metrics.addSection( "Test Summary" );
    section.addMetric( ModelItemIconFactory.getIcon( TestSuite.class ), TESTSUITES_STATISTICS );
    section.addMetric( ModelItemIconFactory.getIcon( TestCase.class ), TESTCASES_STATISTICS );
    section.addMetric( ModelItemIconFactory.getIcon( TestStep.class ), TESTSTEPS_STATISTICS );
    section.addMetric( ModelItemIconFactory.getIcon( TestAssertion.class ), ASSERTIONS_STATISTICS );
    section.addMetric( ModelItemIconFactory.getIcon( LoadTest.class ), LOADTESTS_STATISTICS );
    section.finish();

    section = metrics.addSection( "Mock Summary" );
    section.addMetric( ModelItemIconFactory.getIcon( MockService.class ), MOCKSERVICES_STATISTICS );
    section.addMetric( ModelItemIconFactory.getIcon( MockOperation.class ), MOCKOPERATIONS_STATISTICS );
    section.addMetric( ModelItemIconFactory.getIcon( MockResponse.class ), MOCKRESPONSES_STATISTICS );
    section.finish();
    return new JScrollPane( metrics );
  }
View Full Code Here

        Set<String> newNames = new HashSet<String>();
        boolean rebuilt = false;
        for (Interface iface : getModelItem().getInterfaceList()) {
            if (!metrics.hasMetric(iface.getName())) {
                MetricsSection section = metrics.getSection("Interface Summary");
                buildInterfaceSummary(section.clear());
                rebuilt = true;
                break;
            }

            newNames.add(iface.getName());
            interfaceNameSet.remove(iface.getName());
        }

        if (!rebuilt) {
            if (!interfaceNameSet.isEmpty()) {
                MetricsSection section = metrics.getSection("Interface Summary");
                buildInterfaceSummary(section.clear());
            }

            interfaceNameSet = newNames;
        }
View Full Code Here

        metrics = new MetricsPanel();

        JXToolBar toolbar = buildOverviewToolbar();
        metrics.add(toolbar, BorderLayout.NORTH);

        MetricsSection section = metrics.addSection("Project Summary");
        section.addMetric(ModelItemIconFactory.getIcon(Project.class), "File Path", MetricType.URL);
        section.finish();

        section = metrics.addSection("Interface Summary");
        buildInterfaceSummary(section);

        section = metrics.addSection("Test Summary");
        section.addMetric(ModelItemIconFactory.getIcon(TestSuite.class), TESTSUITES_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(TestCase.class), TESTCASES_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(TestStep.class), TESTSTEPS_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(TestAssertion.class), ASSERTIONS_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(LoadTest.class), LOADTESTS_STATISTICS);
        section.finish();

        section = metrics.addSection("SOAP Mock Summary");
        section.addMetric(ModelItemIconFactory.getIcon(MockService.class), MOCKSERVICES_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(MockOperation.class), MOCKOPERATIONS_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(MockResponse.class), MOCKRESPONSES_STATISTICS);
        section.finish();

        section = metrics.addSection("REST Mock Summary");
        section.addMetric(ModelItemIconFactory.getIcon(RestMockService.class), REST_MOCKSERVICES_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(RestMockAction.class), REST_MOCKACTIONS_STATISTICS);
        section.addMetric(ModelItemIconFactory.getIcon(RestMockResponse.class), REST_MOCKRESPONSES_STATISTICS);
        section.finish();
        return new JScrollPane(metrics);
    }
View Full Code Here

        JXToolBar toolbar = UISupport.createSmallToolbar();
        toolbar.addGlue();
        toolbar.addFixed(UISupport
                .createToolbarButton(new ShowOnlineHelpAction(HelpUrls.INTERFACE_OVERVIEW_HELP_URL)));
        metrics.add(toolbar, BorderLayout.NORTH);
        MetricsSection section = metrics.addSection("WSDL Definition");

        try {
            section.addMetric("WSDL URL", MetricType.URL).set(iface.getDefinition());
            section.addMetric("Namespace").set(iface.getBindingName().getNamespaceURI());
            section.addMetric("Binding").set(iface.getBindingName().getLocalPart());
            section.addMetric("SOAP Version").set(iface.getSoapVersion().toString());
            section.addMetric("Style").set(iface.getStyle());
            section.addMetric("WS-A version").set(iface.getWsaVersion());
        } catch (Exception e) {
            UISupport.showErrorMessage(e);
        }

        section.finish();

        metrics.addSection("Definition Parts");
        section = metrics.addSection("Operations");
        operationsTableModel = new OperationsTableModel();
        JXTable table = section.addTable(operationsTableModel);
        table.getColumn(1).setPreferredWidth(60);
        table.getColumn(2).setPreferredWidth(60);
        section.finish();

        table.packColumn(3, 10);
        if (table.getColumn(3).getPreferredWidth() < 250) {
            table.getColumn(3).setPreferredWidth(250);
        }
View Full Code Here

        public Loader(WsdlInterface iface) {
            this.iface = iface;
        }

        public Object construct(XProgressMonitor monitor) {
            MetricsSection section = metrics.getSection(DEFINITION_PARTS_SECTION);
            section.clear();

            try {
                List<InterfaceDefinitionPart> schemas = iface.getWsdlContext().getDefinitionParts();
                int tabCount = partTabs.getTabCount();

                for (InterfaceDefinitionPart part : schemas) {
                    addTab(part.getUrl(), part.getContent());
                }

                while (tabCount-- > 0) {
                    partTabs.remove(0);
                }

                return null;
            } catch (Exception e) {
                logger.error("Failed to load WSDL; " + e.getClass().getSimpleName() + "; " + e.getMessage());
                add(new JLabel("Failed to load WSDL; " + e.toString()), BorderLayout.NORTH);

                SoapUI.logError(e);

                return e;
            } finally {
                section.finish();
            }

        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.components.MetricsPanel.MetricsSection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.