From 678bfab363ff545c4e068f9cd0142f628c7b026d Mon Sep 17 00:00:00 2001 From: Khalah Jones-Golden Date: Thu, 14 Jan 2016 15:35:05 -0400 Subject: [PATCH 01/10] [Kibana5.0] First go at the css --- src/optimize/BaseOptimizer.js | 5 +- .../elasticsearch/lib/expose_client.js | 2 + src/plugins/kibana/public/kibana.js | 6 +- src/ui/public/chrome/chrome.html | 121 +++++++++--------- .../directives/app_switcher/app_switcher.less | 100 ++++++++++----- src/ui/public/images/kibana.gif | Bin 0 -> 3737 bytes src/ui/public/styles/base.less | 9 +- src/ui/public/styles/mixins.less | 9 +- 8 files changed, 144 insertions(+), 108 deletions(-) create mode 100644 src/ui/public/images/kibana.gif diff --git a/src/optimize/BaseOptimizer.js b/src/optimize/BaseOptimizer.js index 9ca708ab04fd9..e236769f466d7 100644 --- a/src/optimize/BaseOptimizer.js +++ b/src/optimize/BaseOptimizer.js @@ -63,6 +63,7 @@ class BaseOptimizer { getConfig() { let mapQ = this.sourceMaps ? '?sourceMap' : ''; + let mapQPre = mapQ ? mapQ + '&' : '?'; return { context: fromRoot('.'), @@ -101,7 +102,7 @@ class BaseOptimizer { test: /\.less$/, loader: ExtractTextPlugin.extract( 'style', - `css${mapQ}!autoprefixer${mapQ ? mapQ + '&' : '?'}{ "browsers": ["last 2 versions","> 5%"] }!less${mapQ}` + `css${mapQ}!autoprefixer${mapQPre}{ "browsers": ["last 2 versions","> 5%"] }!less${mapQPre}dumpLineNumbers=comments` ) }, { test: /\.css$/, loader: ExtractTextPlugin.extract('style', `css${mapQ}`) }, @@ -109,7 +110,7 @@ class BaseOptimizer { { test: /\.json$/, loader: 'json' }, { test: /\.(html|tmpl)$/, loader: 'raw' }, { test: /\.png$/, loader: 'url?limit=10000&name=[path][name].[ext]' }, - { test: /\.(woff|woff2|ttf|eot|svg|ico)(\?|$)/, loader: 'file?name=[path][name].[ext]' }, + { test: /\.(woff|woff2|ttf|eot|svg|ico|gif)(\?|$)/, loader: 'file?name=[path][name].[ext]' }, { test: /[\/\\]src[\/\\](plugins|ui)[\/\\].+\.js$/, loader: `rjs-repack${mapQ}` }, { test: /\.js$/, diff --git a/src/plugins/elasticsearch/lib/expose_client.js b/src/plugins/elasticsearch/lib/expose_client.js index 61c6c81d69d11..467081aef3f48 100644 --- a/src/plugins/elasticsearch/lib/expose_client.js +++ b/src/plugins/elasticsearch/lib/expose_client.js @@ -41,6 +41,7 @@ module.exports = function (server) { return new elasticsearch.Client({ host: url.format(uri), ssl: ssl, + plugins: options.plugins, apiVersion: options.apiVersion, keepAlive: options.keepAlive, log: function () { @@ -66,6 +67,7 @@ module.exports = function (server) { server.expose('client', client); server.expose('createClient', createClient); + server.expose('callWithRequestFactory', callWithRequest); server.expose('callWithRequest', callWithRequest(noAuthClient)); server.expose('errors', elasticsearch.errors); diff --git a/src/plugins/kibana/public/kibana.js b/src/plugins/kibana/public/kibana.js index 2d059cc972c81..b62be1d887b12 100644 --- a/src/plugins/kibana/public/kibana.js +++ b/src/plugins/kibana/public/kibana.js @@ -19,7 +19,7 @@ var chrome = require('ui/chrome'); var routes = require('ui/routes'); var modules = require('ui/modules'); -var kibanaLogoUrl = require('ui/images/kibana.svg'); +var kibanaLogoUrl = require('ui/images/kibana.gif'); routes.enable(); @@ -30,8 +30,8 @@ routes chrome .setBrand({ - 'logo': 'url(' + kibanaLogoUrl + ') left no-repeat', - 'smallLogo': 'url(' + kibanaLogoUrl + ') left no-repeat' + 'logo': 'url(' + kibanaLogoUrl + ') 0% 0% no-repeat', + 'smallLogo': 'url(' + kibanaLogoUrl + ') 0% 0% no-repeat' }) .setNavBackground('#222222') .setTabDefaults({ diff --git a/src/ui/public/chrome/chrome.html b/src/ui/public/chrome/chrome.html index 6e5cccbfdd497..f52ef56fd48c1 100644 --- a/src/ui/public/chrome/chrome.html +++ b/src/ui/public/chrome/chrome.html @@ -1,74 +1,69 @@
- - - + + -
+
+
diff --git a/src/ui/public/chrome/directives/app_switcher/app_switcher.less b/src/ui/public/chrome/directives/app_switcher/app_switcher.less index 95ac50baa310c..782713582b720 100644 --- a/src/ui/public/chrome/directives/app_switcher/app_switcher.less +++ b/src/ui/public/chrome/directives/app_switcher/app_switcher.less @@ -1,55 +1,87 @@ +@import (reference) "~ui/styles/mixins"; @import (reference) "~ui/styles/variables"; -@app-icon-size: 48px; -@app-icon-padding: 10px; +// as - App Switcher +@as-open-width: 160px; +@as-closed-width: 50px; +@app-icon-height: 30px; +@transition-time: .65s; +@transition-delay: .2s; +.app-links-wrapper { + flex: 0 0 @as-closed-width; + background-color: #3caed2; + overflow: hidden; + transition: flex-basis @transition-time; + transition-delay: @transition-delay; + + &:hover { + flex-basis: @as-open-width; + + .app-title { + display: inline-block; + } + + .app-wrapper { + padding-right: @as-open-width; + } + } + + .logo { + height: 70px; + list-style-type: none; + } +} +.app-wrapper { + .real-flex-parent(); + flex: 0 0 100%; + // flex: 0 0 calc(100% - @as-closed-width); + // flex: 0 0 auto; + margin: 0 auto; + padding-right: @as-closed-width; + transition: padding-right @transition-time; + transition-delay: @transition-delay; + + + .navbar-right { + margin-right: 0; + } +} .app-links { text-align: justify; .app-link { - display: inline-block; - vertical-align: top; - text-align: left; - width: @app-icon-size + (@app-icon-padding * 2); - margin: 0px 10px; - padding: @app-icon-padding; - border-radius: @border-radius-base; - - .app-icon { + width: @as-open-width; + height: @app-icon-height; + > a { display: block; - height: @app-icon-size; - width: @app-icon-size; + height: 100%; + color: #fff; + } + .app-icon { + float: left; + text-align: center; + font-size: 1.7em; + display: inline-block; + height: @app-icon-height; + width: @as-closed-width; background-position: center; background-size: contain; - border-radius: @border-radius-base; - background-color: @gray-light; - width: 100%; - - &-missing { - text-align: center; - font-size: 2.7em; - font-weight: bold; - font-family: @font-family-sans-serif; - color: #fff; - } } .app-title { - color: @text-color; + width: calc(@as-open-width - @as-closed-width); + display: inline-block; + float: left; font-size: 0.9em; - width: 100%; text-align: center; - margin-top: 3px; - } - - &:hover .app-title { - text-decoration: underline; + line-height: @app-icon-height; } &.active { - background: @gray-lighter; - .app-title { - text-decoration: underline; + background-color: #73c6e0; + > a { + color: #333; + text-decoration: none; } } diff --git a/src/ui/public/images/kibana.gif b/src/ui/public/images/kibana.gif new file mode 100644 index 0000000000000000000000000000000000000000..767b01aceef299fb5feac00629ddc93dcd22d926 GIT binary patch literal 3737 zcmV;K4rcL3Nk%w1VW0p;0QUd@g~i%1pu$M1$)?uiN~+4A(&FOq^*W@*?)LdAp1?Vy z#e&4yQm)Kkwa@7D_ma%t^7#6@-s;fl@vPV8_4@nv`uw)s>Av9W=JNK4#@kJ-%Xh!l z$mQ>k%H6Zu=xn;u)avof=I}_G@;p{h}#9p+|JEX;Cx6zHs+~4o?dBE0s!Pl|c=bO;s&*<;PuJf+6z^!V)d z`S|<%E}p`e&)_Vd!o%b3#^mljrN-^{`K{UK{r>(lp~FC@$7{LLna|)gqQtD&=C0W0 zE1khIp~J7)=T)%H;qdi9rpHvT%_^P2MX1Qn=<$HV*)gEQZo1Re?D8s|z(S|TMXAaA z{QcML^85Y$M5xH>_4w=c_%ENsZoAWf!q_>a#sB~Q&gbvi?en42h$=>PDna|-qrp8&a&OoNdfy3FW*X7db@-Lpj zbiLJezSVEL)cO4Vc)!;0_xe7i#%{XOalF(=smXA=(?6%j#pLe8;_aQ$;%B(gL8ixw z$lLk*{BOL}E}y}2z0@zC!F-6~1>G0(7_ExXWL#N1TxzcL5 z(L<)ixZUcy-Ri;O>~Ff$N~_9{%ijL~|Ns8}Hlf5kq{W`m;>qRjn9tv@+2${v!r<@q zn9ksu&)|H)*v;tiNvq25_xbtz{XM0}Jfy~OyVO{*&eiMkfy3Cs;_SlW?Jl3fFQ3A$ z+2{ZN|1hA#A^8LV00000EC2ui0H6Ry000R80RIUbNU)&6g9sBUT*$DY!-o(f7Tgy` zqQ#3CGiuzpkRr#AAVZ4O=y9aUlPFD=Ov$pPONT38%AEN!Ce52TL)sL`Z=cVfK!XYu z%CD%=qegQo#kiASArS(iN}WozD%D~1;Aq{tmBu4}OT$9kc?O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t|jDc{$5&yfgBvzga+BR_c{xE|7BuIT4Q-i<* zYgT=;?v{u%7|bANc)=9(pa-D-X%j7YK{e=)0bD$_1N7$rT3{+?5DcLJ0Tr+YO~eOl z00E(}0~(+^GGGG>!%umLU*1ZL8MrG{qW zHgf707_5M9C(;u?F&v)wFg)>zKr#kTbu$Aq2Ce5*H=~MJSXLwwiv1yrU~`I4^&YI~ zZ4;DYH&6_in2CEZ2sluLL8Ek z2q~(d1Iw6?h0zLm=8rDHF?mn`>`0L1F#$CYj|d48O)(Ek;E`I0ahlQJnLTM!K1hLRk1(G)o%20Yo5KKYYC8I(dP z26-?I+K7`dVJ;tKB23woPU)0LsS-*VmFKt nav { position: relative; z-index: 1; .navbar-right { - margin-right: 0; + margin-right: 0 !important; } } } diff --git a/src/ui/public/styles/mixins.less b/src/ui/public/styles/mixins.less index 568f9dd03dada..ceab159c3745d 100644 --- a/src/ui/public/styles/mixins.less +++ b/src/ui/public/styles/mixins.less @@ -1,15 +1,20 @@ @import "~ui/styles/variables"; @import (reference) "~bootstrap/less/mixins"; -.flex-parent(@grow: 1, @shrink: 1, @basis: auto) { +.flex-parent(@grow: 1, @shrink: 1, @basis: auto, @direction: column) { flex: @grow @shrink @basis; display: flex; - flex-direction: column; + flex-direction: @direction; > * { flex-shrink: 0; } } +.real-flex-parent(@display: flex, @flow: column nowrap) { + display: @display; + flex-flow: @flow; +} + .ellipsis() { white-space: nowrap; From d2d5e27531a3ee4bdbc42c08787284f9b1c0521c Mon Sep 17 00:00:00 2001 From: Khalah Jones-Golden Date: Tue, 26 Jan 2016 09:35:09 -0400 Subject: [PATCH 02/10] [app_switcher] Changed the css to be proper flex box --- .../chrome/directives/app_switcher/app_switcher.less | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ui/public/chrome/directives/app_switcher/app_switcher.less b/src/ui/public/chrome/directives/app_switcher/app_switcher.less index 782713582b720..a604863e7ebfb 100644 --- a/src/ui/public/chrome/directives/app_switcher/app_switcher.less +++ b/src/ui/public/chrome/directives/app_switcher/app_switcher.less @@ -21,9 +21,6 @@ .app-title { display: inline-block; } - + .app-wrapper { - padding-right: @as-open-width; - } } .logo { @@ -33,11 +30,8 @@ } .app-wrapper { .real-flex-parent(); - flex: 0 0 100%; - // flex: 0 0 calc(100% - @as-closed-width); - // flex: 0 0 auto; + flex: 1; margin: 0 auto; - padding-right: @as-closed-width; transition: padding-right @transition-time; transition-delay: @transition-delay; From 78d004be2a7e5fe1e6cb3e38374a7267f4a7ff58 Mon Sep 17 00:00:00 2001 From: michaelcheng429 Date: Tue, 26 Jan 2016 14:49:45 -0600 Subject: [PATCH 03/10] minor copy improvements (typos) --- .../components/field_chooser/discover_field.js | 4 ++-- .../settings/sections/advanced/advanced_row.html | 12 ++++++------ .../settings/sections/advanced/advanced_row.js | 8 ++++---- .../public/settings/sections/indices/index.html | 2 +- .../kibana/public/settings/sections/indices/index.js | 4 ++-- src/ui/public/state_management/state.js | 6 +++--- src/ui/public/time_buckets/time_buckets.js | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/plugins/kibana/public/discover/components/field_chooser/discover_field.js b/src/plugins/kibana/public/discover/components/field_chooser/discover_field.js index 1f9bf7b622351..2411e915e149c 100644 --- a/src/plugins/kibana/public/discover/components/field_chooser/discover_field.js +++ b/src/plugins/kibana/public/discover/components/field_chooser/discover_field.js @@ -60,11 +60,11 @@ define(function (require) { }; $scope.toggleDisplay = function (field) { - // inheritted param to fieldChooser + // This is inherited from fieldChooser $scope.toggle(field.name); if (field.display) $scope.increaseFieldCounter(field); - // we are now displaying the field, kill it's details + // we are now displaying the field, kill its details if (field.details) { $scope.toggleDetails(field); } diff --git a/src/plugins/kibana/public/settings/sections/advanced/advanced_row.html b/src/plugins/kibana/public/settings/sections/advanced/advanced_row.html index 1bd6edaac6441..4b57f33041143 100644 --- a/src/plugins/kibana/public/settings/sections/advanced/advanced_row.html +++ b/src/plugins/kibana/public/settings/sections/advanced/advanced_row.html @@ -16,7 +16,7 @@
@@ -65,7 +65,7 @@
- + {{conf.value || conf.defVal}} {{(conf.value || conf.defVal).join(', ')}} {{conf.value === undefined ? conf.defVal : conf.value}} @@ -74,7 +74,7 @@