Skip to content

Commit

Permalink
Implement new 5.0 loading screen. (#8970)
Browse files Browse the repository at this point in the history
* Implement new 5.0 loading screen.
* Remove old Kibana loading gif.
* Add Open Sans font files to public/assets/fonts dir, and remove some unused ones.
* Serve fonts directly from ui directory, using exposeStaticDir.
  • Loading branch information
cjcenizal authored Nov 15, 2016
1 parent b066807 commit 26c53e8
Show file tree
Hide file tree
Showing 50 changed files with 108 additions and 11,641 deletions.
7 changes: 3 additions & 4 deletions src/server/http/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { parse } from 'url';
import { format } from 'url';
import { resolve } from 'path';
import _ from 'lodash';
import fs from 'fs';
import Boom from 'boom';
import Hapi from 'hapi';
import HapiTemplates from 'vision';
import HapiStaticFiles from 'inert';
import HapiProxy from 'h2o2';
import getDefaultRoute from './get_default_route';
import versionCheckMixin from './version_check';
import { shortUrlAssertValid } from './short_url_assert_valid';
Expand Down Expand Up @@ -140,6 +137,8 @@ module.exports = async function (kbnServer, server, config) {
}
});

server.exposeStaticDir('/ui/fonts/{path*}', resolve(__dirname, '../../ui/public/assets/fonts'));

kbnServer.mixin(versionCheckMixin);

return kbnServer.mixin(require('./xsrf'));
Expand Down
5 changes: 0 additions & 5 deletions src/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import UiBundleCollection from './ui_bundle_collection';
import UiBundlerEnv from './ui_bundler_env';

export default async (kbnServer, server, config) => {

const loadingGif = readFile(fromRoot('src/ui/public/loading.gif'), { encoding: 'base64'});

const uiExports = kbnServer.uiExports = new UiExports({
urlBasePath: config.get('server.basePath')
});
Expand Down Expand Up @@ -42,7 +39,6 @@ export default async (kbnServer, server, config) => {

// render all views from the ui/views directory
server.setupViews(resolve(__dirname, 'views'));
server.exposeStaticFile('/loading.gif', resolve(__dirname, 'public/loading.gif'));

server.route({
path: '/app/{id}',
Expand Down Expand Up @@ -81,7 +77,6 @@ export default async (kbnServer, server, config) => {
function viewAppWithPayload(app, payload) {
return this.view(app.templateName, {
app: app,
loadingGif: loadingGif,
kibanaPayload: payload,
bundlePath: `${config.get('server.basePath')}/bundles`,
});
Expand Down
Binary file removed src/ui/public/loading.gif
Binary file not shown.
100 changes: 0 additions & 100 deletions src/ui/public/styles/fonts.less

This file was deleted.

Loading

0 comments on commit 26c53e8

Please sign in to comment.