This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#66 from spalger/lockdown
Lockdown
- Loading branch information
Showing
11 changed files
with
314 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
webpackShims | ||
public/src/sense_editor/mode/worker.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
|
||
root: true | ||
extends: airbnb | ||
|
||
env: | ||
node: true | ||
amd: true | ||
|
||
rules: | ||
no-undef: [1] | ||
|
||
func-names: [0] | ||
quotes: [0] | ||
space-before-function-paren: [0] | ||
vars-on-top: [0] | ||
no-cond-assign: [0] | ||
no-param-reassign: [0] | ||
comma-dangle: [0] | ||
no-var: [0] | ||
one-var: [0] | ||
id-length: [0] | ||
eol-last: [0] | ||
consistent-return: [0] | ||
no-use-before-define: [0] | ||
no-nested-ternary: [0] | ||
new-cap: [0] | ||
wrap-iife: [0] | ||
eqeqeq: [0] | ||
no-use-before-define: [0] | ||
no-else-return: [0] | ||
indent: [0] | ||
spaced-comment: [0] | ||
key-spacing: [0] | ||
space-infix-ops: [0] | ||
prefer-const: [0] | ||
camelcase: [0] | ||
no-unused-vars: [0] | ||
padded-blocks: [0] | ||
no-shadow: [0] | ||
semi: [0] | ||
no-console: [0] | ||
brace-style: [0] | ||
no-empty: [0] | ||
strict: [0] | ||
no-redeclare: [0] | ||
curly: [0] | ||
default-case: [0] | ||
dot-notation: [0] | ||
no-multi-spaces: [0] | ||
guard-for-in: [0] | ||
yoda: [0] | ||
no-new: [0] | ||
no-throw-literal: [0] | ||
no-unreachable: [0] | ||
no-multi-str: [0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
/work | ||
.idea | ||
/agent/logs | ||
/agent/data | ||
/agent/target | ||
/agent/.project | ||
/agent/.classpath | ||
/agent/.settings | ||
/agent/config | ||
/agent/lib | ||
/agent/.local-execution-hints.log | ||
.DS_Store | ||
*.iml | ||
/kibana/kibana | ||
/node_modules | ||
/build | ||
/.aws-config.json | ||
node_modules | ||
build | ||
.aws-config.json | ||
html_docs | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,19 +42,19 @@ Follow the instruction described on the [Kibana Contributing Guide](https://gith | |
|
||
Once Kibana is setup, make sure your have the 4.2 branch checkout: | ||
|
||
``` | ||
$ git checkout 4.2 | ||
```sh | ||
git checkout 4.2 | ||
``` | ||
|
||
Next, clone your Sense fork into it's `installedPlugin` folder: | ||
|
||
``` | ||
$ git clone [email protected]:YOUR_GITHUB_HANDLE/sense.git installedPlugins/sense | ||
```sh | ||
git clone [email protected]:YOUR_GITHUB_HANDLE/sense.git installedPlugins/sense | ||
``` | ||
|
||
Create a file named `config/kibana.dev.yml` (under the Kibana *root folder*), with the following content: | ||
|
||
``` | ||
```yaml | ||
kibana.enabled: false # do not load the Discover, Visualize and Dashboard tabs of Kibana. This saves time | ||
elasticsearch.enabled: false # do not require an active Elasticsearch instance to run | ||
optimize: | ||
|
@@ -65,13 +65,30 @@ optimize: | |
last, run Kibana in development mode: | ||
``` | ||
$ ./bin/kibana --dev | ||
```sh | ||
./bin/kibana --dev | ||
``` | ||
|
||
Congratulations, you should have Sense up and running now. | ||
You can check that by pointing your browser at http://localhost:5601/app/sense/ | ||
|
||
### Linting your code | ||
|
||
Sense uses the fantastic [eslint](http://eslint.org) tool to detect common programming errors and to enforce a uniform code style. To check your code with the linter simply run the lint script in your terminal: | ||
|
||
```sh | ||
npm run lint | ||
``` | ||
|
||
Eslint also has plugins for most text editors and IDEs so that you can get linting results as you work. Here are some hints for getting eslint setup in your favorite editor: | ||
|
||
| Editor | Plugin | | ||
| --- | --- | --- | | ||
| Sublime | [SublimeLinter-eslint](https://github.com/roadhump/SublimeLinter-eslint#installation) | | ||
| Atom | [linter-eslint](https://github.com/AtomLinter/linter-eslint#installation) | | ||
| IntelliJ | Settings » Languages & Frameworks » JavaScript » Code Quality Tools » ESLint | | ||
| vi | [scrooloose/syntastic](https://github.com/scrooloose/syntastic) | | ||
|
||
### Submitting your changes | ||
|
||
Once your changes and tests are ready to submit for review: | ||
|
@@ -99,4 +116,3 @@ Once your changes and tests are ready to submit for review: | |
|
||
Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, | ||
we would love to work with you to get your pull request merged into Sense. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
module.exports = function (grunt) { | ||
require('jit-grunt')(grunt, { | ||
s3: 'grunt-aws', | ||
eslint: 'gruntify-eslint' | ||
}); | ||
|
||
const srcFiles = [ | ||
{ | ||
expand: true, | ||
src: [ | ||
'public/**', | ||
'!public/tests/**', | ||
'api_server/**', | ||
'index.js', | ||
'LICENSE.md', | ||
'package.json', | ||
'README.md', | ||
], | ||
dest: 'build/sense-<%= pkg.version %>' | ||
} | ||
]; | ||
|
||
grunt.initConfig({ | ||
pkg: require('./package.json'), | ||
|
||
clean: { | ||
build: { src: 'build' }, | ||
target: { src: 'target' }, | ||
}, | ||
|
||
compress: { | ||
build: { | ||
options: { | ||
mode: 'tgz', | ||
archive: 'target/sense-<%= pkg.version %>.tar.gz' | ||
}, | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: 'build/', | ||
src: ['**'], | ||
dest: '' | ||
}, | ||
] | ||
} | ||
}, | ||
|
||
copy: { | ||
build: { | ||
files: srcFiles | ||
} | ||
}, | ||
|
||
s3: { | ||
release: { | ||
options: { | ||
bucket: 'download.elasticsearch.org', | ||
access: 'private', | ||
gzip: false | ||
}, | ||
files: [ | ||
{ | ||
src: 'target/sense-<%= pkg.version %>.tar.gz', | ||
dest: 'elasticsearch/sense/sense-<%= pkg.version %>.tar.gz' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
eslint: { | ||
source: { | ||
src: [ | ||
'public/**/*.js', | ||
'!**/webpackShims/**' | ||
] | ||
} | ||
}, | ||
|
||
gitinfo: {}, | ||
|
||
replace: { | ||
build: { | ||
options: { | ||
patterns: [ | ||
{ | ||
match: 'SENSE_REVISION', | ||
replacement: '<%= gitinfo.local.branch.current.SHA %>' | ||
} | ||
] | ||
}, | ||
files: srcFiles | ||
} | ||
} | ||
}); | ||
|
||
require('./tasks/build')(grunt); | ||
require('./tasks/release')(grunt); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,31 @@ | |
"Spencer Alger <[email protected]>" | ||
], | ||
"name": "Sense", | ||
"version": "2.0.0-SNAPSHOT", | ||
"version": "2.0.0-snapshot", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/elastic/sense.git" | ||
}, | ||
"license": "SEE LICENSE IN LICENSE.MD", | ||
"dependencies": {} | ||
"scripts": { | ||
"build": "grunt build", | ||
"release": "grunt release", | ||
"lint": "grunt eslint:source" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^1.7.3", | ||
"eslint-config-airbnb": "^0.1.0", | ||
"eslint-plugin-react": "^3.6.3", | ||
"grunt": "^0.4.5", | ||
"grunt-aws": "^0.6.1", | ||
"grunt-cli": "^0.1.13", | ||
"grunt-contrib-clean": "^0.6.0", | ||
"grunt-contrib-compress": "^0.14.0", | ||
"grunt-contrib-copy": "^0.8.2", | ||
"grunt-gitinfo": "^0.1.7", | ||
"grunt-replace": "^0.11.0", | ||
"gruntify-eslint": "^1.2.0", | ||
"jit-grunt": "^0.9.1" | ||
}, | ||
"dependencies": {}, | ||
"license": "Apache-2.0" | ||
} |
Oops, something went wrong.