element('genericElements/IndexTable/Fields/links', array( 'url' => $baseurl . '/galaxy_clusters/view/', 'row' => $cluster, 'field' => array( 'data_path' => 'GalaxyCluster.extended_from.GalaxyCluster.id', 'title' => sprintf(__('%s (version: %s)'), $cluster['GalaxyCluster']['extended_from']['GalaxyCluster']['value'], $cluster['GalaxyCluster']['extends_version']) ), )); $extendedFromHtml = sprintf('', $element); } if ($newVersionAvailable) { $extendedFromHtml .= sprintf('
%s
', sprintf(__('New version available! Update cluster to version %s'), '/galaxy_clusters/updateCluster/' . $cluster['GalaxyCluster']['id'], h($cluster['GalaxyCluster']['extended_from']['GalaxyCluster']['version']) )); } $extendedByHtml = ''; $extendByLinks = array(); foreach ($cluster['GalaxyCluster']['extended_by'] as $extendCluster) { $element = $this->element('genericElements/IndexTable/Fields/links', array( 'url' => '/galaxy_clusters/view/', 'row' => $extendCluster, 'field' => array( 'data_path' => 'GalaxyCluster.id', 'title' => sprintf(__('%s (parent version: %s)'), $extendCluster['GalaxyCluster']['value'], $extendCluster['GalaxyCluster']['extends_version']) ), )); $extendByLinks[] = sprintf('
  • %s
  • ', $element); } if (!empty($extendByLinks)) { $extendedByHtml = sprintf('', implode('', $extendByLinks)); } $description = $this->Markdown->cleanup($cluster['GalaxyCluster']['description']); $table_data = array(); $table_data[] = array('key' => __('Cluster ID'), 'value' => $cluster['GalaxyCluster']['id']); $table_data[] = array('key' => __('Name'), 'value' => $cluster['GalaxyCluster']['value']); $table_data[] = array('key' => __('Parent Galaxy'), 'value' => $cluster['GalaxyCluster']['Galaxy']['name'] ? $cluster['GalaxyCluster']['Galaxy']['name'] : $cluster['GalaxyCluster']['Galaxy']['type']); $table_data[] = array('key' => __('Description'), 'value' => $description, 'value_class' => 'md'); if (!$cluster['GalaxyCluster']['default']) { $table_data[] = [ 'key' => __('Published'), 'boolean' => $cluster['GalaxyCluster']['published'], 'class' => !$cluster['GalaxyCluster']['published'] ? 'background-red bold' : '' ]; } $table_data[] = array('key' => __('Default'), 'boolean' => $cluster['GalaxyCluster']['default'], 'class' => 'black'); $table_data[] = array('key' => __('Version'), 'value' => $cluster['GalaxyCluster']['version']); $table_data[] = array('key' => __('UUID'), 'value' => $cluster['GalaxyCluster']['uuid'], 'value_class' => 'quickSelect'); $table_data[] = array('key' => __('Collection UUID'), 'value' => $cluster['GalaxyCluster']['collection_uuid'], 'value_class' => 'quickSelect'); $table_data[] = array( 'key' => __('Source'), 'html' => filter_var($cluster['GalaxyCluster']['source'], FILTER_VALIDATE_URL) ? '' . h($cluster['GalaxyCluster']['source']) : h($cluster['GalaxyCluster']['source']), ); $table_data[] = array('key' => __('Authors'), 'value' => !empty($cluster['GalaxyCluster']['authors']) ? implode(', ', $cluster['GalaxyCluster']['authors']) : __('N/A')); $table_data[] = array('key' => __('Distribution'), 'element' => 'genericElements/IndexTable/Fields/distribution_levels', 'element_params' => array( 'row' => $cluster['GalaxyCluster'], 'field' => array('data_path' => 'distribution') )); $table_data[] = array( 'key' => __('Owner Organisation'), 'html' => $this->OrgImg->getOrgImg(array('name' => $cluster['GalaxyCluster']['Org']['name'], 'id' => $cluster['GalaxyCluster']['Org']['id'], 'size' => 18), true), ); $table_data[] = array( 'key' => __('Creator Organisation'), 'html' => $this->OrgImg->getOrgImg(array('name' => $cluster['GalaxyCluster']['Orgc']['name'], 'id' => $cluster['GalaxyCluster']['Orgc']['id'], 'size' => 18), true), ); $table_data[] = array('key' => __('Connector tag'), 'value' => $cluster['GalaxyCluster']['tag_name']); $table_data[] = array('key' => __('Events'), 'html' => isset($cluster['GalaxyCluster']['tag_count']) ? sprintf('%s', sprintf('%s/events/index/searchtag:%s', $baseurl, h($cluster['GalaxyCluster']['tag_id'])), __n('%s event', '%s events', $cluster['GalaxyCluster']['tag_count'], h($cluster['GalaxyCluster']['tag_count'])) ): '0' ); if (!empty($extendedFromHtml)) { $table_data[] = array('key' => __('Forked From'), 'html' => $extendedFromHtml); } if (!empty($extendedByHtml)) { $table_data[] = array('key' => __('Forked By'), 'html' => $extendedByHtml); } ?>

    element('genericElements/viewMetaTable', array('table_data' => $table_data)); ?>
    ', 'https://cycat.org/', __('CyCAT or the CYbersecurity Resource CATalogue aims at mapping and documenting, in a single formalism and catalogue all the available cybersecurity tools, rules, playbooks, processes and controls.'), $baseurl . '/img/CyCat.ico' ); echo $this->element('/genericElements/accordion', [ 'title' => 'CyCat Relationships', 'titleHTML' => $titleHTML, 'url' => '/galaxy_clusters/viewCyCatRelations/' . $cluster['GalaxyCluster']['id'] ]); } ?>
    element('genericElements/assetLoader', array( 'js' => array( 'markdown-it', ), )); ?> element('/genericElements/SideMenu/side_menu', array('menuList' => 'galaxies', 'menuItem' => 'view_cluster'));