Fixed layout of bruteforcesettings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
86022f8710
commit
ed00bab80b
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
#whitelist-list {
|
||||||
|
min-width: 262px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#whitelist-list td span {
|
||||||
|
padding: 10px 15px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#whitelist-list .action-column {
|
||||||
|
width: 46px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#whitelist-list .action-column a {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
|
@ -27,7 +27,7 @@
|
||||||
var TEMPLATE_WHITELIST =
|
var TEMPLATE_WHITELIST =
|
||||||
'<tr data-id="{{id}}">'
|
'<tr data-id="{{id}}">'
|
||||||
+ '<td><span>{{ip}}/{{mask}}</span></td>'
|
+ '<td><span>{{ip}}/{{mask}}</span></td>'
|
||||||
+ '<td><a class="icon-delete has-tooltip" title="' + t('bruteforcesettings', 'Delete') + '">BAD CSS</a></td>'
|
+ '<td class="action-column"><span><a class="icon-delete has-tooltip" title="' + t('bruteforcesettings', 'Delete') + '"></a></span></td>'
|
||||||
+ '</tr>';
|
+ '</tr>';
|
||||||
|
|
||||||
OCA.BruteForceSettings.WhitelistView = OC.Backbone.View.extend({
|
OCA.BruteForceSettings.WhitelistView = OC.Backbone.View.extend({
|
||||||
|
|
|
@ -30,16 +30,17 @@ script('bruteforcesettings', [
|
||||||
'IPWhitelistCollection',
|
'IPWhitelistCollection',
|
||||||
'IPWhitelistView',
|
'IPWhitelistView',
|
||||||
]);
|
]);
|
||||||
|
style('bruteforcesettings', [
|
||||||
|
'settings'
|
||||||
|
])
|
||||||
|
|
||||||
/** @var \OCP\IL10N $l */
|
/** @var \OCP\IL10N $l */
|
||||||
?>
|
?>
|
||||||
<form id="IPWhiteList" class="section">
|
<form id="IPWhiteList" class="section">
|
||||||
<h2><?php p($l->t('Brute force ip whitelist')); ?></h2>
|
<h2><?php p($l->t('Brute force ip whitelist')); ?></h2>
|
||||||
|
|
||||||
<table>
|
<table id="whitelist-list">
|
||||||
<tbody id="whitelist-list">
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<input type="text" name="whitelist_ip" id="whitelist_ip" placeholder="1.2.3.4" style="width: 200px;" />/
|
<input type="text" name="whitelist_ip" id="whitelist_ip" placeholder="1.2.3.4" style="width: 200px;" />/
|
||||||
|
|
|
@ -273,7 +273,7 @@ class Manager implements IManager {
|
||||||
$sections = [
|
$sections = [
|
||||||
0 => [new Section('server', $this->l->t('Server settings'), 0, $this->url->imagePath('settings', 'admin.svg'))],
|
0 => [new Section('server', $this->l->t('Server settings'), 0, $this->url->imagePath('settings', 'admin.svg'))],
|
||||||
5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))],
|
5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))],
|
||||||
10 => [new Section('security', $this->l->t('Security'), 0)],
|
10 => [new Section('security', $this->l->t('Security'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
||||||
45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
||||||
98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))],
|
98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))],
|
||||||
99 => [new Section('tips-tricks', $this->l->t('Tips & tricks'), 0, $this->url->imagePath('settings', 'help.svg'))],
|
99 => [new Section('tips-tricks', $this->l->t('Tips & tricks'), 0, $this->url->imagePath('settings', 'help.svg'))],
|
||||||
|
|
|
@ -146,7 +146,7 @@ class ManagerTest extends TestCase {
|
||||||
['class' => \OCA\WorkflowEngine\Settings\Section::class, 'priority' => 90]
|
['class' => \OCA\WorkflowEngine\Settings\Section::class, 'priority' => 90]
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$this->url->expects($this->exactly(5))
|
$this->url->expects($this->exactly(6))
|
||||||
->method('imagePath')
|
->method('imagePath')
|
||||||
->willReturnMap([
|
->willReturnMap([
|
||||||
['settings', 'admin.svg', '1'],
|
['settings', 'admin.svg', '1'],
|
||||||
|
@ -159,7 +159,7 @@ class ManagerTest extends TestCase {
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
0 => [new Section('server', 'Server settings', 0, '1')],
|
0 => [new Section('server', 'Server settings', 0, '1')],
|
||||||
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
||||||
10 => [new Section('security', 'Security', 0)],
|
10 => [new Section('security', 'Security', 0, '3')],
|
||||||
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
||||||
90 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)],
|
90 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)],
|
||||||
98 => [new Section('additional', 'Additional settings', 0, '4')],
|
98 => [new Section('additional', 'Additional settings', 0, '4')],
|
||||||
|
@ -178,7 +178,7 @@ class ManagerTest extends TestCase {
|
||||||
->will($this->returnValue([
|
->will($this->returnValue([
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$this->url->expects($this->exactly(5))
|
$this->url->expects($this->exactly(6))
|
||||||
->method('imagePath')
|
->method('imagePath')
|
||||||
->willReturnMap([
|
->willReturnMap([
|
||||||
['settings', 'admin.svg', '1'],
|
['settings', 'admin.svg', '1'],
|
||||||
|
@ -191,7 +191,7 @@ class ManagerTest extends TestCase {
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
0 => [new Section('server', 'Server settings', 0, '1')],
|
0 => [new Section('server', 'Server settings', 0, '1')],
|
||||||
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
||||||
10 => [new Section('security', 'Security', 0)],
|
10 => [new Section('security', 'Security', 0, '3')],
|
||||||
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
||||||
98 => [new Section('additional', 'Additional settings', 0, '4')],
|
98 => [new Section('additional', 'Additional settings', 0, '4')],
|
||||||
99 => [new Section('tips-tricks', 'Tips & tricks', 0, '5')],
|
99 => [new Section('tips-tricks', 'Tips & tricks', 0, '5')],
|
||||||
|
|
Loading…
Reference in New Issue