Repository: qpid-dispatch Updated Branches: refs/heads/1.1.x 4fb04f463 -> 6502523b0
DISPATCH-989 Replace broken symlink with original files. Add npm dependency on rhea. Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/f0cc5659 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/f0cc5659 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/f0cc5659 Branch: refs/heads/1.1.x Commit: f0cc5659f968ea842f407cc99cb3cb8ea1582e32 Parents: 4fb04f4 Author: Ernest Allen <eal...@redhat.com> Authored: Tue May 8 13:24:49 2018 -0400 Committer: Ganesh Murthy <gmur...@redhat.com> Committed: Wed May 9 10:06:11 2018 -0400 ---------------------------------------------------------------------- console/test/css/brokers.ttf | Bin 40 -> 2272 bytes console/test/css/dispatch.css | 707 +++++++++++++++++++++- console/test/css/plugin.css | 1020 +++++++++++++++++++++++++++++++- console/test/css/site-base.css | 1 - console/test/html/qdrConnect.html | 106 +++- console/test/html/qdrLayout.html | 1 - console/test/js/qdrService.js | 270 ++++++++- console/test/lib/rhea-min.js | 1 - console/test/package.json | 14 + 9 files changed, 2113 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/css/brokers.ttf ---------------------------------------------------------------------- diff --git a/console/test/css/brokers.ttf b/console/test/css/brokers.ttf deleted file mode 120000 index b5894a5..0000000 --- a/console/test/css/brokers.ttf +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/css/brokers.ttf \ No newline at end of file diff --git a/console/test/css/brokers.ttf b/console/test/css/brokers.ttf new file mode 100644 index 0000000..ae83968 Binary files /dev/null and b/console/test/css/brokers.ttf differ http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/css/dispatch.css ---------------------------------------------------------------------- diff --git a/console/test/css/dispatch.css b/console/test/css/dispatch.css deleted file mode 120000 index 26812a5..0000000 --- a/console/test/css/dispatch.css +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/css/dispatch.css \ No newline at end of file diff --git a/console/test/css/dispatch.css b/console/test/css/dispatch.css new file mode 100644 index 0000000..0096f95 --- /dev/null +++ b/console/test/css/dispatch.css @@ -0,0 +1,706 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +svg { + background-color: transparent; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} + +svg:not(.active):not(.ctrl) { + cursor: crosshair; +} +#end-arrow-selected, #start-arrow-selected { + stroke: #33F; + fill: #33F; +} +path.link.selected { + /* stroke-dasharray: 10,2; */ + stroke: #33F !important; +} + +path.link { + fill: #000; + stroke: #000; + stroke-width: 4px; + cursor: default; +} + +svg:not(.active):not(.ctrl) path.link { + cursor: pointer; +} + +path.link.small { + stroke-width: 2.5; + stroke: darkgray; +} +path.link.highlighted { + stroke: #6F6 !important; +} +marker#start-arrow-highlighted, +marker#end-arrow-highlighted { + fill: #6F6; +} +marker#start-arrow-small, +marker#end-arrow-small { + fill: darkgray; +} + +path.link.dragline { + pointer-events: none; +} + +path.link.hidden { + stroke-width: 0; +} + +circle.node { + stroke-width: 1.5px; + cursor: pointer; + stroke: darkgray; +} + +circle.node.reflexive { + stroke: #F00 !important; + stroke-width: 2.5px; +} +circle.node.selected { + stroke: #6F6 !important; + stroke-width: 2px; + fill: #e0e0ff !important; +} +circle.node.highlighted { + stroke: #6F6; +} +circle.node.inter-router { + fill: #EAEAEA; +} +circle.node.normal.in { + fill: #F0F000; +} +circle.node.normal.out { + fill: #C0F0C0; +} +circle.node.on-demand { + fill: #C0FFC0; +} +circle.node.on-demand.artemis { + fill: #FCC; + /*opacity: 0.2; */ +} + +circle.node.fixed { + stroke-dasharray: 10,2; +} +text { + font: 12px sans-serif; + pointer-events: none; + /*font-family: monospace;*/ + +} + +.tooltipsy +{ + padding: 10px; +/* max-width: 320px;*/ + color: #303030; + background-color: #fcfcfe; + border: 1px solid #deca7e; + border-radius: 5px; +} + +.tiptable { + +} +.tiptable tr { + border-bottom: 1px solid #ccc; +} + +.tiptable tr:last-child { + border-bottom: 0px; +} + +.tiptable tr:nth-child(even) { + background: #fcfcfe; +} +.tiptable tr:nth-child(odd) { + background: #FFF +} + +text.id { + text-anchor: middle; + font-weight: bold; +} + +text.label { + text-anchor: start; + font-weight: bold; +} + +.row-fluid.tertiary { + position: relative; + left: 20px; +} + +.row-fluid.tertiary.left { + float: left; +} + +.row-fluid.tertiary.panel { + width: 410px; + /*height: 100%; */ +} + +div#topologyForm .ngViewport, div#topologyForm .gridStyle { + height: auto !important; + min-height: initial !important; + overflow: initial; +} + +div#multiple_details, div#link_details { + height: 300px; + width: 700px; + display: none; + padding: 0.5em; + border: 1px solid; + position: absolute; + background-color: white; + max-height: 330px !important; + overflow: hidden; +} +div#multiple_details div.ngRow.selected { + background-color: #c9dde1 !important; +} + +div.grid-values { + text-align: right; +} + +div.grid-values.ngCellText span { + padding-right: 4px; +} + +.panel-adjacent { + margin-left: 430px; +} + +/* globe */ +.land { + fill: #999; + stroke-opacity: 1; +} + +.graticule { + fill: none; + stroke: black; + stroke-width:.5; + opacity:.1; +} + +.labels { + font: 18px sans-serif; + fill: black; + opacity: .85; + text-anchor: middle; +} + +.noclicks { pointer-events:none; } + +.point { opacity:.6; } + +.arcs { + opacity:.7; + stroke: darkgreen; + stroke-width: 3; +} +.flyers { + stroke-width:1; + opacity: 0; + stroke: darkred; +} +.arc, .flyer { + stroke-linejoin: round; + fill:none; +} +.arc { } +.arc:hover { + stroke: darkred; +} +.flyer { } +.flyer:hover { + stroke: darkgreen; +} +.arc.inter-router { + stroke: darkblue; +} + +#addNodeForm { + padding: 1em; +} + + +li.currentStep { + font-weight: bold; +} + +.qdrTopology div.panel { + position: absolute; +} +/* +.ui-dialog-titlebar { + border: 0; + background: transparent; +} +*/ + +/* +.ui-tabs.ui-tabs-vertical { + padding: 0; + width: 48em; +} +.ui-tabs.ui-tabs-vertical .ui-widget-header { + border: none; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-nav { + float: left; + width: 10em; + background: #CCC; + border-radius: 4px 0 0 4px; + border-right: 1px solid gray; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-nav li { + clear: left; + width: 100%; + margin: 0.1em 0; + border: 1px solid gray; + border-width: 1px 0 1px 1px; + border-radius: 4px 0 0 4px; + overflow: hidden; + position: relative; + right: -2px; + z-index: 2; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-nav li a { + display: block; + width: 100%; + padding: 0.1em 1em; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-nav li a:hover { + cursor: pointer; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { + margin-bottom: 0.2em; + padding-bottom: 0; + border-right: 1px solid white; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-nav li:last-child { + margin-bottom: 10px; +} +.ui-tabs.ui-tabs-vertical .ui-tabs-panel { + float: left; + width: 34em; + border-left: 1px solid gray; + border-radius: 0; + position: relative; + left: -1px; +} + +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { + right: -3px !important; +} + +.ui-tabs li i.ui-icon { + display: inline-block; +} +*/ +.ui-tabs .ui-tabs-panel { + /* padding-top: 0 !important; */ +} + +.ui-widget-content fieldset { + float: left; + padding: 0 1em 0 0; +} + +.entity-description { + color: #960; + font-size: 90%; +} + +.attr-description { + padding-top: 1.5em; + float: right; + width: 17em; +} +.attr-annotations { + padding-top: 2.5em; + clear: both; +} +.attr-annotations > span { + padding-top: 0.5em; + border-top: 1px dashed darkgray; + display: block; +} + +.attr-type { + color: #990; + font-size: 85%; +} +.attr-required { + color: red; + font-size: 85%; +} +.attr-unique { + color: green; + font-size: 85%; +} + +#tabs.nodeEntities { + border: 0; +} + +#tabs ul.nodeTabs { + background: #fff; +} + +#tabs #Container { + border-left: 1px solid #aaa; +} + +#tabs.ui-tabs .ui-tabs-nav li { + border-bottom: 1px solid #aaa !important; +} + +.entity-fields { + /* height: 400px; */ + overflow-y: scroll; + overflow-x: hidden; +} + +div.boolean label:first-child { + float: left; + margin-right: 1em; +} +div.boolean { + padding-bottom: 1em; +} + +.entity-fields label { + font-weight: 600; + margin-top: 0.5em; + display: inline; +} + +.aggregate { + text-align: right; +} + +.aggregate i { + float: right; + /* margin: 3px 3px 3px 8px; */ +} + +.aggregate .hastip { + padding: 5px; +} + +.subTip .tipsy-inner { + background-color: white; + color: black; + font-size: 1.3em; + border: 1px solid black; +} + +.subTip .tipsy-arrow-n { border-bottom-color: black; } +.subTip .tipsy-arrow-s { border-top-color: black; } +.subTip .tipsy-arrow-e { border-left-color: black; } +.subTip .tipsy-arrow-w { border-right-color: black; } + + +.contextMenu { + display:none; + position:absolute; + left:30px; + top:-30px; + z-index:999; + /* width:300px; */ +} +.contextMenu ul { + width:300px; + margin:0; + padding-left:0; + list-style:none; + background:#fff; + color:#333; + font-weight: 600; + /* -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; */ + -moz-box-shadow:5px 5px 5px #ddd; -webkit-box-shadow:5px 5px 5px #999; box-shadow:5px 5px 5px #ddd; + border: 1px solid #aaa; +} +.contextMenu ul li { + padding:5px 10px; + /* border-bottom: solid 1px #ccc; */ +} +.contextMenu ul li:hover { + background:#4a90d9; color:#fff; +} +.contextMenu ul li:last-child { + border:none; +} + +.na { + display: none; +} +.contextMenu ul li.new { + display: block; +} +.contextMenu ul li.adding, .contextMenu ul li.adding + li { + display: block; +} +.contextMenu ul li.force-display { + display: block; +} +.contextMenu ul li.context-separator { + background-color: lightgray; + height: 1px; + padding: 0; +} + +.ui-tabs.ui-tabs-vertical .ui-tabs-nav li.separated { + margin-top: 1em; +} + +#crosssection { + display: none; + position: absolute; + top: 200px; + left: 600px; +} + +.cross-rect { + /* fill: #cfe2f3; */ +} +.cross-line { + stroke: black; + stroke-width: 4px; +} + +.node circle { +/* fill: rgb(31, 119, 180); + fill-opacity: .25; */ + fill: #cfe2f3; + fill-opacity: .98; + stroke: black; + stroke-width: 3px; +} + +circle.subcircle { + stroke-width: 1px; + /* stroke-dasharray: 2; */ + fill-opacity: 0; + stroke: darkgray; +} + +.leaf circle { + fill: #6fa8dc; + fill-opacity: 0.95; + stroke-width: 3px; +} + +.leaf circle[title] { + font-family: monospace; + +} + +#svg_legend { + position: absolute; + top: 110px; + right: 0; + border: 1px solid #ccc; + border-radius: 5px; + background-color: #fcfcfc; + margin-right: 1.3em; + padding: 1em; +} + +#svg_legend svg { + height: 235px; + width: 180px; +} + +#multiple_details div.gridStyle { +/* height: 50em; */ + min-height: 70px !important; + height: auto !important; +} + +#multiple_details .ngViewport { + height: auto !important; +} + +#multiple_details .gridCellButton button, #link_details .gridCellButton button { + margin: .25em .4em; + font-size: 12px; + height: 2em; + padding-top: .1em; +} + +#linkFilter { + display: none; + padding: 0.5em; + border: 1px solid grey; + background-color: #F0F0F0; + position: absolute; + z-index: 100; + right: 1em; +} +div.formLine label, div.formLine input { + display: inline-block; + padding: 0 8px; +} + +span.filter-icon { + padding-left: 1em; +} + +button.filter-close { + width: 15px; + height: 20px; + padding: 0; + position: absolute; + right: 4px; + top: 4px; +} + +div.filter-title h6 { + margin: 0 0 0.5em 0; +} + +.links button.btn-filter { + padding: 0 1em 0 0; + margin-left: 1em; + font-size: 1em; +} + +button.btn-filter { + float: right; +} +span.fancytree-expanded button.btn-filter, +a.fancytree-title:hover button.btn-filter { + visibility: visible; +} + +div.hdash-button a { + color: white; +} + +.linkDirIn { + color: red; + background-color: #f3f3f3; +} + +.linkDirOut { + color: blue; + background-color: white; +} + +div.topoGrid .ui-grid-viewport { + overflow: hidden !important; +} + +@-moz-document url-prefix() { + .btn {padding: 2px 12px 8px !important;} + #overview-controller .btn {padding: 4px 12px !important;} + #overview-controller .btn.filter-close {padding: 0 !important;} +} + +.ui-fancytree.fancytree-container { + font-size: 14px; +} + +.grid-title { + background-color: #FAFAFA; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#F2F2F2', GradientType=0); + border-bottom: 1px solid #d4d4d4; + text-shadow: 0 1px 0 #FFFFFF; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + margin: 0 0 10px 0; + padding-bottom: 4px; +} + +.expand-collapse { + float: right; + margin-right: 0.5em; +} + +.pane-viewport { + top: 26px !important; +} +.fancytree-node.loading { + position: initial; +} + +.newChart { + float: right; +} + +select.unique, input.unique { + border: 2px solid blue; +} +select.required, input.required { + border: 2px solid black; +} + +.required-indicator { + padding-left: 0.5em; + font-size: 0.85em; + vertical-align: super; +} + +.required-indicator::before { + content: '(required)' +} + +.unique-indicator { + padding-left: 0.5em; + font-size: 0.85em; + vertical-align: super; +} + +.unique-indicator::before { + content: '(must be unique if supplied)' +} + +.unique-indicator + +.error { + color: red; + font-weight: bold; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/css/plugin.css ---------------------------------------------------------------------- diff --git a/console/test/css/plugin.css b/console/test/css/plugin.css deleted file mode 120000 index 207638e..0000000 --- a/console/test/css/plugin.css +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/css/plugin.css \ No newline at end of file diff --git a/console/test/css/plugin.css b/console/test/css/plugin.css new file mode 100644 index 0000000..f7259dd --- /dev/null +++ b/console/test/css/plugin.css @@ -0,0 +1,1019 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ +main-display > .span8 { + height: 100%; + position: relative; +} + +ul.qdrListNodes > li > span { + padding: 6px 20px; 6px; 6px; + display: block; +} + +.qdrList .grid { + width: 20em; + margin-right: 0; + float: left; +} + + +.qdrList div.gridDetails { + width: auto; +} + +.selectedItems { + /* margin-left: 21em; */ +} + +.qdrListPane { + top: 110px; +} + +.qdrListActions { + width: auto; + margin-left: 1em; +} + +div.listAttrName { + padding-top: 5px; +} + +div.listAttrName button { + float: right; + margin: 3px 5px; +} + +div.listAggrValue button { + margin: 3px 5px; +} + +@-moz-document url-prefix() { + div.listAttrName button { + top: -24px; + position: relative; + margin: 3px 0px; + padding: 0 5px !important; + } +} + +div.listAttrName i.icon-bar-chart.active, div.hastip i.icon-bar-chart.active, li.haschart i { + /*background-color: #AAFFAA; */ +} + +div#main div ul.nav li a:not(.btn) { + background: initial !important; +} + +div#main div ul.nav li.active a { + background-color: #f0f0ff !important; +} + +div#main.qdr { + margin-top: 56px !important; +} + +div.charts-header { + font-size: 1.2em; + color: #666666; + margin: 1em 0; +} + +.selectedNode, .selectedAction, .selectedEntity { + font-weight: 600; + color: #606066; +} + +.okButton { + text-align: center; + margin: 1em; +} + +span.showChartsLink { + border: 1px solid blue; + padding: 1px 2px; +} + +div.listGraphs p { + margin: 1em 0 2em 2em; + text-align: center; +} + +div.centered { + text-align: center; + margin: 4em; +} + +.modal-body.centered { + margin: 0; +} + +/* dialog */ +div.aChart { + height: 200px; + width: 400px; + margin: 1em; +} + +/* dashboard */ +div.aChart.hDash { + /* width: 21em; */ + /* height: 17em; */ + width: 100%; + height: 87%; + margin: 0; + padding: 0; + +} +div.chartContainer { + float: left; + width: 100%; + height: 100%; + overflow: hidden; +} + +/* the x and y axis lines */ +.d3Chart g.axis path.domain { + stroke-width: 1; + stroke: black; +} + +/* the line surrounding the area chart */ +div.d3Chart path { +/* stroke: black; */ +/* stroke-width: 0; */ +/* opacity: 0.5; */ +} + +/* the line above the area chart */ +/* the color gets overridden */ +div.d3Chart path.line { + stroke: steelblue; + stroke-width: 1.5; + fill: none; + opacity: 1; +} + +.mo-rect { + fill: #ffffdd; + stroke: #f0f0f0; + stroke-width: 1; +} + +.mo-guide { + fill: none; + stroke: #d0d0d0; + stroke-width: 2; + stroke-dasharray: 3,3; +} + +div.d3Chart .title { + text-decoration: underline; +} + + +.axis line, .axis path { + fill: none; + shape-rendering: crispEdges; + stroke-width: 1; + stroke: #000000; +} + +.axis line { + stroke: #C0C0C0; + stroke-dasharray: 1,1; + opacity: 0.5; +} + +.y.axis text, .x.axis text, .focus text, div.d3Chart .title { + font-size: 12px; +} + +.y.axis path { + stroke: #000; + } + +.overlay { + fill: none; + pointer-events: all; + } + +.focus circle { + fill: none; + stroke: steelblue; + } +.focus .fo-table { + /* box-shadow: 2px 2px 3px #EEE; */ +} + +div.d3Chart { + /* padding: 1em 0; */ + /* border: 1px solid #C0C0C0; */ + margin-bottom: 2em; +} +div.d3Chart.hDash { + border: 0px; +} + +div.d3Chart .axis path { + display: inherit; +} + +.c3-circle { + /* display: none; */ +} + +.fo-table { + border: 1px solid darkgray; + background-color: white; + font-size: .85em; +} + +.fo-table td { + padding: 4px; + border-left: 1px solid darkgray; +} +.fo-table tr.detail td { + padding: 1px 4px; +} +.fo-title { + color: white; + background-color: darkgray; +} + +.fo-table-legend { + width: 8px; + height: 8px; + border: 1px solid black; + margin: 0 4px; + display: inline-block; +} + +svg .legend { + dominant-baseline: central; +} + +div.chartContainer div.aChart { + margin-top: 0.5em; +} + +div#main.qdr div ul.nav li.active a { + background-color: #e0e0ff !important; + color: #000000; +} + +div#main.qdr .selected, .box.selected { + color: #000000; + text-shadow: none; +} + +/* the selected node on the list page */ +div.qdrList li.active, ul.qdrListNodes li.active { + background-color: #e0e0ff; +} + +div.qdr-attributes span.fancytree-selected a { + background-color: #e0e0ff; +} +div.qdr-attributes.pane, div.qdr-topology.pane { + position: absolute; + margin-left: 10px; +} +div.qdr-overview.pane { + position: absolute; +} +div.qdr-topology.pane.left { + width: auto; + /*border-right: 1px solid lightgray; */ +} + +/* the selected row in the name table */ +div#main.qdr div.qdrList div.selected { + background-color: #e0e0ff !important; +} + +#dialogChart, #dialogEditChart { + height: 220px; +} + +.chartOptions .modal-body { + overflow-y: initial; +} + +div.qdrCharts p.chartLabels button { + float: right; +} + +div.qdrCharts p.chartLabels { + padding-right: 1em;; + } + +p.dialogHeader { + text-align: center; +} + +p.dialogHeader input { + margin-top: 10px; + width: 480px; +} + +.ui-slider-tick { + position: absolute; + background-color: #666; + width: 2px; + height: 8px; + top: 12px; + z-index: -1; +} + +label.rateGroup { + float: left; +} + +div.chartOptions div.dlg-slider { + float: left; + width: 28em; + font-size: 14px; +} + +div.chartOptions div.duration { + width: 35em !important; +} + +div.chartOptions .slider { + margin-top: 1em; + margin-bottom: 1em; +} + +input[type="radio"] { + margin-top: 0 !important; +} + +div.chartOptions legend { + font-size: 1.2em; + font-weight: bold; + margin-bottom: 10px; +} + +div.chartOptions tab > div { + margin-left: 1em; +} + +div.chartOptions span.minicolors-swatch { + width: 14px; + height: 14px; +} + +.minicolors-input { + width: 4em; + padding: 0 0 0 24px !important; +} + +div.colorPicker div.colorText { + display: inline-block; + width: 10em; +} +div.colorPicker div:nth-of-type(1), /* first span under div.colorPicker */ + div.minicolors{ + float:left; + margin-right: 0.5em; +} + +div.chartOptions p.sep { + height: 1em; +} + +ul.nav-tabs { + border-bottom: 1px solid #ddd !important; +} + +.chartOptions ul.nav-tabs { + margin-bottom: 0px !important; +} + +div.tabbable div.tab-content { + overflow: visible; +} + +div.tabbable ul.nav-tabs > .active > a { + background-color: #f8f8f8; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + + +div.tabbable .tab-pane { + background-color: #f8f8f8; + padding: 12px; + border-right: 1px solid #ddd; + border-left: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} +div.dlg-large div.tabbable .tab-pane { + margin-left: 11em; +} + +div.tabbable ul.nav-tabs { + margin-bottom: 0; +} + +ul.qdrTopoModes { + position: relative; + top: -10px; +} +.overview.section { + /* width: 35em; */ +} +.overview.section .ngGrid { + height: 12em !important; + min-height: 12em !important; +} + +.overview.routers.section .ngGrid { + height: 16em !important; + min-height: 16em !important; +} +.overview.routers.section { + /*width: 15em; */ + } + +.grid-align-value { + text-align: right; +} + +.grid-align-value .ngCellText { + padding-right: 10px; +} + +.overview .ngRow:hover { + background:#e0e0ff; +} + +.overview-cell .ngCell:hover { + background:#e0e0ff; +} +.overview-cell .ngCell.col0:hover, .overview-cell .ngCell.col1:hover { + background: initial; +} + + +.qdr-overview.pane.left, .qdr-attributes.pane.left { + top: 104px; +} +.qdr-topology.pane.left { + top: 104px; +} +.qdr-overview.pane.left, .qdr-attributes.pane.left, .qdr-topology.pane.left { + left: 10px; +} + +.overview-tree, .qdr-attributes { + min-height: calc(100vh - 90px) +} +/* +.treeContainer { + width: 100%; + float: left; +} +*/ +.pane-content { + overflow: auto; +} + +#entityNames { + width: 20em; + float: left; +} + +.treeDetails { + margin-left: 260px; +} + +.grid:not(.noHighlight) .ui-grid-row:hover .ui-grid-cell-contents { + /*background-color: #e0e0ff; */ + background-color: #e9f2f9 +} +.ngCellText { + padding: 4px 0 0 4px; +} + +.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell { + background-color: #e0e0ff; +} + +.tab-content .tab-pane { + background-color: #f8f8f8; + padding: 12px; + border-right: 1px solid #ddd; + border-left: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +div.chartOptions ul.nav-tabs > .active > a { + background-color: #f8f8f8; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +div.chartOptions label:nth-of-type(2) { + margin-left: 1em; +} +div.chartOptions label { + font-weight: normal; + display: inline-block; +} + +/* +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + margin-left: 180px; +} + +.form-horizontal input, { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; +} + +input[type="text"], input[type="number"], input[type="password"] { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +input[type="text"], input[type="number"], input[type="password"] { + display: inline-block; + width: 200px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.login input[type="checkbox"] { + margin-top: 0.75em; +} +*/ + +#dispatch-login-container { + /* width: 18.5em; */ + margin-top: 2em; +} +/* +div.login.container { + width: 550px; +} +*/ + + +#overtree .fancytree-container { + border: 0px; +} + +#overtree span.fancytree-alert-icon.ui-icon-refresh { + background-position: -64px -80px; +} +#overtree span.fancytree-alert-icon.ui-icon-transfer-e-w { + background-position: -112px -80px; +} + +#alerts { + position: fixed; + right: 0; + top: 0; + z-index: 100; +} + +.alert-enter, +.alert-leave, +.alert-move { + -webkit-transition: 1s linear all; + -moz-transition: 1s linear all; + -o-transition: 1s linear all; + transition: 1s linear all; + position:relative; +} + +.alert-enter { + left:-10px; + opacity:0; +} +.alert-enter.alert-enter-active { + left:0; + opacity:1; +} + +.alert-leave { + left:0; + opacity:1; +} +.alert-leave.alert-leave-active { + left:-10px; + opacity:0; +} + +.alert-move { + opacity:0.5; +} +.alert-move.alert-move-active { + opacity:1; +} + +.overview .table-striped tr:hover td { + background-color: #e0e0ff !important; +} + +#entityNames div.ngViewport { + overflow-x: hidden; +} + +.connect-column.connect-form { + width: 20em; +} + +.chartLabels button a { + text-decoration: none; +} + +.fancytree-ico-c.router .fancytree-icon { + +} + +.tabs-left .nav-tabs { + float: left; +} +.tabs-left .nav-tabs > li { +/* float: initial; */ +} + +div.modal.dlg-large { + width: 53em; +} + +button.hdash-button a { + text-decoration: none; + color: #fff; +} + +div.widget-body > div { + height: 100%; +} + +div.qdrCharts { + height: 100%; +} + +ul.dispatch-view { + margin-bottom: 0 !important; +} + +.qdr-overview.pane.left span:not(.fancytree-has-children) .fancytree-icon:before, +.qdr-attributes.pane.left span:not(.fancytree-has-children) .fancytree-icon:before { + color: green; +} + +span:not(.fancytree-has-children).address .fancytree-icon:before, +span:not(.fancytree-has-children).router\.address .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0ac"; +} +span:not(.fancytree-has-children).address.mobile .fancytree-icon:before, +span:not(.fancytree-has-children).router\.address.mobile .fancytree-icon:before { + font-family: FontAwesome; + content: "\f109"; +} +span:not(.fancytree-has-children).address.internal.mobile .fancytree-icon:before, +span:not(.fancytree-has-children).router\.address.internal.mobile .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0ac"; +} +span:not(.fancytree-has-children).address.router .fancytree-icon:before, +span:not(.fancytree-has-children).router\.address.router .fancytree-icon:before { + font-family: FontAwesome; + content: "\f047"; +} + +span.address-link .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0ac"; +} + +span:not(.fancytree-has-children).connection.external .fancytree-icon:before { + font-family: FontAwesome; + content: "\f109"; +} +span:not(.fancytree-has-children).connection.normal .fancytree-icon:before { + font-family: FontAwesome; + content: "\f08e"; +} +span:not(.fancytree-has-children).connection.external.quiesced .fancytree-icon:before { + font-family: FontAwesome; + content: "\f14c"; + color: red; +} +span:not(.fancytree-has-children).connection.inter-router .fancytree-icon:before { + font-family: FontAwesome; + content: "\f07e"; +} +span:not(.fancytree-has-children).connection.router-control .fancytree-icon:before { + font-family: FontAwesome; + content: "\f013"; +} +span:not(.fancytree-has-children).no-data .fancytree-icon:before { + font-family: FontAwesome; + content: "\f05e"; + color: red !important; +} +span:not(.fancytree-has-children).loading .fancytree-icon:before { + font-family: FontAwesome; + content: "\f254"; +} +span:not(.fancytree-has-children).connector .fancytree-icon:before { + font-family: FontAwesome; + content: "\f126"; +} +span:not(.fancytree-has-children).container .fancytree-icon:before { + font-family: FontAwesome; + content: "\f16c"; +} +span:not(.fancytree-has-children).log .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0f6"; +} +span:not(.fancytree-has-children).router\.node .fancytree-icon:before { + font-family: FontAwesome; + content: "\f013"; +} +span:not(.fancytree-has-children).link.inter-router .fancytree-icon:before, +span:not(.fancytree-has-children).router\.link.inter-router .fancytree-icon:before{ + font-family: FontAwesome; + content: "\f07e"; +} +span:not(.fancytree-has-children).link.router-control .fancytree-icon:before, +span:not(.fancytree-has-children).router\.link.router-control .fancytree-icon:before{ + font-family: FontAwesome; + content: "\f013"; +} +span:not(.fancytree-has-children).link.endpoint .fancytree-icon:before, +span:not(.fancytree-has-children).router\.link.endpoint .fancytree-icon:before{ + font-family: FontAwesome; + content: "\f109"; +} +span:not(.fancytree-has-children).link.console .fancytree-icon:before, +span:not(.fancytree-has-children).router\.link.console .fancytree-icon:before { + font-family: FontAwesome; + content: "\f108"; +} +span:not(.fancytree-has-children).listener .fancytree-icon:before { + font-family: FontAwesome; + content: "\f025"; +} +span:not(.fancytree-has-children).connection .fancytree-icon:before { + font-family: FontAwesome; + content: "\f07e"; +} +span:not(.fancytree-has-children).connection.console .fancytree-icon:before { + font-family: FontAwesome; + content: "\f108"; +} +span:not(.fancytree-has-children).waypoint .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0ec"; +} +span:not(.fancytree-has-children).router .fancytree-icon:before { + font-family: FontAwesome; + content: "\f047"; +} +span:not(.fancytree-has-children).fixedAddress .fancytree-icon:before { + font-family: FontAwesome; + content: "\f015"; +} +span:not(.fancytree-has-children).linkRoutePattern .fancytree-icon:before { + font-family: FontAwesome; + content: "\f039"; +} +span:not(.fancytree-has-children).allocator .fancytree-icon:before { + font-family: FontAwesome; + content: "\f170"; +} +span:not(.fancytree-has-children).policy .fancytree-icon:before { + font-family: FontAwesome; + content: "\f256"; +} +span:not(.fancytree-has-children).logStats .fancytree-icon:before { + font-family: FontAwesome; + content: "\f080"; +} +span:not(.fancytree-has-children).autoLink .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0c1"; +} +span:not(.fancytree-has-children).authServicePlugin .fancytree-icon:before { + font-family: FontAwesome; + content: "\f0c1"; +} +span:not(.fancytree-has-children).sslProfile .fancytree-icon:before { + font-family: FontAwesome; + content: "\f023"; +} +span:not(.fancytree-has-children).vhost .fancytree-icon:before { + font-family: FontAwesome; + content: "\f108"; +} +span:not(.fancytree-has-children).vhostStats .fancytree-icon:before { + font-family: FontAwesome; + content: "\f080"; +} + + +.ngCellText { +/* color: #333333; */ +} + +.changed { + color: #339933; +} + +div.dispatch-router div.help { + width: auto; + padding: 1em; + background-color: lavender; + border-radius: 6px; + margin-top: 1em; + text-align: center; +} + +div.operations tr:nth-child(even) { + background: #f3f3f3; +} +div.operations tr:nth-child(odd), div.operations tr:last-child { + background: #fff; +} + +div.operations tr input { + margin: 0; + padding: 3px 6px; +} +div.operations table { + width: 100%; +} +div.operations th { + width: 50%; + border-bottom: 1px solid #cccccc; + text-align: left; +} +div.operations td:nth-child(odd), div.operations th:nth-child(odd) { + border-right: 1px solid #cccccc; +} +div.operations td:nth-child(odd) { + padding-left: 0; +} +div.operations td:nth-child(even), div.operations th:nth-child(even) { + padding-left: 5px; +} +div.operations th { + padding: 5px; +} +div.operations .tab-pane.active { + padding: 12px 12px 12px 0; +} +div.operations label { + padding-top: 4px; + margin-bottom: 4px; +} +.qdrListActions .ngGrid { + /*min-height: 40em; + height: 100%; */ +} +div.qdrListActions .ngViewport { + height: initial !important; +} + +div.operations .boolean { + padding-bottom: 0; +} + +table.log-entry { + margin-bottom: 1em; + border-top: 1px solid black; +} + +table.log-entry pre { + background-color: #f5f5f5; + color: inherit; + margin: 0; + white-space: pre-wrap; +} + +circle.node.normal.console { + fill: lightcyan; +} +circle.node.artemis { + fill: lightgreen; +} +circle.node.route-container { + fill: orange; +} + +text.console, text.on-demand, text.normal { + font-family: FontAwesome; + font-weight: normal; + font-size: 16px; +} + +@font-face { + font-family:"Brokers"; + src: url("brokers.ttf") /* TTF file for CSS3 browsers */ +} + +text.artemis { + font-family: Brokers; + font-size: 20px; + font-weight: bold; +} + +text.qpid-cpp { + font-family: Brokers; + font-size: 18px; + font-weight: bold; +} + +i.red { + color: red; +} + +.qdrListActions div.delete { + width: 20em; + margin: auto; + border: 1px solid #eaeaea; + height: 5em; + padding: 4em; + background-color: #fcfcfc; +} + +.btn:focus { + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { + outline:3px solid rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +btn.disabled, .btn[disabled] { + opacity: 0.35; +} + +#dispatch-login-container .ng-invalid-range { + border-color: #e9322d !important; +} + +div#durationSlider, div#rateSlider { + margin-top: 1em; +} + +.list-grid { + padding-left: 10px; +} + +.ngViewport.ng-scope { + height: auto !important; +} + +.listening-on { + background-color: #CCFFCC; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/css/site-base.css ---------------------------------------------------------------------- diff --git a/console/test/css/site-base.css b/console/test/css/site-base.css deleted file mode 120000 index 874fb05..0000000 --- a/console/test/css/site-base.css +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/css/site-base.css \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/html/qdrConnect.html ---------------------------------------------------------------------- diff --git a/console/test/html/qdrConnect.html b/console/test/html/qdrConnect.html deleted file mode 120000 index 6eec141..0000000 --- a/console/test/html/qdrConnect.html +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/html/qdrConnect.html \ No newline at end of file diff --git a/console/test/html/qdrConnect.html b/console/test/html/qdrConnect.html new file mode 100644 index 0000000..b3500c4 --- /dev/null +++ b/console/test/html/qdrConnect.html @@ -0,0 +1,105 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<style> + .alert { + margin-top: 4em; + } + + .login:after { + content: ''; + display: block; + clear: both; +} + +</style> +<div class="row-fluid" ng-controller="QDR.SettingsController"> + <div class="login" ng-hide="connecting"> + <div class="col-xs-1"></div> + <div class="col-xs-10"> + <div class="alert alert-success"> + <p> + Enter the address and a HTML-enabled port of a <strong><a href="http://qpid.apache.org/components/dispatch-router/" target="_blank">Qpid Dispatch Router</a></strong>. + </p> + <!-- + <p> + If Autostart is checked, you will be automatically logged in to the router the next time you start the console. + </p> --> + + </div> + <div class="connect-form"> + <form class="form-horizontal no-bottom-margin" novalidate ng-submit="connect()" name="settings"> + <div class="form-group"> + <label class="col-md-2 control-label" for="address">Address: </label> + <div class="col-md-6"> + <input tabindex="1" id="address" type="text" ng-model="formEntity.address" placeholder="localhost" name="address" autofocus="autofocus" class="ng-pristine ng-valid ng-valid-required"></div> + </div> + <div class="form-group"> + <label tabindex="-1" class="col-md-2 control-label" title="Ports to connect to, by default 5673" for="port">Port: </label> + <div class="col-md-6"> + <input tabindex="2" id="port" posint type="number" placeholder="5673" tooltip="Ports to connect to, by default 5673" ng-model="formEntity.port" name="port" title="Ports to connect to, by default 5673"> + <span ng-show="settings.port.$error.range">Must be 1 through 65535</span> + </div> + </div> + <div class="form-group"> + <label tabindex="-1" class="col-md-2 control-label" title="User name" for="username">User name: </label> + <div class="col-md-6"> + <input tabindex="3" id="username" type="text" placeholder="username" tooltip="User name" ng-model="formEntity.username" name="username" title="User name"> + </div> + </div> + <div class="form-group"> + <label tabindex="-1" class="col-md-2 control-label" title="Password" for="password">Password: </label> + <div class="col-md-6"> + <input tabindex="4" id="password" type="password" placeholder="password" tooltip="Password" ng-model="formEntity.password" name="password" title="Password"> + </div> + </div> +<!-- + <div class="form-group"> + <label tabindex="-1" class="col-md-2 control-label" title="Whether or not the connection should be started as soon as you log in" for="autostart">Autostart: </label> + <div class="col-md-6"> + <input tabindex="3" id="autostart" type="checkbox" tooltip="Whether or not the connection should be started as soon as you log into hawtio" ng-model="formEntity.autostart" name="autostart" title="Whether or not the connection should be started as soon as you log into hawtio" + class="ng-scope ng-pristine ng-valid"></div> + </div> +--> + <input tabindex="-1" type="submit" style="position: absolute; left: -9999px; width: 1px; height: 1px;"> + <p></p> + <div class="form-group"> + <label tabindex="-1" class="col-md-2 control-label" title="button"></label> + <div class="col-md-6"> + <button type="submit" tabindex="4" class="btn btn-primary pull-left" ng-disabled="settings.$invalid">{{buttonText()}}</button> + </div> + </div> + </form> + + + </div> + </div> + <div class="col-xs-1"></div> + </div> + + <div class="centered" ng-show="connecting"> + <i class="icon-spin icon-spinner icon-4x"></i> + <p>Please wait, connecting now...</p> + </div> + <div class="centered error" ng-show="connectionError"> + <p>There was a connection error: {{connectionErrorText}}</p> + </div> + +</div> + http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/html/qdrLayout.html ---------------------------------------------------------------------- diff --git a/console/test/html/qdrLayout.html b/console/test/html/qdrLayout.html deleted file mode 120000 index d27ffd4..0000000 --- a/console/test/html/qdrLayout.html +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/html/qdrLayout.html \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/js/qdrService.js ---------------------------------------------------------------------- diff --git a/console/test/js/qdrService.js b/console/test/js/qdrService.js deleted file mode 120000 index 2717c3a..0000000 --- a/console/test/js/qdrService.js +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/js/qdrService.js \ No newline at end of file diff --git a/console/test/js/qdrService.js b/console/test/js/qdrService.js new file mode 100644 index 0000000..f4effdd --- /dev/null +++ b/console/test/js/qdrService.js @@ -0,0 +1,269 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +'use strict'; +/* global Promise */ +/** + * @module QDR + */ +var QDR = (function(QDR) { + + // The QDR service handles the connection to the router + QDR.module.factory('QDRService', ['$timeout', '$location', function($timeout, $location) { + let dm = require('dispatch-management'); + let self = { + management: new dm.Management($location.protocol()), + utilities: dm.Utilities, + + onReconnect: function () { + self.management.connection.on('disconnected', self.onDisconnect); + let org = localStorage[QDR.LAST_LOCATION] || '/overview'; + $timeout ( function () { + $location.path(org); + $location.search('org', null); + $location.replace(); + }); + }, + onDisconnect: function () { + self.management.connection.on('connected', self.onReconnect); + $timeout( function () { + $location.path('/connect'); + let curPath = $location.path(); + let parts = curPath.split('/'); + let org = parts[parts.length-1]; + if (org && org.length > 0 && org !== 'connect') { + $location.search('org', org); + } else { + $location.search('org', null); + } + $location.replace(); + }); + }, + + connect: function (connectOptions) { + return new Promise ( function (resolve, reject) { + self.management.connection.connect(connectOptions) + .then( function (r) { + // if we are ever disconnected, show the connect page and wait for a reconnect + self.management.connection.on('disconnected', self.onDisconnect); + + self.management.getSchema() + .then( function () { + QDR.log.info('got schema after connection'); + self.management.topology.setUpdateEntities([]); + QDR.log.info('requesting a topology'); + self.management.topology.get() // gets the list of routers + .then( function () { + QDR.log.info('got initial topology'); + let curPath = $location.path(); + let parts = curPath.split('/'); + let org = parts[parts.length-1]; + if (org === '' || org === 'connect') { + org = localStorage[QDR.LAST_LOCATION] || QDR.pluginRoot + '/overview'; + } + $timeout ( function () { + $location.path(org); + $location.search('org', null); + $location.replace(); + }); + }); + }); + resolve(r); + }, function (e) { + reject(e); + }); + }); + }, + disconnect: function () { + self.management.connection.disconnect(); + delete self.management; + self.management = new dm.Management($location.protocol()); + } + + + }; + + return self; + }]); + + return QDR; + +}(QDR || {})); + +(function() { + console.dump = function(o) { + if (window.JSON && window.JSON.stringify) + QDR.log.info(JSON.stringify(o, undefined, 2)); + else + console.log(o); + }; +})(); + +if (!String.prototype.startsWith) { + String.prototype.startsWith = function (searchString, position) { + return this.substr(position || 0, searchString.length) === searchString; + }; +} + +if (!String.prototype.endsWith) { + String.prototype.endsWith = function(searchString, position) { + let subjectString = this.toString(); + if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { + position = subjectString.length; + } + position -= searchString.length; + let lastIndex = subjectString.lastIndexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }; +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex +if (!Array.prototype.findIndex) { + Object.defineProperty(Array.prototype, 'findIndex', { + value: function(predicate) { + // 1. Let O be ? ToObject(this value). + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + + let o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + let len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + let thisArg = arguments[1]; + + // 5. Let k be 0. + let k = 0; + + // 6. Repeat, while k < len + while (k < len) { + // a. Let Pk be ! ToString(k). + // b. Let kValue be ? Get(O, Pk). + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + // d. If testResult is true, return k. + let kValue = o[k]; + if (predicate.call(thisArg, kValue, k, o)) { + return k; + } + // e. Increase k by 1. + k++; + } + + // 7. Return -1. + return -1; + } + }); +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.find +if (!Array.prototype.find) { + Object.defineProperty(Array.prototype, 'find', { + value: function(predicate) { + // 1. Let O be ? ToObject(this value). + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + + let o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + let len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + let thisArg = arguments[1]; + + // 5. Let k be 0. + let k = 0; + + // 6. Repeat, while k < len + while (k < len) { + // a. Let Pk be ! ToString(k). + // b. Let kValue be ? Get(O, Pk). + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + // d. If testResult is true, return kValue. + let kValue = o[k]; + if (predicate.call(thisArg, kValue, k, o)) { + return kValue; + } + // e. Increase k by 1. + k++; + } + + // 7. Return undefined. + return undefined; + } + }); +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill +if (!Array.prototype.fill) { + Object.defineProperty(Array.prototype, 'fill', { + value: function(value) { + + // Steps 1-2. + if (this == null) { + throw new TypeError('this is null or not defined'); + } + + var O = Object(this); + + // Steps 3-5. + var len = O.length >>> 0; + + // Steps 6-7. + var start = arguments[1]; + var relativeStart = start >> 0; + + // Step 8. + var k = relativeStart < 0 ? + Math.max(len + relativeStart, 0) : + Math.min(relativeStart, len); + + // Steps 9-10. + var end = arguments[2]; + var relativeEnd = end === undefined ? + len : end >> 0; + + // Step 11. + var final = relativeEnd < 0 ? + Math.max(len + relativeEnd, 0) : + Math.min(relativeEnd, len); + + // Step 12. + while (k < final) { + O[k] = value; + k++; + } + + // Step 13. + return O; + } + }); +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/lib/rhea-min.js ---------------------------------------------------------------------- diff --git a/console/test/lib/rhea-min.js b/console/test/lib/rhea-min.js deleted file mode 120000 index b445ba6..0000000 --- a/console/test/lib/rhea-min.js +++ /dev/null @@ -1 +0,0 @@ -../../stand-alone/plugin/lib/rhea-min.js \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f0cc5659/console/test/package.json ---------------------------------------------------------------------- diff --git a/console/test/package.json b/console/test/package.json new file mode 100644 index 0000000..8ba9524 --- /dev/null +++ b/console/test/package.json @@ -0,0 +1,14 @@ +{ + "name": "test", + "version": "0.0.1", + "description": "Generate test data for Apache interconnect console", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Apache Qpid", + "license": "Apache-2.0", + "dependencies": { + "rhea": "^0.2.12" + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org