new: Show galaxy namespaces and allow the loading of the new field

pull/3267/head
iglocska 2018-05-20 22:57:01 +02:00
parent 3b2927a47f
commit c0fd043143
3 changed files with 9 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class AppModel extends Model {
public $db_changes = array(
1 => false, 2 => false, 3 => false, 4 => true, 5 => false, 6 => false,
7 => false, 8 => false
7 => false, 8 => false, 9 => false
);
function afterSave($created, $options = array()) {
@ -928,6 +928,10 @@ class AppModel extends Model {
INDEX `noticelist_id` (`noticelist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;';
break;
case 9:
$sqlArray[] = 'ALTER TABLE galaxies ADD namespace varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT "misp";';
$indexArray[] = array('galaxies', 'namespace');
break;
case 'fixNonEmptySharingGroupID':
$sqlArray[] = 'UPDATE `events` SET `sharing_group_id` = 0 WHERE `distribution` != 4;';
$sqlArray[] = 'UPDATE `attributes` SET `sharing_group_id` = 0 WHERE `distribution` != 4;';

View File

@ -22,6 +22,7 @@
<th><?php echo $this->Paginator->sort('icon');?></th>
<th><?php echo $this->Paginator->sort('name');?></th>
<th><?php echo $this->Paginator->sort('version');?></th>
<th><?php echo $this->Paginator->sort('namespace');?></th>
<th><?php echo $this->Paginator->sort('description');?></th>
<th class="actions"><?php echo $this->Paginator->sort('description');?></th>
</tr><?php
@ -31,6 +32,7 @@ foreach ($list as $item):?>
<td class="short"><span class="fa fa-<?php echo h($item['Galaxy']['icon']); ?>"></span></td>
<td><?php echo h($item['Galaxy']['name']);?>&nbsp;</td>
<td class="short"><?php echo h($item['Galaxy']['version']);?>&nbsp;</td>
<td class="short"><?php echo h($item['Galaxy']['namespace']);?>&nbsp;</td>
<td><?php echo h($item['Galaxy']['description']);?>&nbsp;</td>
<td class="short action-links">
<?php echo $this->Html->link('', array('action' => 'view', $item['Galaxy']['id']), array('class' => 'icon-list-alt', 'title' => 'View'));?>

View File

@ -13,6 +13,8 @@
<dd><?php echo h($galaxy['Galaxy']['id']); ?></dd>
<dt><?php echo __('Name');?></dt>
<dd><?php echo $galaxy['Galaxy']['name'] ? h($galaxy['Galaxy']['name']) : h($galaxy['Galaxy']['type']); ?></dd>
<dt><?php echo __('Namespace');?></dt>
<dd><?php echo $galaxy['Galaxy']['namespace'] ? h($galaxy['Galaxy']['namespace']) : 'misp'; ?></dd>
<dt><?php echo __('Uuid');?></dt>
<dd><?php echo h($galaxy['Galaxy']['uuid']); ?></dd>
<dt><?php echo __('Description');?></dt>