mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
security/q-feeds-connector: lint
This commit is contained in:
parent
b25d279f81
commit
b587cc21cb
16 changed files with 13 additions and 18 deletions
|
|
@ -32,4 +32,4 @@ function qfeeds_cron()
|
|||
$jobs[]['autocron'] = ['/usr/local/sbin/configctl -d qfeeds update', '*/5'];
|
||||
$jobs[]['autocron'] = ['/usr/local/sbin/configctl -d ! qfeeds stats', '*/15'];
|
||||
return $jobs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
# load already collected feeds
|
||||
/usr/local/opnsense/scripts/qfeeds/qfeedsctl.py firewall_load
|
||||
/usr/local/opnsense/scripts/qfeeds/qfeedsctl.py firewall_load
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ use OPNsense\Base\UserException;
|
|||
use OPNsense\Core\Backend;
|
||||
use OPNsense\Core\Config;
|
||||
|
||||
|
||||
class SettingsController extends ApiMutableModelControllerBase
|
||||
{
|
||||
protected static $internalModelName = 'connect';
|
||||
|
|
@ -114,4 +113,4 @@ class SettingsController extends ApiMutableModelControllerBase
|
|||
}
|
||||
return $stats;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,4 +37,4 @@ class IndexController extends \OPNsense\Base\IndexController
|
|||
$this->view->formSettings = $this->getForm("settings");
|
||||
$this->view->pick('OPNsense/QFeeds/index');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@
|
|||
<type>text</type>
|
||||
<help><![CDATA[API key to access Q-Feeds services, to apply for a key, <a target="_new" href="https://qfeeds.com/opnsense/">click here</a>]]></help>
|
||||
</field>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class QfeedsAliases
|
|||
if (is_array($payload) && !empty($payload['feeds'])) {
|
||||
foreach ($payload['feeds'] as $feed) {
|
||||
if ($feed['type'] == 'ip' && !empty($feed['licensed'])) {
|
||||
$name = '__qfeeds_'. $feed['feed_type'];
|
||||
$name = '__qfeeds_' . $feed['feed_type'];
|
||||
$result[$name] = [
|
||||
'enabled' => '1',
|
||||
'counters' => '1',
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
<pattern>api/q_feeds/*</pattern>
|
||||
</patterns>
|
||||
</page-firewall-qfeeds>
|
||||
</acl>
|
||||
</acl>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2025 Deciso B.V.
|
||||
* All rights reserved.
|
||||
|
|
@ -35,4 +36,4 @@ use OPNsense\Base\BaseModel;
|
|||
*/
|
||||
class Connector extends BaseModel
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
<apikey type="TextField"/>
|
||||
</general>
|
||||
</items>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
<Events order="30" url="/ui/q_feeds/#events"/>
|
||||
</QFeeds>
|
||||
</Security>
|
||||
</menu>
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -133,4 +133,4 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
<br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -68,5 +68,3 @@ class Api:
|
|||
entry = line.decode().strip()
|
||||
if entry:
|
||||
yield entry
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -50,4 +50,3 @@ class LockedFile:
|
|||
@property
|
||||
def filename(self):
|
||||
return self._filename
|
||||
|
||||
|
|
|
|||
|
|
@ -74,4 +74,3 @@ class PFLogCrawler:
|
|||
return result
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
|||
|
|
@ -61,4 +61,3 @@ if __name__ == '__main__':
|
|||
except ujson.JSONDecodeError:
|
||||
print("JSON decode error")
|
||||
sys.exit(-1)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@
|
|||
<unlicensed>Unlicensed</unlicensed>
|
||||
</translations>
|
||||
</qfeeds>
|
||||
</metadata>
|
||||
</metadata>
|
||||
|
|
|
|||
Loading…
Reference in a new issue