mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
fixed a bug in the versionmath that occured when multiple of the same version were sorted. Updated the tests to include this
This commit is contained in:
parent
0cb00a269a
commit
7363c1e13d
3 changed files with 7 additions and 197 deletions
|
@ -1337,187 +1337,6 @@
|
|||
.fa-plus-square-o:before {
|
||||
content: "\f196";
|
||||
}
|
||||
/* Stylings that will blow your mind! */
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
/* stroke-width: 3px; */
|
||||
}
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
/* stroke-width: 3px; */
|
||||
}
|
||||
div.col {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
div.rows {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.row-labels,
|
||||
.column-labels {
|
||||
margin: 0;
|
||||
padding: 10;
|
||||
}
|
||||
visualize {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chartwrapper {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
/* legends */
|
||||
.legendwrapper {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
/*border: 1px solid #ddd;*/
|
||||
position: absolute;
|
||||
float: right;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
top: 34px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
}
|
||||
.header {
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
margin: 0 0 6px 0;
|
||||
}
|
||||
.legend-ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 150px;
|
||||
}
|
||||
.legend-ul li {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 150px;
|
||||
min-height: 22px;
|
||||
margin: 0 18px 0 18px;
|
||||
padding: 4px 0 4px 0;
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
font-size: 12px;
|
||||
line-height: 13px;
|
||||
list-style: none;
|
||||
color: #666;
|
||||
}
|
||||
.dots {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 2px 0 0 -16px;
|
||||
padding: 0;
|
||||
}
|
||||
.legend-toggle {
|
||||
position: relative;
|
||||
float: right;
|
||||
right: 2px;
|
||||
top: 1px;
|
||||
}
|
||||
.legend-open {
|
||||
overflow: auto;
|
||||
}
|
||||
.column-labels {
|
||||
color: #777;
|
||||
font-size: 10pt;
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding-left: 1.0em;
|
||||
line-height: 2.0em;
|
||||
}
|
||||
/* histogram axis and label styles */
|
||||
.vis-canvas {
|
||||
/* background-color: #fff; */
|
||||
}
|
||||
.chart-bkgd {
|
||||
fill: #ffffff;
|
||||
/*fill: #eff3f4;*/
|
||||
/*stroke: #ddd;*/
|
||||
/*shape-rendering: crispEdges;*/
|
||||
}
|
||||
/*.rows-label, .columns-label {
|
||||
font-size: 10pt;
|
||||
fill: #46525d;
|
||||
text-align: center;
|
||||
line-height: 1.5em;
|
||||
}*/
|
||||
p.rows-label,
|
||||
p.columns-label {
|
||||
display: block;
|
||||
background: #eff3f4;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 9pt;
|
||||
fill: #46525d;
|
||||
text-align: center;
|
||||
line-height: 1.9em;
|
||||
}
|
||||
.charts-label {
|
||||
font-size: 8pt;
|
||||
fill: #848e96;
|
||||
}
|
||||
.x-axis-label,
|
||||
.y-axis-label {
|
||||
font-size: 7pt;
|
||||
fill: #848e96;
|
||||
}
|
||||
.tick text {
|
||||
font-size: 7pt;
|
||||
fill: #848e96;
|
||||
/*cursor: pointer;*/
|
||||
}
|
||||
.axis {
|
||||
shape-rendering: crispEdges;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
.axis line,
|
||||
.axis path {
|
||||
stroke: #ddd;
|
||||
fill: none;
|
||||
}
|
||||
.legend-box {
|
||||
fill: #ffffff;
|
||||
}
|
||||
.brush .extent {
|
||||
stroke: #fff;
|
||||
fill-opacity: .125;
|
||||
shape-rendering: crispEdges;
|
||||
}
|
||||
.layer .rect:hover {
|
||||
stroke: 3px;
|
||||
}
|
||||
.k4tip {
|
||||
line-height: 1;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
padding: 8px;
|
||||
background: rgba(70, 82, 93, 0.95);
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
visibility: hidden;
|
||||
}
|
||||
.rect {
|
||||
/*shape-rendering: crispEdges;*/
|
||||
stroke: transparent;
|
||||
stroke-width: 2;
|
||||
}
|
||||
.rect.hover {
|
||||
/*shape-rendering: crispEdges;*/
|
||||
stroke: #333;
|
||||
}
|
||||
.navbar {
|
||||
border-width: 0;
|
||||
}
|
||||
|
|
|
@ -18,21 +18,9 @@ define(function (require) {
|
|||
|
||||
// Sort versions from lowest to highest
|
||||
var sortVersions = function (versions) {
|
||||
var _versions = _.clone(versions),
|
||||
_r = [];
|
||||
|
||||
while (_r.length < versions.length) {
|
||||
var _h = '0';
|
||||
/*jshint -W083 */
|
||||
_.each(_versions, function (v) {
|
||||
if (compare(_h, v)) {
|
||||
_h = v;
|
||||
}
|
||||
});
|
||||
_versions = _.without(_versions, _h);
|
||||
_r.push(_h);
|
||||
}
|
||||
return _r.reverse();
|
||||
return _.uniq(versions).sort(function (a, b) {
|
||||
return !compare(a, b);
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,6 +2,9 @@ define(function (require) {
|
|||
var _ = require('lodash');
|
||||
var versionmath = require('utils/versionmath');
|
||||
var versions = [
|
||||
'1.1.12',
|
||||
'1.1.12',
|
||||
'1.1.12',
|
||||
'1.1.12',
|
||||
'0.90.0',
|
||||
'0.90.1',
|
||||
|
@ -17,7 +20,7 @@ define(function (require) {
|
|||
|
||||
var methods = 'max,min,eq,is,lt,lte,gt,gte'.split(',');
|
||||
describe('methods', function () {
|
||||
it('should have ' + methods.join(', ') + ' methods', function () {
|
||||
it('should have ' + methods.join(', ') + ' method', function () {
|
||||
_.each(methods, function (method) {
|
||||
expect(versionmath[method]).to.be.a(Function);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue