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

Feature/design merge master3 #6182

Merged
merged 134 commits into from
Feb 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
b7107c4
Added labels for metrics aggregations in Kibana.
Oct 19, 2015
7fa8b26
Check that $scope.vis is defined for testing env.
Oct 19, 2015
b06efa6
Merge branch 'master' of https://github.com/elastic/kibana into metri…
Nov 27, 2015
4fbafcb
Labels now working in all visualizations. Some issues pending in Pie …
Nov 27, 2015
cff9613
Merge branch 'master' of https://github.com/elastic/kibana into metri…
Dec 2, 2015
a2cc244
Use the same approach than "JSON input" to add a "Custom label" param…
Dec 2, 2015
1064f31
Merge branch 'master' of https://github.com/elastic/kibana into metri…
Jan 14, 2016
8ae97ce
Don't use customLabel if it is not defined.
Jan 20, 2016
28254dd
Merge branch 'master' of https://github.com/elastic/kibana
Jan 20, 2016
793f3d3
[Aggregations labels] Address epixa comments about redundant check an…
Jan 21, 2016
7e1a943
Merge branch 'master' into metric-label
Jan 21, 2016
12f88a8
make only spy tab clickable, not entire row
Jan 23, 2016
bf2e23a
Disable browser auto-complete in favor of module autocomplete
RubieV Jan 29, 2016
ab33ab6
Merge branch 'master' into metric-label
Feb 2, 2016
38752c3
[AgType tests] Update tests so the new customLabel param is supported.
Feb 2, 2016
46739cd
[AggType tests] Check the param name for customLabel.
Feb 2, 2016
4c23c41
Lint for attempts to override const variables
epixa Jan 26, 2016
0a2e335
Use const/let in devMode plugin
epixa Jan 26, 2016
d71d27b
Use const/let in elasticsearch plugin
epixa Jan 26, 2016
3508dda
Use const/let in kbn_vislib_vis_types plugin
epixa Jan 26, 2016
7cf4433
Use const/let in kibana plugin
epixa Jan 26, 2016
5d4fd25
Use const/let in markdown_vis plugin
epixa Jan 26, 2016
91ed332
Use const/let in metric_vis plugin
epixa Jan 26, 2016
c3d725f
Use const/let in spyModes plugin
epixa Jan 26, 2016
07d5b5a
Use const/let in statusPage plugin
epixa Jan 26, 2016
fc3a9f5
Use const/let in table_vis plugin
epixa Jan 26, 2016
0475b85
Merge pull request #6012 from epixa/es6ify
epixa Feb 2, 2016
1ba65b0
Merge pull request #6049 from RubieV/patch-1
epixa Feb 2, 2016
02b9f0e
Merge pull request #5985 from michaelcheng429/spytab
Feb 2, 2016
b86910f
[es6Modules] convert simple case first
spalger Feb 2, 2016
96c2eb7
Add settings sections registry
lukasolson Feb 2, 2016
d75fb95
Merge pull request #6072 from spalger/implement/es6Modules/simple
tsullivan Feb 2, 2016
f0527aa
[Tests AggConfig#makeLabel] Add tests for AggConfig.prototype.makeLabel.
Feb 2, 2016
9f65dd9
Fix issue with incorrect name in uiExports
lukasolson Feb 2, 2016
3fe85a2
Use settings sections registry to display settings sections
lukasolson Feb 3, 2016
26c8460
Ensure settings sections load in order
lukasolson Feb 3, 2016
a6eb23e
[amd] remove unused module, export args
spalger Feb 3, 2016
618e23b
Merge pull request #6080 from spalger/fix/unusedAmdArgs
spalger Feb 3, 2016
b1587c8
Change to use _.constant instead of () => {}
lukasolson Feb 3, 2016
2a5cdae
Merge pull request #5142 from acs/metric-label
Feb 3, 2016
5e05310
Allow customLabels to be disabled on a per-agg basis
Feb 3, 2016
f37e0f4
[es6Modules] convert destructured exports
spalger Feb 2, 2016
353bdde
Merge pull request #6087 from rashidkpc/fix/uselessFilterLabel
Feb 3, 2016
cba5d66
Merge pull request #6073 from spalger/implement/es6Modules/destructured
spalger Feb 3, 2016
ed78270
[es6modules] apply transforms from #6076, #6079, and #6075
spalger Feb 3, 2016
11664b3
[es6modules] properly import ui/utils/aggressive_parse in tests
spalger Feb 3, 2016
5fa29d5
[es6modules] exclude src/cli/cluster and src/cli/serve from automatic…
spalger Feb 3, 2016
6b9fea2
Merge pull request #6093 from spalger/implement/es6Modules/imports
spalger Feb 3, 2016
70a3fc6
Refactor archive type checks to be more DRY
epixa Feb 3, 2016
71ffdaf
Plugin installer treats .tgz as a tar file
epixa Feb 3, 2016
906611e
Rename type_from_filename to file_type
epixa Feb 3, 2016
a668ec9
[es6modules] hoist private module providers
spalger Feb 3, 2016
ba17d3b
[es6modules] unwrap amd modules
spalger Feb 3, 2016
69b44a0
Merge branch 'master' into plugin-settings-sections
lukasolson Feb 3, 2016
ed871e5
[es6modules] hoist commonly inlined modules
spalger Feb 3, 2016
67aea87
Change require to import
lukasolson Feb 3, 2016
34b9a73
[packaging] Add description
jbudz Feb 3, 2016
cca8c1a
[build] Set os-packages flag on jenkins
jbudz Feb 4, 2016
781e9be
Allow sections after about settings section
lukasolson Feb 4, 2016
0af354f
Add registry for doc table details
Feb 4, 2016
f97f714
Merge pull request #6077 from lukasolson/plugin-settings-sections
lukasolson Feb 4, 2016
19022d2
Merge remote-tracking branch 'kibana/master' into doc-detail-views-re…
Feb 4, 2016
a2b99c4
[packaging] Escape spaces instead of quoting description
jbudz Feb 4, 2016
596f350
[renderDirective] add support for defining scope bindings
spalger Feb 4, 2016
67ae154
Merge pull request #6103 from jbudz/issues/6095
jbudz Feb 4, 2016
5a7669c
Merge remote-tracking branch 'spalger/implement/renderDirectiveScopeB…
Feb 4, 2016
b81aad0
[vislib/tests] evade race condition by inlining css
spalger Feb 4, 2016
5d5e8bf
Resolve review comments
Feb 4, 2016
f06a07f
[timepicker/tests] only pass objects to setRefreshInterval()
spalger Feb 4, 2016
c54fbb1
Move doc viewers to plugin
Feb 4, 2016
8df5a2f
[timepicker/tests] do not rely on object identity
spalger Feb 4, 2016
ec22f09
Fix tests for doc_views
Feb 4, 2016
41d3333
[packages] Add url, maintainer, vendor, license metadata
jbudz Feb 4, 2016
ad2f9b4
Merge pull request #6114 from jbudz/snapshots
jbudz Feb 4, 2016
7fbe6ff
[plugins] allow breaking nuts
spalger Feb 4, 2016
956adbd
Make saved object list length configurable
Feb 5, 2016
da5acc4
[es] upgrade to master
Dec 11, 2015
9ad8239
[courier] don't send search_type=count
spalger Jan 5, 2016
ff832a6
[courier] remove use of filtered_query
spalger Jan 5, 2016
05392a7
[scriptedFields] nest script and lang under script param
spalger Jan 5, 2016
811991b
[webpack] enforce using elasticsearch-browser
spalger Jan 8, 2016
d5e76b0
[esjs] update
spalger Jan 11, 2016
1e507a9
[elasticsearch/client] use bluebird for promises for better backward …
spalger Jan 13, 2016
451e7fc
[elasticsearch] getFieldMapping takes fields not field now
spalger Jan 13, 2016
23aae7e
removing query object wrapper
stormpython Jan 15, 2016
b6c057c
[filterManager] remove query wrapper
spalger Jan 18, 2016
ea57429
Revert "[filterManager] remove query wrapper"
spalger Jan 29, 2016
6a5e038
Revert "removing query object wrapper"
spalger Jan 29, 2016
c60d080
Revert "[scriptedFields] nest script and lang under script param"
spalger Jan 29, 2016
02d6fd5
Revert "[courier] remove use of filtered_query"
spalger Jan 29, 2016
b1cfa20
Revert "Revert "[courier] remove use of filtered_query""
spalger Feb 2, 2016
15c94b4
[courier/DataSource] style improvements
spalger Feb 2, 2016
7aee4a5
[courier] translate filters and filter aggs to work with es master
spalger Feb 5, 2016
410029d
[ScenarioManager] use new multi-field syntax
spalger Feb 5, 2016
f594433
[packages] Set deb-priority to optional
jbudz Feb 5, 2016
4480595
[npm] update grunt-esvm
spalger Feb 5, 2016
d68f018
Update CONTRIBUTING.md
Feb 5, 2016
50119d4
Merge pull request #6120 from elastic/implement/es6Modules/fixImportS…
spalger Feb 5, 2016
4a5146c
Hyperlink some more advanced settings
jimmyjones2 Feb 5, 2016
50cd3e2
Merge pull request #6100 from elastic/implement/es6Modules/inlineImports
spalger Feb 5, 2016
0b122eb
Merge pull request #6105 from trevan/doc-detail-views-registry
spalger Feb 5, 2016
dfe03ca
Merge branch 'master' of github.com:elastic/kibana into implement/sle…
spalger Feb 5, 2016
efeeacb
Merge pull request #6122 from spalger/implement/sledgehammer
spalger Feb 5, 2016
6ee7047
[java] use jdk8 on jenkins
spalger Feb 6, 2016
3e867a4
Merge pull request #6099 from elastic/implement/es6Modules/unwrapDefine
spalger Feb 6, 2016
e958c87
Merge branch 'master' of github.com:elastic/kibana into implement/es6…
spalger Feb 6, 2016
b605b66
[fixtures] fix syntax error
spalger Feb 6, 2016
2520af4
Merge pull request #6135 from jimmyjones2/advanced_lin
spalger Feb 6, 2016
6458414
added missing word
scampi Feb 8, 2016
d64ca9c
[packages] Add www to metadata url
jbudz Feb 8, 2016
66ee2b2
Merge pull request #6146 from scampi/patch-1
epixa Feb 8, 2016
93b891b
Merge pull request #6133 from jbudz/issues/6117
jbudz Feb 8, 2016
5aab99f
Merge pull request #6083 from epixa/6074-tgz-plugins
epixa Feb 8, 2016
176c2ad
[es] use master api
spalger Feb 8, 2016
82e2890
[courier] recurse to aggregations and aggs
spalger Feb 8, 2016
925bbfb
[esProxy/tests] rewrite test request without filters
spalger Feb 8, 2016
94a9e65
Merge pull request #6128 from rashidkpc/tweak/saved-object-list-length
Feb 8, 2016
8d0d581
[scenarios] number types are not analyzable
spalger Feb 8, 2016
13560d7
Merge branch 'master' of github.com:elastic/kibana into implement/es6…
spalger Feb 8, 2016
c6da4eb
Allow exists filter for unindexed fields, but not meta fields
jimmyjones2 Feb 6, 2016
d248af5
[scenarioManager] when bulk fails, report errors
spalger Feb 8, 2016
10e97a4
Merge branch 'fix/failTestOnBadBulk' into upgrade/elasticsearch/master
spalger Feb 8, 2016
728fbdb
[scenarioManager] do not mix index:analyzed and doc_values:true
spalger Feb 8, 2016
c8e38a6
Merge pull request #6102 from elastic/implement/es6Modules/privatePro…
w33ble Feb 8, 2016
f200db7
Merge branch 'master' of github.com:elastic/kibana into upgrade/elast…
spalger Feb 8, 2016
233869f
Merge pull request #6154 from spalger/fix/failTestOnBadBulk
spalger Feb 8, 2016
d1387c7
Revert "Allow exists filter for unindexed fields, but not meta fields"
spalger Feb 8, 2016
2486b1d
[scriptedFields] use the comprehensive syntax for compat
spalger Feb 8, 2016
9a4bb32
[scenarioManager] use index:true rather than removal from 8d0d581577c…
spalger Feb 8, 2016
135188e
[courier/segmented] remove search_type=count again (bad merge?)
spalger Feb 8, 2016
be40e98
Merge branch 'master' of github.com:elastic/kibana into upgrade/elast…
spalger Feb 9, 2016
b9e8a86
[es-browser] fix load order issues
spalger Feb 9, 2016
4e27267
Merge pull request #5656 from spalger/upgrade/elasticsearch/master
spalger Feb 9, 2016
16300d6
Merge remote-tracking branch 'upstream/master' into feature/design-me…
tsullivan Feb 10, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ rules:
no-bitwise: 0
no-caller: 2
no-cond-assign: 0
no-const-assign: 2
no-debugger: 2
no-empty: 2
no-eval: 2
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Distributable packages can be found in `target/` after the build completes.
Packages are built using fpm, pleaserun, dpkg, and rpm. fpm and pleaserun can be installed using gem. Package building has only been tested on Linux and is not supported on any other platform.
```sh
gem install pleaserun
apt-get install ruby-dev
gem install fpm
npm run build:ospackages
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Kibana is an open source ([Apache Licensed](https://github.com/elastic/kibana/bl

## Requirements

- Elasticsearch version 2.2.0 or later
- Elasticsearch master
- Kibana binary package

## Installation
Expand Down
6 changes: 3 additions & 3 deletions docs/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You can set up Kibana and start exploring your Elasticsearch indices in minutes.
All you need is:

* Elasticsearch 2.1 or later
* Elasticsearch master
* A modern web browser - http://www.elastic.co/subscriptions/matrix#matrix_browsers[Supported Browsers].
* Information about your Elasticsearch installation:
** URL of the Elasticsearch instance you want to connect to.
Expand Down Expand Up @@ -82,8 +82,8 @@ simply be the name of a single index.
reads the index mapping to list all of the fields that contain a timestamp. If your index doesn't have time-based data,
disable the *Index contains time-based events* option.
+
WARNING: Using event times to create index names is *deprecated* in this release of Kibana. Support for this functionality
will be removed entirely in the next major Kibana release. Elasticsearch 2.1 includes sophisticated date parsing APIs that
WARNING: Using event times to create index names is *deprecated* in this release of Kibana. Support for this functionality
will be removed entirely in the next major Kibana release. Elasticsearch 2.1 includes sophisticated date parsing APIs that
Kibana uses to determine date information, removing the need to specify dates in the index pattern name.
+
. Click *Create* to add the index pattern. This first pattern is automatically configured as the default.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"commander": "2.8.1",
"css-loader": "0.17.0",
"d3": "3.5.6",
"elasticsearch": "8.0.1",
"elasticsearch-browser": "8.0.1",
"elasticsearch": "10.1.2",
"elasticsearch-browser": "10.1.2",
"expiry-js": "0.1.7",
"exports-loader": "0.6.2",
"expose-loader": "0.7.0",
Expand Down Expand Up @@ -154,7 +154,7 @@
"grunt-cli": "0.1.13",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-copy": "0.8.1",
"grunt-esvm": "2.0.0",
"grunt-esvm": "2.1.1",
"grunt-karma": "0.12.0",
"grunt-run": "0.5.0",
"grunt-s3": "0.2.0-alpha.3",
Expand Down
10 changes: 5 additions & 5 deletions src/cli/Command.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
let _ = require('lodash');
let Command = require('commander').Command;
import _ from 'lodash';

let red = require('./color').red;
let yellow = require('./color').yellow;
let help = require('./help');
import help from './help';
import { Command } from 'commander';
import { red } from './color';
import { yellow } from './color';

Command.prototype.error = function (err) {
if (err && err.message) err = err.message;
Expand Down
6 changes: 3 additions & 3 deletions src/cli/Log.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
let _ = require('lodash');
let ansicolors = require('ansicolors');
import _ from 'lodash';
import ansicolors from 'ansicolors';

let log = _.restParam(function (color, label, rest1) {
console.log.apply(console, [color(` ${_.trim(label)} `)].concat(rest1));
});

let color = require('./color');
import color from './color';

module.exports = class Log {
constructor(quiet, silent) {
Expand Down
4 changes: 2 additions & 2 deletions src/cli/cli.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let _ = require('lodash');
import _ from 'lodash';

let utils = require('requirefrom')('src/utils');
let pkg = utils('packageJson');
let Command = require('./Command');
import Command from './Command';

let argv = process.env.kbnWorkerArgv ? JSON.parse(process.env.kbnWorkerArgv) : process.argv.slice();
let program = new Command('bin/kibana');
Expand Down
10 changes: 5 additions & 5 deletions src/cli/cluster/cluster_manager.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const cluster = require('cluster');
import cluster from 'cluster';
const { join } = require('path');
const { format: formatUrl } = require('url');
const Hapi = require('hapi');
import Hapi from 'hapi';
const { debounce, compact, get, invoke, bindAll, once, sample } = require('lodash');

const Log = require('../Log');
const Worker = require('./worker');
const BasePathProxy = require('./base_path_proxy');
import Log from '../Log';
import Worker from './worker';
import BasePathProxy from './base_path_proxy';

process.env.kbnWorkerType = 'managr';

Expand Down
6 changes: 3 additions & 3 deletions src/cli/cluster/worker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
let _ = require('lodash');
let cluster = require('cluster');
import _ from 'lodash';
import cluster from 'cluster';
let { resolve } = require('path');
let { EventEmitter } = require('events');

let fromRoot = require('../../utils/fromRoot');
import fromRoot from '../../utils/fromRoot';

let cliPath = fromRoot('src/cli');
let baseArgs = _.difference(process.argv.slice(2), ['--no-watch']);
Expand Down
4 changes: 2 additions & 2 deletions src/cli/color.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

var _ = require('lodash');
var ansicolors = require('ansicolors');
import _ from 'lodash';
import ansicolors from 'ansicolors';

exports.green = _.flow(ansicolors.black, ansicolors.bgGreen);
exports.red = _.flow(ansicolors.white, ansicolors.bgRed);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/help.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('lodash');
import _ from 'lodash';

module.exports = function (command, spaces) {
if (!_.size(command.commands)) {
Expand Down
31 changes: 31 additions & 0 deletions src/cli/plugin/__tests__/file_type.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import expect from 'expect.js';
import fileType, { ZIP, TAR } from '../file_type';

describe('kibana cli', function () {
describe('file_type', function () {
it('returns ZIP for .zip filename', function () {
const type = fileType('wat.zip');
expect(type).to.equal(ZIP);
});
it('returns TAR for .tar.gz filename', function () {
const type = fileType('wat.tar.gz');
expect(type).to.equal(TAR);
});
it('returns TAR for .tgz filename', function () {
const type = fileType('wat.tgz');
expect(type).to.equal(TAR);
});
it('returns undefined for unknown file type', function () {
const type = fileType('wat.unknown');
expect(type).to.equal(undefined);
});
it('accepts paths', function () {
const type = fileType('/some/path/to/wat.zip');
expect(type).to.equal(ZIP);
});
it('accepts urls', function () {
const type = fileType('http://example.com/wat.zip');
expect(type).to.equal(ZIP);
});
});
});
6 changes: 3 additions & 3 deletions src/cli/plugin/__tests__/plugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const expect = require('expect.js');
const sinon = require('sinon');
const plugin = require('../plugin');
import expect from 'expect.js';
import sinon from 'sinon';
import plugin from '../plugin';

describe('kibana cli', function () {

Expand Down
12 changes: 6 additions & 6 deletions src/cli/plugin/__tests__/plugin_cleaner.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const expect = require('expect.js');
const sinon = require('sinon');
const fs = require('fs');
const rimraf = require('rimraf');
import expect from 'expect.js';
import sinon from 'sinon';
import fs from 'fs';
import rimraf from 'rimraf';

const pluginCleaner = require('../plugin_cleaner');
const pluginLogger = require('../plugin_logger');
import pluginCleaner from '../plugin_cleaner';
import pluginLogger from '../plugin_logger';

describe('kibana cli', function () {

Expand Down
37 changes: 28 additions & 9 deletions src/cli/plugin/__tests__/plugin_downloader.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const expect = require('expect.js');
const sinon = require('sinon');
const nock = require('nock');
const glob = require('glob');
const rimraf = require('rimraf');
const { join } = require('path');
const mkdirp = require('mkdirp');
const pluginLogger = require('../plugin_logger');
const pluginDownloader = require('../plugin_downloader');
import expect from 'expect.js';
import sinon from 'sinon';
import nock from 'nock';
import glob from 'glob';
import rimraf from 'rimraf';
import mkdirp from 'mkdirp';
import pluginLogger from '../plugin_logger';
import pluginDownloader from '../plugin_downloader';
import { join } from 'path';

describe('kibana cli', function () {

Expand Down Expand Up @@ -124,6 +124,25 @@ describe('kibana cli', function () {
});
});

it('should consider .tgz files as archive type .tar.gz', function () {
const filePath = join(__dirname, 'replies/test_plugin_master.tar.gz');

const couchdb = nock('http://www.files.com')
.defaultReplyHeaders({
'content-length': '10'
})
.get('/plugin.tgz')
.replyWithFile(200, filePath);

const sourceUrl = 'http://www.files.com/plugin.tgz';

return downloader._downloadSingle(sourceUrl)
.then(function (data) {
expect(data.archiveType).to.be('.tar.gz');
expectWorkingPathNotEmpty();
});
});

it('should download a zip from a valid http url', function () {
const filePath = join(__dirname, 'replies/test_plugin_master.zip');

Expand Down
20 changes: 10 additions & 10 deletions src/cli/plugin/__tests__/plugin_extractor.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const expect = require('expect.js');
const sinon = require('sinon');
const glob = require('glob');
const rimraf = require('rimraf');
const { join } = require('path');
const mkdirp = require('mkdirp');

const pluginLogger = require('../plugin_logger');
const extract = require('../plugin_extractor');
const pluginDownloader = require('../plugin_downloader');
import expect from 'expect.js';
import sinon from 'sinon';
import glob from 'glob';
import rimraf from 'rimraf';
import mkdirp from 'mkdirp';

import pluginLogger from '../plugin_logger';
import extract from '../plugin_extractor';
import pluginDownloader from '../plugin_downloader';
import { join } from 'path';

describe('kibana cli', function () {

Expand Down
14 changes: 7 additions & 7 deletions src/cli/plugin/__tests__/plugin_installer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const expect = require('expect.js');
const sinon = require('sinon');
const rimraf = require('rimraf');
const { mkdirSync } = require('fs');
const { join } = require('path');
const pluginLogger = require('../plugin_logger');
const pluginInstaller = require('../plugin_installer');
import expect from 'expect.js';
import sinon from 'sinon';
import rimraf from 'rimraf';
import pluginLogger from '../plugin_logger';
import pluginInstaller from '../plugin_installer';
import { mkdirSync } from 'fs';
import { join } from 'path';

describe('kibana cli', function () {

Expand Down
6 changes: 3 additions & 3 deletions src/cli/plugin/__tests__/plugin_logger.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const expect = require('expect.js');
const sinon = require('sinon');
const pluginLogger = require('../plugin_logger');
import expect from 'expect.js';
import sinon from 'sinon';
import pluginLogger from '../plugin_logger';

describe('kibana cli', function () {

Expand Down
8 changes: 4 additions & 4 deletions src/cli/plugin/__tests__/progress_reporter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const expect = require('expect.js');
const sinon = require('sinon');
const progressReporter = require('../progress_reporter');
const pluginLogger = require('../plugin_logger');
import expect from 'expect.js';
import sinon from 'sinon';
import progressReporter from '../progress_reporter';
import pluginLogger from '../plugin_logger';

describe('kibana cli', function () {

Expand Down
6 changes: 3 additions & 3 deletions src/cli/plugin/__tests__/setting_parser.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var path = require('path');
var expect = require('expect.js');
import path from 'path';
import expect from 'expect.js';

var utils = require('requirefrom')('src/utils');
var fromRoot = utils('fromRoot');
var settingParser = require('../setting_parser');
import settingParser from '../setting_parser';

describe('kibana cli', function () {

Expand Down
16 changes: 4 additions & 12 deletions src/cli/plugin/downloaders/file.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { createWriteStream, createReadStream, unlinkSync, statSync } = require('fs');
const getProgressReporter = require('../progress_reporter');
import getProgressReporter from '../progress_reporter';
import { createWriteStream, createReadStream, unlinkSync, statSync } from 'fs';
import fileType from '../file_type';

function openSourceFile({ sourcePath }) {
try {
Expand Down Expand Up @@ -36,15 +37,6 @@ async function copyFile({ readStream, writeStream, progressReporter }) {
});
}

function getArchiveTypeFromFilename(path) {
if (/\.zip$/i.test(path)) {
return '.zip';
}
if (/\.tar\.gz$/i.test(path)) {
return '.tar.gz';
}
}

/*
// Responsible for managing local file transfers
*/
Expand All @@ -67,7 +59,7 @@ export default async function copyLocalFile(logger, sourcePath, targetPath) {
}

// all is well, return our archive type
const archiveType = getArchiveTypeFromFilename(sourcePath);
const archiveType = fileType(sourcePath);
return { archiveType };
} catch (err) {
logger.error(err);
Expand Down
Loading