luci-app-mwan3: fix interface grid 4361/head
authorAaron Goodman <aaronjg@stanford.edu>
Tue, 18 Aug 2020 00:36:38 +0000 (20:36 -0400)
committerAaron Goodman <aaronjg@stanford.edu>
Tue, 18 Aug 2020 00:36:38 +0000 (20:36 -0400)
Interface grid can become misaligned due to varying number of
lines. Use non-breaking spaces to ensure all interface boxes are three
lines long.

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm

index 3cb0ca224e5a9d7449a2c051e2b7f02a760565e8..468aa12b41f94722ff8142c6d248d1cadbc276c0 100644 (file)
@@ -33,7 +33,7 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                case 'online':
                                                        state = '<%:Online%>';
                                                        time = String.format(
-                                                               '<div><strong>Uptime: </strong>%s</div>',
+                                                               '<div><strong>Uptime:&nbsp;</strong>%s</div>',
                                                                secondsToString(status.interfaces[iface].online)
                                                        );
                                                        css = 'success';
@@ -41,13 +41,14 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                case 'offline':
                                                        state = '<%:Offline%>';
                                                        time = String.format(
-                                                               '<div><strong>Downtime: </strong>%s</div>',
+                                                               '<div><strong>Downtime:&nbsp;</strong>%s</div>',
                                                                secondsToString(status.interfaces[iface].offline)
                                                        );
                                                        css = 'danger';
                                                        break;
                                                default:
                                                        state = '<%:Disabled%>';
+                                                       time = '<div>&nbsp;</div>'
                                                        css = 'warning';
                                                        break;
                                        }
@@ -56,11 +57,11 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
                                                css
                                        );
                                        statusview += String.format(
-                                               '<div><strong>Interface: </strong>%s</div>',
+                                               '<div><strong>Interface:&nbsp;</strong>%s</div>',
                                                iface
                                        );
                                        statusview += String.format(
-                                               '<div><strong>Status: </strong>%s</div>',
+                                               '<div><strong>Status:&nbsp;</strong>%s</div>',
                                                state
                                        );
                                        if (time)