From 985b2108a6437173d4364238c13a98d13d1c7083 Mon Sep 17 00:00:00 2001 From: Seshu-Kumar-M Date: Fri, 23 Sep 2016 21:52:17 +0800 Subject: formatting the code, removing unnecessary imports and URL patterns correction Change-Id: I44ef8d3318e222cf6cdbccfb717f22b05dd6cb01 Signed-off-by: Seshu-Kumar-M --- .../src/main/webapp/resmgr-nfv/css/RMain.css | 309 ++++---- .../src/main/webapp/resmgr-nfv/css/VMMain.css | 820 ++++++++++++--------- .../src/main/webapp/resmgr-nfv/css/resmgr.css | 28 +- .../src/main/webapp/resmgr-nfv/datacenter.html | 651 ++++++++-------- .../src/main/webapp/resmgr-nfv/html/index.html | 8 +- .../src/main/webapp/resmgr-nfv/js/SendMsg.js | 26 +- .../src/main/webapp/resmgr-nfv/js/datacenter.js | 437 ++++++----- .../src/main/webapp/resmgr-nfv/js/resmgr.js | 372 +++++----- .../src/main/webapp/resmgr-nfv/js/validateset.js | 54 +- .../src/main/webapp/resmgr-nfv/js/vim.js | 146 ++-- .../src/main/webapp/resmgr-nfv/location.html | 479 ++++++------ .../src/main/webapp/resmgr-nfv/resource.html | 94 +-- .../src/main/webapp/resmgr-nfv/vim.html | 90 +-- 13 files changed, 1833 insertions(+), 1681 deletions(-) (limited to 'openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv') diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css index 90b05a9f..43160f5a 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/RMain.css @@ -1,195 +1,224 @@ #iemp_layout_container { - padding: 0px; - margin: 1px auto; - width: 100%; - height: 100%; + padding: 0px; + margin: 1px auto; + width: 100%; + height: 100%; } + #iemp_layout_container .three-cols-layout { - width: 100%; - height: 100%; - border-collapse: collapse; - margin-left: 0px; - margin-top: 0px; - margin-right: 0px; - margin-bottom: 0px; -} + width: 100%; + height: 100%; + border-collapse: collapse; + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; +} + #iemp_layout_container .three-cols-layout { - width: 100%; - height: 100%; - border-collapse: collapse; - margin-left: 0px; - margin-top: 0px; - margin-right: 0px; - margin-bottom: 0px; -} + width: 100%; + height: 100%; + border-collapse: collapse; + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; +} + #iemp_layout_container .three-cols-column.three-cols-left { - width: 215px; - background-color: #f5f5f5; + width: 215px; + background-color: #f5f5f5; } + .accordion_parent { - position: relative; - width: 220px; - background-color: #f5f5f5; + position: relative; + width: 220px; + background-color: #f5f5f5; } + .openo-accordion-resizable-handle { - z-index: 1!important; - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; - position: absolute; - font-size: .1px; - display: block; -} + z-index: 1 !important; + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; + position: absolute; + font-size: .1px; + display: block; +} + .openoAccordian_accordionmenu { - width: 100%; - margin: 0; - padding: 0; - list-style-type: none; - line-height: 17px; + width: 100%; + margin: 0; + padding: 0; + list-style-type: none; + line-height: 17px; } + .openoAccordian_accordionmenu li { - min-width: 75px; - margin: 0; - padding: 0; - list-style-type: none; - color: #000; - clear: both; -} + min-width: 75px; + margin: 0; + padding: 0; + list-style-type: none; + color: #000; + clear: both; +} + .openo_accordion_ui-icon-collapse, .openo_accordion_ui-icon-expand { - display: block; - float: left; - margin-bottom: -1px; - border-bottom: 1px solid #e5e5e5; - cursor: pointer; - width: 13px; - padding-top: 26px; + display: block; + float: left; + margin-bottom: -1px; + border-bottom: 1px solid #e5e5e5; + cursor: pointer; + width: 13px; + padding-top: 26px; } + .openo_accordion_ui-icon-expand { - background: url(../images/collapse_arrow.png) right 20px no-repeat; - margin-top: 8px; + background: url(../images/collapse_arrow.png) right 20px no-repeat; + margin-top: 8px; } -.openo_accordion_ui-icon-expand.current{ - background: url(../images/expand_arrow.png) right 20px no-repeat; + +.openo_accordion_ui-icon-expand.current { + background: url(../images/expand_arrow.png) right 20px no-repeat; } + .openoAccordian_showHideArrow_hide, .openoAccordian_showHideArrow_show { - display: block; - position: absolute; - right: 0; - top: 4px; - width: 18px; - height: 41px; - cursor: pointer; - background-color: #f5f5f5; + display: block; + position: absolute; + right: 0; + top: 4px; + width: 18px; + height: 41px; + cursor: pointer; + background-color: #f5f5f5; } + .openoAccordian_showHideArrow_hide { - background-image: url(../images/openo.png); - background-position: -7px 0!important; - border-collapse: separate; - /*box-shadow: inset -1px 0 0 #e5e5e5;*/ + background-image: url(../images/openo.png); + background-position: -7px 0 !important; + border-collapse: separate; + /*box-shadow: inset -1px 0 0 #e5e5e5;*/ } + a.header.opened, a.header.closed { - font-size: 16px; - padding-top: 24px; - padding-bottom: 25px; - color: #999999; + font-size: 16px; + padding-top: 24px; + padding-bottom: 25px; + color: #999999; } + .openoAccordian_accordionmenu .closed, .openoAccordian_accordionmenu .opened { - padding-right: 10px; - background-position: 98% 50%; - background-repeat: no-repeat; + padding-right: 10px; + background-position: 98% 50%; + background-repeat: no-repeat; } + .openoAccordian_accordionmenu li a { - padding: 11px 10px 12px; - color: #333333; - margin-right: 1px; - margin-top: -1px; - text-align: left!important; - font-family: "Microsoft Yahei",SimSun,Arial,Tahoma; - font-size: 14px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - border-top: 1px solid #e5e5e5; - border-bottom: 1px solid #e5e5e5; - /*height: 19px;*/ -} + padding: 11px 10px 12px; + color: #333333; + margin-right: 1px; + margin-top: -1px; + text-align: left !important; + font-family: "Microsoft Yahei", SimSun, Arial, Tahoma; + font-size: 14px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + border-top: 1px solid #e5e5e5; + border-bottom: 1px solid #e5e5e5; + /*height: 19px;*/ +} + .openoAccordian_accordionmenu ul { - margin: 0; - padding: 0; - overflow: hidden; + margin: 0; + padding: 0; + overflow: hidden; } + .openoAccordian_accordionmenu a { - display: block; - text-decoration: none; + display: block; + text-decoration: none; } + a { - color: #428bca; - text-decoration: none; - background: 0 0; + color: #428bca; + text-decoration: none; + background: 0 0; } -.bar{ + +.bar { height: 834px; width: 18px; background: #f8f8f8; display: none; } -.bar span{ + +.bar span { width: 13px; height: 34px; background-image: url(../images/openo.png); - background-position: -39px 0!important; - display: block; - /*margin-top: -430px;*/ + background-position: -39px 0 !important; + display: block; + /*margin-top: -430px;*/ } -#accordionmenuid_ul_0_0_brAppTopMenuID_UL li{ + +#accordionmenuid_ul_0_0_brAppTopMenuID_UL li { cursor: pointer; } -#puer_base_openo{ + +#puer_base_openo { border: 1px solid #ddd; } + .openo_accordion_selected { - margin-left: 0; - margin-right: 0; - background: #fafafa; - border-left: 3px solid #4ac9ff!important; - box-shadow: none; - position: relative; -} -a:hover{ - color: #4ac9ff!important; -} + margin-left: 0; + margin-right: 0; + background: #fafafa; + border-left: 3px solid #4ac9ff !important; + box-shadow: none; + position: relative; +} + +a:hover { + color: #4ac9ff !important; +} + .openoAccordian_accordionmenu li.openo_accordion_selected a { - position: relative; - left: -3px; - color: #009ae7; + position: relative; + left: -3px; + color: #009ae7; } + .openo-accordion-resizable-handle { - z-index: 1!important; - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; - position: absolute; - font-size: .1px; - display: block; -} + z-index: 1 !important; + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; + position: absolute; + font-size: .1px; + display: block; +} + #iframeContainer iframe { - width: 100%; - height: 100%; - border: 0; + width: 100%; + height: 100%; + border: 0; } + #accordionContent, #iframeContainer { - margin: 0; - padding: 0; - border: 0; - width: 100%; - height: 100%; + margin: 0; + padding: 0; + border: 0; + width: 100%; + height: 100%; } + .openoAccordian_showHideArrow_show { - background-image: url(../images/openo.png); - background-position: -39px 0!important; - box-shadow: inset 1px 0 0 #e5e5e5,inset -1px 0 0 #e5e5e5; + background-image: url(../images/openo.png); + background-position: -39px 0 !important; + box-shadow: inset 1px 0 0 #e5e5e5, inset -1px 0 0 #e5e5e5; } \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css index 8d1db5ae..25653069 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/VMMain.css @@ -1,56 +1,65 @@ -body{ +body { font-family: '微软雅黑'; font-size: 12px; color: #333; background: #fafafa; } -button{ + +button { outline: none; } -ul,li{ + +ul, li { list-style: none; - padding:0; - margin:0; + padding: 0; + margin: 0; } -.titleFont{ + +.titleFont { font-size: 16px; } -.separator-line{ + +.separator-line { height: 1px; width: 100%; - border:1px solid #ddd; + border: 1px solid #ddd; margin: 6px 0 15px 0; } -.uploadBtn{ + +.uploadBtn { overflow: hidden; } + .creat-btn { - padding: 0 14px; - height: 24px; + padding: 0 14px; + height: 24px; float: left; cursor: pointer; text-decoration: none; outline: 0; border: 1px solid #d3d3d3; text-align: center; - box-shadow: 0 1px 1px rgba(0,0,0,.05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); background: #fafafa; - background: -moz-linear-gradient(top,#fff,#fafafa); - background: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#fafafa)); - background: -webkit-linear-gradient(top,#fff,#fafafa); - background: linear-gradient(to bottom,#fff,#fafafa); + background: -moz-linear-gradient(top, #fff, #fafafa); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(100%, #fafafa)); + background: -webkit-linear-gradient(top, #fff, #fafafa); + background: linear-gradient(to bottom, #fff, #fafafa); border-radius: 6px; background: #fff url(../images/add.png) no-repeat 5px center; padding-left: 20px; } + .creat-btn:hover { - color: #009ae7; - border: 1px solid #4AC9FF + color: #009ae7; + border: 1px solid #4AC9FF } + .creat-btn:active { - color: #000; - border: 1px solid #4AC9FF + color: #000; + border: 1px solid #4AC9FF } + /*.creat-btn{ background: #fff url(../image/add.png) no-repeat 5px center; border: 1px solid #ddd; @@ -61,110 +70,130 @@ ul,li{ color: #fff; border:1px solid #428bca; }*/ -.search{ +.search { width: 310px; height: 30px; - float:right; + float: right; } -.search-text{ + +.search-text { width: 250px; float: left; margin-right: 6px; } -.search-btn{ + +.search-btn { height: 30px; background: #fff; border: 1px solid #ddd; float: left; } -#ict_virtualApplication_table_div{ + +#ict_virtualApplication_table_div { margin-top: 15px; } -.table>thead>tr.active>th{ - border: 1px solid #ddd!important; + +.table > thead > tr.active > th { + border: 1px solid #ddd !important; border-bottom: 0; background: #f0f0f0; } + /*.table tbody tr:hover{ background: #e6fbe0!important; }*/ -.table tbody tr:last-child{ +.table tbody tr:last-child { border-bottom: 1px solid #ddd; } -.table-btn{ + +.table-btn { border: 1px solid #ccc; border-radius: 3px; } -.delete-btn{ + +.delete-btn { background: url(../image/delete.png) no-repeat; width: 16px; height: 16px; border: none; } -.detail-btn{ + +.detail-btn { background: url(../image/openo.png) no-repeat -343px -283px; width: 16px; height: 16px; border: none; } -.detail-btn.current{ - background-position: -7px -314px; + +.detail-btn.current { + background-position: -7px -314px; } -.detail{ + +.detail { height: 200px; border: 1px solid #ddd; margin-top: 60px; } -.detail-top ul{ +.detail-top ul { height: 50px; line-height: 50px; border-bottom: 1px solid #ddd; padding-left: 0px; - background: #fafafa; + background: #fafafa; } -.detail-top ul li{ - float:left; + +.detail-top ul li { + float: left; width: 120px; text-align: center; border-right: 1px solid #ddd; cursor: pointer; } -.detail-top ul li.current{ + +.detail-top ul li.current { background: #fff; } -.vmapp-margin{ + +.vmapp-margin { margin-bottom: 10px; } -.control-label .required{ + +.control-label .required { color: #e02222; font-size: 12px; padding-left: 2px; } -.form-group .control-label{ + +.form-group .control-label { font-size: 12px; font-weight: 400; } -legend{ + +legend { font-size: 12px; font-weight: bold; } -.pageGro{ + +.pageGro { width: 250px; float: right; } -.pageUp,.pageDown,.pageList,.pageList li{ + +.pageUp, .pageDown, .pageList, .pageList li { float: left; cursor: pointer; } -.pageUp,.pageDown{ + +.pageUp, .pageDown { width: 60px; height: 30px; border: 1px solid #ddd; text-align: center; line-height: 30px; } -.pageList li{ + +.pageList li { width: 30px; height: 30px; border: 1px solid #ddd; @@ -172,466 +201,543 @@ legend{ line-height: 30px; border-left: none; } -.pageList li.active{ + +.pageList li.active { background: #428bca; color: #fff; border-color: #428bca; } -.pageDown{ + +.pageDown { border-left: none; } -.headerLinkP{ + +.headerLinkP { padding-top: 17px; } -.headerLinkP span{ + +.headerLinkP span { font-size: 12px; color: #666; - font-weight: normal!important; + font-weight: normal !important; } -label{ - font-weight: normal!important; + +label { + font-weight: normal !important; } + table.userform tbody tr td { - display: table-cell; - padding-right: 10px; - padding-top: 10px; - font-size: 12px; - color: #333; + display: table-cell; + padding-right: 10px; + padding-top: 10px; + font-size: 12px; + color: #333; } -.table th,.table td{ - padding-top: 3px!important; - padding-bottom: 3px!important; + +.table th, .table td { + padding-top: 3px !important; + padding-bottom: 3px !important; } + .openoBrowseButton_element { - display: table; + display: table; } + .openo { - font-family: "Microsoft Yahei",SimSun,Arial,Tahoma; - font-size: 12px; - color: #000; + font-family: "Microsoft Yahei", SimSun, Arial, Tahoma; + font-size: 12px; + color: #000; } + .openoBrowseButton_input { - width: 198px; - position: relative; - border: 1px solid #c3c3c3!important; - height: 26px; - background-color: #f3f3f3; - border-radius: 4px 0 0 4px; - border-right: none; - padding: 0; + width: 198px; + position: relative; + border: 1px solid #c3c3c3 !important; + height: 26px; + background-color: #f3f3f3; + border-radius: 4px 0 0 4px; + border-right: none; + padding: 0; } + .buttonClassDefault, .buttonClassDefault:active { - cursor: pointer; - background-image: url(../images/openo.png); - background-position: -154px -7px!important; + cursor: pointer; + background-image: url(../images/openo.png); + background-position: -154px -7px !important; } + .openoBrowseButton_button { - width: 27px; - border: 0; - float: right; - position: relative; - height: 26px; - right: 0; - top: 0; - border-radius: 0 4px 4px 0; - border-right: 1px solid #c3c3c3; - border-left: none; + width: 27px; + border: 0; + float: right; + position: relative; + height: 26px; + right: 0; + top: 0; + border-radius: 0 4px 4px 0; + border-right: 1px solid #c3c3c3; + border-left: none; } + .openo .openo-input, .openo.openo-input { - outline: 0; - border: 1px solid #c3c3c3; - box-shadow: 1px 1px #f6f6f6 inset; - background-color: #fff; - height: 26px; + outline: 0; + border: 1px solid #c3c3c3; + box-shadow: 1px 1px #f6f6f6 inset; + background-color: #fff; + height: 26px; } + .openoInput_openoDefaultText { - padding: 0 0 0 6px; - border-radius: 4px; - color: #000; - display: inline-block; - outline: 0; - box-shadow: 1px 1px #f6f6f6 inset; - font-size: 12px; - background: #fff; + padding: 0 0 0 6px; + border-radius: 4px; + color: #000; + display: inline-block; + outline: 0; + box-shadow: 1px 1px #f6f6f6 inset; + font-size: 12px; + background: #fff; } + div.openo-select { - border: 1px solid #c3c3c3; - border-radius: 4px; - background: url(../images/arrow-down-enable.png) right no-repeat #fff; - line-height: 24px; - padding-left: 3px; - display: block; -} -div.openo-select>input.openo-select-input { - border: none; - outline: 0; - line-height: 21px; - height: 21px; - padding-left: 3px; - border-right: solid 1px #c3c3c3; + border: 1px solid #c3c3c3; + border-radius: 4px; + background: url(../images/arrow-down-enable.png) right no-repeat #fff; + line-height: 24px; + padding-left: 3px; + display: block; +} + +div.openo-select > input.openo-select-input { + border: none; + outline: 0; + line-height: 21px; + height: 21px; + padding-left: 3px; + border-right: solid 1px #c3c3c3; } + .openo .openo-ellipsis, .openo.openo-ellipsis { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } + a.openoButton_buttonClass, a.openoButton_buttonDisableClass, div.openoButton_buttonClass, div.openoButton_buttonDisableClass { - height: 26px; - float: left; - cursor: pointer; - text-decoration: none; - outline: 0; - border: 1px solid #d3d3d3; - text-align: center; - box-shadow: 0 1px 1px rgba(0,0,0,.05); - background: #fafafa; - background: -moz-linear-gradient(top,#fff,#fafafa); - background: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#fafafa)); - background: -webkit-linear-gradient(top,#fff,#fafafa); - background: linear-gradient(to bottom,#fff,#fafafa); - border-radius: 6px; -} -.openoButton_buttonInnerClass{ - padding: 0 19px; - border-radius: 6px; + height: 26px; + float: left; + cursor: pointer; + text-decoration: none; + outline: 0; + border: 1px solid #d3d3d3; + text-align: center; + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + background: #fafafa; + background: -moz-linear-gradient(top, #fff, #fafafa); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(100%, #fafafa)); + background: -webkit-linear-gradient(top, #fff, #fafafa); + background: linear-gradient(to bottom, #fff, #fafafa); + border-radius: 6px; +} + +.openoButton_buttonInnerClass { + padding: 0 19px; + border-radius: 6px; } + .openoButton_buttonCenterText { - color: #000; - line-height: 24px; - white-space: nowrap; - width: auto!important; + color: #000; + line-height: 24px; + white-space: nowrap; + width: auto !important; } + .userHeader { - clear: left; - overflow: hidden; - margin-bottom: 10px; - padding: 10px 10px 0px 0px; + clear: left; + overflow: hidden; + margin-bottom: 10px; + padding: 10px 10px 0px 0px; } + .openoButton_buttonGroupClass { - display: inline; + display: inline; } + .openoButton_buttonGroupClass div.openoButton_buttonClass_parent:first-child { - margin-left: 0; + margin-left: 0; } + .openoButton_buttonLeftImg { - margin-right: 5px; + margin-right: 5px; } + .openoButton_buttonLeftImg, .openoButton_buttonRightImg { - display: inline-block; - vertical-align: top; - width: 16px; - height: 16px; - margin-top: 4px; + display: inline-block; + vertical-align: top; + width: 16px; + height: 16px; + margin-top: 4px; } + .openo-table-pagination-wrapper { - height: 37px; + height: 37px; } + .openo-pagination { - display: block; - float: left; - overflow: hidden; - padding: 5px 0 0; - margin-top: 8px; + display: block; + float: left; + overflow: hidden; + padding: 5px 0 0; + margin-top: 8px; } + .openoPagination_openoPaginationLengthOptions:not(msie8) { - line-height: 24px; + line-height: 24px; } + .openoPagination_openoPaginationLengthOptions { - white-space: normal; - height: 24px; - float: left; - outline: 0; - line-height: 20px; - margin: 0 5px; + white-space: normal; + height: 24px; + float: left; + outline: 0; + line-height: 20px; + margin: 0 5px; } + .openo-pagination-select { - height: 26px; - line-height: 22px; - text-align: center; - margin-right: -2px; - border: 1px solid #e0e0e0; - border-radius: 5px 0 0 5px; - padding: 1px; + height: 26px; + line-height: 22px; + text-align: center; + margin-right: -2px; + border: 1px solid #e0e0e0; + border-radius: 5px 0 0 5px; + padding: 1px; } + .openoPagination_openoPaginationLengthOptions span { - background-color: #fff!important; + background-color: #fff !important; } + .openo-pagination-theme a, .openo-pagination-theme span { - float: left; - color: #666; - font: 12px Lucida Grande,Verdana,Arial,Helvetica,sans-serif; - line-height: 24px; - font-weight: 400; - text-align: center; - border: 1px solid #e0e0e0; - text-decoration: none!important; - padding: 0 7px; - border-radius: 3px; - background: #fff; + float: left; + color: #666; + font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif; + line-height: 24px; + font-weight: 400; + text-align: center; + border: 1px solid #e0e0e0; + text-decoration: none !important; + padding: 0 7px; + border-radius: 3px; + background: #fff; } + .openo-pagination-selectspan { - background: url(../images/ideo_default_select.png) left no-repeat!important; - float: right!important; - width: 26px; - height: 26px; - cursor: pointer; + background: url(../images/ideo_default_select.png) left no-repeat !important; + float: right !important; + width: 26px; + height: 26px; + cursor: pointer; } + .openo-pagination-theme label { - padding-top: 6px; - vertical-align: middle; - margin-right: 20px; - margin-top: -1px; - float: left; - display: inline-block; - height: 20px; - font: 12px Lucida Grande,Verdana,Arial,Helvetica,sans-serif; + padding-top: 6px; + vertical-align: middle; + margin-right: 20px; + margin-top: -1px; + float: left; + display: inline-block; + height: 20px; + font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif; } + .openo-pagination li, .openo-pagination ul { - list-style: none; - padding: 0; - margin: 0; - float: left; + list-style: none; + padding: 0; + margin: 0; + float: left; } + dd, dl, dt, li { - color: #000; + color: #000; } + .openo-pagination-theme a, .openo-pagination-theme span.current { - margin: 0 5px 0 0; + margin: 0 5px 0 0; } + .openo .openo-disabled, .openo.openo-disabled { - border-color: #c3c3c3!important; - color: #666!important; - opacity: .3; - filter: alpha(opacity=30); + border-color: #c3c3c3 !important; + color: #666 !important; + opacity: .3; + filter: alpha(opacity=30); } + .openo-pagination-theme .prev { - background: 0 0; - float: left; + background: 0 0; + float: left; } + .openo-pagination-theme .current { - text-decoration: none!important; - float: left; - padding-left: 6px; - height: 24px; - color: #fff; - display: inline; - border-color: #00adf5; - background: #4ad2ff; + text-decoration: none !important; + float: left; + padding-left: 6px; + height: 24px; + color: #fff; + display: inline; + border-color: #00adf5; + background: #4ad2ff; } + .openo-pagination-theme a, .openo-pagination-theme span { - float: left; - color: #666; - font: 12px Lucida Grande,Verdana,Arial,Helvetica,sans-serif; - line-height: 24px; - font-weight: 400; - text-align: center; - border: 1px solid #e0e0e0; - text-decoration: none!important; - padding: 0 7px; - border-radius: 3px; - background: #fff; + float: left; + color: #666; + font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif; + line-height: 24px; + font-weight: 400; + text-align: center; + border: 1px solid #e0e0e0; + text-decoration: none !important; + padding: 0 7px; + border-radius: 3px; + background: #fff; } + .openo-pagination-theme .prev.openo-disabled:before { - background: url(../images/page_left_disabled.png) 50% 45% no-repeat; + background: url(../images/page_left_disabled.png) 50% 45% no-repeat; } + .openo-pagination-theme .prev.openo-disabled:before { - background: url(../images/page_left_disabled.png) 50% 45% no-repeat; + background: url(../images/page_left_disabled.png) 50% 45% no-repeat; } + .openo-pagination-theme .prev:before { - background: url(../images/page_l.png) 50% 45% no-repeat; + background: url(../images/page_l.png) 50% 45% no-repeat; } + .openo-pagination-theme .next:after, .openo-pagination-theme .prev:before { - display: inline-block; - content: ""; - vertical-align: middle; - width: 10px; - height: 24px; + display: inline-block; + content: ""; + vertical-align: middle; + width: 10px; + height: 24px; } + .openo-pagination-theme .prev:before { - background: url(../images/page_l.png) 50% 45% no-repeat; + background: url(../images/page_l.png) 50% 45% no-repeat; } + .openo-pagination-theme .next:after, .openo-pagination-theme .prev:before { - display: inline-block; - content: ""; - vertical-align: middle; - width: 10px; - height: 24px; + display: inline-block; + content: ""; + vertical-align: middle; + width: 10px; + height: 24px; } + pagination ul { - list-style: none; - padding: 0; - margin: 0; - float: left; + list-style: none; + padding: 0; + margin: 0; + float: left; } + .openo-pagination li, .openo-pagination ul { - list-style: none; - padding: 0; - margin: 0; - float: left; + list-style: none; + padding: 0; + margin: 0; + float: left; } + .openoPagination_gototext { - background: #FFF; - outline: 0; - width: 29px; - float: left; - height: 26px; - line-height: 24px; - border-radius: 4px; - border: 1px solid #c3c3c3; - padding: 0 0 0 5px; - margin: 0; - color: #666; - min-width: 50px; + background: #FFF; + outline: 0; + width: 29px; + float: left; + height: 26px; + line-height: 24px; + border-radius: 4px; + border: 1px solid #c3c3c3; + padding: 0 0 0 5px; + margin: 0; + color: #666; + min-width: 50px; } + .openoPagination_gotoimage { - width: 29px; - height: 26px; - line-height: 26px; - background-color: #FFF; - background-image: url(/portal/themes/default/components/openo/images/openo.png); - padding-left: 21px; - float: left; - margin-left: 5px; - border: 1px solid #e0e0e0; - border-radius: 4px; - box-sizing: border-box; - -moz-box-sizing: border-box; - background-position: -184px -181px!important; + width: 29px; + height: 26px; + line-height: 26px; + background-color: #FFF; + background-image: url(/portal/themes/default/components/openo/images/openo.png); + padding-left: 21px; + float: left; + margin-left: 5px; + border: 1px solid #e0e0e0; + border-radius: 4px; + box-sizing: border-box; + -moz-box-sizing: border-box; + background-position: -184px -181px !important; } + .openo-pagination-theme .ellipse { - float: left; - margin-left: -8px; - margin-right: -4px; - background: 0 0; - border: none; - border-radius: 0; - box-shadow: none; - font-weight: 700; - cursor: default; + float: left; + margin-left: -8px; + margin-right: -4px; + background: 0 0; + border: none; + border-radius: 0; + box-shadow: none; + font-weight: 700; + cursor: default; } + .openo.openo-disabled { - border-color: #c3c3c3!important; - color: #666!important; - opacity: .3; - filter: alpha(opacity=30); + border-color: #c3c3c3 !important; + color: #666 !important; + opacity: .3; + filter: alpha(opacity=30); } + .openo-pagination-theme .prev { - background: 0 0; - float: left; + background: 0 0; + float: left; } + .openo-pagination-theme .current { - text-decoration: none!important; - float: left; - padding-left: 6px; - height: 26px; - color: #fff; - display: inline; - /*border-color: #00adf5; - background: #4ad2ff;*/ + text-decoration: none !important; + float: left; + padding-left: 6px; + height: 26px; + color: #fff; + display: inline; + /*border-color: #00adf5; + background: #4ad2ff;*/ border: 1px solid #e0e0e0; } + .openo-pagination-theme .next:after { - background: url(../images/page_r.png) 50% 45% no-repeat; + background: url(../images/page_r.png) 50% 45% no-repeat; } + .openoButton_buttonGroupClass div.openoButton_buttonClass_parent, .openoButton_buttonRightImg { - margin-left: 5px; + margin-left: 5px; } html, body { - height: 99%; - width: 98%; + height: 99%; + width: 98%; } + .cotentBody { - padding: 0px 20px 0px 20px; + padding: 0px 20px 0px 20px; } div.openoButton_buttonClass:hover { - border: 1px solid #4ac9ff; + border: 1px solid #4ac9ff; } + div.openoButton_button_default:hover .openoButton_buttonCenterText { - color: #009ae7; + color: #009ae7; } + .header_lineimg { - height: 1px; - width: 100%; - margin-top: 17px; + height: 1px; + width: 100%; + margin-top: 17px; } + .openo.openo-hide { - display: none; + display: none; } + div.openo-select-popup-container { - position: absolute; - border: 1px solid #4ac9ff; - border-top: none; - border-radius: 0 0 4px 4px; - max-height: 202px; - overflow-y: auto; - background-color: #fff; - z-index: 880; -} -div.openo-select-popup-container>div.openo-select-item { - display: block; + position: absolute; + border: 1px solid #4ac9ff; + border-top: none; + border-radius: 0 0 4px 4px; + max-height: 202px; + overflow-y: auto; + background-color: #fff; + z-index: 880; +} + +div.openo-select-popup-container > div.openo-select-item { + display: block; } + .openo .openo-ellipsis, .openo.openo-ellipsis { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } -div.openo-select-popup-container>div.openo-select-item>label { - padding-top: 3px; - padding-bottom: 3px; - line-height: 20px; + +div.openo-select-popup-container > div.openo-select-item > label { + padding-top: 3px; + padding-bottom: 3px; + line-height: 20px; } + .openo .openo-ellipsis, .openo.openo-ellipsis { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } + .openo-select-item label { - margin-left: 4px; - margin-right: 4px; - white-space: nowrap; + margin-left: 4px; + margin-right: 4px; + white-space: nowrap; } -div.openo-select-popup-container>div.openo-select-item.openo-item-selected, div.openo-select-popup-container>div.openo-select-item:hover { - background-color: #f1f1f1; - color: #008fd6; + +div.openo-select-popup-container > div.openo-select-item.openo-item-selected, div.openo-select-popup-container > div.openo-select-item:hover { + background-color: #f1f1f1; + color: #008fd6; } + div.openo-select.openo-focus { - border: 1px solid #4ac9ff; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - border-bottom-color: #ddd; + border: 1px solid #4ac9ff; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom-color: #ddd; } + .openo-pagination-theme a:hover { - border-color: #4ac9ff; - cursor: pointer; + border-color: #4ac9ff; + cursor: pointer; } -.SDBtn{ - background: #fff; - color: #333; - border: 1px solid #ddd; + +.SDBtn { + background: #fff; + color: #333; + border: 1px solid #ddd; } -.SDBtn:hover{ - color: #009ae7; - border: 1px solid #4AC9FF + +.SDBtn:hover { + color: #009ae7; + border: 1px solid #4AC9FF } + table tbody tr.even:hover td, table tbody tr.odd:hover td { - background-color: #e6fbe0; + background-color: #e6fbe0; } + table tr.openoTable_row_selected td { - background: #e8f8fe!important; - border-bottom: 1px solid #e8e8e8!important; + background: #e8f8fe !important; + border-bottom: 1px solid #e8e8e8 !important; } -.modal-body{ - padding: 0!important; + +.modal-body { + padding: 0 !important; } -.form-control{ - height: 26px!important; + +.form-control { + height: 26px !important; } + .form-group .control-label { - margin-left: 20px; + margin-left: 20px; } .form-horizontal .control-label { - text-align: left; + text-align: left; } \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css index 6163952f..e79d125a 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/css/resmgr.css @@ -1,20 +1,24 @@ -fieldset{ width: 680px; } +fieldset { + width: 680px; +} -legend{ margin-left: 8px; } +legend { + margin-left: 8px; +} -.item{ +.item { height: 56px; line-height: 36px; margin: 10px; } -.item .item-label{ +.item .item-label { float: left; width: 80px; text-align: right; } -.item-text{ +.item-text { float: left; width: 244px; height: 16px; @@ -24,7 +28,7 @@ legend{ margin-left: 8px; } overflow: hidden; } -.item-select{ +.item-select { float: left; height: 34px; border: 1px solid #ccc; @@ -33,19 +37,19 @@ legend{ margin-left: 8px; } padding: 6px 0px; } -.item-submit{ +.item-submit { margin-left: 88px; } -input.error{ +input.error { border: 1px solid #E6594E; } -input.highlight{ +input.highlight { border: 1px solid #7abd54; } -label.error,label.tip{ +label.error, label.tip { float: left; height: 32px; line-height: 32px; @@ -57,12 +61,12 @@ label.error,label.tip{ background: url('error.png') no-repeat left center; } -label.tip{ +label.tip { color: #aaa; background: url('tip.png') no-repeat left center; } -label.valid{ +label.valid { background: url('valid.png') no-repeat left center; width: 32px; } \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html index cac3a83c..451d2f4c 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/datacenter.html @@ -1,339 +1,346 @@ - - - - - - - + + + + + + - - - - - + + + + + - + - - - + function operateFormatter(value, row, index) { + return [''] + .join(''); + + } + window.operateEvents = { + 'click .DatacenterDeleteImg': function (e, value, row, index) { + deleteDatacenter(row.id); + console.log(value, row, index); + } + }; + + + + - - - - -
-
- -
-
-
-
-
- - - - - - - - - - -
IdNameCpuMemoryHardDisk
-
-
-
-
-
- -
-
- -
-
-
-
- - - - - - - - - -
IdNameNetworkIDStatus
-
-
-
-
-
- -
-
- -
-
-
-
- - - - - - - - - - - - - -
IdNameNetworkIDVLanIDphysicalNettypeServiceNamestatus
-
-
-
-
-
-
-
- -
-
-
-
-
+ $('#dcTab a').click(function (e) { + e.preventDefault();//prevent the link + $(this).tab('show');//show content + }) + }) + +
+ +
+ +
+
+
+
+
+ + + + + + + + + + +
IdNameCpuMemoryHardDisk
+
+
+
+
+
+ +
+
+ +
+
+
+
+ + + + + + + + + +
IdNameNetworkIDStatus
+
+
+
+
+
+ +
+
+ +
+
+
+
+ + + + + + + + + + + + + +
IdNameNetworkIDVLanIDphysicalNettypeServiceNamestatus
+
+
+
+
+
+
+
+ +
+
+
+
+
Create Datacenter -
-
- - - + + + - -
-
-
- -
-
-
-
- - - - - - - - - - - - - - - -
IdNameStatusCountryLocationServiceNameCpu(Cores)Memory(MB)HardDisk(GB)Action
-
-
-
-
- - -
-
+ class="openo-widget-button-image openoButton_buttonImgDefault">Edit +
+
+ +
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + +
IdNameStatusCountryLocationServiceNameCpu(Cores)Memory(MB)HardDisk(GB)Action +
+
+
+
+
+ + +
+
\ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/html/index.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/html/index.html index c4009b77..300a4470 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/html/index.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/html/index.html @@ -18,14 +18,14 @@ -Test - - + Test + + Loading... diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js index b898d6ad..e42c0333 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/SendMsg.js @@ -1,20 +1,20 @@ var sendMsg = { - get : "get", - post : "post" + get: "get", + post: "post" } function request(url, requestType, data, success, error, async) { - var setting = { - url : url, - async : async ? async : false, - type : requestType, - dataType : "json", - contentType : 'application/json;charset=UTF-8', - data : data, - success : success, - error : error - } + var setting = { + url: url, + async: async ? async : false, + type: requestType, + dataType: "json", + contentType: 'application/json;charset=UTF-8', + data: data, + success: success, + error: error + } - $.ajax(setting); + $.ajax(setting); } \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js index 44b464e3..e3ff681a 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/datacenter.js @@ -1,247 +1,246 @@ -function hideFirstCol(){ +function hideFirstCol() { // $('table tr').find('th:eq(0)').hide(); // $('table tr').find('td:eq(0)').hide(); } function deleteDatacenter(objectId) { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters/"+ objectId; - $.ajax({ - type : "DELETE", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $('#Datacenter_table').bootstrapTable('remove', { - field : 'id', - values : [ objectId ] - }); - bootbox.alert("Delete successfull !!!"); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on deleting data: " + xhr.responseText); - } - }); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters/" + objectId; + $.ajax({ + type: "DELETE", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $('#Datacenter_table').bootstrapTable('remove', { + field: 'id', + values: [objectId] + }); + bootbox.alert("Delete successfull !!!"); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on deleting data: " + xhr.responseText); + } + }); } function loadDatacenterData() { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters"; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $.each(jsonobj.datacenters,function(n,v){ - v.cpu= "used:"+v.usedCPU+"
total:"+v.totalCPU; - v.memory="used:"+v.usedMemory+"
total:"+v.totalMemory; - v.hardDisk="used:"+v.usedDisk+"
total:"+v.totalDisk; + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $.each(jsonobj.datacenters, function (n, v) { + v.cpu = "used:" + v.usedCPU + "
total:" + v.totalCPU; + v.memory = "used:" + v.usedMemory + "
total:" + v.totalMemory; + v.hardDisk = "used:" + v.usedDisk + "
total:" + v.totalDisk; + }); + $('#Datacenter_table').bootstrapTable({ + data: jsonobj.datacenters }); - $('#Datacenter_table').bootstrapTable({ - data : jsonobj.datacenters - }); - $('#Datacenter_table').bootstrapTable('refresh'); - hideFirstCol(); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting site data : " + xhr.responseText); - } - }); + $('#Datacenter_table').bootstrapTable('refresh'); + hideFirstCol(); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting site data : " + xhr.responseText); + } + }); } function loadNetWorkData() { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/networks"; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $('#network_table').bootstrapTable({ - data : jsonobj.networks - }); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting site data : " + xhr.responseText); - } - }); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/networks"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $('#network_table').bootstrapTable({ + data: jsonobj.networks + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting site data : " + xhr.responseText); + } + }); } function loadPortData() { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/ports"; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $('#port_table').bootstrapTable({ - data : jsonobj.ports - }); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting site data : " + xhr.responseText); - } - }); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/ports"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $('#port_table').bootstrapTable({ + data: jsonobj.ports + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting site data : " + xhr.responseText); + } + }); } function loadHostData() { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/hosts"; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $('#host_table').bootstrapTable({ - data : jsonobj.hosts - }); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting site data : " + xhr.responseText); - } - }); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/hosts"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $('#host_table').bootstrapTable({ + data: jsonobj.hosts + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting site data : " + xhr.responseText); + } + }); } function fillCountryData() { - - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/country"; - var htmlContent = ""; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - var str = jsonobj.data.replace('[','').replace(']','').split(',') - $.each(str,function(n,v){ - htmlContent += ""; - $("#country").html(htmlContent); - - }); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting country data : " + xhr.responseText); - } - }); + + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/country"; + var htmlContent = ""; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + var str = jsonobj.data.replace('[', '').replace(']', '').split(',') + $.each(str, function (n, v) { + htmlContent += ""; + $("#country").html(htmlContent); + + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting country data : " + xhr.responseText); + } + }); } function fillVimNameData() { - - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/cloudservice"; - var htmlContent = ""; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - var str = jsonobj.data.replace('[','').replace(']','').split(',') - $.each(str,function(n,v){ - htmlContent += ""; - $("#vimName").html(htmlContent); - + + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/cloudservice"; + var htmlContent = ""; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + var str = jsonobj.data.replace('[', '').replace(']', '').split(',') + $.each(str, function (n, v) { + htmlContent += ""; + $("#vimName").html(htmlContent); + }); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting country data : " + xhr.responseText); - } - }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting country data : " + xhr.responseText); + } + }); } -$(function() { - $("#vmAppForm").validate({ - rules: { - country: "required", - location: "required", - lantitude: "required", - longitude: "required" - } - }); - - $('.close,.button-previous').click(function() { - $('#vmAppDialog').removeClass('in').css('display', 'none'); - }); - $('.detail-top ul li').click(function() { - $(this).addClass('current').siblings().removeClass('current'); - }); - $('.basic').click(function() { - $('#flavorTab').css('display', 'none'); - }); - - $('.table tbody tr').click( - function() { - $(this).addClass('openoTable_row_selected').siblings() - .removeClass('openoTable_row_selected'); - }); - $('.table tr:odd').addClass('active'); - $('#false').click(function() { - $('#vmAppForm')[0].reset(); - $('#vmAppDialog').addClass('in').css({ - 'display' : 'block' - }); - }); - $('.close,.button-previous').click(function() { - $('#vmAppDialog').removeClass('in').css('display', 'none'); - }); - - $.fn.serializeObject = function() { - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name] !== undefined) { - if (!o[this.name].push) { - o[this.name] = [ o[this.name] ]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; - }; - $('#createDatacenter') - .click( - function() { - - - var formData = JSON.stringify($("#vmAppForm").serializeObject()); - var jsonobj = JSON.parse(formData); - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters"; - $.ajax({ - type : "POST", - url : requestUrl, - contentType : "application/json", - dataType : "json", - data : formData, - success : function(jsonResp) { - loadDatacenterData(); - bootbox.alert(jsonResp.msg); - $('#vmAppDialog').removeClass('in').css({ - 'display' : 'none' - }); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on page : " + xhr.responseText); - } - }); - }); - - $('#country').change(function(){ - var country = $(this).children('option:selected').val(); - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/locationbycountry?country="+country; - - var htmlContent = ""; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $.each(jsonobj.data,function(n,v){ - htmlContent += ""; - $("#location").html(htmlContent); - - }); - - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting location data : " + xhr.responseText); - } - }); - - }) - - +$(function () { + $("#vmAppForm").validate({ + rules: { + country: "required", + location: "required", + lantitude: "required", + longitude: "required" + } + }); + + $('.close,.button-previous').click(function () { + $('#vmAppDialog').removeClass('in').css('display', 'none'); + }); + $('.detail-top ul li').click(function () { + $(this).addClass('current').siblings().removeClass('current'); + }); + $('.basic').click(function () { + $('#flavorTab').css('display', 'none'); + }); + + $('.table tbody tr').click( + function () { + $(this).addClass('openoTable_row_selected').siblings() + .removeClass('openoTable_row_selected'); + }); + $('.table tr:odd').addClass('active'); + $('#false').click(function () { + $('#vmAppForm')[0].reset(); + $('#vmAppDialog').addClass('in').css({ + 'display': 'block' + }); + }); + $('.close,.button-previous').click(function () { + $('#vmAppDialog').removeClass('in').css('display', 'none'); + }); + + $.fn.serializeObject = function () { + var o = {}; + var a = this.serializeArray(); + $.each(a, function () { + if (o[this.name] !== undefined) { + if (!o[this.name].push) { + o[this.name] = [o[this.name]]; + } + o[this.name].push(this.value || ''); + } else { + o[this.name] = this.value || ''; + } + }); + return o; + }; + $('#createDatacenter') + .click( + function () { + + + var formData = JSON.stringify($("#vmAppForm").serializeObject()); + var jsonobj = JSON.parse(formData); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters"; + $.ajax({ + type: "POST", + url: requestUrl, + contentType: "application/json", + dataType: "json", + data: formData, + success: function (jsonResp) { + loadDatacenterData(); + bootbox.alert(jsonResp.msg); + $('#vmAppDialog').removeClass('in').css({ + 'display': 'none' + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on page : " + xhr.responseText); + } + }); + }); + + $('#country').change(function () { + var country = $(this).children('option:selected').val(); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/locationbycountry?country=" + country; + + var htmlContent = ""; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $.each(jsonobj.data, function (n, v) { + htmlContent += ""; + $("#location").html(htmlContent); + + }); + + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting location data : " + xhr.responseText); + } + }); + + }) + }) \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js index 24804131..a0ad9921 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/resmgr.js @@ -1,202 +1,198 @@ -function hideFirstCol(){ +function hideFirstCol() { // $('table tr').find('th:eq(0)').hide(); // $('table tr').find('td:eq(0)').hide(); } function deleteLocation(objectId) { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/"+ objectId; - $.ajax({ - type : "DELETE", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $('#location_table').bootstrapTable('remove', { - field : 'id', - values : [ objectId ] - }); - bootbox.alert("Delete successfull !!!"); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on deleting data: " + xhr.responseText); - } - }); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/" + objectId; + $.ajax({ + type: "DELETE", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $('#location_table').bootstrapTable('remove', { + field: 'id', + values: [objectId] + }); + bootbox.alert("Delete successfull !!!"); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on deleting data: " + xhr.responseText); + } + }); } function editLocation(row) { - $('#vmAppDialog').addClass('in').css({ - 'display' : 'block' - }); - $('#id').val(row.id); - $('#country').val(row.country); - $('#location').val(row.location); - $('#description').val(row.description); - $('#latitude').val(row.latitude); - $('#longitude').val(row.longitude); + $('#vmAppDialog').addClass('in').css({ + 'display': 'block' + }); + $('#id').val(row.id); + $('#country').val(row.country); + $('#location').val(row.location); + $('#description').val(row.description); + $('#latitude').val(row.latitude); + $('#longitude').val(row.longitude); } function loadLocationData() { - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations"; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - $('#location_table').bootstrapTable({ - pageSize: 50, - striped: true, - data : jsonobj.locations - }); - $('#location_table').bootstrapTable('refresh'); - - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting site data : " + xhr.responseText); - } - }); - + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + $('#location_table').bootstrapTable({ + pageSize: 50, + striped: true, + data: jsonobj.locations + }); + $('#location_table').bootstrapTable('refresh'); + + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting site data : " + xhr.responseText); + } + }); + } -$(function() { - $("#vmAppForm").validate({ - rules: { - country: "required", - location: "required", - latitude: { - required: true, - number: true - }, - longitude: { - required: true, - number: true - } - } - }); - - $('.close,.button-previous').click(function() { - $('#vmAppDialog').removeClass('in').css('display', 'none'); - }); - $('.detail-top ul li').click(function() { - $(this).addClass('current').siblings().removeClass('current'); - }); - $('.para').click(function() { - if ($('#serviceTemplateName').val() == '') { - alert('Please choose the service templet!'); - $('#flavorTab').css('display', 'none'); - } else { - $('#flavorTab').css('display', 'block'); - } - $('#basicTab').css('display', 'block'); - }); - $('.basic').click(function() { - $('#flavorTab').css('display', 'none'); - }); - - $('.table tbody tr').click( - function() { - $(this).addClass('openoTable_row_selected').siblings() - .removeClass('openoTable_row_selected'); - }); - $('.table tr:odd').addClass('active'); - $('#false').click(function() { - $('#vmAppForm')[0].reset(); - $('#vmAppDialog').addClass('in').css({ - 'display' : 'block' - }); - }); - $('.close,.button-previous').click(function() { - $('#vmAppDialog').removeClass('in').css('display', 'none'); - }); - $('#filterTpLogicalType').click( - function() { - $('#filterTpLogicalType_select_popupcontainer').toggleClass( - 'openo-hide'); - $('#filterTpLogicalType').toggleClass('openo-focus'); - var oLeft = $('#open_base_tpL_td6').offset().left; - var oTop = $('#open_base_tpL_td6').offset().top; - var oHeight = $('#open_base_tpL_td6').height(); - $('#filterTpLogicalType_select_popupcontainer').css({ - 'left' : oLeft, - 'top' : oTop + oHeight + 10 - }); - }); - $('div.openo-select-popup-container>div.openo-select-item>label').click( - function() { - var Lvalue = $(this).html(); - $('#filterTpLogicalType_select_input').attr('value', Lvalue); - $('#filterTpLogicalType_select_popupcontainer').addClass( - 'openo-hide'); - $('#filterTpLogicalType').removeClass('openo-focus'); - }); - $.fn.serializeObject = function() { - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name] !== undefined) { - if (!o[this.name].push) { - o[this.name] = [ o[this.name] ]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; - }; - $('#createLocation') - .click( - - function() { - var formData = JSON.stringify($("#vmAppForm").serializeObject()); - var jsonobj = JSON.parse(formData); - var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations"; - var requestUrl_query = "/resmgr/rest/openoapi/resmgr/v1/locations"; - if($('#id').val().length === 0){//create - - - $.ajax({ - type : "POST", - url : requestUrl, - contentType : "application/json", - dataType : "json", - data : formData, - success : function(jsonResp) { - loadLocationData(); - bootbox.alert(jsonResp.msg); - $('#vmAppDialog').removeClass('in').css({ - 'display' : 'none' - }); - - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on page : " + xhr.responseText); - } - }); - }else{//put - - - $.ajax({ - type : "PUT", - url : requestUrl, - contentType : "application/json", - dataType : "json", - data : formData, - success : function(jsonResp) { - loadLocationData(); - bootbox.alert(jsonResp.msg); - $('#vmAppDialog').removeClass('in').css({ - 'display' : 'none' - }); - - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on page : " + xhr.responseText); - } - }); - } - - }); - - - - +$(function () { + $("#vmAppForm").validate({ + rules: { + country: "required", + location: "required", + latitude: { + required: true, + number: true + }, + longitude: { + required: true, + number: true + } + } + }); + + $('.close,.button-previous').click(function () { + $('#vmAppDialog').removeClass('in').css('display', 'none'); + }); + $('.detail-top ul li').click(function () { + $(this).addClass('current').siblings().removeClass('current'); + }); + $('.para').click(function () { + if ($('#serviceTemplateName').val() == '') { + alert('Please choose the service templet!'); + $('#flavorTab').css('display', 'none'); + } else { + $('#flavorTab').css('display', 'block'); + } + $('#basicTab').css('display', 'block'); + }); + $('.basic').click(function () { + $('#flavorTab').css('display', 'none'); + }); + + $('.table tbody tr').click( + function () { + $(this).addClass('openoTable_row_selected').siblings() + .removeClass('openoTable_row_selected'); + }); + $('.table tr:odd').addClass('active'); + $('#false').click(function () { + $('#vmAppForm')[0].reset(); + $('#vmAppDialog').addClass('in').css({ + 'display': 'block' + }); + }); + $('.close,.button-previous').click(function () { + $('#vmAppDialog').removeClass('in').css('display', 'none'); + }); + $('#filterTpLogicalType').click( + function () { + $('#filterTpLogicalType_select_popupcontainer').toggleClass( + 'openo-hide'); + $('#filterTpLogicalType').toggleClass('openo-focus'); + var oLeft = $('#open_base_tpL_td6').offset().left; + var oTop = $('#open_base_tpL_td6').offset().top; + var oHeight = $('#open_base_tpL_td6').height(); + $('#filterTpLogicalType_select_popupcontainer').css({ + 'left': oLeft, + 'top': oTop + oHeight + 10 + }); + }); + $('div.openo-select-popup-container>div.openo-select-item>label').click( + function () { + var Lvalue = $(this).html(); + $('#filterTpLogicalType_select_input').attr('value', Lvalue); + $('#filterTpLogicalType_select_popupcontainer').addClass( + 'openo-hide'); + $('#filterTpLogicalType').removeClass('openo-focus'); + }); + $.fn.serializeObject = function () { + var o = {}; + var a = this.serializeArray(); + $.each(a, function () { + if (o[this.name] !== undefined) { + if (!o[this.name].push) { + o[this.name] = [o[this.name]]; + } + o[this.name].push(this.value || ''); + } else { + o[this.name] = this.value || ''; + } + }); + return o; + }; + $('#createLocation') + .click( + function () { + var formData = JSON.stringify($("#vmAppForm").serializeObject()); + var jsonobj = JSON.parse(formData); + var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations"; + var requestUrl_query = "/resmgr/rest/openoapi/resmgr/v1/locations"; + if ($('#id').val().length === 0) {//create + + + $.ajax({ + type: "POST", + url: requestUrl, + contentType: "application/json", + dataType: "json", + data: formData, + success: function (jsonResp) { + loadLocationData(); + bootbox.alert(jsonResp.msg); + $('#vmAppDialog').removeClass('in').css({ + 'display': 'none' + }); + + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on page : " + xhr.responseText); + } + }); + } else {//put + + + $.ajax({ + type: "PUT", + url: requestUrl, + contentType: "application/json", + dataType: "json", + data: formData, + success: function (jsonResp) { + loadLocationData(); + bootbox.alert(jsonResp.msg); + $('#vmAppDialog').removeClass('in').css({ + 'display': 'none' + }); + + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on page : " + xhr.responseText); + } + }); + } + + }); + }) \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js index 5b44be87..d6e47d27 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/validateset.js @@ -1,28 +1,28 @@ -$(function(){ - $.validator.setDefaults({ - onkeyup: null, - success: function(label){ - label.text('').addClass('valid'); - }, - onfocusin: function( element ) { - this.lastActive = element; - this.addWrapper(this.errorsFor(element)).hide(); - var tip = $(element).attr('tip'); - if(tip && $(element).parent().children(".tip").length === 0){ - $(element).parent().append(""); - } - $(element).addClass('highlight'); - if ( this.settings.focusCleanup ) { - if ( this.settings.unhighlight ) { - this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); - } - this.hideThese( this.errorsFor( element ) ); - } - }, - onfocusout: function( element ) { - $(element).parent().children(".tip").remove(); - $(element).removeClass('highlight'); - this.element( element ); - } - }); +$(function () { + $.validator.setDefaults({ + onkeyup: null, + success: function (label) { + label.text('').addClass('valid'); + }, + onfocusin: function (element) { + this.lastActive = element; + this.addWrapper(this.errorsFor(element)).hide(); + var tip = $(element).attr('tip'); + if (tip && $(element).parent().children(".tip").length === 0) { + $(element).parent().append(""); + } + $(element).addClass('highlight'); + if (this.settings.focusCleanup) { + if (this.settings.unhighlight) { + this.settings.unhighlight.call(this, element, this.settings.errorClass, this.settings.validClass); + } + this.hideThese(this.errorsFor(element)); + } + }, + onfocusout: function (element) { + $(element).parent().children(".tip").remove(); + $(element).removeClass('highlight'); + this.element(element); + } + }); }); \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js index 1a406f9c..6de43718 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/js/vim.js @@ -1,79 +1,79 @@ function loadVimData() { - var requestUrl = "/resmgr/rest/v1/resmanage/vim/vimInfo"; - $.ajax({ - type : "GET", - url : requestUrl, - contentType : "application/json", - success : function(jsonobj) { - printCharts(jsonobj.data[0].used.cpu, - jsonobj.data[0].total.cpu,jsonobj.data[0].used.memory,jsonobj.data[0].total.memory,jsonobj.data[0].used.disk,jsonobj.data[0].total.disk); + var requestUrl = "/resmgr/rest/v1/resmanage/vim/vimInfo"; + $.ajax({ + type: "GET", + url: requestUrl, + contentType: "application/json", + success: function (jsonobj) { + printCharts(jsonobj.data[0].used.cpu, + jsonobj.data[0].total.cpu, jsonobj.data[0].used.memory, jsonobj.data[0].total.memory, jsonobj.data[0].used.disk, jsonobj.data[0].total.disk); - }, - error : function(xhr, ajaxOptions, thrownError) { - bootbox.alert("Error on getting data (here display the test data) : " + xhr.responseText); - printCharts(11,12,21,22,31,32); - } - }); + }, + error: function (xhr, ajaxOptions, thrownError) { + bootbox.alert("Error on getting data (here display the test data) : " + xhr.responseText); + printCharts(11, 12, 21, 22, 31, 32); + } + }); } -function printCharts(v11,v12,v21,v22,v31,v32){ - var cpuChart = new Chart($("#cpuChart"), { - type : 'doughnut', - data : { - labels : ["used", "available" ], - datasets : [ { - data : [v11,v12], - backgroundColor : ["#FFCE56","#36A2EB"], - hoverBackgroundColor : ["#FFCE56","#36A2EB"] - } ] - }, - options : { - animation:{ - animateScale:true, - animateRotate:true - - } - } - }); - var memoryChart = new Chart($("#memoryChart"), { - type : 'doughnut', - data : { - labels : [ "used", "available"], - datasets : [ { - data : [v21,v22], - backgroundColor : [ "#FF6384", "#36A2EB"], - hoverBackgroundColor : [ "#FF6384", "#36A2EB"] - } ] - }, - options : { - - animation:{ - animateScale:true, - animateRotate:true - - } - } - }); - var diskChart = new Chart($("#diskChart"), { - type : 'doughnut', - data : { - labels : [ "used", "available"], - datasets : [ { - data : [v31,v32], - backgroundColor : [ "#FF6384", "green" ], - hoverBackgroundColor : [ "#FF6384", "green" ] - } ] - }, - options : { - animation:{ - animateScale:true, - animateRotate:true - - } - } - }); +function printCharts(v11, v12, v21, v22, v31, v32) { + var cpuChart = new Chart($("#cpuChart"), { + type: 'doughnut', + data: { + labels: ["used", "available"], + datasets: [{ + data: [v11, v12], + backgroundColor: ["#FFCE56", "#36A2EB"], + hoverBackgroundColor: ["#FFCE56", "#36A2EB"] + }] + }, + options: { + animation: { + animateScale: true, + animateRotate: true + + } + } + }); + var memoryChart = new Chart($("#memoryChart"), { + type: 'doughnut', + data: { + labels: ["used", "available"], + datasets: [{ + data: [v21, v22], + backgroundColor: ["#FF6384", "#36A2EB"], + hoverBackgroundColor: ["#FF6384", "#36A2EB"] + }] + }, + options: { + + animation: { + animateScale: true, + animateRotate: true + + } + } + }); + var diskChart = new Chart($("#diskChart"), { + type: 'doughnut', + data: { + labels: ["used", "available"], + datasets: [{ + data: [v31, v32], + backgroundColor: ["#FF6384", "green"], + hoverBackgroundColor: ["#FF6384", "green"] + }] + }, + options: { + animation: { + animateScale: true, + animateRotate: true + + } + } + }); } -$(function() { - loadVimData(); - +$(function () { + loadVimData(); + }) \ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html index b51c16a1..187bee32 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/location.html @@ -1,261 +1,262 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - + $('#location_table').bootstrapTable({ + //Assigning example data to table + data: jsondata + }); */ - + loadLocationData(); + }); - - - + + -
- -
-
-
-
-
+
+ +
+
+
+
+
Add Location -
-
+ style="background-image: url(images/add.png);">Add Location +
+
- -
-
-
- -
-
-
-
- - - - - - - - - - - - -
IdCountryLocationDescriptionLatitudeLongitudeAction
-
-
-
-
- - + +
+
+
+
+
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html index 702061ae..116990d8 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/resource.html @@ -1,59 +1,59 @@ - - - - + + + + -
+
@@ -66,28 +66,38 @@ -
+
-
+
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html index 31879e18..d4697da3 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-nfv/vim.html @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + -
-
-
resource using status:
-
- -
-
- -
-
- -
- -
-
-
- -
- -
+
+
+
resource using status:
+
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
\ No newline at end of file -- cgit 1.2.3-korg