From 555070387d85aeea88fc1585be66aee44f1e2865 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Tue, 15 Sep 2015 14:40:02 -0700 Subject: [PATCH 1/4] Move app switcher to pull down --- .../appSwitcher/public/appSwitcher.html | 19 +- src/plugins/appSwitcher/public/appSwitcher.js | 31 - .../appSwitcher/public/appSwitcher.less | 34 +- .../settings/sections/about/barcode.svg | 797 +++++++++--------- src/server/http/getDefaultRoute.js | 2 +- src/ui/index.js | 11 - src/ui/public/chrome/chrome.html | 16 +- src/ui/public/chrome/context.js | 15 +- 8 files changed, 445 insertions(+), 480 deletions(-) delete mode 100644 src/plugins/appSwitcher/public/appSwitcher.js diff --git a/src/plugins/appSwitcher/public/appSwitcher.html b/src/plugins/appSwitcher/public/appSwitcher.html index df9522d7c09b9..9652ebbf94660 100644 --- a/src/plugins/appSwitcher/public/appSwitcher.html +++ b/src/plugins/appSwitcher/public/appSwitcher.html @@ -1,16 +1,11 @@
- diff --git a/src/plugins/appSwitcher/public/appSwitcher.js b/src/plugins/appSwitcher/public/appSwitcher.js deleted file mode 100644 index 9df64e2562b36..0000000000000 --- a/src/plugins/appSwitcher/public/appSwitcher.js +++ /dev/null @@ -1,31 +0,0 @@ -require('plugins/appSwitcher/appSwitcher.less'); - -var kibanaLogoUrl = require('ui/images/kibana.png'); - -require('ui/chrome') -.setBrand({ - 'logo': 'url(' + kibanaLogoUrl + ') left no-repeat', - 'smallLogo': 'url(' + kibanaLogoUrl + ') left no-repeat' -}) -.setShowAppsLink(false) -.setTabs([ - { - id: '', - title: 'Apps', - activeIndicatorColor: '#ecf0f1' - } -]) -.setRootTemplate(require('plugins/appSwitcher/appSwitcher.html')) -.setRootController('switcher', function SwitcherController($http) { - var switcher = { - loading: true - }; - - $http.get('/api/apps') - .then(function (resp) { - switcher.loading = false; - switcher.apps = resp.data; - }); - - return switcher; -}); diff --git a/src/plugins/appSwitcher/public/appSwitcher.less b/src/plugins/appSwitcher/public/appSwitcher.less index dbd6cba6542a8..3299565243458 100644 --- a/src/plugins/appSwitcher/public/appSwitcher.less +++ b/src/plugins/appSwitcher/public/appSwitcher.less @@ -1,43 +1,37 @@ @import (reference) "~ui/styles/variables"; -.application { - background-color: @gray-lighter; -} +@app-icon-size: 48px; .app-links { - width: 700px; - margin: 25px auto; text-align: justify; .app-link { display: inline-block; vertical-align: top; - text-align: left; - background: white; - width: 200px; - margin: 0 30px 30px 0; + text-align: center; + width: @app-icon-size; + margin: 0px 10px; .app-icon { display: block; - height: 200px; + height: @app-icon-size; + width: @app-icon-size; background-size: cover; background-position: center; - } - - .app-info { - display: block; - padding: 15px; + background-size: contain; + border-radius: @border-radius-base; + width: 100%; } .app-title { - margin: 0 0 10px; color: @text-color; + font-size: 0.9em; + width: 100%; } - .app-description { - font-size: 1em; - color: @gray; - margin: 0; + &:hover .app-title { + text-decoration: underline; } } + } diff --git a/src/plugins/kibana/public/settings/sections/about/barcode.svg b/src/plugins/kibana/public/settings/sections/about/barcode.svg index 6b981fca1c3f9..671b628ca1507 100644 --- a/src/plugins/kibana/public/settings/sections/about/barcode.svg +++ b/src/plugins/kibana/public/settings/sections/about/barcode.svg @@ -13,7 +13,7 @@ height="64" id="svg5235" version="1.1" - inkscape:version="0.91+devel+osxmenu r12835" + inkscape:version="0.91 r13725" viewBox="0 0 64 64" sodipodi:docname="barcode.svg"> image/svg+xml - + @@ -54,404 +54,401 @@ inkscape:label="Layer 1" inkscape:groupmode="layer"> - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="g4300" + transform="matrix(1.1002186,0,0,1.1002186,-3.2119331,-3.0092752)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/server/http/getDefaultRoute.js b/src/server/http/getDefaultRoute.js index 91546528e9441..0df77f2275adf 100644 --- a/src/server/http/getDefaultRoute.js +++ b/src/server/http/getDefaultRoute.js @@ -7,5 +7,5 @@ module.exports = _.once(function (kbnServer) { // redirect to the single app let apps = kbnServer.uiExports.apps.toArray(); - return apps.length === 1 ? `/app/${apps[0].id}` : '/apps'; + return '/app/kibana'; }); diff --git a/src/ui/index.js b/src/ui/index.js index c906be2b572bb..2c830b98102a4 100644 --- a/src/ui/index.js +++ b/src/ui/index.js @@ -40,17 +40,6 @@ module.exports = async (kbnServer, server, config) => { server.setupViews(resolve(__dirname, 'views')); server.exposeStaticFile('/loading.gif', resolve(__dirname, 'public/loading.gif')); - // serve the app switcher - server.route({ - path: '/apps', - method: 'GET', - handler: function (req, reply) { - let switcher = uiExports.getHiddenApp('appSwitcher'); - if (!switcher) return reply(Boom.notFound('app switcher not installed')); - return reply.renderApp(switcher); - } - }); - // serve the app switcher server.route({ path: '/api/apps', diff --git a/src/ui/public/chrome/chrome.html b/src/ui/public/chrome/chrome.html index 87ee0be3c2cf1..ce592d7c16a46 100644 --- a/src/ui/public/chrome/chrome.html +++ b/src/ui/public/chrome/chrome.html @@ -41,15 +41,17 @@ -
  • - -
  • -
  • {{ tab.title }}
  • + +
  • + + + +