Various UI fixes/cleanup under device edit #1901

Merged
merged 13 commits into from Sep 16, 2015

Projects

None yet

4 participants

@arjitc
Contributor
arjitc commented Sep 14, 2015

Various UI fixes/cleanup under device edit

arjitc added some commits Sep 14, 2015
@arjitc arjitc UI cleanup and icons added 44042d9
@arjitc arjitc Cleanup UI, expand table to full width, add icon to save 62e3eb0
@arjitc arjitc UI cleanup and added icons to various buttons
abd6d37
@arjitc arjitc Set community field as required
under "SNMP Community input" -- edit device -> SNMP
c6d7d4e
@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/apps.inc.php
<form id='appedit' name='appedit' method='post' action='' role='form' class='form-horizontal'>
<input type=hidden name=device value='".$device['device_id']."'>
- <table class='table table-condensed table-striped table-responsive'>
+ <table class='table table-hover table-responsive'>
@f0o
f0o Sep 15, 2015 Member

please re-add table-condensed

@arjitc arjitc Added back table-condensed
ea5b865
@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/alerts.inc.php
@@ -92,10 +92,13 @@
/>
</div>
</div>
- <button class="btn btn-default btn-sm" type="submit" name="Submit">Save</button>
+ <div class="col-sm-3"></div>
@f0o
f0o Sep 15, 2015 Member

Please use bootstrap's offset classes instead of empty dom elements

@arjitc
Contributor
arjitc commented Sep 15, 2015

Done added back @f0o

@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/alerts.inc.php
</form>
<?php
require_once 'includes/modal/new_alert_rule.inc.php';
?>
-<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#create-alert" data-device_id="<?php echo $device['device_id']; ?>">Create new alert rule</button>
+<br>
+<div class="col-sm-3"></div>
@f0o
f0o Sep 15, 2015 Member

Please use bootstrap's offset classes instead of empty dom elements

@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/device.inc.php
@@ -65,23 +65,23 @@
?>
<div class="row">
+ <div class="col-sm-2"></div>
@f0o
f0o Sep 15, 2015 Member

Please use bootstrap's offset classes instead of empty dom elements

@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/device.inc.php
</form>
</div>
+ <div class="col-sm-1"></div>
@f0o
f0o Sep 15, 2015 Member

wow a lot of these

@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/device.inc.php
@@ -141,7 +141,8 @@
<input name="ignore" type="checkbox" id="ignore" value="1" <?php if ($device['ignore']) echo("checked=checked"); ?> />
</div>
</div>
- <button type="submit" name="Submit" class="btn btn-default">Save</button>
+ <div class="col-sm-2"></div>
@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/ipmi.inc.php
@@ -66,6 +66,10 @@
<input id="ipmi_password" name="ipmi_password" type="password" class="form-control" value="<?php echo get_dev_attrib($device, 'ipmi_password'); ?>" />
</div>
</div>
- <button class="btn btn-default btn-sm" type="submit" name="Submit">Save</button>
+ <div class="col-sm-2"></div>
@f0o
f0o Sep 15, 2015 Member

ok almost done

@f0o f0o commented on an outdated diff Sep 15, 2015
html/pages/device/edit/snmp.inc.php
@@ -211,7 +211,8 @@
echo '
- <button type="submit" name="Submit" class="btn btn-default">Save</button>
+ <div class="col-sm-2"></div>
@f0o
f0o Sep 15, 2015 Member

Thanks! :)

@f0o
Member
f0o commented Sep 15, 2015

@arjitc awesome!
All in all the UI cleanup-PRs are very good 👍

@arjitc
Contributor
arjitc commented Sep 15, 2015

thanks @f0o :)

About the offset, Hmm for some reason with using bootstrap offset the alignment goes/ends up a bit ahead, is this alright? if not I'll have to dig a bit deeper and get all the elements into 1x div class=row I suppose

using bootstrap offset:
http://i.imgur.com/EcRMGq4.png

without using offset (empty element//whats in my commit)
http://i.imgur.com/pTMwp5X.png

@f0o
Member
f0o commented Sep 15, 2015

@arjitc for those forms I think one must use form-group or input-group classes, best to consult bootstrap's forms section.

@arjitc
Contributor
arjitc commented Sep 15, 2015

Hmm, I'll have to dig a bit more into this then :( I'll be away a bit this week for a few local festivities, please put this on hold until then :)

@Rosiak
Contributor
Rosiak commented Sep 15, 2015

Roger that.
Thanks a lot for the UI work so far @arjitc , much appreciated!

arjitc added some commits Sep 16, 2015
@arjitc arjitc fix device.inc.php indents and switch to using offsets
a827b3d
@arjitc arjitc snmp.inc.php switch to offsets
c14942e
@arjitc arjitc Display success/error messages across the width of the page
5b1d1f7
@arjitc arjitc switch to bootstrap offsets
4c0b707
@arjitc arjitc Merge remote-tracking branch 'librenms/master'
7c3e7d2
@arjitc
Contributor
arjitc commented Sep 16, 2015

Looks like I was missing the class=row element all long which was causing this alignment issue with the offset class, Should be all good now. Thanks @Rosiak 👍

arjitc added some commits Sep 16, 2015
@arjitc arjitc Fix to offset on alerts
5e92e97
@arjitc arjitc Add fa-check to Save and move out of table
99e819d
@arjitc arjitc Added back table-condensed
9fcee7a
@f0o f0o merged commit 7b4f0c5 into librenms:master Sep 16, 2015

1 of 2 checks passed

Scrutinizer Scheduled/Installing
Details
Auto-Deploy Build finished. No test results found.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment