mirror of https://github.com/MISP/MISP
chg: [server:pull] Pluralized `pull_relevant_cluster` as we may pull
more than onepull/6120/head
parent
9efef3a854
commit
cb764f42c3
|
@ -669,7 +669,7 @@ class ServersController extends AppController
|
|||
if (false == $this->Server->data['Server']['pull'] && ($technique == 'full' || $technique == 'incremental')) {
|
||||
$error = __('Pull setting not enabled for this server.');
|
||||
}
|
||||
if (false == $this->Server->data['Server']['pull_galaxy_clusters'] && ($technique == 'pull_relevant_cluster')) {
|
||||
if (false == $this->Server->data['Server']['pull_galaxy_clusters'] && ($technique == 'pull_relevant_clusters')) {
|
||||
$error = __('Pull setting not enabled for this server.');
|
||||
}
|
||||
if (empty($error)) {
|
||||
|
|
|
@ -1568,7 +1568,7 @@ class GalaxyCluster extends AppModel
|
|||
if ("update" === $technique) {
|
||||
$localClustersToUpdate = $this->getElligibleLocalClustersToUpdate($user);
|
||||
$clusterIds = $this->Server->getElligibleClusterIdsFromServerForPull($server, $HttpSocket=null, $onlyUpdateLocalCluster=true, $elligibleClusters=$localClustersToUpdate);
|
||||
} elseif ("pull_relevant_cluster" === $technique) {
|
||||
} elseif ("pull_relevant_clusters" === $technique) {
|
||||
// Fetch all local custom cluster tags then fetch their corresponding clusters on the remote end
|
||||
$tagNames = $this->Tag->find('list', array(
|
||||
'conditions' => array(
|
||||
|
|
|
@ -2626,10 +2626,10 @@ class Server extends AppModel
|
|||
if (!empty($server['Server']['pull_galaxy_clusters'])) {
|
||||
$this->GalaxyCluster = ClassRegistry::init('GalaxyCluster');
|
||||
if ($jobId) {
|
||||
$job->saveField('message', $technique == 'pull_relevant_cluster' ? __('Pulling relevant galaxy clusters.') : __('Pulling galaxy clusters.'));
|
||||
$job->saveField('message', $technique == 'pull_relevant_clusters' ? __('Pulling relevant galaxy clusters.') : __('Pulling galaxy clusters.'));
|
||||
}
|
||||
$pulledClusters = $this->GalaxyCluster->pullGalaxyClusters($user, $server, $technique);
|
||||
if ($technique == 'pull_relevant_cluster') {
|
||||
if ($technique == 'pull_relevant_clusters') {
|
||||
if ($jobId) {
|
||||
$job->saveField('progress', 100);
|
||||
$job->saveField('message', 'Pulling complete.');
|
||||
|
|
|
@ -176,7 +176,7 @@ foreach ($servers as $row_pos => $server):
|
|||
echo sprintf('<a href="%s" title="%s" aria-label="%s" class="%s"></a>', $baseurl . '/servers/pull/' . h($server['Server']['id']) . '/full', __('Pull all'), __('Pull all'), 'fa fa-arrow-circle-down');
|
||||
}
|
||||
if ($server['Server']['pull_galaxy_clusters']) {
|
||||
echo sprintf('<a href="%s" title="%s" aria-label="%s" class="%s"></a>', $baseurl . '/servers/pull/' . h($server['Server']['id']) . '/pull_relevant_cluster', __('Pull known relevant custom clusters'), __('Pull relevant clusters'), 'fa fa-star');
|
||||
echo sprintf('<a href="%s" title="%s" aria-label="%s" class="%s"></a>', $baseurl . '/servers/pull/' . h($server['Server']['id']) . '/pull_relevant_clusters', __('Pull known relevant custom clusters'), __('Pull relevant clusters'), 'fa fa-star');
|
||||
}
|
||||
if ($server['Server']['push'] || $server['Server']['push_sightings']) {
|
||||
echo sprintf('<a href="%s" title="%s" aria-label="%s" class="%s"></a>', $baseurl . '/servers/push/' . h($server['Server']['id']) . '/full', __('Push all'), __('Push all'), 'fa fa-arrow-circle-up');
|
||||
|
|
Loading…
Reference in New Issue