public final function onInit(IntegrationInitEvent $event)
 {
     $integrations = $this->getIntegration($event->getProject());
     if ($integrations instanceof Integration) {
         $integrations = [$integrations];
     }
     foreach ($integrations as $integration) {
         $integration->setActiveElements($this->getActiveElementCount($event->getProject()));
         $integration->setUrl($this->getUrl($event->getProject()));
         $event->getIntegrationContainer()->addIntegration($integration);
     }
 }
 public function onInit(IntegrationInitEvent $event)
 {
     $systems = $this->doctrine->getRepository('KoalamonIncidentDashboardBundle:System')->findBy(['project' => $event->getProject()]);
     $activeSystemsCount = 0;
     foreach ($systems as $system) {
         if (count($this->doctrine->getRepository('LeanKoalaIntegrationMissingRequestBundle:Collection')->findBySystem($system)) > 0) {
             $activeSystemsCount++;
         }
     }
     $integrationContainer = $event->getIntegrationContainer();
     $url = $this->router->generate('leankoala_integration_missing_request_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $integrationContainer->addIntegration(new Integration('MissingRequest (lite)', '/images/integrations/missing_logo.png', 'Tool for checking missing http requests.', $url, $activeSystemsCount));
 }
 public function onInit(IntegrationInitEvent $event)
 {
     $integrationContainer = $event->getIntegrationContainer();
     $url = $this->router->generate('leankoala_integration_zaproxy_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $integrationContainer->addIntegration(new Integration('Security Scanner', '/images/integrations/zap.png', 'Scanning your systems for security issues.', $url));
 }
 public function onInit(IntegrationInitEvent $event)
 {
     $repo = $this->doctrine->getRepository('KoalamonIntegrationBundle:IntegrationSystem');
     $integrationContainer = $event->getIntegrationContainer();
     $url = $this->router->generate('leankoala_integration_smoke_xml_well_formed_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(XmlWellFormedController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('Xml Checker', '/bundles/leankoalaintegrationsmoke/images/xml.png', 'Checks if an xml file is well-formed.', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_sitemap_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(SitemapController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('Xml Sitemap Checker', '/bundles/leankoalaintegrationsmoke/images/sitemap.png', 'Checks if an xml sitemap is valid.', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_seo_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(LittleSeoController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('LittleSEO', '/bundles/leankoalaintegrationsmoke/images/littleseo.png', 'Checking some search engine rules', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_xpath_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(XPathCheckerController::INTEGRATION_ID, $event->getProject());
     $integrationContainer->addIntegration(new Integration('XPath Checker', '/bundles/leankoalaintegrationsmoke/images/xpath.png', 'Checking if given XPaths do exist.', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_json_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(JsonValidatorController::INTEGRATION_ID, $event->getProject());
     $integrationContainer->addIntegration(new Integration('Json Validator', '/bundles/leankoalaintegrationsmoke/images/json.png', 'Checking if given Systems return valid json', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_http_head_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(HttpHeadController::INTEGRATION_ID, $event->getProject());
     $integrationContainer->addIntegration(new Integration('Http Header Check', '/bundles/leankoalaintegrationsmoke/images/head.png', 'Checking if a given http header exists', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_reg_ex_exists_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(RegExExistsController::INTEGRATION_ID, $event->getProject());
     $integrationContainer->addIntegration(new Integration('RegEx Exists', '/bundles/leankoalaintegrationsmoke/images/regex.png', 'Checks if a given regular expression exists', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_https_cert_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(HttpsCertController::INTEGRATION_ID, $event->getProject());
     $integrationContainer->addIntegration(new Integration('Https Certificate Checker', '/bundles/leankoalaintegrationsmoke/images/httpscert.png', 'Checks if the https certificate is valid', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_css_selector_checker_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(CssSelectorCheckerController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('CSS Selector Checker', '/bundles/leankoalaintegrationsmoke/images/cssselector.png', 'Checks if a CSS Selector is found in DOM.', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_json_path_checker_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(JsonPathCheckerController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('JSON Path Checker', '/bundles/leankoalaintegrationsmoke/images/jsonpath.png', 'Checks if a JSON Path is found in JSON document.', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_xml_valid_xsd_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(XmlValidXsdController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('XSD Validation', '/bundles/leankoalaintegrationsmoke/images/xsd.png', 'Checks if a XML document is valide against one or more XSD files.', $url, $activeSystems));
     $url = $this->router->generate('leankoala_integration_smoke_json_schema_homepage', ['project' => $event->getProject()->getIdentifier()]);
     $activeSystems = $repo->findActiveElementsCount(JsonSchemaController::INTEGRATION_ID, $event->getProject(), true);
     $integrationContainer->addIntegration(new Integration('JSON Schema Validator', '/bundles/leankoalaintegrationsmoke/images/jsonschema.png', 'Checks if a JSON document is valide against a JSON Schema file.', $url, $activeSystems));
 }