From: Keith Burns Date: Mon, 8 Jun 2015 19:58:01 +0000 (+0000) Subject: Merge "Bug 3607: Removing OpFlex from Sonar coverage." X-Git-Tag: release/beryllium~170 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=f9b7536fdd18edb7b918e16c235caf572848c97d;hp=1ee646015c9d010157f7fffcc17cb39a5c652320;p=groupbasedpolicy.git Merge "Bug 3607: Removing OpFlex from Sonar coverage." --- diff --git a/features/src/main/resources/features.xml b/features/src/main/resources/features.xml index 154f3644d..a09303285 100644 --- a/features/src/main/resources/features.xml +++ b/features/src/main/resources/features.xml @@ -111,6 +111,7 @@ odl-dlux-core odl-dlux-yangvisualizer + odl-groupbasedpolicy-uibackend mvn:org.opendaylight.groupbasedpolicy/groupbasedpolicy-ui-bundle/${project.version} diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js index eb7b7c249..aa12d60a1 100755 --- a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js @@ -237,6 +237,7 @@ define(modules, function(gbp) { $scope.init = function(paperInstance){ paper = paperInstance; + $scope.loadMouseScrollEvent(); }; @@ -244,6 +245,28 @@ define(modules, function(gbp) { paperScale = out ? paperScale - 0.1 : paperScale >= 1 ? 1 : paperScale + 0.1; paper.scale(paperScale, paperScale); }; + + + + $scope.loadMouseScrollEvent = function(){ + /*mouse wheel event for zooming*/ + var graph = document.getElementById('graph'), + MouseWheelHandler = function(e){ + var mouseEvent = window.event || e; // old IE support + var delta = Math.max(-1, Math.min(1, (mouseEvent.wheelDelta || -mouseEvent.detail))); + $scope.zoom(delta === 1 ? false : true); + }; + + if (graph.addEventListener) { + // IE9, Chrome, Safari, Opera + graph.addEventListener("mousewheel", MouseWheelHandler, false); + // Firefox + graph.addEventListener("DOMMouseScroll", MouseWheelHandler, false); + } + // IE 6/7/8 + else {graph.attachEvent("onmousewheel", MouseWheelHandler);} + /*mouse wheel event for zooming - end*/ + }; }]); diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.css b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.css index c25860a8c..298d66f0f 100755 --- a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.css +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.css @@ -530,7 +530,7 @@ display: none; } /*-------------------YangUI import START-------------------*/ -.customContainer { +.gbpWrapper .customContainer { border-left: 1px solid #7a7a7a; margin: 35px 5px 5px 15px; padding: 5px; @@ -538,31 +538,31 @@ width: auto; position: relative; } -.customContainer.withoutBorder { +.gbpWrapper .customContainer.withoutBorder { border-left: 0; padding-bottom: 0; } -.customContainer.withoutBorder .treeBullet.containerBullet { +.gbpWrapper .customContainer.withoutBorder .treeBullet.containerBullet { left: -25px; top: -25px; } -.topContainerPart { +.gbpWrapper .topContainerPart { margin-left: -19px; margin-top: -28px; margin-bottom: 10px; } -.treeBullet { +.gbpWrapper .treeBullet { font-size: 25px; color: #7a7a7a; position: absolute; left: -15px; top: 0; } -.treeBullet.containerBullet { +.gbpWrapper .treeBullet.containerBullet { top: -25px; left: -25px; } -.btn-name { +.gbpWrapper .btn-name { -webkit-border-radius: 5px; border-radius: 5px; background: transparent; @@ -571,8 +571,8 @@ border: 2px solid #393939; cursor: auto; } -button.yangButton, -div.yangButton { +.gbpWrapper button.yangButton, +.gbpWrapper div.yangButton { cursor: pointer; position: relative; width: 24px; @@ -585,55 +585,55 @@ div.yangButton { zoom: 1; *display: inline; } -button.yangButton.iconArrowDown, -div.yangButton.iconArrowDown { +.gbpWrapper button.yangButton.iconArrowDown, +.gbpWrapper div.yangButton.iconArrowDown { background: transparent url('images/yang-ui-icons/icon-arrow-down.tpl.html') no-repeat center top; } -button.yangButton.iconArrowRight, -div.yangButton.iconArrowRight { +.gbpWrapper button.yangButton.iconArrowRight, +.gbpWrapper div.yangButton.iconArrowRight { background: transparent url('images/yang-ui-icons/icon-arrow-right.tpl.html') no-repeat center top; } -button.yangButton.iconNext, -div.yangButton.iconNext { +.gbpWrapper button.yangButton.iconNext, +.gbpWrapper div.yangButton.iconNext { background: transparent url('images/yang-ui-icons/icon-next.tpl.html') no-repeat center top; } -button.yangButton.iconPrev, -div.yangButton.iconPrev { +.gbpWrapper button.yangButton.iconPrev, +.gbpWrapper div.yangButton.iconPrev { background: transparent url('images/yang-ui-icons/icon-prev.tpl.html') no-repeat center top; } -button.yangButton:hover, -div.yangButton:hover { +.gbpWrapper button.yangButton:hover, +.gbpWrapper div.yangButton:hover { background-position: center -24px; } -button.yangButton.disabled, -div.yangButton.disabled { +.gbpWrapper button.yangButton.disabled, +.gbpWrapper div.yangButton.disabled { -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity= 40 )' !important; filter: alpha(opacity= 40 ) !important; -moz-opacity: 0.4 !important; -khtml-opacity: 0.4 !important; opacity: 0.4 !important; } -button.yangButton.disabled:hover, -div.yangButton.disabled:hover { +.gbpWrapper button.yangButton.disabled:hover, +.gbpWrapper div.yangButton.disabled:hover { background-position: center top; } -.btn-slim { +.gbpWrapper .btn-slim { padding-top: 2px; padding-bottom: 2px; } -.inlineBlock { +.gbpWrapper .inlineBlock { display: -moz-inline-stack; display: inline-block; vertical-align: top; zoom: 1; *display: inline; } -.leaf { +.gbpWrapper .leaf { margin: 5px; padding-left: 5px; position: relative; } -.leaf-label { +.gbpWrapper .leaf-label { margin-right: 10px; font-weight: bold; display: -moz-inline-stack; @@ -644,24 +644,24 @@ div.yangButton.disabled:hover { /*width: 170px;*/ padding-top: 6px; } -.leaf-label button.iconQuestion { +.gbpWrapper .leaf-label button.iconQuestion { margin-top: -2px; } -.leaf-label i.icon-key { +.gbpWrapper .leaf-label i.icon-key { font-size: 1.3em; padding-left: 5px; } -.clear { +.gbpWrapper .clear { clear: both; } -.borderArrow { +.gbpWrapper .borderArrow { color: #393939; position: absolute; bottom: -6px; left: -6px; font-size: 1.3em; } -.tooltip-inner { +.gbpWrapper .tooltip-inner { color: #fff; white-space: pre-wrap; /* CSS3 */ @@ -703,7 +703,7 @@ div.yangButton.disabled:hover { */ /*GBP END*/ -.btn-like-tab { +.gbpWrapper .btn-like-tab { text-decoration: none; color: #464646; border: 0; @@ -725,17 +725,18 @@ div.yangButton.disabled:hover { -o-transition: all 150ms linear; transition: all 150ms linear; } -.btn-like-tab.btn-selected, -.btn-like-tab:hover { +.gbpWrapper .btn-like-tab.btn-selected, +.gbpWrapper .btn-like-tab:hover { border-bottom: 3px solid #1baafd; background: transparent !important; } +.gbpWrapper h1, .gbpWrapper h2, .gbpWrapper h3 { + color: #393939; +} + #page_logo { display:none; } -h1, h2, h3 { - color: #393939; -} diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.less b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.less index 804172549..e46266aa2 100755 --- a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.less +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.less @@ -591,141 +591,141 @@ /*-------------------YangUI import START-------------------*/ @iconsRootPath : 'images/yang-ui-icons/'; - -.customContainer{ - border-left: 1px solid #7a7a7a; - margin: 35px 5px 5px 15px; - padding: 5px; - /*z-index: 10;*/ - width:auto; - position: relative; - &.withoutBorder{ - border-left: 0; - padding-bottom: 0; - .treeBullet.containerBullet{ - left: -25px; - top: -25px; +.gbpWrapper{ + .customContainer{ + border-left: 1px solid #7a7a7a; + margin: 35px 5px 5px 15px; + padding: 5px; + /*z-index: 10;*/ + width:auto; + position: relative; + &.withoutBorder{ + border-left: 0; + padding-bottom: 0; + .treeBullet.containerBullet{ + left: -25px; + top: -25px; + } } } -} -.topContainerPart{ - margin-left: -19px; - margin-top: -28px; - margin-bottom: 10px; -} - -.treeBullet{ - font-size: 25px; - color: #7a7a7a; - position: absolute; - left: -15px; - top: 0; - &.containerBullet{ - top: -25px; - left: -25px; + .topContainerPart{ + margin-left: -19px; + margin-top: -28px; + margin-bottom: 10px; } -} -.btn-name{ - -webkit-border-radius: 5px; - border-radius: 5px; - background: transparent; - font-weight: bold; - color: @text-color; - border: 2px solid @text-color; - cursor: auto; -} - -button, div{ - &.yangButton{ - cursor: pointer; - position: relative; - width: 24px; - height: 24px; - border: 0; - margin: 2px; - .inlineBlock; - &.iconArrowDown{ - background: transparent url('@{iconsRootPath}icon-arrow-down.png') no-repeat center top; - } - &.iconArrowRight{ - background: transparent url('@{iconsRootPath}icon-arrow-right.png') no-repeat center top; - } - &.iconNext{ - background: transparent url('@{iconsRootPath}icon-next.png') no-repeat center top; - } - &.iconPrev{ - background: transparent url('@{iconsRootPath}icon-prev.png') no-repeat center top; - } - &:hover{ - background-position: center -24px; + .treeBullet{ + font-size: 25px; + color: #7a7a7a; + position: absolute; + left: -15px; + top: 0; + &.containerBullet{ + top: -25px; + left: -25px; } - &.disabled{ - .opacityDeph(0.4)!important; + } + + .btn-name{ + -webkit-border-radius: 5px; + border-radius: 5px; + background: transparent; + font-weight: bold; + color: @text-color; + border: 2px solid @text-color; + cursor: auto; + } + + button, div{ + &.yangButton{ + cursor: pointer; + position: relative; + width: 24px; + height: 24px; + border: 0; + margin: 2px; + .inlineBlock; + &.iconArrowDown{ + background: transparent url('@{iconsRootPath}icon-arrow-down.png') no-repeat center top; + } + &.iconArrowRight{ + background: transparent url('@{iconsRootPath}icon-arrow-right.png') no-repeat center top; + } + &.iconNext{ + background: transparent url('@{iconsRootPath}icon-next.png') no-repeat center top; + } + &.iconPrev{ + background: transparent url('@{iconsRootPath}icon-prev.png') no-repeat center top; + } &:hover{ - background-position: center top; + background-position: center -24px; + } + &.disabled{ + .opacityDeph(0.4)!important; + &:hover{ + background-position: center top; + } } } } -} -.btn-slim { - padding-top: 2px; - padding-bottom: 2px; -} + .btn-slim { + padding-top: 2px; + padding-bottom: 2px; + } -.inlineBlock { - display: -moz-inline-stack; - display: inline-block; - vertical-align: top; - zoom: 1; - *display: inline; -} + .inlineBlock { + display: -moz-inline-stack; + display: inline-block; + vertical-align: top; + zoom: 1; + *display: inline; + } -.leaf { - margin: 5px; - padding-left: 5px; - position: relative; -} + .leaf { + margin: 5px; + padding-left: 5px; + position: relative; + } -.leaf-label { - margin-right: 10px; - font-weight: bold; - .inlineBlock; - /*width: 170px;*/ - padding-top: 6px; - button.iconQuestion{ - margin-top: -2px; - } + .leaf-label { + margin-right: 10px; + font-weight: bold; + .inlineBlock; + /*width: 170px;*/ + padding-top: 6px; + button.iconQuestion{ + margin-top: -2px; + } - i.icon-key { - font-size: 1.3em; - padding-left: 5px; - } -} + i.icon-key { + font-size: 1.3em; + padding-left: 5px; + } + } -.clear{ - clear: both; -} + .clear{ + clear: both; + } -.borderArrow{ - color: @text-color; - position: absolute; - bottom: -6px; - left: -6px; - font-size: 1.3em; -} + .borderArrow{ + color: @text-color; + position: absolute; + bottom: -6px; + left: -6px; + font-size: 1.3em; + } -.tooltip-inner{ - color: #fff; - white-space: pre-wrap; /* CSS3 */ - white-space: -moz-pre-wrap; /* Firefox */ - white-space: -pre-wrap; /* Opera <7 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* IE */ + .tooltip-inner{ + color: #fff; + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ + } } - /*-------------------YangUI import END-------------------*/ /*