mirror of https://github.com/MISP/MISP
micro cleanup of servers index
parent
435c52c457
commit
8fe83c333f
|
@ -152,9 +152,6 @@ class ServersController extends AppController {
|
||||||
public function pull($id = null, $technique=false) {
|
public function pull($id = null, $technique=false) {
|
||||||
// TODO should we de-activate data validation for type and category / and or mapping? Maybe other instances have other configurations that are incompatible.
|
// TODO should we de-activate data validation for type and category / and or mapping? Maybe other instances have other configurations that are incompatible.
|
||||||
if (!$this->_IsSiteAdmin() && !($this->Server->organization == $this->Auth->user('org') && $this->checkAction('perm_sync'))) $this->redirect(array('controller' => 'servers', 'action' => 'index'));
|
if (!$this->_IsSiteAdmin() && !($this->Server->organization == $this->Auth->user('org') && $this->checkAction('perm_sync'))) $this->redirect(array('controller' => 'servers', 'action' => 'index'));
|
||||||
// if (!$this->request->is('post')) {
|
|
||||||
// throw new MethodNotAllowedException();
|
|
||||||
// }
|
|
||||||
$this->Server->id = $id;
|
$this->Server->id = $id;
|
||||||
if (!$this->Server->exists()) {
|
if (!$this->Server->exists()) {
|
||||||
throw new NotFoundException(__('Invalid server'));
|
throw new NotFoundException(__('Invalid server'));
|
||||||
|
@ -184,10 +181,8 @@ class ServersController extends AppController {
|
||||||
$eventIds = array_reverse($eventIds);
|
$eventIds = array_reverse($eventIds);
|
||||||
} elseif ("incremental" == $technique) {
|
} elseif ("incremental" == $technique) {
|
||||||
// TODO incremental pull
|
// TODO incremental pull
|
||||||
// lastpulledid
|
|
||||||
throw new NotFoundException('Sorry, this is not yet implemented');
|
throw new NotFoundException('Sorry, this is not yet implemented');
|
||||||
|
|
||||||
// increment lastid based on the highest ID seen
|
|
||||||
} elseif (true == $technique) {
|
} elseif (true == $technique) {
|
||||||
$eventIds[] = intval($technique);
|
$eventIds[] = intval($technique);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,10 @@ foreach ($servers as $server): ?>
|
||||||
<td class="short"><?php echo $server['Server']['lastpushedid']; ?></td>
|
<td class="short"><?php echo $server['Server']['lastpushedid']; ?></td>
|
||||||
<td class="short action-links">
|
<td class="short action-links">
|
||||||
<?php
|
<?php
|
||||||
if ($server['Server']['pull'] && $me['org'] == 'ADMIN') echo $this->Form->postLink('', array('action' => 'pull', $server['Server']['id'], 'full'), array('class' => 'icon-download', 'title' => 'Pull all'));
|
if ($server['Server']['pull'] && $me['org'] == 'ADMIN')
|
||||||
if ($server['Server']['push'] && $me['org'] == 'ADMIN') echo $this->Form->postLink('', array('action' => 'push', $server['Server']['id'], 'full'), array('class' => 'icon-upload', 'title' => 'Push all') );
|
echo $this->Html->link('', array('action' => 'pull', $server['Server']['id'], 'full'), array('class' => 'icon-download', 'title' => 'Pull all'));
|
||||||
|
if ($server['Server']['push'] && $me['org'] == 'ADMIN')
|
||||||
|
echo $this->Form->postLink('', array('action' => 'push', $server['Server']['id'], 'full'), array('class' => 'icon-upload', 'title' => 'Push all') );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue