Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighten up spacing, move drag handle, move spy toggle #6247

Merged
merged 19 commits into from
Mar 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
247ad41
[npm] added "clean" script
spalger Jan 11, 2016
636bc7d
Merge branch 'master' of github.com:elastic/kibana into implement/npm…
spalger Feb 8, 2016
2722f42
[grunt/run] support passing arbitrary commands to underlying kibana s…
spalger Feb 12, 2016
4561c82
[glob] switch out glob for glob-all
spalger Feb 12, 2016
c594b5d
[plugins] support running just the tests for one plugin
spalger Feb 12, 2016
4e9e30c
Merge branch 'master' of github.com:elastic/kibana into implement/npm…
spalger Feb 12, 2016
00204a3
[npm/clean] rename to sterilize
spalger Feb 12, 2016
383981a
Merge pull request #5874 from spalger/implement/npmCleanTask
spalger Feb 12, 2016
d664a77
Merge branch 'master' of github.com:elastic/kibana into implement/uiT…
spalger Feb 12, 2016
d573272
Merge pull request #6227 from spalger/implement/kbnServerArgsGruntRun
spalger Feb 12, 2016
53b35c4
[testBundles] throw intelligible error when the plugin is missing
spalger Feb 12, 2016
508d945
[grunt/run] be more lenient with flag prefix parsing
spalger Feb 12, 2016
2ce9b82
Merge branch 'master' of github.com:elastic/kibana into implement/uiT…
spalger Feb 12, 2016
4554030
Merge pull request #6220 from spalger/implement/uiTestsForPlugins
spalger Feb 13, 2016
629365f
Tighten up spacing, move drag handle, move spy toggle
Feb 13, 2016
c9e0c5f
Merge branch 'master' into tweak/smallspy
Feb 13, 2016
de0697c
Import all of lodash
Feb 16, 2016
aa36e68
Change cursor to move button
Mar 8, 2016
a882445
Merge branch 'feature/design' of github.com:elastic/kibana into tweak…
Mar 8, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"lint": "grunt eslint:source",
"lintroller": "grunt eslint:fixSource",
"mocha": "mocha",
"mocha:debug": "mocha --debug-brk"
"mocha:debug": "mocha --debug-brk",
"sterilize": "grunt sterilize"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -100,6 +101,7 @@
"extract-text-webpack-plugin": "0.8.2",
"file-loader": "0.8.4",
"font-awesome": "4.4.0",
"glob-all": "3.0.1",
"good": "6.3.0",
"good-squeeze": "2.1.0",
"gridster": "0.5.6",
Expand Down Expand Up @@ -149,7 +151,6 @@
"eslint-plugin-mocha": "1.1.0",
"expect.js": "0.3.1",
"faker": "1.1.0",
"glob": "4.5.3",
"grunt": "0.4.5",
"grunt-babel": "5.0.1",
"grunt-cli": "0.1.13",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/plugin/__tests__/plugin_downloader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import expect from 'expect.js';
import sinon from 'sinon';
import nock from 'nock';
import glob from 'glob';
import glob from 'glob-all';
import rimraf from 'rimraf';
import mkdirp from 'mkdirp';
import pluginLogger from '../plugin_logger';
Expand Down
2 changes: 1 addition & 1 deletion src/cli/plugin/__tests__/plugin_extractor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect.js';
import sinon from 'sinon';
import glob from 'glob';
import glob from 'glob-all';
import rimraf from 'rimraf';
import mkdirp from 'mkdirp';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<a aria-label="Edit" ng-show="chrome.getVisible() && editUrl" ng-href="{{::editUrl}}">
<i aria-hidden="true" class="fa fa-pencil"></i>
</a>
<a aria-label="Move" ng-show="chrome.getVisible()" class="panel-move">
<i aria-hidden="true" class="fa fa-arrows"></i>
</a>
<a aria-label="Remove" ng-show="chrome.getVisible()" ng-click="remove()">
<i aria-hidden="true" class="fa fa-times"></i>
</a>
Expand Down
5 changes: 2 additions & 3 deletions src/plugins/kibana/public/dashboard/directives/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.directive('dashboardGrid', function ($compile, Notifier) {
// number of columns to render
const COLS = 12;
// number of pixed between each column/row
const SPACER = 10;
const SPACER = 0;
// pixels used by all of the spacers (gridster puts have a spacer on the ends)
const spacerSize = SPACER * COLS;

Expand All @@ -46,7 +46,7 @@ app.directive('dashboardGrid', function ($compile, Notifier) {
stop: readGridsterChangeHandler
},
draggable: {
handle: '.panel-heading, .panel-title',
handle: '.panel-move, .fa-arrows',
stop: readGridsterChangeHandler
}
}).data('gridster');
Expand Down Expand Up @@ -232,4 +232,3 @@ app.directive('dashboardGrid', function ($compile, Notifier) {
}
};
});

14 changes: 6 additions & 8 deletions src/plugins/kibana/public/dashboard/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,8 @@ dashboard-grid {
.visualize-show-spy {
visibility: visible;
}
.panel .panel-heading {
background-color: @kibanaGray6;
&:hover {
cursor: pointer;
}
.btn-group {
display: block !important;
}
.panel .panel-heading .btn-group {
display: block !important;
}
}

Expand Down Expand Up @@ -117,6 +111,10 @@ dashboard-grid {
}
}

.panel-move:hover {
cursor: move;
}

a {
color: @dashboard-panel-heading-link-color;
border: none;
Expand Down
1 change: 0 additions & 1 deletion src/plugins/metric_vis/public/metric_vis.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@

.metric-container {
text-align: center;
padding: 1em;
}
}
32 changes: 15 additions & 17 deletions src/plugins/testsBundle/findSourceFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,27 @@ import fromRoot from '../../utils/fromRoot';
import { chain, memoize } from 'lodash';
import { resolve } from 'path';
import { map, fromNode } from 'bluebird';
import { Glob } from 'glob';
import glob from 'glob-all';

let findSourceFiles = async (patterns, cwd = fromRoot('.')) => {
patterns = [].concat(patterns || []);

let matcheses = await map(patterns, async pattern => {
return await fromNode(cb => {
let g = new Glob(pattern, {
cwd: cwd,
ignore: [
'node_modules/**/*',
'bower_components/**/*',
'**/_*.js'
],
symlinks: findSourceFiles.symlinks,
statCache: findSourceFiles.statCache,
realpathCache: findSourceFiles.realpathCache,
cache: findSourceFiles.cache
}, cb);
});
const matches = await fromNode(cb => {
glob(patterns, {
cwd: cwd,
ignore: [
'node_modules/**/*',
'bower_components/**/*',
'**/_*.js'
],
symlinks: findSourceFiles.symlinks,
statCache: findSourceFiles.statCache,
realpathCache: findSourceFiles.realpathCache,
cache: findSourceFiles.cache
}, cb);
});

return chain(matcheses)
return chain(matches)
.flatten()
.uniq()
.map(match => resolve(cwd, match))
Expand Down
37 changes: 26 additions & 11 deletions src/plugins/testsBundle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = (kibana) => {
config: (Joi) => {
return Joi.object({
enabled: Joi.boolean().default(true),
instrument: Joi.boolean().default(false)
instrument: Joi.boolean().default(false),
pluginId: Joi.string()
}).default();
},

Expand All @@ -18,21 +19,35 @@ module.exports = (kibana) => {
let modules = [];
let config = kibana.config;

// add the modules from all of the apps
for (let app of apps) {
modules = union(modules, app.getModules());
}
const testGlobs = ['src/ui/public/**/*.js'];
const testingPluginId = config.get('testsBundle.pluginId');

if (testingPluginId) {
const plugin = plugins.byId[testingPluginId];
if (!plugin) throw new Error('Invalid testingPluginId :: unknown plugin ' + testingPluginId);

// add the modules from all of this plugins apps
for (let app of plugin.apps) {
modules = union(modules, app.getModules());
}

const testGlobs = [
'src/ui/public/**/__tests__/**/*.js',
];
testGlobs.push(
'!src/ui/public/**/__tests__/**/*',
`${plugin.publicDir}/**/__tests__/**/*.js`
);
} else {

for (const plugin of plugins) {
testGlobs.push(`${plugin.publicDir}/**/__tests__/**/*.js`);
// add the modules from all of the apps
for (let app of apps) {
modules = union(modules, app.getModules());
}

for (const plugin of plugins) {
testGlobs.push(`${plugin.publicDir}/**/__tests__/**/*.js`);
}
}

const testFiles = await findSourceFiles(testGlobs);

for (let f of testFiles) modules.push(f);

if (config.get('testsBundle.instrument')) {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/visualize/spy.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="visualize-show-spy">
<div ng-click="toggleDisplay()" class="visualize-show-spy-tab">
<i class="fa" ng-class="spy.mode.name ? 'fa-chevron-down' : 'fa-chevron-up'"></i>
<i class="fa" ng-class="spy.mode.name ? 'fa-chevron-circle-down' : 'fa-chevron-circle-up'"></i>
</div>
</div>
<div ng-show="spy.mode.name" class="visualize-spy-container">
Expand All @@ -21,4 +21,4 @@
</a>
</div>
</header>
</div>
</div>
34 changes: 6 additions & 28 deletions src/ui/public/visualize/visualize.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ul.visualizations .media-body {
visualize-spy {
// this element should flex
flex: 0 1 auto;
padding: 0px 0px 0px 15px;

// it's children should also flex vertically
flex-direction: column;
Expand All @@ -77,34 +78,12 @@ visualize-spy {

.visualize-show-spy {
flex: 0 0 auto;

border-top: 1px solid;
border-top-color: @visualize-show-spy-border;
margin-bottom: 3px;

&-tab {
margin: 0px auto;
margin-top: -1px;
border: 1px solid;
border-color: @visualize-show-spy-border;
border-top: 0px;
border-width: 0px 1px 1px 1px;
border-bottom-left-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
width: 50px;
background: @visualize-show-spy-bg;
text-align: center;
color: @visualize-show-spy-color;

&:hover {
background-color: @visualize-show-spy-hover-bg;
color: @visualize-show-spy-hover-color;
}
}


i {
padding: 0 10px;
color: @kibanaGray4;
position: absolute;
z-index: 100;
left: 5px;
bottom: 0px;
}
}

Expand Down Expand Up @@ -181,4 +160,3 @@ visualize-spy {
white-space: pre-wrap;
}
}

1 change: 1 addition & 0 deletions src/ui/ui_app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { chain, get, noop, once, pick } from 'lodash';
import _ from 'lodash';

class UiApp {
constructor(uiExports, spec) {
Expand Down
Loading