diff --git a/NOTICE.txt b/NOTICE.txt index facd56a646f60..87c9dfb44799a 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -185,25 +185,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -This product uses "radioactive button" styles that were published on -https://zurb.com/playground/radioactive-buttons under an "MIT" License. - -Copyright (c) ZURB -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/x-pack/plugins/graph/index.js b/x-pack/plugins/graph/index.js index dfb4410e4ec7c..ee7dba276fffd 100644 --- a/x-pack/plugins/graph/index.js +++ b/x-pack/plugins/graph/index.js @@ -23,6 +23,7 @@ export function graph(kibana) { icon: 'plugins/graph/icon.png', description: 'Graph exploration', main: 'plugins/graph/app', + styleSheetPath: `${__dirname}/public/index.scss`, }, hacks: ['plugins/graph/hacks/toggle_app_link_in_nav'], home: ['plugins/graph/register_feature'], diff --git a/x-pack/plugins/graph/public/_main.scss b/x-pack/plugins/graph/public/_main.scss new file mode 100644 index 0000000000000..7e70ccd6f35d8 --- /dev/null +++ b/x-pack/plugins/graph/public/_main.scss @@ -0,0 +1,104 @@ +/** + * Nodes + */ + +.gphNode-disabled{ + opacity:0.3; +} + +.gphNode__circle { + fill: $euiColorMediumShade; + + // SASSTODO: Can't definitively change modifier class + // because it's not easy to tell what's a class and what's + // part of the data object since they are named the same + &.selectedNode { + stroke-width: $euiSizeXS; + stroke: transparentize($euiColorPrimary, .25); + } +} + +.gphNode__text { + fill: $euiColorDarkestShade; + + &--lowOpacity{ + fill-opacity: 0.5; + } +} + + +/** + * Forms + */ + +.gphFormGroup--small { + margin-bottom: $euiSizeS; +} + +.gphColorPicker__color, +.gphIconPicker__icon { + margin: $euiSizeXS; + cursor: pointer; + + &.selectedNode, + &:hover, + &:focus { + transform: scale(1.4); + } +} + +.gphIconPicker__icon { + opacity: .7; + + &.selectedNode, + &:hover, + &:focus { + opacity: 1; + } +} + +.gphIndexSelect{ + max-width: $euiSizeL * 10; + margin-right: $euiSizeXS; + + &-unselected { + @include euiFocusRing; + } +} + +.gphAddButton { + background: $euiColorPrimary; + color: $euiColorEmptyShade; + border-radius: 50%; + font-size: $euiFontSizeXS; + margin: 2px $euiSizeS 0 $euiSizeXS; + @include size(26px); // same as svg + + &:hover:not(:disabled) { + background: shadeOrTint($euiColorPrimary, 10%, 10%); + cursor: pointer; + } + + &:disabled { + background: $euiColorMediumShade; + cursor: not-allowed; + } + + &-focus { + @include euiFocusRing; + } +} + +.gphFieldList { + min-width: $euiSizeXL * 10; +} + +/** + * Utilities + */ + +.gphNoUserSelect{ + user-select: none; + -webkit-touch-callout: none; + -webkit-tap-highlight-color: transparent; +} diff --git a/x-pack/plugins/graph/public/app.js b/x-pack/plugins/graph/public/app.js index 577a537af3fef..4190401822493 100644 --- a/x-pack/plugins/graph/public/app.js +++ b/x-pack/plugins/graph/public/app.js @@ -25,7 +25,6 @@ import { KibanaParsedUrl } from 'ui/url/kibana_parsed_url'; import { XPackInfoProvider } from 'plugins/xpack_main/services/xpack_info'; -import './less/main.less'; import appTemplate from './templates/index.html'; import './angular-venn-simple.js'; diff --git a/x-pack/plugins/graph/public/index.scss b/x-pack/plugins/graph/public/index.scss new file mode 100644 index 0000000000000..808ef23afdd7f --- /dev/null +++ b/x-pack/plugins/graph/public/index.scss @@ -0,0 +1,14 @@ +// Import the EUI global scope so we can use EUI constants +@import 'ui/public/styles/_styling_constants'; + +/* Graph plugin styles */ + +// Prefix all styles with "gph" to avoid conflicts. +// Examples +// gphChart +// gphChart__legend +// gphChart__legend--small +// gphChart__legend-isLoading + +@import './main'; +@import './templates/index'; diff --git a/x-pack/plugins/graph/public/less/main.less b/x-pack/plugins/graph/public/less/main.less deleted file mode 100644 index c3d1ca434c1f8..0000000000000 --- a/x-pack/plugins/graph/public/less/main.less +++ /dev/null @@ -1,347 +0,0 @@ -@import (reference) "~ui/styles/variables"; -@import '~plugins/xpack_main/style/main.less'; - -.container { - margin-top: 30px; -} - -.selectedFieldLine{ - background: #D0D3D8; -} - -.nodeCircle { - fill: #aaaaaa; - opacity: 0.95; -} - -.nodeCircle.selectedNode { - stroke-width: 4; - stroke: yellowgreen; -} -.disabledField{ - opacity:0.3; -} - -/* @notice - * This product uses "radioactive button" styles that were published on - * https://zurb.com/playground/radioactive-buttons under an "MIT" License. - * - * Copyright (c) ZURB - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in the - * Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the - * following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -@-webkit-keyframes greenPulse { - from { border-color: #749a02; -webkit-box-shadow: 0 0 9px #333; } - 50% { border-color: #91bd09; -webkit-box-shadow: 0 0 18px #91bd09; } - to { border-color: #749a02; -webkit-box-shadow: 0 0 9px #333; } -} - -.pulseControl { - border: solid 1px @globalColorTeal; -} - - -.edge { - fill: #aaaaaa; - stroke-width: 2; - stroke: #aaaaaa; - stroke-opacity: 0.5; -} -.edge.selectedEdge { - stroke: yellowgreen; - stroke-opacity: 0.95; -} -.edge.inferredEdge { - stroke-dasharray: 5,5; -} - -.edge:hover { - stroke-opacity: 0.95; -} - -.nodeSvgText { - font-size: 7px; - font-family: "Arial"; - fill: #555555; -} -.nodeHtmlLabel { - font-size: 7px; - font-family: "Arial"; - color: #555555; - cursor:pointer; - text-overflow: ellipsis; - overflow: hidden; - text-align: center; - max-width: 100px; - max-height: 20px; -} - -.dialogFooterText { - position: absolute; - bottom: 0; -} - - -.nodeMarkerText { - font-size: 3px; - font-family: "Arial"; - fill: #555555; -} -.nodeMarkerCircle{ - fill: #E1E897; - stroke: white; -} - -.help-block { - font-size: smaller; -} - -.indexDropDown{ - max-width: 200px; - margin-right: 5px; -} - -#qDisplayField{ - max-width: 280px; -} - -#addVertexFieldButton { - border-radius: 50%; - font-size: smaller; - margin-right: 5px; - height: 28px; - width: 28px; -} - -.selButton{ - margin-right: 5px; - margin-bottom: 2px; - margin-top: 2px; - // width:66px; -} - -.selectionActionButton i{ - margin-right: 5px; - margin-bottom: 2px; - margin-top: 2px; -} - -.selectionActionButton i{ - font-size:18px; -} - -.vertexSelectionActionBar { - padding-top: 2px; -} - -#sidebar{ - position: absolute; - right: 5px; - top: 5px; - width: 300px; - z-index: 5; - background-color: #FFFFFF; - opacity: 0.96; -} -.sidebarPanel{ - border: 1px solid #cccccc; - padding-left: 5px; - padding-right: 5px; - padding-bottom: 5px; - padding-top: 0px; - border-radius: 5px; - margin-bottom: 2px; -} - -#qDiversityField{ - max-width: 220px; -} -.small-graph-form { - margin-bottom: 5px; -} - -#fieldList { - height: 100%; - min-width: 300px; -} - -.legend-value-color-picker .dot { - line-height: 14px; - margin: 2px; - font-size: 14px; -} -.legend-value-color-picker .dot:hover { - margin: 0px; - font-size: 18px; -} - -.legend-value-icon-picker .icon { - line-height: 14px; - margin: 2px; - font-size: 14px; - color: grey; -} -.legend-value-icon-picker .icon:hover { - margin: 0px; - font-size: 18px; - color: black; -} -.legend-value-icon-picker .selectedNode{ - margin: 0px; - font-size: 18px; - color: black; -} - -.venn1 { - fill: #FF0000; - fill-opacity:0.5; -} -.venn2 { - fill: #0000FF; - fill-opacity:0.5; -} - -.vennTerm1{ - color:#FF0000; -} -.vennTerm2{ - color:#0000FF; -} -.vennTerm12{ - color:#BC4A84; -} - -.detailPanel{ - max-height: 300px; - overflow: scroll; -} -.detailHeader{ - margin-top: 5px; - color: white; - background-color: #656A76; - padding: 5px; - border-radius: 3px; - margin-bottom: 3px; -} - -.selectionList{ - height: 200px; - max-height: 200px; - background-color: #ECF0F1; - overflow: scroll; - margin-bottom: 0px; -} - -.no-margin-bottom{ - margin-bottom:0px; - padding-bottom: 0px; -} - -.noUserSelect{ - user-select: none; - -webkit-touch-callout: none; - -webkit-tap-highlight-color: transparent; -} - -#GraphSvgContainer { - position: fixed; - height: 100%; - width: ~"calc(100% - 53px)"; -} - -.global-nav.is-global-nav-open + .app-wrapper #GraphSvgContainer { - width: ~"calc(100% - 160px)"; -} - -.requestJsonView{ - height:200px; -} - - -.SvgIconFont{ - font-family: FontAwesome; - font-size: 1em; - fill: white; -} - -.lowOpacitySvgText{ - fill-opacity: 0.5; -} - -.SvgZoomedIconButton{ - fill: #95a5a6; - stroke:#FFFFFF -} -.SvgZoomedIconButton:hover{ - fill: #636E6F; -} - - -.SvgZoomedIconButtonText{ - font-family: FontAwesome; - font-size: 0.15em; - fill: white; -} -.SvgZoomedButtonText{ - font-size: 0.1em; - fill: white; -} - -navbar .input-group{ - top: 2px; - padding-bottom: 2px; -} - -#fieldFinderIcon{ - background-color: #ffffff; - border: none; -} -#fieldFinderInput{ - border: none; -} -#fieldIconPlaceholder{ - min-height: 35px; -} -.scrollable-list{ - max-height: 180px; - overflow: scroll; -} - -.scrollable-list ul.li-striped { - li { - border: none; - } - - li:nth-child(even) { - background-color: @kibanaGray6; - } - - li:nth-child(odd) { - background-color: @white; - } - -} - -.graphPlusButton { - background: @globalColorBlue; - border: none; - color: white; - &:hover { - background: darken(@globalColorBlue, 10%); - cursor: pointer; - } -} diff --git a/x-pack/plugins/graph/public/templates/_graph.scss b/x-pack/plugins/graph/public/templates/_graph.scss new file mode 100644 index 0000000000000..71520354b8034 --- /dev/null +++ b/x-pack/plugins/graph/public/templates/_graph.scss @@ -0,0 +1,70 @@ +@mixin gphSvgText() { + font-family: $euiFontFamily; + font-size: $euiSizeS; + line-height: $euiSizeM; + fill: $euiColorDarkShade; + color: $euiColorDarkShade; +} + +/** + * THE SVG Graph + * 1. Calculated px values come from the open/closed state of the global nav sidebar + */ + +.gphGraph__container { + position: fixed; + height: 100%; + width: calc(100% - 53px); /* 1 */ +} + +.global-nav.is-global-nav-open + .app-wrapper .gphGraph__container { + width: calc(100% - 180px); /* 1 */ +} + +.gphGraph { + // SASSTODO: Can't definitively change child class + // because it's not easy to tell what's a class and what's + // part of the data object since they are named the same + .edge { + fill: $euiColorMediumShade; + stroke: $euiColorMediumShade; + stroke-width: 2; + stroke-opacity: 0.5; + + &:hover { + stroke-opacity: 0.95; + cursor: pointer; + } + } + + .edge.selectedEdge { + stroke: $euiColorDarkShade; + stroke-opacity: 0.95; + } + + .edge.inferredEdge { + stroke-dasharray: 5,5; + } +} + +.gphNode__label { + @include gphSvgText; + cursor:pointer; +} + +.gphNode__label--html { + @include euiTextTruncate; + text-align: center; +} + +.gphNode__markerCircle { + fill: $euiColorDarkShade; + stroke: $euiColorEmptyShade; +} + +.gphNode__markerText { + @include gphSvgText; + font-size: $euiSizeS - 2px; + fill: $euiColorEmptyShade; +} + diff --git a/x-pack/plugins/graph/public/templates/_index.scss b/x-pack/plugins/graph/public/templates/_index.scss new file mode 100644 index 0000000000000..64a6e11560ee5 --- /dev/null +++ b/x-pack/plugins/graph/public/templates/_index.scss @@ -0,0 +1,3 @@ +@import './graph'; +@import './sidebar'; +@import './settings'; diff --git a/x-pack/plugins/graph/public/templates/_settings.scss b/x-pack/plugins/graph/public/templates/_settings.scss new file mode 100644 index 0000000000000..0c47703e87c24 --- /dev/null +++ b/x-pack/plugins/graph/public/templates/_settings.scss @@ -0,0 +1,25 @@ +.gphSettings__jsonView { + height: $euiSizeL * 10; +} + +/** + * Lists + */ + +.gphDrilldownList { + max-height: $euiSize * 10; + overflow-y: auto; + border-top: $euiBorderThin; +} + +.gphDrilldownList__item { + border: none; + + &:nth-child(even) { + background-color: $euiColorLightestShade; + } + + &:nth-child(odd) { + background-color: $euiColorEmptyShade; + } +} diff --git a/x-pack/plugins/graph/public/templates/_sidebar.scss b/x-pack/plugins/graph/public/templates/_sidebar.scss new file mode 100644 index 0000000000000..e5014134102c3 --- /dev/null +++ b/x-pack/plugins/graph/public/templates/_sidebar.scss @@ -0,0 +1,89 @@ +.gphSidebar { + position: absolute; + right: $euiSizeS; + top: $euiSizeS; + width: $euiSizeXL * 10; + z-index: $euiZLevel1; + background-color: $euiColorEmptyShade; + border: $euiBorderThin; + padding: $euiSizeXS; + border-radius: $euiBorderRadius; + opacity: .9; + @include euiBottomShadowMedium; + + .help-block { + font-size: $euiFontSizeXS; + } +} + +.gphSidebar__header{ + margin-top: $euiSizeS; + color: $euiColorEmptyShade; + background-color: $euiColorDarkShade; + padding: $euiSizeXS; + border-radius: $euiBorderRadius; + margin-bottom: $euiSizeXS; +} + +.gphSidebar__panel{ + max-height: $euiSizeL * 10; + overflow-y: auto; +} + +/** + * Vertex Select + */ + +.gphVertexSelect__button { + margin: $euiSizeXS $euiSizeXS $euiSizeXS 0; +} + +/** + * Selection List + */ + +.gphSelectionList { + height: $euiSizeL * 10; + background-color: $euiColorLightestShade; + overflow: auto; + margin-bottom: 0; +} + +.gphSelectionList__field { + line-height: $euiLineHeight; + margin: $euiSizeXS 0; + cursor: pointer; + + > * { + vertical-align: middle; + } +} + +.gphSelectionList__field--selected { + background: $euiColorLightShade; +} + +/** + * Link summary / Venn Diagram + */ + +.gphLinkSummary__venn { + .venn1 { + fill: $euiColorDanger; + fill-opacity:0.5; + } + .venn2 { + fill: $euiColorPrimary; + fill-opacity:0.5; + } +} + +.gphLinkSummary__term--1 { + color:$euiColorDanger; +} +.gphLinkSummary__term--2 { + color:$euiColorPrimary; +} +.gphLinkSummary__term--1-2 { + color: mix($euiColorDanger, $euiColorPrimary); +} diff --git a/x-pack/plugins/graph/public/templates/index.html b/x-pack/plugins/graph/public/templates/index.html index 0f40eb9689cdf..7548c60c9d0eb 100644 --- a/x-pack/plugins/graph/public/templates/index.html +++ b/x-pack/plugins/graph/public/templates/index.html @@ -10,81 +10,36 @@
- - - - - + + + + {{f.icon.code}} - - -
+
- -
@@ -95,134 +50,108 @@
-
- - -
- - - - -
- - - - -
- - -
+ +
-
-
+
-
+
-
-
+
+ -
-
- {{selectedFieldConfig.name}} -
-
+
+
+ {{selectedFieldConfig.name}} +
+
-
- -
- - - - - - -
-
+
+ +
+ + + + +
+
-
- -
- - - {{i.code}} - -
-
+
+ +
+ + + {{i.code}} + +
+
-
- -
- -
-
-

Controls the number of terms returned each search step.

-
- -
- Shift-clicking the field icons in the menu bar provides a quick way to toggle this number to zero and back -
- -
-
+
+ +
+ +
+
+

Controls the number of terms returned each search step.

-
-
-
- -
-
+
+ Shift-clicking the field icons in the menu bar + provides a quick way to toggle this number to zero and back
- +
+
+
+
+
+
+ +
+
+ + + +
-
+
@@ -230,37 +159,41 @@
-
- +
+ - + - - {{n.icon.code}} + + {{n.icon.code}} - + {{n.label}} - - -

{{n.label}}

- + + + +

{{n.label}}

+
- - {{n.numChildren}} + + {{n.numChildren}} @@ -286,355 +219,250 @@ --> -