mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/q-feeds-connector: lint
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,4 +37,4 @@ class IndexController extends \OPNsense\Base\IndexController
|
||||
$this->view->formSettings = $this->getForm("settings");
|
||||
$this->view->pick('OPNsense/QFeeds/index');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+2
-1
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@
|
||||
<apikey type="TextField"/>
|
||||
</general>
|
||||
</items>
|
||||
</model>
|
||||
</model>
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user