Skip to content

Commit

Permalink
Initial commit. Parallel Coordinates just made its way in.
Browse files Browse the repository at this point in the history
  • Loading branch information
archv committed Feb 20, 2020
0 parents commit 56a958b
Show file tree
Hide file tree
Showing 15 changed files with 1,717 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
root: true,
extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'],
settings: {
'import/resolver': {
'@kbn/eslint-import-resolver-kibana': {
rootPackageName: 'test_3',
},
},
},
overrides: [
{
files: ['**/public/**/*'],
settings: {
'import/resolver': {
'@kbn/eslint-import-resolver-kibana': {
forceNode: false,
rootPackageName: 'test_3',
},
},
},
},
]
};
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
npm-debug.log*
node_modules
/build/
/public/app.css
9 changes: 9 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"paths": {
"test3": "./"
},
"translations": [
"translations/zh-CN.json"
]
}

37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# test-3

> ASDasdkjflsd
---

## development

See the [kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) for instructions setting up your development environment. Once you have completed that, use the following yarn scripts.

- `yarn kbn bootstrap`

Install dependencies and crosslink Kibana and all projects/plugins.

> ***IMPORTANT:*** Use this script instead of `yarn` to install dependencies when switching branches, and re-run it whenever your dependencies change.
- `yarn start`

Start kibana and have it include this plugin. You can pass any arguments that you would normally send to `bin/kibana`

```
yarn start --elasticsearch.hosts http://localhost:9220
```
- `yarn build`
Build a distributable archive of your plugin.
- `yarn test:browser`
Run the browser tests in a real web browser.
- `yarn test:mocha`
Run the server tests using mocha.
For more information about any of these commands run `yarn ${task} --help`. For a full list of tasks checkout the `package.json` file, or run `yarn run`.
22 changes: 22 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { existsSync } from 'fs';

export default function(kibana) {
return new kibana.Plugin({
require: ['elasticsearch'],
name: 'test_3',
uiExports: {
/*app: {
title: 'Test 3',
description: 'ASDasdkjflsd',
main: 'plugins/test_3/app',
},
hacks: ['plugins/test_3/hack'],*/
styleSheetPaths: [
resolve(__dirname, 'public/parallel_coordinates/css/*'),
//resolve(__dirname, 'public/app.css'),
].find(p => existsSync(p)),
visTypes: ['plugins/test_3/testviz/testviz'],
}
});
}
54 changes: 54 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "test_3",
"version": "0.0.3",
"description": "ASDasdkjflsd",
"main": "index.js",
"kibana": {
"version": "7.6.1",
"templateVersion": "1.0.0"
},
"scripts": {
"preinstall": "node ../../preinstall_check",
"kbn": "node ../../scripts/kbn",
"es": "node ../../scripts/es",
"lint": "eslint .",
"start": "plugin-helpers start",
"test:server": "plugin-helpers test:server",
"test:browser": "plugin-helpers test:browser",
"build": "plugin-helpers build"
},
"devDependencies": {
"@elastic/eslint-config-kibana": "link:../../packages/eslint-config-kibana",
"@elastic/eslint-import-resolver-kibana": "link:../../packages/kbn-eslint-import-resolver-kibana",
"@kbn/expect": "link:../../packages/kbn-expect",
"@kbn/i18n": "link:../../packages/kbn-i18n",
"@kbn/plugin-helpers": "link:../../packages/kbn-plugin-helpers",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jest": "^22.4.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-mocha": "^5.3.0",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-react": "^7.12.4"
},
"dependencies": {
"d3": "3",
"datatables.mark.js": "^2.0.1",
"datatables.net-buttons-jqui": "^1.6.1",
"datatables.net-colreorder-jqui": "^1.5.2",
"datatables.net-fixedcolumns-jqui": "^3.3.0",
"datatables.net-fixedheader-jqui": "^3.1.6",
"datatables.net-jqui": "^1.10.20",
"datatables.net-responsive-jqui": "^2.2.3",
"jquery": "^3.4.1",
"jquery-ui": "^1.12.1",
"js-cookie": "^2.2.1",
"mark.js": "^8.11.1",
"react-html-id": "^0.1.5",
"select2": "^4.0.13",
"simple-statistics": "^7.0.8"
}
}
7 changes: 7 additions & 0 deletions public/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import expect from '@kbn/expect';

describe('suite', () => {
it('is a test', () => {
expect(true).to.equal(true);
});
});
134 changes: 134 additions & 0 deletions public/testviz/parallel_coordinates/css/ParallelCoordinates.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
@font-face {
font-family: "Oswald script=all rev=1";
src: url("https://fonts.gstatic.com/s/oswald/v29/TK3_WkUHHAIjg75cFRf3bXL8LICs1xZosUZiZQ.woff2") format("woff2");
font-style: normal;
font-weight: 700;
unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Select part */
.select2-container, .select2-choice, .select2-results__option {
font-size: 12px !important;
}

/* The SVG part */
svg {
font: 10px sans-serif;
}

.background path {
fill: none;
stroke: #ddd5;
shape-rendering: crispEdges;
}

.foreground path {
fill: none;
}

.brush .extent {
fill-opacity: .3;
stroke: #fff;
shape-rendering: crispEdges;
}

.axis line,
.axis path {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}

.axis text {
text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;
cursor: move;
}

.bold {
stroke-width: 3;
stroke-opacity: 1.0;
filter: brightness(250%);
}

/* The tables part */
mark {
background: orange;
color: black;
}

.table-selected-line {
background: #555 !important;
color: #fff;
}

.paginate_button{
font-size: 12px !important;
}

/* Clusters part */
.ci-button-group::before ::after{
display: table;
content: ' ';
order: 1;
clear: both;
}

.ci-button-group{
display: flex;
flex-wrap: wrap;
max-height: 550px;
}

.ci-button {
padding: 1em 1em;
outline: 1px dashed lightgray;
text-shadow: #000000 1px 1px 0, 0px 0px 1px rgba(215, 142, 131, 0);
text-align: center;
font-size: 0.75rem;
font-weight: 600;
line-height: 1.6;
color: #fefefe;
width: 45px;
height: 45px;

margin-left: 1px;
margin-top: 1px;
}

.ci-button:hover{
outline-width: 2px;
outline-color: gray;
z-index: 1;
}

.ci-button-group :last-child{
margin-bottom: 3px;
}

.ci-selected{
outline: 2px dashed black;
z-index: 1;
}

.ci-tooltip{
border-width: 1px;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
white-space: pre-line;
}

.ci-table{
width: 100%;
white-space: nowrap;
padding: 10px;
}

.ci-table h3,h5{
font-family: 'Oswald script=all rev=1' !important;
text-shadow: #ddd 1px 1px 0;
}

.ci-table h3{
font-size: 2.3rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
div.alphabet {
position: relative;
display: table;
width: 100%;
margin-bottom: 1em;
white-space: nowrap;
}

div.alphabet span {
display: table-cell;
color: #3174c7;
cursor: pointer;
text-align: center;
width: 3.5%
}

div.alphabet span:hover {
text-decoration: underline;
}

div.alphabet span.active {
color: black;
}

div.alphabet span.empty {
color: red;
}

div.alphabetInfo {
display: block;
position: absolute;
background-color: #111;
border-radius: 3px;
color: white;
top: 2em;
height: 1.8em;
padding-top: 0.4em;
text-align: center;
z-index: 1;
}
Loading

0 comments on commit 56a958b

Please sign in to comment.