MISP/app/View/Feeds/edit.ctp

95 lines
3.8 KiB
Plaintext
Raw Normal View History

2016-02-28 22:54:09 +01:00
<div class="feed form">
<?php echo $this->Form->create('Feed');?>
<fieldset>
<legend>Edit MISP Feed</legend>
2016-03-04 14:56:56 +01:00
<p>Edit a new MISP feed source.</p>
2016-02-28 22:54:09 +01:00
<?php
2016-03-04 14:56:56 +01:00
echo $this->Form->input('enabled', array());
2016-02-28 22:54:09 +01:00
echo $this->Form->input('name', array(
'div' => 'input clear',
2016-03-04 14:56:56 +01:00
'placeholder' => 'Feed name',
'class' => 'form-control span6',
2016-02-28 22:54:09 +01:00
));
echo $this->Form->input('provider', array(
'div' => 'input clear',
2016-03-04 14:56:56 +01:00
'placeholder' => 'Name of the content provider',
'class' => 'form-control span6'
2016-02-28 22:54:09 +01:00
));
echo $this->Form->input('url', array(
'div' => 'input clear',
2016-03-04 14:56:56 +01:00
'placeholder' => 'URL of the feed',
'class' => 'form-control span6'
2016-02-28 22:54:09 +01:00
));
echo $this->Form->input('distribution', array(
'options' => array($distributionLevels),
'div' => 'input clear',
'label' => 'Distribution',
));
?>
<div id="SGContainer" style="display:none;">
2016-06-04 01:10:45 +02:00
<?php
if (!empty($sharingGroups)) {
echo $this->Form->input('sharing_group_id', array(
'options' => array($sharingGroups),
'label' => 'Sharing Group',
));
}
?>
</div>
<div class="input clear"></div>
<?php
echo $this->Form->input('tag_id', array(
'options' => $tags,
'label' => 'Default Tag',
));
2016-02-28 22:54:09 +01:00
echo $this->Form->input('pull_rules', array('style' => 'display:none;', 'label' => false, 'div' => false));
?>
</fieldset>
2016-03-04 14:56:56 +01:00
<b>Filter rules:</b><br />
<span id="pull_tags_OR" style="display:none;">Events with the following tags allowed: <span id="pull_tags_OR_text" style="color:green;"></span><br /></span>
<span id="pull_tags_NOT" style="display:none;">Events with the following tags blocked: <span id="pull_tags_NOT_text" style="color:red;"></span><br /></span>
<span id="pull_orgs_OR" style="display:none;">Events with the following organisations allowed: <span id="pull_orgs_OR_text" style="color:green;"></span><br /></span>
<span id="pull_orgs_NOT" style="display:none;">Events with the following organisations blocked: <span id="pull_orgs_NOT_text" style="color:red;"></span><br /></span>
<span id="pull_modify" class="btn btn-inverse" style="line-height:10px; padding: 4px 4px;">Modify</span><br /><br />
<?php
echo $this->Form->button('Edit', array('class' => 'btn btn-primary'));
echo $this->Form->end();
?>
<div id="hiddenRuleForms">
<?php echo $this->element('serverRuleElements/pull'); ?>
</div>
2016-02-28 22:54:09 +01:00
</div>
2016-06-04 01:10:45 +02:00
<?php
2016-02-29 22:32:04 +01:00
echo $this->element('side_menu', array('menuList' => 'feeds', 'menuItem' => 'edit'));
2016-02-28 22:54:09 +01:00
?>
2016-03-04 14:56:56 +01:00
<script type="text/javascript">
//
var formInfoValues = {
'ServerUrl' : "The base-url to the external server you want to sync with. Example: https://foo.sig.mil.be",
'ServerName' : "A name that will make it clear to your users what this instance is. For example: Organisation A's instance",
'ServerOrganization' : "The organization having the external server you want to sync with. Example: BE",
'ServerAuthkey' : "You can find the authentication key on your profile on the external server.",
'ServerPush' : "Allow the upload of events and their attributes.",
'ServerPull' : "Allow the download of events and their attributes from the server.",
'ServerSubmittedCert' : "You can also upload a certificate file if the instance you are trying to connect to has its own signing authority.",
'ServerSelfSigned' : "Click this, if you would like to allow a connection despite the other instance using a self-signed certificate (not recommended)."
};
var rules = {"pull": {"tags": {"OR":[], "NOT":[]}, "orgs": {"OR":[], "NOT":[]}}};
var validOptions = ['pull'];
var validFields = ['tags', 'orgs'];
var modelContext = 'Feed';
$(document).ready(function() {
rules = convertServerFilterRules(rules);
feedDistributionChange();
2016-03-04 14:56:56 +01:00
$("#pull_modify").click(function() {
serverRuleFormActivate('pull');
});
$("#FeedDistribution").change(function() {
feedDistributionChange();
});
2016-03-04 14:56:56 +01:00
});
</script>