From f51611960a9280700a7b6b906cd250eeaf4a0cd0 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Wed, 14 Dec 2016 17:16:21 -0500 Subject: [PATCH] improve service traffic table on mobile --- app/styles/_core.less | 2 +- app/styles/_tables.less | 9 ++++++++ app/views/browse/service.html | 8 +++---- app/views/directives/traffic-table.html | 20 ++++++++++-------- dist/scripts/templates.js | 28 ++++++++++++------------- dist/styles/main.css | 3 +++ 6 files changed, 41 insertions(+), 29 deletions(-) diff --git a/app/styles/_core.less b/app/styles/_core.less index 5b49d30180..76fc921cca 100644 --- a/app/styles/_core.less +++ b/app/styles/_core.less @@ -1208,4 +1208,4 @@ copy-to-clipboard .input-group.limit-width { .col-xxs-12 { width: 100%; } -} +} \ No newline at end of file diff --git a/app/styles/_tables.less b/app/styles/_tables.less index 6453284e91..ca2a438ab3 100644 --- a/app/styles/_tables.less +++ b/app/styles/_tables.less @@ -148,6 +148,15 @@ } } +// swaps direction of arrow in table cell +td[role="presentation"].arrow:after { + content: "\2193"; + + @media (min-width: @screen-sm-min) { + content: "\2192"; + } +} + .table-filter-wrapper { .flex-display(@display: flex); padding: 10px 10px 5px 10px; diff --git a/app/views/browse/service.html b/app/views/browse/service.html index a6ba3cfade..a5f49b28b9 100644 --- a/app/views/browse/service.html +++ b/app/views/browse/service.html @@ -91,17 +91,15 @@

-

- Traffic -

-
+

Traffic

+
Learn more about routes and services

Pods

-
+
diff --git a/app/views/directives/traffic-table.html b/app/views/directives/traffic-table.html index b89702d2e3..ee0622a140 100644 --- a/app/views/directives/traffic-table.html +++ b/app/views/directives/traffic-table.html @@ -14,9 +14,9 @@ {{emptyMessage || 'No routes or ports to show'}} - - - + + + {{routes[routeName].metadata.name}} / {{port.nodePort}} - → + {{port.port}}/{{port.protocol}} ({{port.name}}) - → + {{port.targetPort}} @@ -54,18 +54,20 @@   - - + + + + none {{port.nodePort}} - → + {{port.port}}/{{port.protocol}} ({{port.name}}) - → + {{port.targetPort}} diff --git a/dist/scripts/templates.js b/dist/scripts/templates.js index 4636160fc8..25dbd4b877 100644 --- a/dist/scripts/templates.js +++ b/dist/scripts/templates.js @@ -3948,17 +3948,15 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "\n" + "\n" + "\n" + - "

\n" + - "Traffic\n" + - "

\n" + - "
\n" + + "

Traffic

\n" + + "
\n" + "\n" + "
\n" + "
\n" + "Learn more about routes and services\n" + "
\n" + "

Pods

\n" + - "
\n" + + "
\n" + "\n" + "
\n" + "\n" + @@ -8242,9 +8240,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "\n" + "{{emptyMessage || 'No routes or ports to show'}}\n" + "\n" + - " 0\">\n" + - "\n" + - "\n" + + " 0\" ng-repeat-start=\"(routeName,ports) in portsByRoute\" style=\"display:none\">\n" + + "\n" + + "\n" + "\n" + "{{routes[routeName].metadata.name}}\n" + "\n" + @@ -8253,12 +8251,12 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( " / {{port.nodePort}}\n" + "\n" + "\n" + - "→\n" + + "\n" + "\n" + "{{port.port}}/{{port.protocol}}\n" + "({{port.name}})\n" + "\n" + - "→\n" + + "\n" + "\n" + "{{port.targetPort}}\n" + "\n" + @@ -8280,18 +8278,20 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( " \n" + "\n" + "\n" + - "\n" + - "\n" + + "\n" + + "\n" + + "\n" + + "\n" + "\n" + "none\n" + "{{port.nodePort}}\n" + "\n" + - "→\n" + + "\n" + "\n" + "{{port.port}}/{{port.protocol}}\n" + "({{port.name}})\n" + "\n" + - "→\n" + + "\n" + "\n" + "{{port.targetPort}}\n" + "\n" + diff --git a/dist/styles/main.css b/dist/styles/main.css index bff63c361a..51d064df61 100644 --- a/dist/styles/main.css +++ b/dist/styles/main.css @@ -4940,6 +4940,9 @@ body,html{margin:0;padding:0} .table-mobile>tbody>tr>td:last-child{border-bottom:none} .table-mobile>tbody>tr>td:before{content:attr(data-title);position:absolute;top:8px;left:6px;width:35%;padding-right:10px;white-space:nowrap} } +td[role=presentation].arrow:after{content:"\2193"} +@media (min-width:768px){td[role=presentation].arrow:after{content:"\2192"} +} .table-filter-wrapper{display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:-ms-flex;display:flex;padding:10px 10px 5px;border-top:1px solid #d1d1d1;border-left:1px solid #d1d1d1;border-right:1px solid #d1d1d1;background-color:#f9f9f9} .events-table{table-layout:fixed} .events-table th#time{width:90px}