Issue-id: OCS-9
authorZhaoxing <meng.zhaoxing1@zte.com.cn>
Thu, 8 Sep 2016 15:20:06 +0000 (23:20 +0800)
committerZhaoxing <meng.zhaoxing1@zte.com.cn>
Fri, 9 Sep 2016 06:18:38 +0000 (14:18 +0800)
Change-Id: I73c18bdda656c43687810930338f9a949ed08848
Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
268 files changed:
doc/java-license-header.txt [deleted file]
doc/license-format.sh [deleted file]
msb-core/apiroute/apiroute-service/pom.xml
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/ApiRouteApp.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/ApiRouteAppConfig.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/ConsulClientApp.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ApiRouteInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ConsulInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomDateSerializer.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/CustomRouteInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/DiscoverInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/IuiRouteInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MetricsInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceFullInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/MicroServiceInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Node.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/NodeInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/RouteServer.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/Service.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/ServiceAccessInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedInternalServerErrorException.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotFoundException.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/api/exception/ExtendedNotSupportedException.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/health/ApiRouteHealthCheck.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/resources/ApiRouteResource.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/resources/CustomRouteResource.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/resources/IuiRouteResource.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/resources/MetricsResource.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/resources/MicroServiceResource.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/resources/ServiceAccessResource.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/ApiRouteServiceWrapper.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/CustomRouteServiceWrapper.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/IuiRouteServiceWrapper.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/MetricsServiceWrapper.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/MicroServiceWrapper.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/ServiceAccessWrapper.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/CatalogClient.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/Consul.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/ConsulException.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/HealthClient.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/async/ConsulResponseCallback.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/cache/CatalogCache.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/cache/ConsulCache.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/cache/ConsulCache4Map.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/cache/HealthCache.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/cache/ServiceCache.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/ConsulResponse.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/catalog/CatalogNode.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/catalog/CatalogService.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/catalog/ImmutableCatalogNode.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/catalog/ImmutableCatalogService.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/catalog/ServiceInfo.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/health/ImmutableNode.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/health/ImmutableService.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/health/Node.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/health/Service.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/model/health/ServiceHealth.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/CatalogOptions.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/ConsistencyMode.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/ImmutableCatalogOptions.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/ImmutableQueryOptions.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/Options.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/ParamAdder.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/option/QueryOptions.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/Base64EncodingDeserializer.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/ClientUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/Jackson.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/ObjectMapperContextResolver.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/SecondsDeserializer.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/SecondsSerializer.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/consul/util/UnsignedLongDeserializer.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/serviceListener/IMicroServiceChangeListener.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/serviceListener/MicroServiceChangeListener.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/FileUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/JacksonJsonUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/JedisUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/MetricsUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/MicroServiceDB.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/MicroServiceUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/RegExpTestUtil.java
msb-core/apiroute/apiroute-service/src/main/java/org/openo/msb/wrapper/util/RouteUtil.java
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/WEB-INF/web.xml
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/css/reset.css
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/css/screen.css
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/css/typography.css
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/index.html
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/js/iframeResizer/iframeResizer.contentWindow.min.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/js/iframeResizer/iframeResizer.min.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/backbone-min.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/handlebars-2.0.0.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/highlight.7.3.pack.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/jquery.ba-bbq.min.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/marked.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/shred.bundle.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/shred/content.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/swagger-client.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/swagger-oauth.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/lib/underscore-min.js
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/o2c.html
msb-core/apiroute/apiroute-service/src/main/resources/api-doc/swagger-ui.js
msb-core/apiroute/apiroute-service/src/main/resources/banner.txt
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/css/metrics.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/i18n/loadi18nApp_iui-metrics_view.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/i18n/msb-iui-metrics-i18n-en-US.properties
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/i18n/msb-iui-metrics-i18n-zh-CN.properties
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/index.html
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/avalon.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/bootstrap/css/bootstrap-dt.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/bootstrap/css/bootstrap.min.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/bootstrap/js/bootstrap.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/bootstrap/js/bootstrap.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/bootstrap/js/bootstrap2-typeahead.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/dataTables/dataTables.bootstrap.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/echarts/echarts-all.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/fontAwesome/css/font-awesome.min.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/iframeResizer/iframeResizer.contentWindow.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/iframeResizer/iframeResizer.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/jquery.i18n/jquery.i18n.properties-1.0.9.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/metricsChart.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/metricsController.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-metrics/js/metricsUtil.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/css/newRoute.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/css/route.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/default.html
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/i18n/loadi18nApp_iui-route_view.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/i18n/msb-iui-route-i18n-en-US.properties
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/i18n/msb-iui-route-i18n-zh-CN.properties
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/index.html
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/avalon.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/bootstrap/css/bootstrap-dt.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/bootstrap/css/bootstrap.min.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/bootstrap/js/bootstrap.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/bootstrap/js/bootstrap.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/bootstrap/js/bootstrap2-typeahead.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/dataTables/dataTables.bootstrap.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/fontAwesome/css/font-awesome.min.css
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/iframeResizer/iframeResizer.contentWindow.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/iframeResizer/iframeResizer.min.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/additional-methods.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/jquery.validate.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ar.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_bg.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ca.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_cs.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_da.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_de.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_el.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_es.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_es_AR.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_et.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_eu.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_fa.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_fi.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_fr.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_gl.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_he.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_hr.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_hu.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_id.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_is.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_it.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ja.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ka.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_kk.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ko.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_lt.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_lv.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_my.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_nl.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_no.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_pl.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_pt_BR.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_pt_PT.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ro.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_ru.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_si.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_sk.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_sl.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_sr.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_sr_lat.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_sv.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_th.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_tj.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_tr.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_uk.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_vi.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_zh.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/messages_zh_TW.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/methods_de.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/methods_es_CL.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/methods_fi.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/methods_nl.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery-validation/localization/methods_pt.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/jquery.i18n/jquery.i18n.properties-1.0.9.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/routeController.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/routeFunc.js
msb-core/apiroute/apiroute-service/src/main/resources/iui-route/js/routeUtil.js
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/ApiRouteServiceWrapperTest.java
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/CustomRouteServiceWrapperTest.java
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/IuiRouteServiceWrapperTest.java
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/MicroServiceWrapperTest.java
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/util/JacksonJsonUtilTest.java
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/util/RegExpTestUtilTest.java
msb-core/apiroute/apiroute-service/src/test/java/org/openo/msb/wrapper/util/RouteUtilTest.java
msb-core/apiroute/apiroute-standalone/pom.xml
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat
msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh
msb-core/apiroute/pom.xml
msb-core/distributions/pom.xml
msb-core/distributions/standalone/pom.xml
msb-core/distributions/standalone/src/assembly/resource/servicesInstall.bat
msb-core/distributions/standalone/src/assembly/resource/servicesRestart.bat
msb-core/distributions/standalone/src/assembly/resource/servicesStatus.bat
msb-core/distributions/standalone/src/assembly/resource/servicesUninstall.bat
msb-core/distributions/standalone/src/assembly/resource/shutdown.bat
msb-core/distributions/standalone/src/assembly/resource/shutdown.sh
msb-core/distributions/standalone/src/assembly/resource/startup.bat
msb-core/distributions/standalone/src/assembly/resource/startup.sh
msb-core/distributions/standalone/src/assembly/resource/startup4docker.sh [deleted file]
msb-core/distributions/standalone/src/main/docker/Dockerfile [deleted file]
msb-core/openresty-ext/pom.xml
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/auth.lua [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/customrouter.lua [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/iui_auth.lua [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/login.lua [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/logout.lua [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/make_authed.lua [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoadminrouter.lua [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoapijsonrouter.lua [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoapirouter.lua [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openouirouter.lua [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/serviceaccess.lua [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/setnocacheflag.lua [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf [new file with mode: 0644]
msb-core/openresty-ext/src/assembly/resources/openresty/reload.sh
msb-core/openresty-ext/src/assembly/resources/openresty/run.bat
msb-core/openresty-ext/src/assembly/resources/openresty/run.sh
msb-core/openresty-ext/src/assembly/resources/openresty/run4docker.sh [deleted file]
msb-core/openresty-ext/src/assembly/resources/openresty/stop.bat
msb-core/openresty-ext/src/assembly/resources/openresty/stop.sh
msb-core/openresty/pom.xml
msb-core/pom.xml
msb-core/redis-ext/pom.xml
msb-core/redis-ext/src/assembly/resources/redis/BGREWRITEAOF.bat
msb-core/redis-ext/src/assembly/resources/redis/BGREWRITEAOF.sh
msb-core/redis-ext/src/assembly/resources/redis/redisService.xml
msb-core/redis-ext/src/assembly/resources/redis/run.bat
msb-core/redis-ext/src/assembly/resources/redis/run.sh
msb-core/redis-ext/src/assembly/resources/redis/run4docker.sh [deleted file]
msb-core/redis-ext/src/assembly/resources/redis/stop.bat
msb-core/redis-ext/src/assembly/resources/redis/stop.sh
msb-core/redis/pom.xml
msb-parent/README.md
msb-parent/msbparent-lite/pom.xml
msb-parent/msbparent/pom.xml
msb-parent/pom.xml
pom.xml

diff --git a/doc/java-license-header.txt b/doc/java-license-header.txt
deleted file mode 100644 (file)
index 03dc039..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright 2016 ZTE, Inc. and others.
-
-Licensed 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.
diff --git a/doc/license-format.sh b/doc/license-format.sh
deleted file mode 100644 (file)
index 89fb451..0000000
+++ /dev/null
@@ -1 +0,0 @@
-mvn com.mycila:license-maven-plugin:format -Dlicense.header=doc/java-license-header.txt
\ No newline at end of file
index 54f8daf..55d1a5e 100644 (file)
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <!--
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +14,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
@@ -46,7 +49,7 @@
       <artifactId>swagger-jersey2-jaxrs</artifactId>
       <scope>compile</scope>
     </dependency>
       <artifactId>swagger-jersey2-jaxrs</artifactId>
       <scope>compile</scope>
     </dependency>
-    <!-- add by wangyg:增加redis的java客户端jedis依赖 -->
+    <!-- add by wangyg:增加redisçš„java客户端jedisä¾\9dèµ– -->
     <dependency>
       <groupId>redis.clients</groupId>
       <artifactId>jedis</artifactId>
     <dependency>
       <groupId>redis.clients</groupId>
       <artifactId>jedis</artifactId>
         <classifier>jdk15</classifier>
     </dependency>
     <dependency>
         <classifier>jdk15</classifier>
     </dependency>
     <dependency>
-               <groupId>junit</groupId>
-               <artifactId>junit</artifactId>
-               <scope>test</scope>
-       </dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
   </dependencies>
   <build>
     <plugins>
index 7a9f524..94b29ac 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb;\r
-\r
-import io.dropwizard.Application;\r
-import io.dropwizard.assets.AssetsBundle;\r
-import io.dropwizard.jetty.HttpConnectorFactory;\r
-import io.dropwizard.server.SimpleServerFactory;\r
-import io.dropwizard.setup.Bootstrap;\r
-import io.dropwizard.setup.Environment;\r
-import io.swagger.jaxrs.config.BeanConfig;\r
-import io.swagger.jaxrs.listing.ApiListingResource;\r
-\r
-import java.io.BufferedWriter;\r
-import java.io.File;\r
-import java.io.FileNotFoundException;\r
-import java.io.FileWriter;\r
-import java.io.IOException;\r
-import java.net.URL;\r
-import java.util.List;\r
-\r
-import net.sf.json.JSONObject;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.ApiRouteInfo;\r
-import org.openo.msb.api.ConsulInfo;\r
-import org.openo.msb.api.CustomRouteInfo;\r
-import org.openo.msb.api.DiscoverInfo;\r
-import org.openo.msb.api.IuiRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-import org.openo.msb.health.ApiRouteHealthCheck;\r
-import org.openo.msb.resources.ApiRouteResource;\r
-import org.openo.msb.resources.CustomRouteResource;\r
-import org.openo.msb.resources.IuiRouteResource;\r
-import org.openo.msb.resources.MetricsResource;\r
-import org.openo.msb.resources.MicroServiceResource;\r
-import org.openo.msb.resources.ServiceAccessResource;\r
-import org.openo.msb.wrapper.ApiRouteServiceWrapper;\r
-import org.openo.msb.wrapper.CustomRouteServiceWrapper;\r
-import org.openo.msb.wrapper.IuiRouteServiceWrapper;\r
-import org.openo.msb.wrapper.serviceListener.MicroServiceChangeListener;\r
-import org.openo.msb.wrapper.util.FileUtil;\r
-import org.openo.msb.wrapper.util.JacksonJsonUtil;\r
-import org.openo.msb.wrapper.util.JedisUtil;\r
-import org.openo.msb.wrapper.util.MetricsUtil;\r
-import org.openo.msb.wrapper.util.MicroServiceDB;\r
-import org.openo.msb.wrapper.util.RegExpTestUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-public class ApiRouteApp extends Application<ApiRouteAppConfig> {\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(ApiRouteApp.class);\r
-\r
-    public static void main(String[] args) throws Exception {\r
-        new ApiRouteApp().run(args);\r
-\r
-    }\r
-\r
-    private ApiRouteAppConfig config;\r
-\r
-    @Override\r
-    public String getName() {\r
-        return " MicroService Bus ";\r
-    }\r
-\r
-    @Override\r
-    public void initialize(Bootstrap<ApiRouteAppConfig> bootstrap) {\r
-        \r
-        \r
-    }\r
-\r
-    @Override\r
-    public void run(ApiRouteAppConfig configuration, Environment environment) {\r
-        \r
-        initRootPath();\r
-        \r
-      \r
-        new AssetsBundle("/iui-metrics", "/"+RouteUtil.IUI_ROOT_PATH+"/microservices/metrics",\r
-            "index.html", "iui-metrics").run(environment); \r
-        \r
-        new AssetsBundle("/iui-route",  "/"+RouteUtil.IUI_ROOT_PATH+"/microservices", "index.html",\r
-                "iui-microservices").run(environment); \r
-        \r
-        new AssetsBundle("/api-doc",  "/"+RouteUtil.IUI_ROOT_PATH+"/microservices/api-doc",\r
-            "index.html", "api-doc").run(environment);\r
-        \r
-        new AssetsBundle("/ext",  "/"+RouteUtil.IUI_ROOT_PATH+"/microservices/ext",\r
-            "index.html", "ext").run(environment);\r
-        \r
-        \r
-        \r
-\r
-        final ApiRouteHealthCheck healthCheck =\r
-                new ApiRouteHealthCheck(configuration.getDefaultWorkspace());\r
-        environment.healthChecks().register("template", healthCheck);\r
-        environment.jersey().register(new ApiRouteResource());\r
-        environment.jersey().register(new IuiRouteResource());\r
-        environment.jersey().register(new MetricsResource());\r
-        environment.jersey().register(new CustomRouteResource());\r
-        environment.jersey().register(new ServiceAccessResource());\r
-        environment.jersey().register(new MicroServiceResource());\r
-\r
-        config = configuration;\r
-\r
-        initSwaggerConfig(environment, configuration);\r
-        initRedisConfig(configuration);\r
-        checkRedisConnect();\r
-        initMetricsConfig(configuration);\r
-        initVisualRangeMatches();\r
-\r
-        registerServiceChangeListener();\r
-\r
-\r
-    }\r
-\r
-    private void initMetricsConfig(ApiRouteAppConfig configuration) {\r
-\r
-        SimpleServerFactory simpleServerFactory =\r
-                (SimpleServerFactory) configuration.getServerFactory();\r
-        HttpConnectorFactory httpConnectorFactory =\r
-                (HttpConnectorFactory) simpleServerFactory.getConnector();\r
-        MetricsUtil.adminContextPath =\r
-                "http://127.0.0.1:" + httpConnectorFactory.getPort()\r
-                        + simpleServerFactory.getAdminContextPath() + "/metrics";\r
-    }\r
-\r
-    private void initSwaggerConfig(Environment environment, ApiRouteAppConfig configuration) {\r
-\r
-        environment.jersey().register(new ApiListingResource());\r
-        environment.getObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);\r
-\r
-        BeanConfig config = new BeanConfig();\r
-        config.setTitle("MicroService Bus rest API");\r
-        config.setVersion("1.0.0");\r
-        config.setResourcePackage("org.openo.msb.resources");\r
-        SimpleServerFactory simpleServerFactory =\r
-                (SimpleServerFactory) configuration.getServerFactory();\r
-        String basePath = simpleServerFactory.getApplicationContextPath();\r
-        String rootPath = simpleServerFactory.getJerseyRootPath();\r
-\r
-        rootPath = rootPath.substring(0, rootPath.indexOf("/*"));\r
-\r
-        basePath =\r
-                basePath.equals("/") ? rootPath : (new StringBuilder()).append(basePath)\r
-                        .append(rootPath).toString();\r
-\r
-        LOGGER.info("getApplicationContextPath: " + basePath);\r
-        config.setBasePath(basePath);\r
-        config.setScan(true);\r
-    }\r
-    \r
-    \r
-    private void initRootPath(){\r
-        try {\r
-            \r
-            URL urlRootPath = ApiRouteApp.class.getResource("/ext/initUrlRootPath/initUrlRootPath.json");\r
-            if (urlRootPath != null) {\r
-                String path = urlRootPath.getPath();\r
-    \r
-                LOGGER.info("read initUrlRootPath:" + path);\r
-              \r
-                String fileContent = FileUtil.readFile(path);\r
-                JSONObject jsonObj = JSONObject.fromObject(fileContent);\r
-                RouteUtil.IUI_ROOT_PATH=jsonObj.get("iuiRootPath").toString();\r
-                RouteUtil.API_ROOT_PATH=jsonObj.get("apiRootPath").toString();\r
-                }\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error("read  initUrlRootPath Files throw exception", e);\r
-        }\r
-        \r
-    }\r
-    private void initRedisConfig(ApiRouteAppConfig configuration) {\r
-\r
-        String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();\r
-        String jarPath = path.substring(0, path.lastIndexOf("/"));\r
-\r
-        LOGGER.info("jarpath: " + jarPath);\r
-        LOGGER.info("getDefaultWorkspace " + configuration.getDefaultWorkspace());\r
-\r
-        String confDir =\r
-                jarPath + "/" + configuration.getDefaultWorkspace() + "/"\r
-                        + configuration.getPropertiesDir();\r
-        String propertiesPath = confDir + "/" + configuration.getPropertiesName();\r
-\r
-        JedisUtil.propertiesPath = propertiesPath;\r
-\r
-        LOGGER.info("propertiesPath: " + propertiesPath);\r
-        LOGGER.info("confDir: " + confDir);\r
-\r
-        try {\r
-            File dirFile = new File(confDir);\r
-\r
-            if (!dirFile.exists()) {\r
-                dirFile.mkdirs();\r
-            }\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.info("create RedisConfig confDir error: " + confDir + e.getMessage());\r
-        }\r
-\r
-\r
-        try {\r
-            File propertiesFile = new File(propertiesPath);\r
-            if (!propertiesFile.exists()) {\r
-\r
-\r
-                propertiesFile.createNewFile();\r
-\r
-                BufferedWriter output = new BufferedWriter(new FileWriter(propertiesFile));\r
-                StringBuilder contentBuilder = new StringBuilder();\r
-                contentBuilder.append("redis.host=127.0.0.1\n").append("redis.port=6379\n")\r
-                        .append("#connectionTimeout\n").append("redis.connectionTimeout=2000\n")\r
-                        .append("#redis dbIndex,defaule:0\n")\r
-                        .append("redis.db_index=0\n\n")\r
-                        .append("#--------------redis pool config--------------\n")\r
-                        .append("#maxTotal\n").append("redis.pool.maxTotal=100\n")\r
-                        .append("#maxIdle\n").append("redis.pool.maxIdle=20\n")\r
-                        .append("#maxWaitMillis:ms\n")\r
-                        .append("redis.pool.maxWaitMillis=1000\n")\r
-                        .append("#testOnBorrow\n")\r
-                        .append("redis.pool.testOnBorrow=false\n")\r
-                        .append("#testOnReturn\n")\r
-                        .append("redis.pool.testOnReturn=true\n")\r
-                        .append("#nginx Port\n").append("server.port=10080\n");\r
-\r
-                output.write(contentBuilder.toString());\r
-                output.close();\r
-\r
-            }\r
-        } catch (IOException e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.info("create RedisConfig File error: " + propertiesPath + e.getMessage());\r
-        }\r
-    }\r
-\r
-\r
-    private void checkRedisConnect() {\r
-\r
-        new Thread(new Runnable() {\r
-            public void run() {\r
-                int n = 0;\r
-                while (true) {\r
-                    if (ApiRouteServiceWrapper.checkRedisConnect() == false) {\r
-                        n++;\r
-                        System.out.println(n\r
-                                + "/10 : Initial Route Configuration——redis connection fail...");\r
-\r
-                        try {\r
-                            Thread.sleep(10000);\r
-                        } catch (InterruptedException e) {\r
-                            LOGGER.error("Thread.sleep throw except:"+e.getMessage());\r
-                        }\r
-\r
-\r
-                        if (n >= 10) {\r
-                            System.out.println("Initial Route Configuration fail,timeout exit");\r
-                            LOGGER.error("Initial Route Configuration——redis connection fail,timeout exit...");\r
-                            break;\r
-                        }\r
-                    } else {\r
-                        System.out.println("starting to initial Route Configuration");\r
-                        // initRouteInfoFromConfig();\r
-                        initRouteInfoFromJson();\r
-                        System.out.println("starting to initial consul Configuration");\r
-                        runConsulClientApp();\r
-\r
-                        break;\r
-                    }\r
-                }\r
-\r
-            }\r
-        }).start();\r
-    }\r
-\r
-\r
-    \r
-\r
-    /**\r
-     * @Title: initVisualRangeMatches\r
-     * @Description: TODO(According to the environment variable or a JSON file configuration initialization VisualRange filter conditions)\r
-     * @return: void\r
-     */\r
-    private void initVisualRangeMatches(){\r
-        try {\r
-            if(System.getenv("APIGATEWAY_VISUAL_RANGE")==null)\r
-            {\r
-            \r
-            URL visualRangePath = ApiRouteApp.class.getResource("/ext/initVisualRange/initVisualRangeMatches.json");\r
-            if (visualRangePath != null) {\r
-                String path = visualRangePath.getPath();\r
-    \r
-                LOGGER.info("read initVisualRangeMatches:" + path);\r
-              \r
-                String fileContent = FileUtil.readFile(path);\r
-                JSONObject jsonObj = JSONObject.fromObject(fileContent);\r
-                String visualRangeArray=jsonObj.get("visualRange").toString();\r
-                \r
-            \r
-                RouteUtil.visualRangeMatches=StringUtils.split(visualRangeArray, ",");  \r
-             \r
-                \r
-               \r
-                }\r
-            }\r
-            else{\r
-                RouteUtil.visualRangeMatches=StringUtils.split(System.getenv("APIGATEWAY_VISUAL_RANGE"), ",");\r
-            }\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error("read  initVisualRangeMatches Files or env(APIGATEWAY_VISUAL_RANGE) throw exception", e);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * @Title: initRouteInfoFromJson\r
-     * @Description: TODO(按照JSON文件配置初始化route数据)\r
-     * @return: void\r
-     */\r
-    private void initRouteInfoFromJson() {\r
-\r
-        URL apiDocsPath = ApiRouteApp.class.getResource("/ext/initServices");\r
-        if (apiDocsPath != null) {\r
-            String path = apiDocsPath.getPath();\r
-\r
-            LOGGER.info("read JsonFilefolder:" + path);\r
-\r
-            try {\r
-                File[] files = FileUtil.readFileFolder(path);\r
-                for (int i = 0; i < files.length; i++) {\r
-                    File file = files[i];\r
-                    if (file.isFile() && file.getName().endsWith(".json")) {\r
-                        LOGGER.info("read JsonFile:" + file.getPath());\r
-                        String fileContent = FileUtil.readFile(file.getPath());\r
-                        saveInitService2redis(fileContent);\r
-                    } else {\r
-                        LOGGER.warn(file.getName() + " is not a right file");\r
-                    }\r
-                }\r
-\r
-\r
-\r
-            } catch (FileNotFoundException e) {\r
-                // TODO Auto-generated catch block\r
-                LOGGER.error("read  initServices Files throw FileNotFoundException", e);\r
-            } catch (IOException e) {\r
-                // TODO Auto-generated catch block\r
-                LOGGER.error("read  initServices Files throw IOexception", e);\r
-            }\r
-\r
-        }\r
-\r
-\r
-\r
-    }\r
-\r
-\r
-\r
-    private void saveInitService2redis(String fileContent) {\r
-        try {\r
-            List<ApiRouteInfo> routeList =\r
-                    (List<ApiRouteInfo>) JacksonJsonUtil.jsonToListBean(fileContent);\r
-            for (ApiRouteInfo route : routeList) {\r
-                String url = route.getUrl();\r
-\r
-                if (RegExpTestUtil.urlRegExpTest(route.getServiceName())) {\r
-                    \r
-                    try{\r
-                    CustomRouteInfo dbCustomRoute =\r
-                            CustomRouteServiceWrapper.getInstance().getCustomRouteInstance(\r
-                                    route.getServiceName());\r
-                    }\r
-                    catch(ExtendedNotFoundException e){\r
-\r
-                        LOGGER.info("initCustomRoute: ServiceName--" + route.getServiceName());\r
-\r
-                        CustomRouteInfo customRouteInfo = new CustomRouteInfo();\r
-                        customRouteInfo.setControl(route.getControl());\r
-                        customRouteInfo.setServers(route.getServers());\r
-                        customRouteInfo.setServiceName(route.getServiceName());\r
-                        customRouteInfo.setStatus(route.getStatus());\r
-                        customRouteInfo.setUrl(route.getUrl());\r
-\r
-\r
-                        CustomRouteServiceWrapper.getInstance().saveCustomRouteInstance(\r
-                                customRouteInfo, "");\r
-\r
-\r
-                    }\r
-                } else {\r
-\r
-                    if (RegExpTestUtil.apiRouteUrlRegExpTest(url) || url.startsWith("/api/microservices/")) {\r
-\r
-\r
-                        try{\r
-                        ApiRouteInfo dbApiRoute =\r
-                                ApiRouteServiceWrapper.getInstance().getApiRouteInstance(\r
-                                        route.getServiceName(), route.getVersion());\r
-                        }\r
-                        catch(ExtendedNotFoundException e){\r
-                            LOGGER.info("initapiRoute: ServiceName--" + route.getServiceName());\r
-                            ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(route, "");\r
-                        }\r
-\r
-                       \r
-                    } else if (RegExpTestUtil.iuiRouteUrlRegExpTest(url)  || url.equals("/iui/microservices")) {\r
-                        \r
-                        try{\r
-                        IuiRouteInfo dbIuiRoute =\r
-                                IuiRouteServiceWrapper.getInstance().getIuiRouteInstance(\r
-                                        route.getServiceName());\r
-                        }\r
-                        catch(ExtendedNotFoundException e){\r
-                    \r
-                            LOGGER.info(" initiuiRoute: ServiceName--" + route.getServiceName());\r
-                            IuiRouteInfo iuiRouteInfo = new IuiRouteInfo();\r
-                            iuiRouteInfo.setControl(route.getControl());\r
-                            iuiRouteInfo.setServers(route.getServers());\r
-                            iuiRouteInfo.setServiceName(route.getServiceName());\r
-                            iuiRouteInfo.setStatus(route.getStatus());\r
-                            \r
-                            if(url.equals("/iui/microservices")){\r
-                                iuiRouteInfo.setUrl("/"+RouteUtil.IUI_ROOT_PATH+"/microservices");\r
-                            }\r
-                            else{\r
-                            iuiRouteInfo.setUrl(route.getUrl());\r
-                            }\r
-\r
-                            IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(iuiRouteInfo);\r
-\r
-                        }\r
-\r
-                    } else {\r
-                        LOGGER.error("init Service throw exception——serviceName: " + route.getServiceName()+",url:"+url);\r
-                    }\r
-                }\r
-\r
-\r
-\r
-            }\r
-\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error("read  initServices Files throw exception", e);\r
-        }\r
-\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * The listener registration service changes\r
-     */\r
-    private void registerServiceChangeListener() {\r
-        MicroServiceDB.getInstance().addServiceChangeListener(new MicroServiceChangeListener());\r
-    }\r
-\r
-    // Open the consul to monitor subscription service\r
-    private void runConsulClientApp() {\r
-        DiscoverInfo config_discoverInfo = config.getDiscoverInfo();\r
-        \r
-        ConsulInfo config_consulInfo=config.getConsulInfo();\r
-        \r
-        RouteUtil.discoverInfo.setEnabled(config_discoverInfo.isEnabled());        \r
-        \r
-        if (config_discoverInfo.isEnabled()) {\r
-            try{\r
-            if(System.getenv("SDCLIENT_SVC_PORT")==null)\r
-            {\r
-                //yml          \r
-                RouteUtil.discoverInfo.setIp(config_discoverInfo.getIp()); \r
-                RouteUtil.discoverInfo.setPort(config_discoverInfo.getPort());\r
-                \r
-            }\r
-            else{\r
-               \r
-                 String  discoverAddress=System.getenv("SDCLIENT_SVC_PORT").split("//")[1];\r
-                 String sdIP=discoverAddress.split(":")[0];\r
-                 int sdPort=Integer\r
-                         .parseInt(discoverAddress.split(":")[1]);\r
-                 \r
-                 RouteUtil.discoverInfo.setIp(sdIP);\r
-                 RouteUtil.discoverInfo.setPort(sdPort);\r
-                 \r
-                 config_consulInfo.setIp(sdIP);\r
-                 config_consulInfo.setPort(sdPort);\r
-             \r
-                \r
-            }\r
-            \r
-           \r
-               \r
-                //Registration service discovery routing\r
-                //api\r
-                ApiRouteInfo discoverApiService=new ApiRouteInfo();\r
-                discoverApiService.setServiceName("msdiscover");\r
-                discoverApiService.setUrl("/api/microservices/v1");\r
-                discoverApiService.setVersion("v1");\r
-                discoverApiService.setMetricsUrl("/admin/metrics");\r
-                discoverApiService.setApiJson("/api/microservices/v1/swagger.json");\r
-                \r
-                RouteServer[] servers=new RouteServer[1];\r
-                servers[0]=new RouteServer(RouteUtil.discoverInfo.getIp(),String.valueOf(RouteUtil.discoverInfo.getPort()));\r
-                discoverApiService.setServers(servers);\r
-             \r
-                ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(discoverApiService, "");\r
-               \r
-                //iui\r
-                IuiRouteInfo discoverIUIService=new IuiRouteInfo();\r
-                discoverIUIService.setServiceName("msdiscover");\r
-                discoverIUIService.setUrl("/iui/microservices");\r
-                discoverIUIService.setServers(servers);\r
-                IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(discoverIUIService);\r
-                \r
-               \r
-\r
-            ConsulClientApp consulClientApp = new ConsulClientApp(config_consulInfo.getIp(), config_consulInfo.getPort());\r
-            // Monitor service change\r
-            consulClientApp.startServiceListen();\r
-            LOGGER.info("start monitor consul service--" +config_consulInfo.getIp() + ":"\r
-                    + config_consulInfo.getPort());\r
-            }\r
-            catch(Exception e){\r
-                LOGGER.error("start monitor consul service fail:"+e.getMessage()); \r
-            }\r
-        }\r
-        \r
-       \r
-    }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb;
+
+import io.dropwizard.Application;
+import io.dropwizard.assets.AssetsBundle;
+import io.dropwizard.jetty.HttpConnectorFactory;
+import io.dropwizard.server.SimpleServerFactory;
+import io.dropwizard.setup.Bootstrap;
+import io.dropwizard.setup.Environment;
+import io.swagger.jaxrs.config.BeanConfig;
+import io.swagger.jaxrs.listing.ApiListingResource;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
+import net.sf.json.JSONObject;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.ApiRouteInfo;
+import org.openo.msb.api.ConsulInfo;
+import org.openo.msb.api.CustomRouteInfo;
+import org.openo.msb.api.DiscoverInfo;
+import org.openo.msb.api.IuiRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+import org.openo.msb.health.ApiRouteHealthCheck;
+import org.openo.msb.resources.ApiRouteResource;
+import org.openo.msb.resources.CustomRouteResource;
+import org.openo.msb.resources.IuiRouteResource;
+import org.openo.msb.resources.MetricsResource;
+import org.openo.msb.resources.MicroServiceResource;
+import org.openo.msb.resources.ServiceAccessResource;
+import org.openo.msb.wrapper.ApiRouteServiceWrapper;
+import org.openo.msb.wrapper.CustomRouteServiceWrapper;
+import org.openo.msb.wrapper.IuiRouteServiceWrapper;
+import org.openo.msb.wrapper.serviceListener.MicroServiceChangeListener;
+import org.openo.msb.wrapper.util.FileUtil;
+import org.openo.msb.wrapper.util.JacksonJsonUtil;
+import org.openo.msb.wrapper.util.JedisUtil;
+import org.openo.msb.wrapper.util.MetricsUtil;
+import org.openo.msb.wrapper.util.MicroServiceDB;
+import org.openo.msb.wrapper.util.RegExpTestUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+public class ApiRouteApp extends Application<ApiRouteAppConfig> {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ApiRouteApp.class);
+
+    public static void main(String[] args) throws Exception {
+        new ApiRouteApp().run(args);
+
+    }
+
+    private ApiRouteAppConfig config;
+
+    @Override
+    public String getName() {
+        return " MicroService Bus ";
+    }
+
+    @Override
+    public void initialize(Bootstrap<ApiRouteAppConfig> bootstrap) {
+        
+        
+    }
+
+    @Override
+    public void run(ApiRouteAppConfig configuration, Environment environment) {
+        
+        initRootPath();
+        
+      
+        new AssetsBundle("/iui-metrics", "/"+RouteUtil.IUI_ROOT_PATH+"/microservices/metrics",
+            "index.html", "iui-metrics").run(environment); 
+        
+        new AssetsBundle("/iui-route",  "/"+RouteUtil.IUI_ROOT_PATH+"/microservices", "index.html",
+                "iui-microservices").run(environment); 
+        
+        new AssetsBundle("/api-doc",  "/"+RouteUtil.IUI_ROOT_PATH+"/microservices/api-doc",
+            "index.html", "api-doc").run(environment);
+        
+        new AssetsBundle("/ext",  "/"+RouteUtil.IUI_ROOT_PATH+"/microservices/ext",
+            "index.html", "ext").run(environment);
+        
+        
+        
+
+        final ApiRouteHealthCheck healthCheck =
+                new ApiRouteHealthCheck(configuration.getDefaultWorkspace());
+        environment.healthChecks().register("template", healthCheck);
+        environment.jersey().register(new ApiRouteResource());
+        environment.jersey().register(new IuiRouteResource());
+        environment.jersey().register(new MetricsResource());
+        environment.jersey().register(new CustomRouteResource());
+        environment.jersey().register(new ServiceAccessResource());
+        environment.jersey().register(new MicroServiceResource());
+
+        config = configuration;
+
+        initSwaggerConfig(environment, configuration);
+        initRedisConfig(configuration);
+        checkRedisConnect();
+        initMetricsConfig(configuration);
+        initVisualRangeMatches();
+
+        registerServiceChangeListener();
+
+
+    }
+
+    private void initMetricsConfig(ApiRouteAppConfig configuration) {
+
+        SimpleServerFactory simpleServerFactory =
+                (SimpleServerFactory) configuration.getServerFactory();
+        HttpConnectorFactory httpConnectorFactory =
+                (HttpConnectorFactory) simpleServerFactory.getConnector();
+        MetricsUtil.adminContextPath =
+                "http://127.0.0.1:" + httpConnectorFactory.getPort()
+                        + simpleServerFactory.getAdminContextPath() + "/metrics";
+    }
+
+    private void initSwaggerConfig(Environment environment, ApiRouteAppConfig configuration) {
+
+        environment.jersey().register(new ApiListingResource());
+        environment.getObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);
+
+        BeanConfig config = new BeanConfig();
+        config.setTitle("MicroService Bus rest API");
+        config.setVersion("1.0.0");
+        config.setResourcePackage("org.openo.msb.resources");
+        SimpleServerFactory simpleServerFactory =
+                (SimpleServerFactory) configuration.getServerFactory();
+        String basePath = simpleServerFactory.getApplicationContextPath();
+        String rootPath = simpleServerFactory.getJerseyRootPath();
+
+        rootPath = rootPath.substring(0, rootPath.indexOf("/*"));
+
+        basePath =
+                basePath.equals("/") ? rootPath : (new StringBuilder()).append(basePath)
+                        .append(rootPath).toString();
+
+        LOGGER.info("getApplicationContextPath: " + basePath);
+        config.setBasePath(basePath);
+        config.setScan(true);
+    }
+    
+    
+    private void initRootPath(){
+        try {
+            
+            URL urlRootPath = ApiRouteApp.class.getResource("/ext/initUrlRootPath/initUrlRootPath.json");
+            if (urlRootPath != null) {
+                String path = urlRootPath.getPath();
+    
+                LOGGER.info("read initUrlRootPath:" + path);
+              
+                String fileContent = FileUtil.readFile(path);
+                JSONObject jsonObj = JSONObject.fromObject(fileContent);
+                RouteUtil.IUI_ROOT_PATH=jsonObj.get("iuiRootPath").toString();
+                RouteUtil.API_ROOT_PATH=jsonObj.get("apiRootPath").toString();
+                }
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error("read  initUrlRootPath Files throw exception", e);
+        }
+        
+    }
+    private void initRedisConfig(ApiRouteAppConfig configuration) {
+
+        String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
+        String jarPath = path.substring(0, path.lastIndexOf("/"));
+
+        LOGGER.info("jarpath: " + jarPath);
+        LOGGER.info("getDefaultWorkspace " + configuration.getDefaultWorkspace());
+
+        String confDir =
+                jarPath + "/" + configuration.getDefaultWorkspace() + "/"
+                        + configuration.getPropertiesDir();
+        String propertiesPath = confDir + "/" + configuration.getPropertiesName();
+
+        JedisUtil.propertiesPath = propertiesPath;
+
+        LOGGER.info("propertiesPath: " + propertiesPath);
+        LOGGER.info("confDir: " + confDir);
+
+        try {
+            File dirFile = new File(confDir);
+
+            if (!dirFile.exists()) {
+                dirFile.mkdirs();
+            }
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.info("create RedisConfig confDir error: " + confDir + e.getMessage());
+        }
+
+
+        try {
+            File propertiesFile = new File(propertiesPath);
+            if (!propertiesFile.exists()) {
+
+
+                propertiesFile.createNewFile();
+
+                BufferedWriter output = new BufferedWriter(new FileWriter(propertiesFile));
+                StringBuilder contentBuilder = new StringBuilder();
+                contentBuilder.append("redis.host=127.0.0.1\n").append("redis.port=6379\n")
+                        .append("#connectionTimeout\n").append("redis.connectionTimeout=2000\n")
+                        .append("#redis dbIndex,defaule:0\n")
+                        .append("redis.db_index=0\n\n")
+                        .append("#--------------redis pool config--------------\n")
+                        .append("#maxTotal\n").append("redis.pool.maxTotal=100\n")
+                        .append("#maxIdle\n").append("redis.pool.maxIdle=20\n")
+                        .append("#maxWaitMillis:ms\n")
+                        .append("redis.pool.maxWaitMillis=1000\n")
+                        .append("#testOnBorrow\n")
+                        .append("redis.pool.testOnBorrow=false\n")
+                        .append("#testOnReturn\n")
+                        .append("redis.pool.testOnReturn=true\n")
+                        .append("#nginx Port\n").append("server.port=10080\n");
+
+                output.write(contentBuilder.toString());
+                output.close();
+
+            }
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            LOGGER.info("create RedisConfig File error: " + propertiesPath + e.getMessage());
+        }
+    }
+
+
+    private void checkRedisConnect() {
+
+        new Thread(new Runnable() {
+            public void run() {
+                int n = 0;
+                while (true) {
+                    if (ApiRouteServiceWrapper.checkRedisConnect() == false) {
+                        n++;
+                        System.out.println(n
+                                + "/10 : Initial Route Configuration——redis connection fail...");
+
+                        try {
+                            Thread.sleep(10000);
+                        } catch (InterruptedException e) {
+                            LOGGER.error("Thread.sleep throw except:"+e.getMessage());
+                        }
+
+
+                        if (n >= 10) {
+                            System.out.println("Initial Route Configuration fail,timeout exit");
+                            LOGGER.error("Initial Route Configuration——redis connection fail,timeout exit...");
+                            break;
+                        }
+                    } else {
+                        System.out.println("starting to initial Route Configuration");
+                        // initRouteInfoFromConfig();
+                        initRouteInfoFromJson();
+                        System.out.println("starting to initial consul Configuration");
+                        runConsulClientApp();
+
+                        break;
+                    }
+                }
+
+            }
+        }).start();
+    }
+
+
+    
+
+    /**
+     * @Title: initVisualRangeMatches
+     * @Description: TODO(According to the environment variable or a JSON file configuration initialization VisualRange filter conditions)
+     * @return: void
+     */
+    private void initVisualRangeMatches(){
+        try {
+            if(System.getenv("APIGATEWAY_VISUAL_RANGE")==null)
+            {
+            
+            URL visualRangePath = ApiRouteApp.class.getResource("/ext/initVisualRange/initVisualRangeMatches.json");
+            if (visualRangePath != null) {
+                String path = visualRangePath.getPath();
+    
+                LOGGER.info("read initVisualRangeMatches:" + path);
+              
+                String fileContent = FileUtil.readFile(path);
+                JSONObject jsonObj = JSONObject.fromObject(fileContent);
+                String visualRangeArray=jsonObj.get("visualRange").toString();
+                
+            
+                RouteUtil.visualRangeMatches=StringUtils.split(visualRangeArray, ",");  
+             
+                
+               
+                }
+            }
+            else{
+                RouteUtil.visualRangeMatches=StringUtils.split(System.getenv("APIGATEWAY_VISUAL_RANGE"), ",");
+            }
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error("read  initVisualRangeMatches Files or env(APIGATEWAY_VISUAL_RANGE) throw exception", e);
+        }
+    }
+
+    /**
+     * @Title: initRouteInfoFromJson
+     * @Description: TODO(按照JSON文件配置初始化route数据)
+     * @return: void
+     */
+    private void initRouteInfoFromJson() {
+
+        URL apiDocsPath = ApiRouteApp.class.getResource("/ext/initServices");
+        if (apiDocsPath != null) {
+            String path = apiDocsPath.getPath();
+
+            LOGGER.info("read JsonFilefolder:" + path);
+
+            try {
+                File[] files = FileUtil.readFileFolder(path);
+                for (int i = 0; i < files.length; i++) {
+                    File file = files[i];
+                    if (file.isFile() && file.getName().endsWith(".json")) {
+                        LOGGER.info("read JsonFile:" + file.getPath());
+                        String fileContent = FileUtil.readFile(file.getPath());
+                        saveInitService2redis(fileContent);
+                    } else {
+                        LOGGER.warn(file.getName() + " is not a right file");
+                    }
+                }
+
+
+
+            } catch (FileNotFoundException e) {
+                // TODO Auto-generated catch block
+                LOGGER.error("read  initServices Files throw FileNotFoundException", e);
+            } catch (IOException e) {
+                // TODO Auto-generated catch block
+                LOGGER.error("read  initServices Files throw IOexception", e);
+            }
+
+        }
+
+
+
+    }
+
+
+
+    private void saveInitService2redis(String fileContent) {
+        try {
+            List<ApiRouteInfo> routeList =
+                    (List<ApiRouteInfo>) JacksonJsonUtil.jsonToListBean(fileContent);
+            for (ApiRouteInfo route : routeList) {
+                String url = route.getUrl();
+
+                if (RegExpTestUtil.urlRegExpTest(route.getServiceName())) {
+                    
+                    try{
+                    CustomRouteInfo dbCustomRoute =
+                            CustomRouteServiceWrapper.getInstance().getCustomRouteInstance(
+                                    route.getServiceName());
+                    }
+                    catch(ExtendedNotFoundException e){
+
+                        LOGGER.info("initCustomRoute: ServiceName--" + route.getServiceName());
+
+                        CustomRouteInfo customRouteInfo = new CustomRouteInfo();
+                        customRouteInfo.setControl(route.getControl());
+                        customRouteInfo.setServers(route.getServers());
+                        customRouteInfo.setServiceName(route.getServiceName());
+                        customRouteInfo.setStatus(route.getStatus());
+                        customRouteInfo.setUrl(route.getUrl());
+
+
+                        CustomRouteServiceWrapper.getInstance().saveCustomRouteInstance(
+                                customRouteInfo, "");
+
+
+                    }
+                } else {
+
+                    if (RegExpTestUtil.apiRouteUrlRegExpTest(url) || url.startsWith("/api/microservices/")) {
+
+
+                        try{
+                        ApiRouteInfo dbApiRoute =
+                                ApiRouteServiceWrapper.getInstance().getApiRouteInstance(
+                                        route.getServiceName(), route.getVersion());
+                        }
+                        catch(ExtendedNotFoundException e){
+                            LOGGER.info("initapiRoute: ServiceName--" + route.getServiceName());
+                            ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(route, "");
+                        }
+
+                       
+                    } else if (RegExpTestUtil.iuiRouteUrlRegExpTest(url)  || url.equals("/iui/microservices")) {
+                        
+                        try{
+                        IuiRouteInfo dbIuiRoute =
+                                IuiRouteServiceWrapper.getInstance().getIuiRouteInstance(
+                                        route.getServiceName());
+                        }
+                        catch(ExtendedNotFoundException e){
+                    
+                            LOGGER.info(" initiuiRoute: ServiceName--" + route.getServiceName());
+                            IuiRouteInfo iuiRouteInfo = new IuiRouteInfo();
+                            iuiRouteInfo.setControl(route.getControl());
+                            iuiRouteInfo.setServers(route.getServers());
+                            iuiRouteInfo.setServiceName(route.getServiceName());
+                            iuiRouteInfo.setStatus(route.getStatus());
+                            
+                            if(url.equals("/iui/microservices")){
+                                iuiRouteInfo.setUrl("/"+RouteUtil.IUI_ROOT_PATH+"/microservices");
+                            }
+                            else{
+                            iuiRouteInfo.setUrl(route.getUrl());
+                            }
+
+                            IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(iuiRouteInfo);
+
+                        }
+
+                    } else {
+                        LOGGER.error("init Service throw exception——serviceName: " + route.getServiceName()+",url:"+url);
+                    }
+                }
+
+
+
+            }
+
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error("read  initServices Files throw exception", e);
+        }
+
+    }
+
+
+
+    /**
+     * The listener registration service changes
+     */
+    private void registerServiceChangeListener() {
+        MicroServiceDB.getInstance().addServiceChangeListener(new MicroServiceChangeListener());
+    }
+
+    // Open the consul to monitor subscription service
+    private void runConsulClientApp() {
+        DiscoverInfo config_discoverInfo = config.getDiscoverInfo();
+        
+        ConsulInfo config_consulInfo=config.getConsulInfo();
+        
+        RouteUtil.discoverInfo.setEnabled(config_discoverInfo.isEnabled());        
+        
+        if (config_discoverInfo.isEnabled()) {
+            try{
+            if(System.getenv("SDCLIENT_SVC_PORT")==null)
+            {
+                //yml          
+                RouteUtil.discoverInfo.setIp(config_discoverInfo.getIp()); 
+                RouteUtil.discoverInfo.setPort(config_discoverInfo.getPort());
+                
+            }
+            else{
+               
+                 String  discoverAddress=System.getenv("SDCLIENT_SVC_PORT").split("//")[1];
+                 String sdIP=discoverAddress.split(":")[0];
+                 int sdPort=Integer
+                         .parseInt(discoverAddress.split(":")[1]);
+                 
+                 RouteUtil.discoverInfo.setIp(sdIP);
+                 RouteUtil.discoverInfo.setPort(sdPort);
+                 
+                 config_consulInfo.setIp(sdIP);
+                 config_consulInfo.setPort(sdPort);
+             
+                
+            }
+            
+           
+               
+                //Registration service discovery routing
+                //api
+                ApiRouteInfo discoverApiService=new ApiRouteInfo();
+                discoverApiService.setServiceName("msdiscover");
+                discoverApiService.setUrl("/api/microservices/v1");
+                discoverApiService.setVersion("v1");
+                discoverApiService.setMetricsUrl("/admin/metrics");
+                discoverApiService.setApiJson("/api/microservices/v1/swagger.json");
+                
+                RouteServer[] servers=new RouteServer[1];
+                servers[0]=new RouteServer(RouteUtil.discoverInfo.getIp(),String.valueOf(RouteUtil.discoverInfo.getPort()));
+                discoverApiService.setServers(servers);
+             
+                ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(discoverApiService, "");
+               
+                //iui
+                IuiRouteInfo discoverIUIService=new IuiRouteInfo();
+                discoverIUIService.setServiceName("msdiscover");
+                discoverIUIService.setUrl("/iui/microservices");
+                discoverIUIService.setServers(servers);
+                IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(discoverIUIService);
+                
+               
+
+            ConsulClientApp consulClientApp = new ConsulClientApp(config_consulInfo.getIp(), config_consulInfo.getPort());
+            // Monitor service change
+            consulClientApp.startServiceListen();
+            LOGGER.info("start monitor consul service--" +config_consulInfo.getIp() + ":"
+                    + config_consulInfo.getPort());
+            }
+            catch(Exception e){
+                LOGGER.error("start monitor consul service fail:"+e.getMessage()); 
+            }
+        }
+        
+       
+    }
+
+}
index e14413c..4029c04 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 4f47732..4986e54 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb;\r
-\r
-import java.net.MalformedURLException;\r
-import java.net.URL;\r
-import java.util.ArrayList;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.ListIterator;\r
-import java.util.Map;\r
-import java.util.concurrent.atomic.AtomicReference;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.MicroServiceFullInfo;\r
-import org.openo.msb.api.MicroServiceInfo;\r
-import org.openo.msb.api.Node;\r
-import org.openo.msb.wrapper.MicroServiceWrapper;\r
-import org.openo.msb.wrapper.consul.CatalogClient;\r
-import org.openo.msb.wrapper.consul.Consul;\r
-import org.openo.msb.wrapper.consul.HealthClient;\r
-import org.openo.msb.wrapper.consul.cache.CatalogCache;\r
-import org.openo.msb.wrapper.consul.cache.ConsulCache;\r
-import org.openo.msb.wrapper.consul.cache.ConsulCache4Map;\r
-import org.openo.msb.wrapper.consul.cache.HealthCache;\r
-import org.openo.msb.wrapper.consul.cache.ServiceCache;\r
-import org.openo.msb.wrapper.consul.model.catalog.CatalogService;\r
-import org.openo.msb.wrapper.consul.model.catalog.ServiceInfo;\r
-import org.openo.msb.wrapper.consul.model.health.Service;\r
-import org.openo.msb.wrapper.consul.model.health.ServiceHealth;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-public class ConsulClientApp {\r
-\r
-    private final Consul consul;\r
-    private final CatalogClient catalogClient;\r
-    private final HealthClient healthClient;\r
-    private AtomicReference<List<HealthCache>> cacheList = new AtomicReference<List<HealthCache>>(\r
-            new ArrayList<HealthCache>());\r
-\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(ConsulClientApp.class);\r
-\r
-    public ConsulClientApp(String ip, int port) {\r
-        URL url = null;\r
-        try {\r
-            url = new URL("http", ip, port, "");\r
-        } catch (MalformedURLException e1) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error("start  ConsulClientApp throw exception", e1);\r
-            throw new RuntimeException(e1);\r
-        }\r
-        this.consul = Consul.builder().withUrl(url).build(); // connect to Consul on localhost\r
-        this.catalogClient = consul.catalogClient();\r
-        this.healthClient = consul.healthClient();\r
-    }\r
-\r
-    public Consul getConsul() {\r
-        return consul;\r
-    }\r
-\r
-    public CatalogClient getCatalogClient() {\r
-        return catalogClient;\r
-    }\r
-\r
-    private void stopNodeListen(String serviceName) {\r
-        try {\r
-\r
-            ListIterator<HealthCache> cacheListLit = cacheList.get().listIterator();\r
-            while (cacheListLit.hasNext()) {\r
-                HealthCache cache = (HealthCache) cacheListLit.next();\r
-                if (cache.getServiceName().equals(serviceName)) {\r
-\r
-                    cache.stop();\r
-                    cacheListLit.remove();\r
-                    LOGGER.info(cache.getServiceName() + " NodeListen stoped");\r
-                    break;\r
-                }\r
-            }\r
-\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error("stop Node:[" + serviceName + "] Listen throw exception", e);\r
-        }\r
-\r
-\r
-    }\r
-\r
-    /**\r
-     * @Title startServiceListen\r
-     * @Description TODO(Open the consul registration services to monitor)\r
-     * @return void\r
-     */\r
-    public void startServiceListen() {\r
-        final ServiceCache serviceCache = ServiceCache.newCache(catalogClient, 30);\r
-        serviceCache.addListener(new ConsulCache4Map.Listener<String, Map<String, List<String>>>() {\r
-            @Override\r
-            public void notify(List<ServiceInfo> oldValues, List<ServiceInfo> newValues) {\r
-                // do Something with updated server List\r
-                LOGGER.info("--new service notify--");\r
-\r
-                List<ServiceInfo> deRegisterServiceList = getDiffrent(oldValues, newValues);\r
-\r
-\r
-                for (ServiceInfo serviceInfo : deRegisterServiceList) {\r
-                    try {\r
-                       \r
-                            MicroServiceWrapper.getInstance().deleteMicroService(\r
-                                    serviceInfo.getServiceName(), serviceInfo.getVersion());\r
-                        \r
-\r
-                        stopNodeListen(serviceInfo.getServiceName());\r
-                        LOGGER.info("Cancel MicroServiceInfo and stop node listen successs:"\r
-                                + serviceInfo.getServiceName());\r
-                    } catch (Exception e) {\r
-                        LOGGER.error("Cancel MicroServiceInfo and stop node listen FAIL : ", e);\r
-\r
-                    }\r
-\r
-                }\r
-\r
-\r
-                List<ServiceInfo> registerServiceList = getDiffrent(newValues, oldValues);\r
-                for (ServiceInfo serviceInfo : registerServiceList) {\r
-\r
-                    // if (deRegisterServiceList.contains(serviceInfo)) continue;\r
-\r
-\r
-                    LOGGER.info(" new serviceName:" + serviceInfo.getServiceName() + "  version:"\r
-                            + serviceInfo.getVersion());\r
-                    // Open Node to monitor new registration service\r
-                    startHealthNodeListen(serviceInfo.getServiceName(), serviceInfo.getVersion());\r
-\r
-                }\r
-\r
-\r
-            }\r
-\r
-        });\r
-\r
-        try {\r
-            LOGGER.info("start...consul ... service..Listening.");\r
-            serviceCache.start();\r
-\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error("start...service..Listen throw exception", e);\r
-        }\r
-    }\r
-\r
-\r
-    /**\r
-     * @Title startHealthNodeListen\r
-     * @Description TODO(Open a service node changes to monitor, only to return to health service)\r
-     * @param serviceName\r
-     * @return\r
-     * @return HealthCache\r
-     */\r
-    private HealthCache startHealthNodeListen(final String serviceName, final String version) {\r
-        final HealthCache healthCache = HealthCache.newCache(healthClient, serviceName, 30);\r
-        healthCache.addListener(new HealthCache.Listener<String, ServiceHealth>() {\r
-            @Override\r
-            public void notify(Map<String, ServiceHealth> newValues) {\r
-                // do Something with updated server map\r
-                LOGGER.info(serviceName + "--new node notify--");\r
-\r
-                if (newValues.isEmpty()) {\r
-                    LOGGER.info(serviceName + "--nodeList is Empty--");\r
-\r
-                  \r
-                        MicroServiceWrapper.getInstance().deleteMicroService(serviceName, version);\r
-                  \r
-                    // try {\r
-                    // healthCache.stop();\r
-                    // } catch (Exception e) {\r
-                    // LOGGER.equals(serviceName+"-- stop Node error:"+e.getMessage());\r
-                    // }\r
-\r
-                } else {\r
-\r
-                    MicroServiceInfo microServiceInfo = new MicroServiceInfo();\r
-                    HashSet<Node> nodes = new HashSet<Node>();\r
-                    String url = "";\r
-                    String version = "", visualRange = "", protocol = "",lb_policy="";\r
-\r
-                    for (Map.Entry<String, ServiceHealth> entry : newValues.entrySet()) {\r
-                        String nodeName = entry.getKey().toString();\r
-                        ServiceHealth value = (ServiceHealth) entry.getValue();\r
-\r
-                        Node node = new Node();\r
-                        Service service = value.getService();\r
-                        node.setIp(service.getAddress());\r
-                        node.setPort(String.valueOf(service.getPort()));\r
-\r
-\r
-                        try {\r
-                            List<String> tagList = service.getTags();\r
-                            for (String tag : tagList) {\r
-                                if (tag.startsWith("url")) {\r
-                                    if (tag.split(":").length == 2) {\r
-                                        url = tag.split(":")[1];\r
-                                    } else {\r
-                                        url = "";\r
-                                    }\r
-\r
-\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("version")) {\r
-                                    if (tag.split(":").length == 2) {\r
-                                        version = tag.split(":")[1];\r
-                                    } else {\r
-                                        version = "";\r
-                                    }\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("protocol")) {\r
-                                    protocol = tag.split(":")[1];\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("visualRange")) {\r
-                                    visualRange = tag.split(":")[1];\r
-                                    continue;\r
-                                }\r
-                                \r
-                                if (tag.startsWith("lb_policy")) {\r
-                                    lb_policy = tag.split(":")[1];\r
-                                    continue;\r
-                                }\r
-\r
-                            }\r
-\r
-\r
-                        } catch (Exception e) {\r
-                            LOGGER.error(serviceName + " read tag  throw exception", e);\r
-                            System.out.println(serviceName + " read tag  throw exception");\r
-                        }\r
-\r
-                        nodes.add(node);\r
-                    }\r
-\r
-                    microServiceInfo.setNodes(nodes);\r
-                    microServiceInfo.setProtocol(protocol);\r
-                    microServiceInfo.setUrl(url);\r
-                    microServiceInfo.setServiceName(serviceName);\r
-                    microServiceInfo.setLb_policy(lb_policy);\r
-                    if (!visualRange.isEmpty()) {\r
-                        microServiceInfo.setVisualRange(visualRange);\r
-                    }\r
-                    microServiceInfo.setVersion(version);\r
-\r
-                    try {\r
-                        MicroServiceFullInfo microServiceFullInfo =\r
-                                MicroServiceWrapper.getInstance().saveMicroServiceInstance(\r
-                                        microServiceInfo, false, "", "");\r
-                        LOGGER.info("register MicroServiceInfo successs:"\r
-                                + microServiceFullInfo.getServiceName());\r
-                    } catch (Exception e) {\r
-                        LOGGER.error("register MicroServiceInfo FAIL : " + serviceName, e);\r
-\r
-                    }\r
-                }\r
-            }\r
-        });\r
-        try {\r
-            LOGGER.info(serviceName + " Node Listen start");\r
-            cacheList.get().add(healthCache);\r
-            healthCache.start();\r
-\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error(serviceName + " Node Listen start throw exception", e);\r
-        }\r
-\r
-        return healthCache;\r
-    }\r
-\r
-    /**\r
-     * @Title startNodeListen\r
-     * @Description TODO(Open a service node changes to monitor)\r
-     * @param serviceName\r
-     * @return\r
-     * @return CatalogCache\r
-     */\r
-    @Deprecated\r
-    private CatalogCache startNodeListen(final String serviceName) {\r
-        final CatalogCache catalogCache = CatalogCache.newCache(catalogClient, serviceName, 30);\r
-        catalogCache.addListener(new ConsulCache.Listener<String, CatalogService>() {\r
-            @Override\r
-            public void notify(Map<String, CatalogService> newValues) {\r
-                // do Something with updated server map\r
-                System.out.println(serviceName + "--new node notify--");\r
-                LOGGER.info(serviceName + "--new node notify--");\r
-\r
-                if (newValues.isEmpty()) {\r
-                    System.out.println(serviceName + "-- nodeList is Empty--");\r
-                    LOGGER.info(serviceName + "--nodeList is Empty-stop service[" + serviceName\r
-                            + "] listen-");\r
-                    try {\r
-                        catalogCache.stop();\r
-                    } catch (Exception e) {\r
-                        LOGGER.equals(serviceName + "-- stop Node error:" + e.getMessage());\r
-                    }\r
-\r
-                } else {\r
-\r
-                    MicroServiceInfo microServiceInfo = new MicroServiceInfo();\r
-                    HashSet<Node> nodes = new HashSet<Node>();\r
-                    String url = "";\r
-                    String version = "", visualRange = "", protocol = "";\r
-\r
-                    for (Map.Entry<String, CatalogService> entry : newValues.entrySet()) {\r
-                        String nodeName = entry.getKey().toString();\r
-                        CatalogService value = (CatalogService) entry.getValue();\r
-\r
-                        Node node = new Node();\r
-                        node.setIp(value.getServiceAddress());\r
-                        node.setPort(String.valueOf(value.getServicePort()));\r
-\r
-\r
-                        try {\r
-                            List<String> tagList = value.getServiceTags();\r
-                            for (String tag : tagList) {\r
-                                if (tag.startsWith("url")) {\r
-                                    if (tag.split(":").length == 2) {\r
-                                        url = tag.split(":")[1];\r
-                                    } else {\r
-                                        url = "";\r
-                                    }\r
-\r
-\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("version")) {\r
-                                    if (tag.split(":").length == 2) {\r
-                                        version = tag.split(":")[1];\r
-                                    } else {\r
-                                        version = "";\r
-                                    }\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("protocol")) {\r
-                                    protocol = tag.split(":")[1];\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("visualRange")) {\r
-                                    visualRange = tag.split(":")[1];\r
-                                    continue;\r
-                                }\r
-                                if (tag.startsWith("ttl")) {\r
-                                    int ttl = Integer.parseInt(tag.split(":")[1]);\r
-                                    node.setTtl(ttl);\r
-                                    continue;\r
-                                }\r
-                            }\r
-\r
-\r
-                        } catch (Exception e) {\r
-                            LOGGER.error(serviceName + " read tag  throw exception", e);\r
-                            System.out.println(serviceName + " read tag  throw exception");\r
-                        }\r
-\r
-                        nodes.add(node);\r
-\r
-\r
-                        System.out.println(nodeName + ":" + value.getServiceAddress() + " "\r
-                                + value.getServicePort() + " " + value.getServiceTags());\r
-                    }\r
-\r
-                    microServiceInfo.setNodes(nodes);\r
-                    microServiceInfo.setProtocol(protocol);\r
-                    microServiceInfo.setUrl(url);\r
-                    microServiceInfo.setServiceName(serviceName);\r
-                    if (!visualRange.isEmpty()) {\r
-                        microServiceInfo.setVisualRange(visualRange);\r
-                    }\r
-                    microServiceInfo.setVersion(version);\r
-\r
-                    try {\r
-                        MicroServiceFullInfo microServiceFullInfo =\r
-                                MicroServiceWrapper.getInstance().saveMicroServiceInstance(\r
-                                        microServiceInfo, false, "", "");\r
-                        LOGGER.info("register MicroServiceInfo successs:" + microServiceFullInfo);\r
-                        System.out.println("register MicroServiceInfo successs:" + serviceName);\r
-                    } catch (Exception e) {\r
-                        LOGGER.error("register MicroServiceInfo FAIL : ", e);\r
-\r
-                    }\r
-                }\r
-            }\r
-        });\r
-        try {\r
-            System.out.println(serviceName + " Node Listen start");\r
-            LOGGER.info(serviceName + " Node Listen start");\r
-            catalogCache.start();\r
-\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            LOGGER.error(serviceName + " Node Listen start throw exception", e);\r
-        }\r
-\r
-        return catalogCache;\r
-    }\r
-\r
-\r
-    /**\r
-     * @Title getDiffrent\r
-     * @Description TODO(Extract the list1 and list2 different data sets)\r
-     * @param list1\r
-     * @param list2\r
-     * @return\r
-     * @return List<String>\r
-     */\r
-    private List<ServiceInfo> getDiffrent(List<ServiceInfo> list1, List<ServiceInfo> list2) {\r
-\r
-        List<ServiceInfo> diff = new ArrayList<ServiceInfo>();\r
-\r
-\r
-\r
-        for (ServiceInfo serviceInfo : list1) {\r
-            if (!list2.contains(serviceInfo)) {\r
-                diff.add(serviceInfo);\r
-            }\r
-        }\r
-\r
-        return diff;\r
-    }\r
-\r
-    public static void main(String[] args) {\r
-        ConsulClientApp consulTest = new ConsulClientApp("127.0.0.1", 10081);\r
-        consulTest.startServiceListen();\r
-\r
-\r
-    }\r
-\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.MicroServiceFullInfo;
+import org.openo.msb.api.MicroServiceInfo;
+import org.openo.msb.api.Node;
+import org.openo.msb.wrapper.MicroServiceWrapper;
+import org.openo.msb.wrapper.consul.CatalogClient;
+import org.openo.msb.wrapper.consul.Consul;
+import org.openo.msb.wrapper.consul.HealthClient;
+import org.openo.msb.wrapper.consul.cache.CatalogCache;
+import org.openo.msb.wrapper.consul.cache.ConsulCache;
+import org.openo.msb.wrapper.consul.cache.ConsulCache4Map;
+import org.openo.msb.wrapper.consul.cache.HealthCache;
+import org.openo.msb.wrapper.consul.cache.ServiceCache;
+import org.openo.msb.wrapper.consul.model.catalog.CatalogService;
+import org.openo.msb.wrapper.consul.model.catalog.ServiceInfo;
+import org.openo.msb.wrapper.consul.model.health.Service;
+import org.openo.msb.wrapper.consul.model.health.ServiceHealth;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ConsulClientApp {
+
+    private final Consul consul;
+    private final CatalogClient catalogClient;
+    private final HealthClient healthClient;
+    private AtomicReference<List<HealthCache>> cacheList = new AtomicReference<List<HealthCache>>(
+            new ArrayList<HealthCache>());
+
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ConsulClientApp.class);
+
+    public ConsulClientApp(String ip, int port) {
+        URL url = null;
+        try {
+            url = new URL("http", ip, port, "");
+        } catch (MalformedURLException e1) {
+            // TODO Auto-generated catch block
+            LOGGER.error("start  ConsulClientApp throw exception", e1);
+            throw new RuntimeException(e1);
+        }
+        this.consul = Consul.builder().withUrl(url).build(); // connect to Consul on localhost
+        this.catalogClient = consul.catalogClient();
+        this.healthClient = consul.healthClient();
+    }
+
+    public Consul getConsul() {
+        return consul;
+    }
+
+    public CatalogClient getCatalogClient() {
+        return catalogClient;
+    }
+
+    private void stopNodeListen(String serviceName) {
+        try {
+
+            ListIterator<HealthCache> cacheListLit = cacheList.get().listIterator();
+            while (cacheListLit.hasNext()) {
+                HealthCache cache = (HealthCache) cacheListLit.next();
+                if (cache.getServiceName().equals(serviceName)) {
+
+                    cache.stop();
+                    cacheListLit.remove();
+                    LOGGER.info(cache.getServiceName() + " NodeListen stoped");
+                    break;
+                }
+            }
+
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error("stop Node:[" + serviceName + "] Listen throw exception", e);
+        }
+
+
+    }
+
+    /**
+     * @Title startServiceListen
+     * @Description TODO(Open the consul registration services to monitor)
+     * @return void
+     */
+    public void startServiceListen() {
+        final ServiceCache serviceCache = ServiceCache.newCache(catalogClient, 30);
+        serviceCache.addListener(new ConsulCache4Map.Listener<String, Map<String, List<String>>>() {
+            @Override
+            public void notify(List<ServiceInfo> oldValues, List<ServiceInfo> newValues) {
+                // do Something with updated server List
+                LOGGER.info("--new service notify--");
+
+                List<ServiceInfo> deRegisterServiceList = getDiffrent(oldValues, newValues);
+
+
+                for (ServiceInfo serviceInfo : deRegisterServiceList) {
+                    try {
+                       
+                            MicroServiceWrapper.getInstance().deleteMicroService(
+                                    serviceInfo.getServiceName(), serviceInfo.getVersion());
+                        
+
+                        stopNodeListen(serviceInfo.getServiceName());
+                        LOGGER.info("Cancel MicroServiceInfo and stop node listen successs:"
+                                + serviceInfo.getServiceName());
+                    } catch (Exception e) {
+                        LOGGER.error("Cancel MicroServiceInfo and stop node listen FAIL : ", e);
+
+                    }
+
+                }
+
+
+                List<ServiceInfo> registerServiceList = getDiffrent(newValues, oldValues);
+                for (ServiceInfo serviceInfo : registerServiceList) {
+
+                    // if (deRegisterServiceList.contains(serviceInfo)) continue;
+
+
+                    LOGGER.info(" new serviceName:" + serviceInfo.getServiceName() + "  version:"
+                            + serviceInfo.getVersion());
+                    // Open Node to monitor new registration service
+                    startHealthNodeListen(serviceInfo.getServiceName(), serviceInfo.getVersion());
+
+                }
+
+
+            }
+
+        });
+
+        try {
+            LOGGER.info("start...consul ... service..Listening.");
+            serviceCache.start();
+
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error("start...service..Listen throw exception", e);
+        }
+    }
+
+
+    /**
+     * @Title startHealthNodeListen
+     * @Description TODO(Open a service node changes to monitor, only to return to health service)
+     * @param serviceName
+     * @return
+     * @return HealthCache
+     */
+    private HealthCache startHealthNodeListen(final String serviceName, final String version) {
+        final HealthCache healthCache = HealthCache.newCache(healthClient, serviceName, 30);
+        healthCache.addListener(new HealthCache.Listener<String, ServiceHealth>() {
+            @Override
+            public void notify(Map<String, ServiceHealth> newValues) {
+                // do Something with updated server map
+                LOGGER.info(serviceName + "--new node notify--");
+
+                if (newValues.isEmpty()) {
+                    LOGGER.info(serviceName + "--nodeList is Empty--");
+
+                  
+                        MicroServiceWrapper.getInstance().deleteMicroService(serviceName, version);
+                  
+                    // try {
+                    // healthCache.stop();
+                    // } catch (Exception e) {
+                    // LOGGER.equals(serviceName+"-- stop Node error:"+e.getMessage());
+                    // }
+
+                } else {
+
+                    MicroServiceInfo microServiceInfo = new MicroServiceInfo();
+                    HashSet<Node> nodes = new HashSet<Node>();
+                    String url = "";
+                    String version = "", visualRange = "", protocol = "",lb_policy="";
+
+                    for (Map.Entry<String, ServiceHealth> entry : newValues.entrySet()) {
+                        String nodeName = entry.getKey().toString();
+                        ServiceHealth value = (ServiceHealth) entry.getValue();
+
+                        Node node = new Node();
+                        Service service = value.getService();
+                        node.setIp(service.getAddress());
+                        node.setPort(String.valueOf(service.getPort()));
+
+
+                        try {
+                            List<String> tagList = service.getTags();
+                            for (String tag : tagList) {
+                                if (tag.startsWith("url")) {
+                                    if (tag.split(":").length == 2) {
+                                        url = tag.split(":")[1];
+                                    } else {
+                                        url = "";
+                                    }
+
+
+                                    continue;
+                                }
+                                if (tag.startsWith("version")) {
+                                    if (tag.split(":").length == 2) {
+                                        version = tag.split(":")[1];
+                                    } else {
+                                        version = "";
+                                    }
+                                    continue;
+                                }
+                                if (tag.startsWith("protocol")) {
+                                    protocol = tag.split(":")[1];
+                                    continue;
+                                }
+                                if (tag.startsWith("visualRange")) {
+                                    visualRange = tag.split(":")[1];
+                                    continue;
+                                }
+                                
+                                if (tag.startsWith("lb_policy")) {
+                                    lb_policy = tag.split(":")[1];
+                                    continue;
+                                }
+
+                            }
+
+
+                        } catch (Exception e) {
+                            LOGGER.error(serviceName + " read tag  throw exception", e);
+                            System.out.println(serviceName + " read tag  throw exception");
+                        }
+
+                        nodes.add(node);
+                    }
+
+                    microServiceInfo.setNodes(nodes);
+                    microServiceInfo.setProtocol(protocol);
+                    microServiceInfo.setUrl(url);
+                    microServiceInfo.setServiceName(serviceName);
+                    microServiceInfo.setLb_policy(lb_policy);
+                    if (!visualRange.isEmpty()) {
+                        microServiceInfo.setVisualRange(visualRange);
+                    }
+                    microServiceInfo.setVersion(version);
+
+                    try {
+                        MicroServiceFullInfo microServiceFullInfo =
+                                MicroServiceWrapper.getInstance().saveMicroServiceInstance(
+                                        microServiceInfo, false, "", "");
+                        LOGGER.info("register MicroServiceInfo successs:"
+                                + microServiceFullInfo.getServiceName());
+                    } catch (Exception e) {
+                        LOGGER.error("register MicroServiceInfo FAIL : " + serviceName, e);
+
+                    }
+                }
+            }
+        });
+        try {
+            LOGGER.info(serviceName + " Node Listen start");
+            cacheList.get().add(healthCache);
+            healthCache.start();
+
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error(serviceName + " Node Listen start throw exception", e);
+        }
+
+        return healthCache;
+    }
+
+    /**
+     * @Title startNodeListen
+     * @Description TODO(Open a service node changes to monitor)
+     * @param serviceName
+     * @return
+     * @return CatalogCache
+     */
+    @Deprecated
+    private CatalogCache startNodeListen(final String serviceName) {
+        final CatalogCache catalogCache = CatalogCache.newCache(catalogClient, serviceName, 30);
+        catalogCache.addListener(new ConsulCache.Listener<String, CatalogService>() {
+            @Override
+            public void notify(Map<String, CatalogService> newValues) {
+                // do Something with updated server map
+                System.out.println(serviceName + "--new node notify--");
+                LOGGER.info(serviceName + "--new node notify--");
+
+                if (newValues.isEmpty()) {
+                    System.out.println(serviceName + "-- nodeList is Empty--");
+                    LOGGER.info(serviceName + "--nodeList is Empty-stop service[" + serviceName
+                            + "] listen-");
+                    try {
+                        catalogCache.stop();
+                    } catch (Exception e) {
+                        LOGGER.equals(serviceName + "-- stop Node error:" + e.getMessage());
+                    }
+
+                } else {
+
+                    MicroServiceInfo microServiceInfo = new MicroServiceInfo();
+                    HashSet<Node> nodes = new HashSet<Node>();
+                    String url = "";
+                    String version = "", visualRange = "", protocol = "";
+
+                    for (Map.Entry<String, CatalogService> entry : newValues.entrySet()) {
+                        String nodeName = entry.getKey().toString();
+                        CatalogService value = (CatalogService) entry.getValue();
+
+                        Node node = new Node();
+                        node.setIp(value.getServiceAddress());
+                        node.setPort(String.valueOf(value.getServicePort()));
+
+
+                        try {
+                            List<String> tagList = value.getServiceTags();
+                            for (String tag : tagList) {
+                                if (tag.startsWith("url")) {
+                                    if (tag.split(":").length == 2) {
+                                        url = tag.split(":")[1];
+                                    } else {
+                                        url = "";
+                                    }
+
+
+                                    continue;
+                                }
+                                if (tag.startsWith("version")) {
+                                    if (tag.split(":").length == 2) {
+                                        version = tag.split(":")[1];
+                                    } else {
+                                        version = "";
+                                    }
+                                    continue;
+                                }
+                                if (tag.startsWith("protocol")) {
+                                    protocol = tag.split(":")[1];
+                                    continue;
+                                }
+                                if (tag.startsWith("visualRange")) {
+                                    visualRange = tag.split(":")[1];
+                                    continue;
+                                }
+                                if (tag.startsWith("ttl")) {
+                                    int ttl = Integer.parseInt(tag.split(":")[1]);
+                                    node.setTtl(ttl);
+                                    continue;
+                                }
+                            }
+
+
+                        } catch (Exception e) {
+                            LOGGER.error(serviceName + " read tag  throw exception", e);
+                            System.out.println(serviceName + " read tag  throw exception");
+                        }
+
+                        nodes.add(node);
+
+
+                        System.out.println(nodeName + ":" + value.getServiceAddress() + " "
+                                + value.getServicePort() + " " + value.getServiceTags());
+                    }
+
+                    microServiceInfo.setNodes(nodes);
+                    microServiceInfo.setProtocol(protocol);
+                    microServiceInfo.setUrl(url);
+                    microServiceInfo.setServiceName(serviceName);
+                    if (!visualRange.isEmpty()) {
+                        microServiceInfo.setVisualRange(visualRange);
+                    }
+                    microServiceInfo.setVersion(version);
+
+                    try {
+                        MicroServiceFullInfo microServiceFullInfo =
+                                MicroServiceWrapper.getInstance().saveMicroServiceInstance(
+                                        microServiceInfo, false, "", "");
+                        LOGGER.info("register MicroServiceInfo successs:" + microServiceFullInfo);
+                        System.out.println("register MicroServiceInfo successs:" + serviceName);
+                    } catch (Exception e) {
+                        LOGGER.error("register MicroServiceInfo FAIL : ", e);
+
+                    }
+                }
+            }
+        });
+        try {
+            System.out.println(serviceName + " Node Listen start");
+            LOGGER.info(serviceName + " Node Listen start");
+            catalogCache.start();
+
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            LOGGER.error(serviceName + " Node Listen start throw exception", e);
+        }
+
+        return catalogCache;
+    }
+
+
+    /**
+     * @Title getDiffrent
+     * @Description TODO(Extract the list1 and list2 different data sets)
+     * @param list1
+     * @param list2
+     * @return
+     * @return List<String>
+     */
+    private List<ServiceInfo> getDiffrent(List<ServiceInfo> list1, List<ServiceInfo> list2) {
+
+        List<ServiceInfo> diff = new ArrayList<ServiceInfo>();
+
+
+
+        for (ServiceInfo serviceInfo : list1) {
+            if (!list2.contains(serviceInfo)) {
+                diff.add(serviceInfo);
+            }
+        }
+
+        return diff;
+    }
+
+    public static void main(String[] args) {
+        ConsulClientApp consulTest = new ConsulClientApp("127.0.0.1", 10081);
+        consulTest.startServiceListen();
+
+
+    }
+
+
+}
index 37cb5c0..ef22994 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import io.swagger.annotations.ApiModelProperty;\r
-\r
-import java.io.Serializable;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-import com.fasterxml.jackson.annotation.JsonInclude.Include;\r
-\r
-\r
-public class ApiRouteInfo implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-       @ApiModelProperty(required = true)\r
-       private String  serviceName;    \r
-       \r
-       @ApiModelProperty(example = "v1", required = true)\r
-       private String  version;  \r
-       \r
-       @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)\r
-       private String  url;       \r
-       \r
-       private String  apiJson="";  //swagger json Path\r
-       \r
-        @ApiModelProperty(value = "[apiJson Type] 0:local file  1: remote file", allowableValues = "0,1", example = "1")\r
-       private String apiJsonType="1";  \r
-       private String  metricsUrl="";     \r
-    \r
-       @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")\r
-       private String  control="0";     \r
-    \r
-       @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")\r
-       private String  status="1"; \r
-   \r
-       @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")\r
-       private String visualRange = "1";   \r
-   \r
-       @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")\r
-    private String useOwnUpstream="0"; //负载均衡策略   \r
-       \r
-    @ApiModelProperty(required = true)\r
-       private RouteServer servers[]; \r
-       \r
-       \r
-       \r
-       public String getServiceName() {\r
-               return serviceName;\r
-       }\r
-       public void setServiceName(String serviceName) {\r
-               this.serviceName = serviceName;\r
-       }\r
-       public String getVersion() {\r
-               return version;\r
-       }\r
-       public void setVersion(String version) {\r
-               this.version = version;\r
-       }\r
-       \r
-       public String getApiJson() {\r
-               return apiJson;\r
-       }\r
-       public void setApiJson(String apiJson) {\r
-               this.apiJson = apiJson;\r
-       }\r
-       \r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-       public RouteServer[] getServers() {\r
-               return servers;\r
-       }\r
-       public void setServers(RouteServer[] servers) {\r
-               this.servers = servers;\r
-       }\r
-       \r
-\r
-       public String getApiJsonType() {\r
-               return apiJsonType;\r
-       }\r
-       public void setApiJsonType(String apiJsonType) {\r
-               this.apiJsonType = apiJsonType;\r
-       }\r
-       public String getMetricsUrl() {\r
-               return metricsUrl;\r
-       }\r
-       public void setMetricsUrl(String metricsUrl) {\r
-               this.metricsUrl = metricsUrl;\r
-       }\r
-       public String getControl() {\r
-               return control;\r
-       }\r
-       public void setControl(String control) {\r
-               this.control = control;\r
-       }\r
-       public String getStatus() {\r
-               return status;\r
-       }\r
-       public void setStatus(String status) {\r
-               this.status = status;\r
-       }\r
-    public String getVisualRange() {\r
-        return visualRange;\r
-    }\r
-    public void setVisualRange(String visualRange) {\r
-        this.visualRange = visualRange;\r
-    }\r
-    public String getUseOwnUpstream() {\r
-        return useOwnUpstream;\r
-    }\r
-\r
-    public void setUseOwnUpstream(String useOwnUpstream) {\r
-        this.useOwnUpstream = useOwnUpstream;\r
-    }\r
-\r
-\r
-       \r
-       \r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+
+public class ApiRouteInfo implements Serializable{
+       private static final long serialVersionUID = 1L;
+       @ApiModelProperty(required = true)
+       private String  serviceName;    
+       
+       @ApiModelProperty(example = "v1", required = true)
+       private String  version;  
+       
+       @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
+       private String  url;       
+       
+       private String  apiJson="";  //swagger json Path
+       
+        @ApiModelProperty(value = "[apiJson Type] 0:local file  1: remote file", allowableValues = "0,1", example = "1")
+       private String apiJsonType="1";  
+       private String  metricsUrl="";     
+    
+       @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")
+       private String  control="0";     
+    
+       @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")
+       private String  status="1"; 
+   
+       @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
+       private String visualRange = "1";   
+   
+       @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
+    private String useOwnUpstream="0"; //负载均衡策略   
+       
+    @ApiModelProperty(required = true)
+       private RouteServer servers[]; 
+       
+       
+       
+       public String getServiceName() {
+               return serviceName;
+       }
+       public void setServiceName(String serviceName) {
+               this.serviceName = serviceName;
+       }
+       public String getVersion() {
+               return version;
+       }
+       public void setVersion(String version) {
+               this.version = version;
+       }
+       
+       public String getApiJson() {
+               return apiJson;
+       }
+       public void setApiJson(String apiJson) {
+               this.apiJson = apiJson;
+       }
+       
+       public String getUrl() {
+               return url;
+       }
+       public void setUrl(String url) {
+               this.url = url;
+       }
+       public RouteServer[] getServers() {
+               return servers;
+       }
+       public void setServers(RouteServer[] servers) {
+               this.servers = servers;
+       }
+       
+
+       public String getApiJsonType() {
+               return apiJsonType;
+       }
+       public void setApiJsonType(String apiJsonType) {
+               this.apiJsonType = apiJsonType;
+       }
+       public String getMetricsUrl() {
+               return metricsUrl;
+       }
+       public void setMetricsUrl(String metricsUrl) {
+               this.metricsUrl = metricsUrl;
+       }
+       public String getControl() {
+               return control;
+       }
+       public void setControl(String control) {
+               this.control = control;
+       }
+       public String getStatus() {
+               return status;
+       }
+       public void setStatus(String status) {
+               this.status = status;
+       }
+    public String getVisualRange() {
+        return visualRange;
+    }
+    public void setVisualRange(String visualRange) {
+        this.visualRange = visualRange;
+    }
+    public String getUseOwnUpstream() {
+        return useOwnUpstream;
+    }
+
+    public void setUseOwnUpstream(String useOwnUpstream) {
+        this.useOwnUpstream = useOwnUpstream;
+    }
+
+
+       
+       
+
+}
index 2bcade0..68a22cf 100644 (file)
@@ -1,38 +1,38 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.io.Serializable;\r
-\r
-public class ConsulInfo implements Serializable{\r
-    private static final long serialVersionUID = 1L;\r
-    private String  ip;  \r
-    private int port;\r
-    \r
-    public String getIp() {\r
-        return ip;\r
-    }\r
-    public void setIp(String ip) {\r
-        this.ip = ip;\r
-    }\r
-    public int getPort() {\r
-        return port;\r
-    }\r
-    public void setPort(int port) {\r
-        this.port = port;\r
-    }\r
-\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.io.Serializable;
+
+public class ConsulInfo implements Serializable{
+    private static final long serialVersionUID = 1L;
+    private String  ip;  
+    private int port;
+    
+    public String getIp() {
+        return ip;
+    }
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+    public int getPort() {
+        return port;
+    }
+    public void setPort(int port) {
+        this.port = port;
+    }
+
 }
\ No newline at end of file
 }
\ No newline at end of file
index ee9dc56..89f51af 100644 (file)
@@ -1,39 +1,39 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.io.IOException;\r
-import java.text.SimpleDateFormat;\r
-import java.util.Date;\r
-\r
-import com.fasterxml.jackson.core.JsonGenerator;\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.JsonSerializer;\r
-import com.fasterxml.jackson.databind.SerializerProvider;\r
-\r
-public class CustomDateSerializer extends JsonSerializer<Date> {  \r
-    \r
-    @Override  \r
-    public void serialize(Date value,   \r
-            JsonGenerator jsonGenerator,   \r
-            SerializerProvider provider)  \r
-            throws IOException, JsonProcessingException {  \r
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");  \r
-        jsonGenerator.writeString(sdf.format(value));  \r
-    }  \r
-    \r
-  \r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+
+public class CustomDateSerializer extends JsonSerializer<Date> {  
+    
+    @Override  
+    public void serialize(Date value,   
+            JsonGenerator jsonGenerator,   
+            SerializerProvider provider)  
+            throws IOException, JsonProcessingException {  
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");  
+        jsonGenerator.writeString(sdf.format(value));  
+    }  
+    
+  
 }  
\ No newline at end of file
 }  
\ No newline at end of file
index 378b4d5..208f3ff 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import io.swagger.annotations.ApiModelProperty;\r
-\r
-import java.io.Serializable;\r
-\r
-public class CustomRouteInfo implements Serializable{\r
-       \r
-       private static final long serialVersionUID = 1L; \r
-       @ApiModelProperty(required = true)\r
-       private String  serviceName; \r
-       \r
-       @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)\r
-       private String  url;      \r
-       \r
-    @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")\r
-       private String  control="0";    \r
-       \r
-    @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")\r
-    private String  status="1"; \r
-       \r
-    @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")\r
-    private String visualRange = "1"; \r
-   \r
-    @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")\r
-    private String useOwnUpstream="0"; //负载均衡策略   \r
-\r
-    @ApiModelProperty(required = true)\r
-       private RouteServer servers[]; \r
-\r
-       public String getServiceName() {\r
-               return serviceName;\r
-       }\r
-\r
-       public void setServiceName(String serviceName) {\r
-               this.serviceName = serviceName;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public RouteServer[] getServers() {\r
-               return servers;\r
-       }\r
-\r
-       public void setServers(RouteServer[] servers) {\r
-               this.servers = servers;\r
-       }\r
-\r
-       public String getControl() {\r
-               return control;\r
-       }\r
-\r
-       public void setControl(String control) {\r
-               this.control = control;\r
-       }\r
-\r
-       public String getStatus() {\r
-               return status;\r
-       }\r
-\r
-       public void setStatus(String status) {\r
-               this.status = status;\r
-       }\r
-\r
-    public String getVisualRange() {\r
-        return visualRange;\r
-    }\r
-\r
-    public void setVisualRange(String visualRange) {\r
-        this.visualRange = visualRange;\r
-    }\r
-\r
-    public String getUseOwnUpstream() {\r
-        return useOwnUpstream;\r
-    }\r
-\r
-    public void setUseOwnUpstream(String useOwnUpstream) {\r
-        this.useOwnUpstream = useOwnUpstream;\r
-    }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+public class CustomRouteInfo implements Serializable{
+       
+       private static final long serialVersionUID = 1L; 
+       @ApiModelProperty(required = true)
+       private String  serviceName; 
+       
+       @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
+       private String  url;      
+       
+    @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")
+       private String  control="0";    
+       
+    @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")
+    private String  status="1"; 
+       
+    @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
+    private String visualRange = "1"; 
+   
+    @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
+    private String useOwnUpstream="0"; //负载均衡策略   
+
+    @ApiModelProperty(required = true)
+       private RouteServer servers[]; 
+
+       public String getServiceName() {
+               return serviceName;
+       }
+
+       public void setServiceName(String serviceName) {
+               this.serviceName = serviceName;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public RouteServer[] getServers() {
+               return servers;
+       }
+
+       public void setServers(RouteServer[] servers) {
+               this.servers = servers;
+       }
+
+       public String getControl() {
+               return control;
+       }
+
+       public void setControl(String control) {
+               this.control = control;
+       }
+
+       public String getStatus() {
+               return status;
+       }
+
+       public void setStatus(String status) {
+               this.status = status;
+       }
+
+    public String getVisualRange() {
+        return visualRange;
+    }
+
+    public void setVisualRange(String visualRange) {
+        this.visualRange = visualRange;
+    }
+
+    public String getUseOwnUpstream() {
+        return useOwnUpstream;
+    }
+
+    public void setUseOwnUpstream(String useOwnUpstream) {
+        this.useOwnUpstream = useOwnUpstream;
+    }
+
+}
index ac16cbb..dc6ec40 100644 (file)
@@ -1,49 +1,49 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.io.Serializable;\r
-\r
-public class DiscoverInfo  implements Serializable{\r
-    private static final long serialVersionUID = 1L;\r
-    private String  ip;  \r
-    private int port;\r
-    private boolean enabled;\r
-\r
-    \r
-    public String getIp() {\r
-        return ip;\r
-    }\r
-    public void setIp(String ip) {\r
-        this.ip = ip;\r
-    }\r
-    public int getPort() {\r
-        return port;\r
-    }\r
-    public void setPort(int port) {\r
-        this.port = port;\r
-    }\r
-    public boolean isEnabled() {\r
-        return enabled;\r
-    }\r
-    public void setEnabled(boolean enabled) {\r
-        this.enabled = enabled;\r
-    }\r
-   \r
-    \r
-    \r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.io.Serializable;
+
+public class DiscoverInfo  implements Serializable{
+    private static final long serialVersionUID = 1L;
+    private String  ip;  
+    private int port;
+    private boolean enabled;
+
+    
+    public String getIp() {
+        return ip;
+    }
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+    public int getPort() {
+        return port;
+    }
+    public void setPort(int port) {
+        this.port = port;
+    }
+    public boolean isEnabled() {
+        return enabled;
+    }
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+   
+    
+    
+
+}
index 19d9ff6..9e40783 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import io.swagger.annotations.ApiModelProperty;\r
-\r
-import java.io.Serializable;\r
-\r
-\r
-public class IuiRouteInfo implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-       @ApiModelProperty(required = true)\r
-       private String  serviceName;  \r
-       \r
-       @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)\r
-       private String  url;      \r
-       \r
-    @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")\r
-       private String  control="0";      \r
-       \r
-    @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")\r
-       private String  status="1"; \r
-    \r
-    @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")\r
-    private String visualRange = "1"; \r
-    \r
-    @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")\r
-    private String useOwnUpstream="0"; //负载均衡策略   \r
-\r
-    @ApiModelProperty(required = true)\r
-       private RouteServer servers[]; \r
-\r
-       public String getServiceName() {\r
-               return serviceName;\r
-       }\r
-\r
-       public void setServiceName(String serviceName) {\r
-               this.serviceName = serviceName;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public RouteServer[] getServers() {\r
-               return servers;\r
-       }\r
-\r
-       public void setServers(RouteServer[] servers) {\r
-               this.servers = servers;\r
-       }\r
-\r
-       public String getControl() {\r
-               return control;\r
-       }\r
-\r
-       public void setControl(String control) {\r
-               this.control = control;\r
-       }\r
-\r
-       public String getStatus() {\r
-               return status;\r
-       }\r
-\r
-       public void setStatus(String status) {\r
-               this.status = status;\r
-       }\r
-\r
-    public String getVisualRange() {\r
-        return visualRange;\r
-    }\r
-\r
-    public void setVisualRange(String visualRange) {\r
-        this.visualRange = visualRange;\r
-    }\r
-\r
-    public String getUseOwnUpstream() {\r
-        return useOwnUpstream;\r
-    }\r
-\r
-    public void setUseOwnUpstream(String useOwnUpstream) {\r
-        this.useOwnUpstream = useOwnUpstream;\r
-    }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+
+public class IuiRouteInfo implements Serializable{
+       private static final long serialVersionUID = 1L;
+       @ApiModelProperty(required = true)
+       private String  serviceName;  
+       
+       @ApiModelProperty(value = "Target Service URL,start with /",example = "/test", required = true)
+       private String  url;      
+       
+    @ApiModelProperty(value = "[control Range] 0:default   1:readonly  2:hidden ", allowableValues = "0,1,2", example = "0")
+       private String  control="0";      
+       
+    @ApiModelProperty(value = "[status] 1:abled    0:disabled ", allowableValues = "0,1", example = "1")
+       private String  status="1"; 
+    
+    @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
+    private String visualRange = "1"; 
+    
+    @ApiModelProperty(value = "[LB Policy]non_ip_hash:0,ip_hash:1", allowableValues = "0,1", example = "0")
+    private String useOwnUpstream="0"; //负载均衡策略   
+
+    @ApiModelProperty(required = true)
+       private RouteServer servers[]; 
+
+       public String getServiceName() {
+               return serviceName;
+       }
+
+       public void setServiceName(String serviceName) {
+               this.serviceName = serviceName;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public RouteServer[] getServers() {
+               return servers;
+       }
+
+       public void setServers(RouteServer[] servers) {
+               this.servers = servers;
+       }
+
+       public String getControl() {
+               return control;
+       }
+
+       public void setControl(String control) {
+               this.control = control;
+       }
+
+       public String getStatus() {
+               return status;
+       }
+
+       public void setStatus(String status) {
+               this.status = status;
+       }
+
+    public String getVisualRange() {
+        return visualRange;
+    }
+
+    public void setVisualRange(String visualRange) {
+        this.visualRange = visualRange;
+    }
+
+    public String getUseOwnUpstream() {
+        return useOwnUpstream;
+    }
+
+    public void setUseOwnUpstream(String useOwnUpstream) {
+        this.useOwnUpstream = useOwnUpstream;
+    }
+
+}
index 097c918..339bb31 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-\r
-\r
-import lombok.AllArgsConstructor;\r
-import lombok.Data;\r
-import lombok.NoArgsConstructor;\r
-\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-\r
-@Data\r
-@NoArgsConstructor\r
-@AllArgsConstructor\r
-public class MetricsInfo{\r
-       private Gauges gauges;\r
-       private Timers timers;\r
-}\r
-\r
-@Data\r
-@NoArgsConstructor\r
-@AllArgsConstructor\r
-class Gauges {\r
-       \r
-       @JsonProperty("jvm.attribute.uptime") \r
-       private JVMMetrics jvm_attribute_uptime;\r
-       \r
-       @JsonProperty("jvm.memory.pools.Eden-Space.usage") \r
-       private JVMMetrics jvm_memory_pools_Eden_Space_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.PS-Eden-Space.usage") \r
-       private JVMMetrics jvm_memory_pools_PS_Eden_Space_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.Perm-Gen.usage") \r
-       private JVMMetrics jvm_memory_pools_Perm_Gen_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.PS-Perm-Gen.usage")\r
-       private JVMMetrics jvm_memory_pools_PS_Perm_Gen_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.Survivor-Space.usage")\r
-       private JVMMetrics jvm_memory_pools_Survivor_Space_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.PS-Survivor-Space.usage")\r
-       private JVMMetrics jvm_memory_pools_PS_Survivor_Space_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.Tenured-Gen.usage")\r
-       private JVMMetrics jvm_memory_pools_Tenured_Gen_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.PS-Old-Gen.usage")\r
-       private JVMMetrics jvm_memory_pools_PS_Old_Gen_usage;\r
-       \r
-       @JsonProperty("jvm.memory.pools.Code-Cache.usage")\r
-       private JVMMetrics jvm_memory_pools_Code_Cache_usage;\r
-       \r
-       @JsonProperty("jvm.memory.heap.init")\r
-       private JVMMetrics jvm_memory_heap_init;\r
-       \r
-       @JsonProperty("jvm.memory.non-heap.init")\r
-       private JVMMetrics jvm_memory_non_heap_init;\r
-       \r
-       @JsonProperty("jvm.memory.heap.used")\r
-       private JVMMetrics jvm_memory_heap_used;\r
-       \r
-       @JsonProperty("jvm.memory.non-heap.used")\r
-       private JVMMetrics jvm_memory_non_heap_used;\r
-       \r
-       @JsonProperty("jvm.memory.heap.max")\r
-       private JVMMetrics jvm_memory_heap_max;\r
-       \r
-       @JsonProperty("jvm.threads.runnable.count")\r
-       private JVMMetrics jvm_threads_runnable_count;  \r
-       \r
-       @JsonProperty("jvm.threads.timed_waiting.count")\r
-       private JVMMetrics jvm_threads_timed_waiting_count;\r
-       \r
-       @JsonProperty("jvm.threads.waiting.count")\r
-       private JVMMetrics jvm_threads_waiting_count;\r
-       \r
-       @JsonProperty("jvm.threads.blocked.count")\r
-       private JVMMetrics jvm_threads_blocked_count;\r
-       \r
-       @JsonProperty("jvm.threads.count")\r
-       private JVMMetrics jvm_threads_count;\r
-       \r
-       \r
-       \r
-}\r
-\r
-@Data\r
-@NoArgsConstructor\r
-@AllArgsConstructor\r
-class Timers{\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.addApiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_addApiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.deleteApiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_deleteApiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiDocs")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiDocs;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoutes")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoutes;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getServerIP")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getServerIP;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.updateApiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_updateApiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.addIuiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_addIuiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.deleteIuiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_deleteIuiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoute;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoutes")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoutes;\r
-       \r
-       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.updateIuiRoute")\r
-       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_updateIuiRoute;\r
-       \r
-       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.get-requests")\r
-       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_get_requests;\r
-       \r
-       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.post-requests")\r
-       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_post_requests;\r
-       \r
-       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.put-requests")\r
-       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_put_requests;\r
-       \r
-       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.delete-requests")\r
-       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_delete_requests;\r
-       \r
-       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.other-requests")\r
-       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_other_requests;\r
-       \r
-}\r
-\r
-@Data\r
-@NoArgsConstructor\r
-@AllArgsConstructor\r
-class JVMMetrics{\r
-       private double value;\r
-}\r
-\r
-@Data\r
-@NoArgsConstructor\r
-@AllArgsConstructor\r
-class HttpMetrics{\r
-       private int count;\r
-       private double max;\r
-       private double mean;\r
-       private double min;\r
-       private double p50;\r
-       private double p75;\r
-       private double p95;\r
-       private double p98;\r
-       private double p99;\r
-       private double p999;\r
-       private double stddev;\r
-       private double m15_rate;\r
-       private double m1_rate;\r
-       private double m5_rate;\r
-       private double mean_rate;\r
-       private String duration_units;\r
-       private String rate_units;\r
-}\r
-\r
-\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class MetricsInfo{
+       private Gauges gauges;
+       private Timers timers;
+}
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+class Gauges {
+       
+       @JsonProperty("jvm.attribute.uptime") 
+       private JVMMetrics jvm_attribute_uptime;
+       
+       @JsonProperty("jvm.memory.pools.Eden-Space.usage") 
+       private JVMMetrics jvm_memory_pools_Eden_Space_usage;
+       
+       @JsonProperty("jvm.memory.pools.PS-Eden-Space.usage") 
+       private JVMMetrics jvm_memory_pools_PS_Eden_Space_usage;
+       
+       @JsonProperty("jvm.memory.pools.Perm-Gen.usage") 
+       private JVMMetrics jvm_memory_pools_Perm_Gen_usage;
+       
+       @JsonProperty("jvm.memory.pools.PS-Perm-Gen.usage")
+       private JVMMetrics jvm_memory_pools_PS_Perm_Gen_usage;
+       
+       @JsonProperty("jvm.memory.pools.Survivor-Space.usage")
+       private JVMMetrics jvm_memory_pools_Survivor_Space_usage;
+       
+       @JsonProperty("jvm.memory.pools.PS-Survivor-Space.usage")
+       private JVMMetrics jvm_memory_pools_PS_Survivor_Space_usage;
+       
+       @JsonProperty("jvm.memory.pools.Tenured-Gen.usage")
+       private JVMMetrics jvm_memory_pools_Tenured_Gen_usage;
+       
+       @JsonProperty("jvm.memory.pools.PS-Old-Gen.usage")
+       private JVMMetrics jvm_memory_pools_PS_Old_Gen_usage;
+       
+       @JsonProperty("jvm.memory.pools.Code-Cache.usage")
+       private JVMMetrics jvm_memory_pools_Code_Cache_usage;
+       
+       @JsonProperty("jvm.memory.heap.init")
+       private JVMMetrics jvm_memory_heap_init;
+       
+       @JsonProperty("jvm.memory.non-heap.init")
+       private JVMMetrics jvm_memory_non_heap_init;
+       
+       @JsonProperty("jvm.memory.heap.used")
+       private JVMMetrics jvm_memory_heap_used;
+       
+       @JsonProperty("jvm.memory.non-heap.used")
+       private JVMMetrics jvm_memory_non_heap_used;
+       
+       @JsonProperty("jvm.memory.heap.max")
+       private JVMMetrics jvm_memory_heap_max;
+       
+       @JsonProperty("jvm.threads.runnable.count")
+       private JVMMetrics jvm_threads_runnable_count;  
+       
+       @JsonProperty("jvm.threads.timed_waiting.count")
+       private JVMMetrics jvm_threads_timed_waiting_count;
+       
+       @JsonProperty("jvm.threads.waiting.count")
+       private JVMMetrics jvm_threads_waiting_count;
+       
+       @JsonProperty("jvm.threads.blocked.count")
+       private JVMMetrics jvm_threads_blocked_count;
+       
+       @JsonProperty("jvm.threads.count")
+       private JVMMetrics jvm_threads_count;
+       
+       
+       
+}
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+class Timers{
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.addApiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_addApiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.deleteApiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_deleteApiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiDocs")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiDocs;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getApiRoutes")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getApiRoutes;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.getServerIP")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_getServerIP;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.ApiRouteResource.updateApiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_ApiRouteResource_updateApiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.addIuiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_addIuiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.deleteIuiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_deleteIuiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoute;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.getIuiRoutes")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_getIuiRoutes;
+       
+       @JsonProperty("com.zte.ums.nfv.eco.hsif.msb.resources.IuiRouteResource.updateIuiRoute")
+       private HttpMetrics com_zte_ums_nfv_eco_hsif_msb_resources_IuiRouteResource_updateIuiRoute;
+       
+       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.get-requests")
+       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_get_requests;
+       
+       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.post-requests")
+       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_post_requests;
+       
+       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.put-requests")
+       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_put_requests;
+       
+       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.delete-requests")
+       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_delete_requests;
+       
+       @JsonProperty("io.dropwizard.jetty.MutableServletContextHandler.other-requests")
+       private HttpMetrics io_dropwizard_jetty_MutableServletContextHandler_other_requests;
+       
+}
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+class JVMMetrics{
+       private double value;
+}
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+class HttpMetrics{
+       private int count;
+       private double max;
+       private double mean;
+       private double min;
+       private double p50;
+       private double p75;
+       private double p95;
+       private double p98;
+       private double p99;
+       private double p999;
+       private double stddev;
+       private double m15_rate;
+       private double m1_rate;
+       private double m5_rate;
+       private double mean_rate;
+       private String duration_units;
+       private String rate_units;
+}
+
+
index 3ce7dc2..14cea47 100644 (file)
@@ -1,44 +1,44 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.io.Serializable;\r
-import java.util.Set;\r
-\r
-public class MicroServiceFullInfo  extends Service<NodeInfo> implements Serializable {\r
-    private static final long serialVersionUID = 1L;\r
\r
-    private Set<NodeInfo> nodes;\r
-    \r
-    private String status = "1";  //0:disable 1:enable\r
-\r
-    public Set<NodeInfo> getNodes() {\r
-        return nodes;\r
-    }\r
-\r
-    public void setNodes(Set<NodeInfo> nodes) {\r
-        this.nodes = nodes;\r
-    }\r
-    \r
-    public String getStatus() {\r
-        return status;\r
-    }\r
-    public void setStatus(String status) {\r
-        this.status = status;\r
-    }\r
-    \r
-  \r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.io.Serializable;
+import java.util.Set;
+
+public class MicroServiceFullInfo  extends Service<NodeInfo> implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Set<NodeInfo> nodes;
+    
+    private String status = "1";  //0:disable 1:enable
+
+    public Set<NodeInfo> getNodes() {
+        return nodes;
+    }
+
+    public void setNodes(Set<NodeInfo> nodes) {
+        this.nodes = nodes;
+    }
+    
+    public String getStatus() {
+        return status;
+    }
+    public void setStatus(String status) {
+        this.status = status;
+    }
+    
+  
 }
\ No newline at end of file
 }
\ No newline at end of file
index 2b88c21..02609f9 100644 (file)
@@ -1,38 +1,38 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.io.Serializable;\r
-import java.util.Set;\r
-\r
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
-\r
-@JsonIgnoreProperties(ignoreUnknown = true)\r
-public class MicroServiceInfo extends Service<Node> implements Serializable {\r
-    private static final long serialVersionUID = 1L;\r
\r
-    private Set<Node> nodes;\r
-\r
-    public Set<Node> getNodes() {\r
-        return nodes;\r
-    }\r
-\r
-    public void setNodes(Set<Node> nodes) {\r
-        this.nodes = nodes;\r
-    }\r
-    \r
-  \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class MicroServiceInfo extends Service<Node> implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Set<Node> nodes;
+
+    public Set<Node> getNodes() {
+        return nodes;
+    }
+
+    public void setNodes(Set<Node> nodes) {
+        this.nodes = nodes;
+    }
+    
+  
+}
index 96b340a..0879c61 100644 (file)
@@ -1,75 +1,75 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import io.swagger.annotations.ApiModelProperty;\r
-\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-import com.fasterxml.jackson.annotation.JsonIgnore;\r
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;\r
-\r
-public class Node implements Serializable {\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @ApiModelProperty(required = true)\r
-    private String ip;\r
-    \r
-    @ApiModelProperty(required = true)\r
-    private String port;\r
-    \r
-    private int ttl=-1;\r
-  \r
-\r
-   \r
-\r
-    public String getIp() {\r
-        return ip;\r
-    }\r
-\r
-    public void setIp(String ip) {\r
-        this.ip = ip;\r
-    }\r
-\r
-    public String getPort() {\r
-        return port;\r
-    }\r
-\r
-    public void setPort(String port) {\r
-        this.port = port;\r
-    }\r
-\r
-    public int getTtl() {\r
-        return ttl;\r
-    }\r
-\r
-    public void setTtl(int ttl) {\r
-        this.ttl = ttl;\r
-    }\r
-\r
-    public Node(){\r
-        \r
-    }\r
-    \r
-    public Node(String ip,String port,int ttl){\r
-        this.ip = ip;\r
-        this.port = port;\r
-        this.ttl = ttl;\r
-    }\r
-    \r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class Node implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(required = true)
+    private String ip;
+    
+    @ApiModelProperty(required = true)
+    private String port;
+    
+    private int ttl=-1;
+  
+
+   
+
+    public String getIp() {
+        return ip;
+    }
+
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+
+    public String getPort() {
+        return port;
+    }
+
+    public void setPort(String port) {
+        this.port = port;
+    }
+
+    public int getTtl() {
+        return ttl;
+    }
+
+    public void setTtl(int ttl) {
+        this.ttl = ttl;
+    }
+
+    public Node(){
+        
+    }
+    
+    public Node(String ip,String port,int ttl){
+        this.ip = ip;
+        this.port = port;
+        this.ttl = ttl;
+    }
+    
+    
+}
index 493b9a9..e3a30e7 100644 (file)
@@ -1,74 +1,74 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.util.Date;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-import com.fasterxml.jackson.annotation.JsonInclude.Include;\r
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;\r
-\r
-public class NodeInfo extends Node {\r
-\r
-    private static final long serialVersionUID = 8955786461351557306L;\r
-    \r
-    private String nodeId;\r
-    \r
-  \r
-\r
-    @JsonSerialize(using = CustomDateSerializer.class)\r
-    private Date expiration;\r
-    \r
-    @JsonSerialize(using = CustomDateSerializer.class)\r
-    private Date created_at;\r
-    \r
-    @JsonSerialize(using = CustomDateSerializer.class)\r
-    private Date updated_at;\r
-\r
-    public Date getExpiration() {\r
-        return expiration;\r
-    }\r
-\r
-    public void setExpiration(Date expiration) {\r
-        this.expiration = expiration;\r
-    }\r
-\r
-    public Date getCreated_at() {\r
-        return created_at;\r
-    }\r
-\r
-    public void setCreated_at(Date created_at) {\r
-        this.created_at = created_at;\r
-    }\r
-\r
-    public Date getUpdated_at() {\r
-        return updated_at;\r
-    }\r
-\r
-    public void setUpdated_at(Date updated_at) {\r
-        this.updated_at = updated_at;\r
-    }\r
-\r
-    public String getNodeId() {\r
-        return nodeId;\r
-    }\r
-\r
-    public void setNodeId(String nodeId) {\r
-        this.nodeId = nodeId;\r
-    }\r
-  \r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class NodeInfo extends Node {
+
+    private static final long serialVersionUID = 8955786461351557306L;
+    
+    private String nodeId;
+    
+  
+
+    @JsonSerialize(using = CustomDateSerializer.class)
+    private Date expiration;
+    
+    @JsonSerialize(using = CustomDateSerializer.class)
+    private Date created_at;
+    
+    @JsonSerialize(using = CustomDateSerializer.class)
+    private Date updated_at;
+
+    public Date getExpiration() {
+        return expiration;
+    }
+
+    public void setExpiration(Date expiration) {
+        this.expiration = expiration;
+    }
+
+    public Date getCreated_at() {
+        return created_at;
+    }
+
+    public void setCreated_at(Date created_at) {
+        this.created_at = created_at;
+    }
+
+    public Date getUpdated_at() {
+        return updated_at;
+    }
+
+    public void setUpdated_at(Date updated_at) {
+        this.updated_at = updated_at;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+  
+    
+}
index e7349b9..675bc69 100644 (file)
@@ -1,68 +1,68 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import io.swagger.annotations.ApiModelProperty;\r
-\r
-import java.io.Serializable;\r
-\r
-\r
-public class RouteServer implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-        @ApiModelProperty(required = true)\r
-       private String ip;\r
-        \r
-        @ApiModelProperty(required = true) \r
-       private String port;\r
-       private int weight=0;\r
-\r
-       public String getIp() {\r
-               return ip;\r
-       }\r
-\r
-       public void setIp(String ip) {\r
-               this.ip = ip;\r
-       }\r
-\r
-       \r
-\r
-       public int getWeight() {\r
-               return weight;\r
-       }\r
-\r
-       public void setWeight(int weight) {\r
-               this.weight = weight;\r
-       }\r
-       \r
-       public RouteServer(){\r
-               \r
-       }\r
-       \r
-       public RouteServer(String ip,String port){\r
-               this.ip=ip;\r
-               this.port=port;\r
-               this.weight=0;\r
-       }\r
-\r
-    public String getPort() {\r
-        return port;\r
-    }\r
-\r
-    public void setPort(String port) {\r
-        this.port = port;\r
-    }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+
+public class RouteServer implements Serializable{
+       private static final long serialVersionUID = 1L;
+        @ApiModelProperty(required = true)
+       private String ip;
+        
+        @ApiModelProperty(required = true) 
+       private String port;
+       private int weight=0;
+
+       public String getIp() {
+               return ip;
+       }
+
+       public void setIp(String ip) {
+               this.ip = ip;
+       }
+
+       
+
+       public int getWeight() {
+               return weight;
+       }
+
+       public void setWeight(int weight) {
+               this.weight = weight;
+       }
+       
+       public RouteServer(){
+               
+       }
+       
+       public RouteServer(String ip,String port){
+               this.ip=ip;
+               this.port=port;
+               this.weight=0;
+       }
+
+    public String getPort() {
+        return port;
+    }
+
+    public void setPort(String port) {
+        this.port = port;
+    }
+
+}
index 618f994..8969e1d 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import io.swagger.annotations.ApiModelProperty;\r
-\r
-import java.io.Serializable;\r
-import java.util.Set;\r
-\r
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
-\r
-@JsonIgnoreProperties(ignoreUnknown = true)\r
-public class Service<T> implements Serializable {\r
-    private static final long serialVersionUID = 1L;\r
-    // 服务名\r
-    @ApiModelProperty(required = true)\r
-    private String serviceName;\r
-    // 版本号\r
-    @ApiModelProperty(example = "v1")\r
-    private String version="";\r
-    // 服务url\r
-    @ApiModelProperty(value = "Target Service URL,start with /",example = "/api/serviceName/v1", required = true)\r
-    private String url="";\r
-    // 服务对应协议,比如REST、UI、MQ、FTP、SNMP、TCP、UDP\r
-    @ApiModelProperty(value = "Service Protocol", allowableValues = "REST,UI, MQ, FTP,SNMP,TCP,UDP", example = "REST",required = true)\r
-    private String protocol = "";\r
-    \r
-    //服务的可见范围   系统间:0   系统内:1 \r
-    @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")\r
-    private String visualRange = "1";\r
-   \r
-    //负载均衡策略类型\r
-    @ApiModelProperty(value = "lb policy", allowableValues = "round-robin,hash,least_conn", example = "hash")\r
-    private String lb_policy="";\r
-   \r
-    @ApiModelProperty(required = true)\r
-    private Set<T> nodes;\r
-\r
-    public Set<T> getNodes() {\r
-        return nodes;\r
-    }\r
-\r
-    public void setNodes(Set<T> nodes) {\r
-        this.nodes = nodes;\r
-    }\r
-    \r
-    public String getServiceName() {\r
-        return serviceName;\r
-    }\r
-    public void setServiceName(String serviceName) {\r
-        this.serviceName = serviceName;\r
-    }\r
-    public String getVersion() {\r
-        return version;\r
-    }\r
-    public void setVersion(String version) {\r
-        this.version = version;\r
-    }\r
-    public String getUrl() {\r
-        return url;\r
-    }\r
-    public void setUrl(String url) {\r
-        this.url = url;\r
-    }\r
-    public String getProtocol() {\r
-        return protocol;\r
-    }\r
-    public void setProtocol(String protocol) {\r
-        this.protocol = protocol;\r
-    }\r
-    \r
-    public String getVisualRange() {\r
-        return visualRange;\r
-    }\r
-\r
-    public void setVisualRange(String visualRange) {\r
-        this.visualRange = visualRange;\r
-    }\r
-    \r
-\r
-    public String getLb_policy() {\r
-        return lb_policy;\r
-    }\r
-\r
-    public void setLb_policy(String lb_policy) {\r
-        this.lb_policy = lb_policy;\r
-    }\r
-\r
-    \r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Service<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+    // 服务名
+    @ApiModelProperty(required = true)
+    private String serviceName;
+    // 版本号
+    @ApiModelProperty(example = "v1")
+    private String version="";
+    // 服务url
+    @ApiModelProperty(value = "Target Service URL,start with /",example = "/api/serviceName/v1", required = true)
+    private String url="";
+    // 服务对应协议,比如REST、UI、MQ、FTP、SNMP、TCP、UDP
+    @ApiModelProperty(value = "Service Protocol", allowableValues = "REST,UI, MQ, FTP,SNMP,TCP,UDP", example = "REST",required = true)
+    private String protocol = "";
+    
+    //服务的可见范围   系统间:0   系统内:1 
+    @ApiModelProperty(value = "[visual Range]interSystem:0,inSystem:1", allowableValues = "0,1", example = "1")
+    private String visualRange = "1";
+   
+    //负载均衡策略类型
+    @ApiModelProperty(value = "lb policy", allowableValues = "round-robin,hash,least_conn", example = "hash")
+    private String lb_policy="";
+   
+    @ApiModelProperty(required = true)
+    private Set<T> nodes;
+
+    public Set<T> getNodes() {
+        return nodes;
+    }
+
+    public void setNodes(Set<T> nodes) {
+        this.nodes = nodes;
+    }
+    
+    public String getServiceName() {
+        return serviceName;
+    }
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+    public String getVersion() {
+        return version;
+    }
+    public void setVersion(String version) {
+        this.version = version;
+    }
+    public String getUrl() {
+        return url;
+    }
+    public void setUrl(String url) {
+        this.url = url;
+    }
+    public String getProtocol() {
+        return protocol;
+    }
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+    
+    public String getVisualRange() {
+        return visualRange;
+    }
+
+    public void setVisualRange(String visualRange) {
+        this.visualRange = visualRange;
+    }
+    
+
+    public String getLb_policy() {
+        return lb_policy;
+    }
+
+    public void setLb_policy(String lb_policy) {
+        this.lb_policy = lb_policy;
+    }
+
+    
+    
+}
index 65ca179..bb375ac 100644 (file)
@@ -1,88 +1,88 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api;\r
-\r
-import java.io.Serializable;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-public class ServiceAccessInfo implements Serializable {\r
-    private static final long serialVersionUID = 1L;\r
-    // (api|iui|custom|p2p)\r
-    private String serviceType;\r
-\r
-    private String serviceName;\r
-    @JsonInclude(JsonInclude.Include.NON_NULL)\r
-    private String version;\r
-\r
-    private String accessAddr;\r
-\r
-    /**\r
-     * @return the serviceType\r
-     */\r
-    public String getServiceType() {\r
-        return serviceType;\r
-    }\r
-\r
-    /**\r
-     * @param serviceType the serviceType to set\r
-     */\r
-    public void setServiceType(String serviceType) {\r
-        this.serviceType = serviceType;\r
-    }\r
-\r
-    /**\r
-     * @return the serviceName\r
-     */\r
-    public String getServiceName() {\r
-        return serviceName;\r
-    }\r
-\r
-    /**\r
-     * @param serviceName the serviceName to set\r
-     */\r
-    public void setServiceName(String serviceName) {\r
-        this.serviceName = serviceName;\r
-    }\r
-\r
-    /**\r
-     * @return the version\r
-     */\r
-    public String getVersion() {\r
-        return version;\r
-    }\r
-\r
-    /**\r
-     * @param version the version to set\r
-     */\r
-    public void setVersion(String version) {\r
-        this.version = version;\r
-    }\r
-\r
-    /**\r
-     * @return the accessAddr\r
-     */\r
-    public String getAccessAddr() {\r
-        return accessAddr;\r
-    }\r
-\r
-    /**\r
-     * @param accessAddr the accessAddr to set\r
-     */\r
-    public void setAccessAddr(String accessAddr) {\r
-        this.accessAddr = accessAddr;\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+public class ServiceAccessInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+    // (api|iui|custom|p2p)
+    private String serviceType;
+
+    private String serviceName;
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    private String version;
+
+    private String accessAddr;
+
+    /**
+     * @return the serviceType
+     */
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    /**
+     * @param serviceType the serviceType to set
+     */
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    /**
+     * @return the serviceName
+     */
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    /**
+     * @param serviceName the serviceName to set
+     */
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    /**
+     * @return the version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    /**
+     * @return the accessAddr
+     */
+    public String getAccessAddr() {
+        return accessAddr;
+    }
+
+    /**
+     * @param accessAddr the accessAddr to set
+     */
+    public void setAccessAddr(String accessAddr) {
+        this.accessAddr = accessAddr;
+    }
+}
index 8946da3..a377c4c 100644 (file)
@@ -1,28 +1,28 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api.exception;\r
-\r
-import javax.ws.rs.InternalServerErrorException;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-\r
-public class ExtendedInternalServerErrorException extends InternalServerErrorException {\r
-    \r
-    public ExtendedInternalServerErrorException(final String message) {\r
-        super(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).type(MediaType.TEXT_PLAIN).build());\r
-    }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api.exception;
+
+import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+public class ExtendedInternalServerErrorException extends InternalServerErrorException {
+    
+    public ExtendedInternalServerErrorException(final String message) {
+        super(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).type(MediaType.TEXT_PLAIN).build());
+    }
+
+}
index defd059..e3e74ea 100644 (file)
@@ -1,28 +1,28 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api.exception;\r
-\r
-import javax.ws.rs.NotFoundException;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-\r
-public class ExtendedNotFoundException extends NotFoundException {\r
-\r
-    public ExtendedNotFoundException(final String message) {\r
-        super(Response.status(Response.Status.NOT_FOUND).entity(message).type(MediaType.TEXT_PLAIN).build());\r
-    }\r
-}\r
-\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api.exception;
+
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+public class ExtendedNotFoundException extends NotFoundException {
+
+    public ExtendedNotFoundException(final String message) {
+        super(Response.status(Response.Status.NOT_FOUND).entity(message).type(MediaType.TEXT_PLAIN).build());
+    }
+}
+
index 6dcc0f5..e0c7805 100644 (file)
@@ -1,27 +1,27 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.api.exception;\r
-\r
-import javax.ws.rs.NotSupportedException;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-\r
-public class ExtendedNotSupportedException extends NotSupportedException {\r
-\r
-    public ExtendedNotSupportedException(final String message) {\r
-        super(Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).entity(message).type(MediaType.TEXT_PLAIN).build());\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.api.exception;
+
+import javax.ws.rs.NotSupportedException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+public class ExtendedNotSupportedException extends NotSupportedException {
+
+    public ExtendedNotSupportedException(final String message) {
+        super(Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).entity(message).type(MediaType.TEXT_PLAIN).build());
+    }
+}
index 31c33e0..cd7ecda 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 2a4c74a..cc1e4de 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.resources;\r
-\r
-import io.swagger.annotations.Api;\r
-import io.swagger.annotations.ApiOperation;\r
-import io.swagger.annotations.ApiParam;\r
-import io.swagger.annotations.ApiResponse;\r
-import io.swagger.annotations.ApiResponses;\r
-\r
-import java.net.URI;\r
-\r
-import javax.ws.rs.DELETE;\r
-import javax.ws.rs.DefaultValue;\r
-import javax.ws.rs.GET;\r
-import javax.ws.rs.POST;\r
-import javax.ws.rs.PUT;\r
-import javax.ws.rs.Path;\r
-import javax.ws.rs.PathParam;\r
-import javax.ws.rs.Produces;\r
-import javax.ws.rs.core.Context;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-import javax.ws.rs.core.Response.ResponseBuilder;\r
-import javax.ws.rs.core.UriInfo;\r
-\r
-import org.apache.http.HttpStatus;\r
-import org.openo.msb.api.ApiRouteInfo;\r
-import org.openo.msb.api.DiscoverInfo;\r
-import org.openo.msb.wrapper.ApiRouteServiceWrapper;\r
-import org.openo.msb.wrapper.CustomRouteServiceWrapper;\r
-import org.openo.msb.wrapper.IuiRouteServiceWrapper;\r
-import org.openo.msb.wrapper.util.JacksonJsonUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-\r
-import com.codahale.metrics.annotation.Timed;\r
-\r
-@Path("/apiRoute")\r
-@Api(tags = { "ApiRoute" })\r
-@Produces(MediaType.APPLICATION_JSON)\r
-public class ApiRouteResource {\r
-\r
-    @Context\r
-    UriInfo uriInfo; // actual uri info\r
-\r
-       @GET\r
-       @Path("/")\r
-       @ApiOperation(value = "get all ApiRoute ", code = HttpStatus.SC_OK,response = ApiRouteInfo.class, responseContainer = "List")\r
-    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get ApiRouteInfo List  fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public ApiRouteInfo[] getApiRoutes() {\r
-               return ApiRouteServiceWrapper.getInstance().getAllApiRouteInstances();\r
-       }\r
-\r
-       @POST\r
-       @Path("/")\r
-       @ApiOperation(value = "add one ApiRoute ", code = HttpStatus.SC_CREATED,response = ApiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add ApiRouteInfo fail", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable ApiRouteInfo JSON REQUEST", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response addApiRoute(\r
-                       @ApiParam(value = "ApiRoute Instance Info", required = true) ApiRouteInfo apiRouteInfo) {\r
-           ApiRouteInfo new_apiRouteInfo = ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(apiRouteInfo,"");\r
-           URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/" + new_apiRouteInfo.getServiceName()+"/version/"+new_apiRouteInfo.getVersion()).build();\r
-        return Response.created(returnURI).entity(new_apiRouteInfo).build();\r
-\r
-       }\r
-       \r
-       @GET\r
-       @Path("/{serviceName}/version/{version}")\r
-       @ApiOperation(value = "get one ApiRoute ",code = HttpStatus.SC_OK, response = ApiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "ApiRouteInfo not found", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get ApiRouteInfo fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public ApiRouteInfo getApiRoute(\r
-                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version) {\r
-\r
-               return ApiRouteServiceWrapper.getInstance().getApiRouteInstance(serviceName,version);\r
-\r
-       }\r
-\r
-       @PUT\r
-       @Path("/{serviceName}/version/{version}")\r
-       @ApiOperation(value = "update one ApiRoute by serviceName and version",  code = HttpStatus.SC_CREATED,response = ApiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update ApiRouteInfo fail", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable ApiRouteInfo JSON REQUEST", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response updateApiRoute(\r
-                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,\r
-                       @ApiParam(value = "ApiRoute Instance Info", required = true) ApiRouteInfo apiRouteInfo) {\r
-\r
-               ApiRouteInfo new_apiRouteInfo = ApiRouteServiceWrapper.getInstance().updateApiRouteInstance(serviceName,version,apiRouteInfo,"");\r
-        URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/" + new_apiRouteInfo.getServiceName()+"/version/"+new_apiRouteInfo.getVersion()).build();\r
-        return Response.created(returnURI).entity(new_apiRouteInfo).build();\r
-\r
-       }\r
-       \r
-       \r
-\r
-       @DELETE\r
-       @Path("/{serviceName}/version/{version}")\r
-       @ApiOperation(value = "delete one ApiRoute by serviceName and version", code = HttpStatus.SC_NO_CONTENT)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete ApiRouteInfo succeed "),\r
-                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "ApiRouteInfo not found", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete ApiRouteInfo fail", response = String.class)})\r
-   @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public void deleteApiRoute(\r
-                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("")  String version) {\r
-\r
-               \r
-                ApiRouteServiceWrapper.getInstance().deleteApiRoute(serviceName, version,"*","");\r
-\r
-       }\r
-       \r
-\r
-       @GET\r
-       @Path("/apiDocs")\r
-       @ApiOperation(value = "get all Local apiDoc ", code = HttpStatus.SC_OK, response = String.class, responseContainer = "List")\r
-    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get apiDoc List  fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public String[] getApiDocs() {\r
-\r
-               String[] apiDocs = ApiRouteServiceWrapper.getInstance().getAllApiDocs();\r
-               return apiDocs;\r
-\r
-       }\r
-       \r
-       @GET\r
-       @Path("/apiGatewayPort")\r
-       @ApiOperation(value = "get apiGateway Port ", code = HttpStatus.SC_OK, response = String.class)\r
-    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get apiGateway Port  fail", response = String.class)})\r
-       @Produces(MediaType.TEXT_PLAIN)\r
-       @Timed\r
-       public String getApiGatewayPort() {\r
-\r
-           return ApiRouteServiceWrapper.getInstance().getApiGatewayPort();\r
-\r
-       }\r
-       \r
-       @GET\r
-    @Path("/discoverInfo")\r
-    @ApiOperation(value = "get discover Info ", code = HttpStatus.SC_OK,response = DiscoverInfo.class)\r
-    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get discover Info fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public DiscoverInfo getServiceDiscoverInfo() {\r
-\r
-           return ApiRouteServiceWrapper.getInstance().getServiceDiscoverInfo();\r
-    }\r
-       \r
-       @PUT\r
-       @Path("/{serviceName}/version/{version}/status/{status}")\r
-       @ApiOperation(value = "update one ApiRoute  status by serviceName and version", code = HttpStatus.SC_CREATED,response = ApiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),\r
-                            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "ApiRouteInfo not found", response = String.class),\r
-                            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update status fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response updateApiRouteStatus(\r
-                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,\r
-                       @ApiParam(value = "ApiRoute status,1:abled  0:disabled", required = true)  @PathParam("status") String status) {\r
-\r
-           ApiRouteInfo new_apiRouteInfo =  ApiRouteServiceWrapper.getInstance().updateApiRouteStatus(serviceName,version,status);\r
-        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(new_apiRouteInfo).build();\r
-\r
-       }\r
-       \r
-       @GET\r
-    @Path("/export")\r
-       @ApiOperation(value = "export all route service Info by json-file", code = HttpStatus.SC_OK,response = String.class)\r
-    @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "export fail", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_NOT_ACCEPTABLE, message = " not Acceptable client-side", response = String.class)})\r
-       @Produces(MediaType.TEXT_PLAIN)  \r
-    public Response  exportService() throws Exception {\r
-        \r
-           \r
-           Object[] apirouteArray= ApiRouteServiceWrapper.getInstance().getAllApiRouteInstances();\r
-           Object[] iuirouteArray= IuiRouteServiceWrapper.getInstance().getAllIuiRouteInstances();\r
-           Object[] customrouteArray= CustomRouteServiceWrapper.getInstance().getAllCustomRouteInstances();\r
-           \r
-           Object[] temprouteArray =RouteUtil.concat(apirouteArray, iuirouteArray);\r
-           Object[] allrouteArray=RouteUtil.concat(temprouteArray, customrouteArray);\r
-           \r
-          \r
-        String allrouteJson=JacksonJsonUtil.beanToJson(allrouteArray);\r
-        \r
-        ResponseBuilder response = Response.ok(allrouteJson);   \r
-        response.header("Content-Disposition",   \r
-            "attachment; filename=\"RouteService.json\"");   \r
-        return response.build(); \r
-       \r
-\r
-    }\r
-\r
-       \r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.resources;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+import java.net.URI;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.http.HttpStatus;
+import org.openo.msb.api.ApiRouteInfo;
+import org.openo.msb.api.DiscoverInfo;
+import org.openo.msb.wrapper.ApiRouteServiceWrapper;
+import org.openo.msb.wrapper.CustomRouteServiceWrapper;
+import org.openo.msb.wrapper.IuiRouteServiceWrapper;
+import org.openo.msb.wrapper.util.JacksonJsonUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+
+import com.codahale.metrics.annotation.Timed;
+
+@Path("/apiRoute")
+@Api(tags = { "ApiRoute" })
+@Produces(MediaType.APPLICATION_JSON)
+public class ApiRouteResource {
+
+    @Context
+    UriInfo uriInfo; // actual uri info
+
+       @GET
+       @Path("/")
+       @ApiOperation(value = "get all ApiRoute ", code = HttpStatus.SC_OK,response = ApiRouteInfo.class, responseContainer = "List")
+    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get ApiRouteInfo List  fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public ApiRouteInfo[] getApiRoutes() {
+               return ApiRouteServiceWrapper.getInstance().getAllApiRouteInstances();
+       }
+
+       @POST
+       @Path("/")
+       @ApiOperation(value = "add one ApiRoute ", code = HttpStatus.SC_CREATED,response = ApiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add ApiRouteInfo fail", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable ApiRouteInfo JSON REQUEST", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response addApiRoute(
+                       @ApiParam(value = "ApiRoute Instance Info", required = true) ApiRouteInfo apiRouteInfo) {
+           ApiRouteInfo new_apiRouteInfo = ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(apiRouteInfo,"");
+           URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/" + new_apiRouteInfo.getServiceName()+"/version/"+new_apiRouteInfo.getVersion()).build();
+        return Response.created(returnURI).entity(new_apiRouteInfo).build();
+
+       }
+       
+       @GET
+       @Path("/{serviceName}/version/{version}")
+       @ApiOperation(value = "get one ApiRoute ",code = HttpStatus.SC_OK, response = ApiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "ApiRouteInfo not found", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get ApiRouteInfo fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public ApiRouteInfo getApiRoute(
+                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,
+                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version) {
+
+               return ApiRouteServiceWrapper.getInstance().getApiRouteInstance(serviceName,version);
+
+       }
+
+       @PUT
+       @Path("/{serviceName}/version/{version}")
+       @ApiOperation(value = "update one ApiRoute by serviceName and version",  code = HttpStatus.SC_CREATED,response = ApiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update ApiRouteInfo fail", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable ApiRouteInfo JSON REQUEST", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response updateApiRoute(
+                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,
+                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,
+                       @ApiParam(value = "ApiRoute Instance Info", required = true) ApiRouteInfo apiRouteInfo) {
+
+               ApiRouteInfo new_apiRouteInfo = ApiRouteServiceWrapper.getInstance().updateApiRouteInstance(serviceName,version,apiRouteInfo,"");
+        URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/" + new_apiRouteInfo.getServiceName()+"/version/"+new_apiRouteInfo.getVersion()).build();
+        return Response.created(returnURI).entity(new_apiRouteInfo).build();
+
+       }
+       
+       
+
+       @DELETE
+       @Path("/{serviceName}/version/{version}")
+       @ApiOperation(value = "delete one ApiRoute by serviceName and version", code = HttpStatus.SC_NO_CONTENT)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete ApiRouteInfo succeed "),
+                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "ApiRouteInfo not found", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete ApiRouteInfo fail", response = String.class)})
+   @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public void deleteApiRoute(
+                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,
+                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("")  String version) {
+
+               
+                ApiRouteServiceWrapper.getInstance().deleteApiRoute(serviceName, version,"*","");
+
+       }
+       
+
+       @GET
+       @Path("/apiDocs")
+       @ApiOperation(value = "get all Local apiDoc ", code = HttpStatus.SC_OK, response = String.class, responseContainer = "List")
+    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get apiDoc List  fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public String[] getApiDocs() {
+
+               String[] apiDocs = ApiRouteServiceWrapper.getInstance().getAllApiDocs();
+               return apiDocs;
+
+       }
+       
+       @GET
+       @Path("/apiGatewayPort")
+       @ApiOperation(value = "get apiGateway Port ", code = HttpStatus.SC_OK, response = String.class)
+    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get apiGateway Port  fail", response = String.class)})
+       @Produces(MediaType.TEXT_PLAIN)
+       @Timed
+       public String getApiGatewayPort() {
+
+           return ApiRouteServiceWrapper.getInstance().getApiGatewayPort();
+
+       }
+       
+       @GET
+    @Path("/discoverInfo")
+    @ApiOperation(value = "get discover Info ", code = HttpStatus.SC_OK,response = DiscoverInfo.class)
+    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get discover Info fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public DiscoverInfo getServiceDiscoverInfo() {
+
+           return ApiRouteServiceWrapper.getInstance().getServiceDiscoverInfo();
+    }
+       
+       @PUT
+       @Path("/{serviceName}/version/{version}/status/{status}")
+       @ApiOperation(value = "update one ApiRoute  status by serviceName and version", code = HttpStatus.SC_CREATED,response = ApiRouteInfo.class)
+       @ApiResponses(value = {
+                            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable ApiRouteInfo Entity ", response = String.class),
+                            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "ApiRouteInfo not found", response = String.class),
+                            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update status fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response updateApiRouteStatus(
+                       @ApiParam(value = "ApiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,
+                       @ApiParam(value = "ApiRoute version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,
+                       @ApiParam(value = "ApiRoute status,1:abled  0:disabled", required = true)  @PathParam("status") String status) {
+
+           ApiRouteInfo new_apiRouteInfo =  ApiRouteServiceWrapper.getInstance().updateApiRouteStatus(serviceName,version,status);
+        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(new_apiRouteInfo).build();
+
+       }
+       
+       @GET
+    @Path("/export")
+       @ApiOperation(value = "export all route service Info by json-file", code = HttpStatus.SC_OK,response = String.class)
+    @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "export fail", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_NOT_ACCEPTABLE, message = " not Acceptable client-side", response = String.class)})
+       @Produces(MediaType.TEXT_PLAIN)  
+    public Response  exportService() throws Exception {
+        
+           
+           Object[] apirouteArray= ApiRouteServiceWrapper.getInstance().getAllApiRouteInstances();
+           Object[] iuirouteArray= IuiRouteServiceWrapper.getInstance().getAllIuiRouteInstances();
+           Object[] customrouteArray= CustomRouteServiceWrapper.getInstance().getAllCustomRouteInstances();
+           
+           Object[] temprouteArray =RouteUtil.concat(apirouteArray, iuirouteArray);
+           Object[] allrouteArray=RouteUtil.concat(temprouteArray, customrouteArray);
+           
+          
+        String allrouteJson=JacksonJsonUtil.beanToJson(allrouteArray);
+        
+        ResponseBuilder response = Response.ok(allrouteJson);   
+        response.header("Content-Disposition",   
+            "attachment; filename=\"RouteService.json\"");   
+        return response.build(); 
+       
+
+    }
+
+       
+
+}
index ffb7924..48545fe 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.resources;\r
-\r
-import io.swagger.annotations.Api;\r
-import io.swagger.annotations.ApiOperation;\r
-import io.swagger.annotations.ApiParam;\r
-import io.swagger.annotations.ApiResponse;\r
-import io.swagger.annotations.ApiResponses;\r
-\r
-import java.net.URI;\r
-\r
-import javax.ws.rs.DELETE;\r
-import javax.ws.rs.GET;\r
-import javax.ws.rs.POST;\r
-import javax.ws.rs.PUT;\r
-import javax.ws.rs.Path;\r
-import javax.ws.rs.Produces;\r
-import javax.ws.rs.QueryParam;\r
-import javax.ws.rs.core.Context;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-import javax.ws.rs.core.UriInfo;\r
-\r
-import org.apache.http.HttpStatus;\r
-import org.openo.msb.api.CustomRouteInfo;\r
-import org.openo.msb.wrapper.CustomRouteServiceWrapper;\r
-\r
-import com.codahale.metrics.annotation.Timed;\r
-\r
-@Path("/customRoute")\r
-@Api(tags = { "CustomRoute" })\r
-@Produces(MediaType.APPLICATION_JSON)\r
-public class CustomRouteResource {\r
-       \r
-    @Context\r
-    UriInfo uriInfo; // actual uri info\r
-    \r
-       @GET\r
-       @Path("/all")\r
-       @ApiOperation(value = "get all CustomRoute ",  code = HttpStatus.SC_OK,response = CustomRouteInfo.class, responseContainer = "List")\r
-    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get CustomRouteInfo List  fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public CustomRouteInfo[] getCustomRoutes() {\r
-               return CustomRouteServiceWrapper.getInstance().getAllCustomRouteInstances();\r
-       }\r
-       \r
-       @POST\r
-       @Path("/instance")\r
-       @ApiOperation(value = "add one CustomRoute ", code = HttpStatus.SC_CREATED,response = CustomRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                              @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable CustomRouteInfo Entity ", response = String.class),\r
-                              @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add CustomRouteInfo fail", response = String.class),\r
-                              @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable CustomRouteInfo JSON REQUEST", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response addCustomRoute(\r
-                       @ApiParam(value = "CustomRoute Instance Info", required = true) CustomRouteInfo customRouteInfo) {\r
-           CustomRouteInfo new_customRouteInfo = CustomRouteServiceWrapper.getInstance().saveCustomRouteInstance(customRouteInfo,"");\r
-           URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/instance?serviceName=" + new_customRouteInfo.getServiceName()).build();\r
-        return Response.created(returnURI).entity(new_customRouteInfo).build();\r
-\r
-       }\r
-       \r
-       @GET\r
-       @Path("/instance")\r
-       @ApiOperation(value = "get one CustomRoute ",code = HttpStatus.SC_OK,  response = CustomRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                               @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "CustomRoute not found", response = String.class),\r
-                               @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable CustomRoute Entity ", response = String.class),\r
-                               @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get CustomRoute fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public CustomRouteInfo getCustomRoute(\r
-                       @ApiParam(value = "CustomRoute serviceName", required = false) @QueryParam("serviceName") String serviceName) {\r
-           \r
-        \r
-               return CustomRouteServiceWrapper.getInstance().getCustomRouteInstance(serviceName);\r
-\r
-       }\r
-       \r
-       @PUT\r
-       @Path("/instance")\r
-       @ApiOperation(value = "update one CustomRoute by serviceName",  code = HttpStatus.SC_CREATED,response = CustomRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                              @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable CustomRoute Entity ", response = String.class),\r
-                              @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update CustomRoute fail", response = String.class),\r
-                              @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable CustomRoute JSON REQUEST", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response updateCustomRoute(\r
-                       @ApiParam(value = "CustomRoute serviceName", required = true) @QueryParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "CustomRoute Instance Info", required = true) CustomRouteInfo customRoute) {\r
-\r
-           CustomRouteInfo new_customRouteInfo= CustomRouteServiceWrapper.getInstance().updateCustomRouteInstance(serviceName,customRoute,"");\r
-\r
-        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(new_customRouteInfo).build();\r
-\r
-       }\r
-\r
-       @DELETE\r
-       @Path("/instance")\r
-       @ApiOperation(value = "delete one CustomRoute by serviceName",  code = HttpStatus.SC_NO_CONTENT)\r
-       @ApiResponses(value = {\r
-                               @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete customRoute succeed "),\r
-                               @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "customRoute not found", response = String.class),\r
-                               @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete customRoute fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public void deleteCustomRoute(\r
-                       @ApiParam(value = "CustomRoute serviceName", required = true) @QueryParam("serviceName") String serviceName) {\r
-\r
-                CustomRouteServiceWrapper.getInstance().deleteCustomRoute(serviceName,"*","");\r
-\r
-       }\r
-       \r
-       @PUT\r
-       @Path("/status")\r
-       @ApiOperation(value = "update one CustomRoute  status by serviceName ",code = HttpStatus.SC_CREATED, response = CustomRouteInfo.class)\r
-    @ApiResponses(value = {\r
-                               @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable customRoute Entity ", response = String.class),\r
-                               @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "customRoute not found", response = String.class),\r
-                               @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update status fail", response = String.class)})\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response updateCustomRouteStatus(\r
-                       @ApiParam(value = "CustomRoute serviceName", required = true) @QueryParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "CustomRoute status,1:abled  0:disabled", required = true)  @QueryParam("status") String status) {\r
-\r
-           CustomRouteInfo new_customRouteInfo = CustomRouteServiceWrapper.getInstance().updateCustomRouteStatus(serviceName,status);\r
-        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(new_customRouteInfo).build();\r
-\r
-\r
-       }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.resources;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+import java.net.URI;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.http.HttpStatus;
+import org.openo.msb.api.CustomRouteInfo;
+import org.openo.msb.wrapper.CustomRouteServiceWrapper;
+
+import com.codahale.metrics.annotation.Timed;
+
+@Path("/customRoute")
+@Api(tags = { "CustomRoute" })
+@Produces(MediaType.APPLICATION_JSON)
+public class CustomRouteResource {
+       
+    @Context
+    UriInfo uriInfo; // actual uri info
+    
+       @GET
+       @Path("/all")
+       @ApiOperation(value = "get all CustomRoute ",  code = HttpStatus.SC_OK,response = CustomRouteInfo.class, responseContainer = "List")
+    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get CustomRouteInfo List  fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public CustomRouteInfo[] getCustomRoutes() {
+               return CustomRouteServiceWrapper.getInstance().getAllCustomRouteInstances();
+       }
+       
+       @POST
+       @Path("/instance")
+       @ApiOperation(value = "add one CustomRoute ", code = HttpStatus.SC_CREATED,response = CustomRouteInfo.class)
+       @ApiResponses(value = {
+                              @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable CustomRouteInfo Entity ", response = String.class),
+                              @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add CustomRouteInfo fail", response = String.class),
+                              @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable CustomRouteInfo JSON REQUEST", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response addCustomRoute(
+                       @ApiParam(value = "CustomRoute Instance Info", required = true) CustomRouteInfo customRouteInfo) {
+           CustomRouteInfo new_customRouteInfo = CustomRouteServiceWrapper.getInstance().saveCustomRouteInstance(customRouteInfo,"");
+           URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/instance?serviceName=" + new_customRouteInfo.getServiceName()).build();
+        return Response.created(returnURI).entity(new_customRouteInfo).build();
+
+       }
+       
+       @GET
+       @Path("/instance")
+       @ApiOperation(value = "get one CustomRoute ",code = HttpStatus.SC_OK,  response = CustomRouteInfo.class)
+       @ApiResponses(value = {
+                               @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "CustomRoute not found", response = String.class),
+                               @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable CustomRoute Entity ", response = String.class),
+                               @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get CustomRoute fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public CustomRouteInfo getCustomRoute(
+                       @ApiParam(value = "CustomRoute serviceName", required = false) @QueryParam("serviceName") String serviceName) {
+           
+        
+               return CustomRouteServiceWrapper.getInstance().getCustomRouteInstance(serviceName);
+
+       }
+       
+       @PUT
+       @Path("/instance")
+       @ApiOperation(value = "update one CustomRoute by serviceName",  code = HttpStatus.SC_CREATED,response = CustomRouteInfo.class)
+       @ApiResponses(value = {
+                              @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable CustomRoute Entity ", response = String.class),
+                              @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update CustomRoute fail", response = String.class),
+                              @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable CustomRoute JSON REQUEST", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response updateCustomRoute(
+                       @ApiParam(value = "CustomRoute serviceName", required = true) @QueryParam("serviceName") String serviceName,
+                       @ApiParam(value = "CustomRoute Instance Info", required = true) CustomRouteInfo customRoute) {
+
+           CustomRouteInfo new_customRouteInfo= CustomRouteServiceWrapper.getInstance().updateCustomRouteInstance(serviceName,customRoute,"");
+
+        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(new_customRouteInfo).build();
+
+       }
+
+       @DELETE
+       @Path("/instance")
+       @ApiOperation(value = "delete one CustomRoute by serviceName",  code = HttpStatus.SC_NO_CONTENT)
+       @ApiResponses(value = {
+                               @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete customRoute succeed "),
+                               @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "customRoute not found", response = String.class),
+                               @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete customRoute fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public void deleteCustomRoute(
+                       @ApiParam(value = "CustomRoute serviceName", required = true) @QueryParam("serviceName") String serviceName) {
+
+                CustomRouteServiceWrapper.getInstance().deleteCustomRoute(serviceName,"*","");
+
+       }
+       
+       @PUT
+       @Path("/status")
+       @ApiOperation(value = "update one CustomRoute  status by serviceName ",code = HttpStatus.SC_CREATED, response = CustomRouteInfo.class)
+    @ApiResponses(value = {
+                               @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable customRoute Entity ", response = String.class),
+                               @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "customRoute not found", response = String.class),
+                               @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update status fail", response = String.class)})
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response updateCustomRouteStatus(
+                       @ApiParam(value = "CustomRoute serviceName", required = true) @QueryParam("serviceName") String serviceName,
+                       @ApiParam(value = "CustomRoute status,1:abled  0:disabled", required = true)  @QueryParam("status") String status) {
+
+           CustomRouteInfo new_customRouteInfo = CustomRouteServiceWrapper.getInstance().updateCustomRouteStatus(serviceName,status);
+        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(new_customRouteInfo).build();
+
+
+       }
+
+}
index c46527e..7635579 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.resources;\r
-\r
-import io.swagger.annotations.Api;\r
-import io.swagger.annotations.ApiOperation;\r
-import io.swagger.annotations.ApiParam;\r
-import io.swagger.annotations.ApiResponse;\r
-import io.swagger.annotations.ApiResponses;\r
-\r
-import java.net.URI;\r
-\r
-import javax.ws.rs.DELETE;\r
-import javax.ws.rs.GET;\r
-import javax.ws.rs.POST;\r
-import javax.ws.rs.PUT;\r
-import javax.ws.rs.Path;\r
-import javax.ws.rs.PathParam;\r
-import javax.ws.rs.Produces;\r
-import javax.ws.rs.core.Context;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-import javax.ws.rs.core.UriInfo;\r
-\r
-import org.apache.http.HttpStatus;\r
-import org.openo.msb.api.IuiRouteInfo;\r
-import org.openo.msb.wrapper.IuiRouteServiceWrapper;\r
-\r
-import com.codahale.metrics.annotation.Timed;\r
-\r
-@Path("/iuiRoute")\r
-@Api(tags = { "iuiRoute" })\r
-@Produces(MediaType.APPLICATION_JSON)\r
-public class IuiRouteResource {\r
-\r
-    @Context\r
-    UriInfo uriInfo; // actual uri info\r
-\r
-       @GET\r
-       @Path("/")\r
-       @ApiOperation(value = "get all iuiRoute ", code = HttpStatus.SC_OK,response = IuiRouteInfo.class, responseContainer = "List")\r
-       @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get iuiRouteInfo List  fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public IuiRouteInfo[] getIuiRoutes() {\r
-               return IuiRouteServiceWrapper.getInstance().getAllIuiRouteInstances();\r
-       }\r
-\r
-       @POST\r
-       @Path("/")\r
-       @ApiOperation(value = "add one iuiRoute ", code = HttpStatus.SC_CREATED,response = IuiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable iuiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add iuiRouteInfo fail", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable iuiRouteInfo JSON REQUEST", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response addIuiRoute(\r
-                       @ApiParam(value = "iuiRoute Instance Info", required = true) IuiRouteInfo iuiRouteInfo) {\r
-           IuiRouteInfo new_iuiRouteInfo = IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(iuiRouteInfo);\r
-           URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/" + new_iuiRouteInfo.getServiceName()).build();\r
-        return Response.created(returnURI).entity(new_iuiRouteInfo).build();\r
-\r
-       }\r
-       \r
-       @GET\r
-       @Path("/{serviceName}")\r
-       @ApiOperation(value = "get one iuiRoute ",code = HttpStatus.SC_OK, response = IuiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "IuiRouteInfo not found", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable IuiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get IuiRouteInfo fail", response = String.class)})\r
-   @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public IuiRouteInfo getIuiRoute(\r
-                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName) {\r
-\r
-               return IuiRouteServiceWrapper.getInstance().getIuiRouteInstance(serviceName);\r
-\r
-       }\r
-\r
-       @PUT\r
-       @Path("/{serviceName}")\r
-       @ApiOperation(value = "update one iuiRoute by serviceName", code = HttpStatus.SC_CREATED,response = IuiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable IuiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update IuiRouteInfo fail", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable IuiRouteInfo JSON REQUEST", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response updateIuiRoute(\r
-                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "iuiRoute Instance Info", required = true) IuiRouteInfo iuiRouteInfo) {\r
-\r
-           IuiRouteInfo new_iuiRouteInfo =  IuiRouteServiceWrapper.getInstance().updateIuiRouteInstance(serviceName,iuiRouteInfo);\r
-           URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/" + serviceName).build();\r
-        return Response.created(returnURI).entity(new_iuiRouteInfo).build();\r
-       }\r
-\r
-       @DELETE\r
-       @Path("/{serviceName}")\r
-       @ApiOperation(value = "delete one iuiRoute by serviceName", code = HttpStatus.SC_NO_CONTENT)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete IuiRouteInfo succeed "),\r
-                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "IuiRouteInfo not found", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete IuiRouteInfo fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public void deleteIuiRoute(\r
-                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName) {\r
-\r
-               IuiRouteServiceWrapper.getInstance().deleteIuiRoute(serviceName,"*");\r
-\r
-       }\r
-       \r
-       @PUT\r
-       @Path("/{serviceName}/status/{status}")\r
-       @ApiOperation(value = "update one iuiRoute  status by serviceName ",code = HttpStatus.SC_CREATED, response = IuiRouteInfo.class)\r
-       @ApiResponses(value = {\r
-                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable IuiRouteInfo Entity ", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "IuiRouteInfo not found", response = String.class),\r
-                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update IuiRouteInfo status fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public Response updateIuiRouteStatus(\r
-                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-                       @ApiParam(value = "iuiRoute status,1:abled  0:disabled", required = true)  @PathParam("status") String status) {\r
-\r
-           IuiRouteInfo new_iuiRouteInfo =  IuiRouteServiceWrapper.getInstance().updateIuiRouteStatus(serviceName,status);\r
-        URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/" + serviceName).build();\r
-        return Response.created(returnURI).entity(new_iuiRouteInfo).build();\r
-\r
-       }\r
-       \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.resources;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+import java.net.URI;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.http.HttpStatus;
+import org.openo.msb.api.IuiRouteInfo;
+import org.openo.msb.wrapper.IuiRouteServiceWrapper;
+
+import com.codahale.metrics.annotation.Timed;
+
+@Path("/iuiRoute")
+@Api(tags = { "iuiRoute" })
+@Produces(MediaType.APPLICATION_JSON)
+public class IuiRouteResource {
+
+    @Context
+    UriInfo uriInfo; // actual uri info
+
+       @GET
+       @Path("/")
+       @ApiOperation(value = "get all iuiRoute ", code = HttpStatus.SC_OK,response = IuiRouteInfo.class, responseContainer = "List")
+       @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get iuiRouteInfo List  fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public IuiRouteInfo[] getIuiRoutes() {
+               return IuiRouteServiceWrapper.getInstance().getAllIuiRouteInstances();
+       }
+
+       @POST
+       @Path("/")
+       @ApiOperation(value = "add one iuiRoute ", code = HttpStatus.SC_CREATED,response = IuiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable iuiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add iuiRouteInfo fail", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable iuiRouteInfo JSON REQUEST", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response addIuiRoute(
+                       @ApiParam(value = "iuiRoute Instance Info", required = true) IuiRouteInfo iuiRouteInfo) {
+           IuiRouteInfo new_iuiRouteInfo = IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(iuiRouteInfo);
+           URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/" + new_iuiRouteInfo.getServiceName()).build();
+        return Response.created(returnURI).entity(new_iuiRouteInfo).build();
+
+       }
+       
+       @GET
+       @Path("/{serviceName}")
+       @ApiOperation(value = "get one iuiRoute ",code = HttpStatus.SC_OK, response = IuiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "IuiRouteInfo not found", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable IuiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get IuiRouteInfo fail", response = String.class)})
+   @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public IuiRouteInfo getIuiRoute(
+                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName) {
+
+               return IuiRouteServiceWrapper.getInstance().getIuiRouteInstance(serviceName);
+
+       }
+
+       @PUT
+       @Path("/{serviceName}")
+       @ApiOperation(value = "update one iuiRoute by serviceName", code = HttpStatus.SC_CREATED,response = IuiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable IuiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update IuiRouteInfo fail", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable IuiRouteInfo JSON REQUEST", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response updateIuiRoute(
+                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,
+                       @ApiParam(value = "iuiRoute Instance Info", required = true) IuiRouteInfo iuiRouteInfo) {
+
+           IuiRouteInfo new_iuiRouteInfo =  IuiRouteServiceWrapper.getInstance().updateIuiRouteInstance(serviceName,iuiRouteInfo);
+           URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/" + serviceName).build();
+        return Response.created(returnURI).entity(new_iuiRouteInfo).build();
+       }
+
+       @DELETE
+       @Path("/{serviceName}")
+       @ApiOperation(value = "delete one iuiRoute by serviceName", code = HttpStatus.SC_NO_CONTENT)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete IuiRouteInfo succeed "),
+                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "IuiRouteInfo not found", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete IuiRouteInfo fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public void deleteIuiRoute(
+                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName) {
+
+               IuiRouteServiceWrapper.getInstance().deleteIuiRoute(serviceName,"*");
+
+       }
+       
+       @PUT
+       @Path("/{serviceName}/status/{status}")
+       @ApiOperation(value = "update one iuiRoute  status by serviceName ",code = HttpStatus.SC_CREATED, response = IuiRouteInfo.class)
+       @ApiResponses(value = {
+                           @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable IuiRouteInfo Entity ", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "IuiRouteInfo not found", response = String.class),
+                           @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update IuiRouteInfo status fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public Response updateIuiRouteStatus(
+                       @ApiParam(value = "iuiRoute serviceName", required = true) @PathParam("serviceName") String serviceName,
+                       @ApiParam(value = "iuiRoute status,1:abled  0:disabled", required = true)  @PathParam("status") String status) {
+
+           IuiRouteInfo new_iuiRouteInfo =  IuiRouteServiceWrapper.getInstance().updateIuiRouteStatus(serviceName,status);
+        URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/" + serviceName).build();
+        return Response.created(returnURI).entity(new_iuiRouteInfo).build();
+
+       }
+       
+}
index 8bf797a..7377c86 100644 (file)
@@ -1,49 +1,48 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.resources;\r
-\r
-import io.swagger.annotations.Api;\r
-import io.swagger.annotations.ApiOperation;\r
-\r
-import javax.ws.rs.GET;\r
-import javax.ws.rs.Path;\r
-import javax.ws.rs.Produces;\r
-import javax.ws.rs.core.MediaType;\r
-\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.openo.msb.api.MetricsInfo;\r
-import org.openo.msb.wrapper.MetricsServiceWrapper;\r
-\r
-import com.codahale.metrics.annotation.Timed;\r
-\r
-@Path("/metrics")\r
-@Api(tags = { "metrics" })\r
-@Produces(MediaType.APPLICATION_JSON)\r
-public class MetricsResource {\r
-       \r
-\r
-       @GET\r
-       @Path("/")\r
-       @ApiOperation(value = "get Metrics Info ", response = MetricsInfo.class)\r
-       @Produces(MediaType.APPLICATION_JSON)\r
-       @Timed\r
-       public MetricsInfo getMetricsInfo() {\r
-               return MetricsServiceWrapper.getMetricsInfo();\r
-       }\r
-       \r
-       \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.resources;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.openo.msb.api.MetricsInfo;
+import org.openo.msb.wrapper.MetricsServiceWrapper;
+
+import com.codahale.metrics.annotation.Timed;
+
+@Path("/metrics")
+@Api(tags = { "metrics" })
+@Produces(MediaType.APPLICATION_JSON)
+public class MetricsResource {
+       
+
+       @GET
+       @Path("/")
+       @ApiOperation(value = "get Metrics Info ", response = MetricsInfo.class)
+       @Produces(MediaType.APPLICATION_JSON)
+       @Timed
+       public MetricsInfo getMetricsInfo() {
+               return MetricsServiceWrapper.getMetricsInfo();
+       }
+       
+       
+}
index 7afa5c7..45328f0 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.resources;\r
-\r
-import io.swagger.annotations.Api;\r
-import io.swagger.annotations.ApiOperation;\r
-import io.swagger.annotations.ApiParam;\r
-import io.swagger.annotations.ApiResponse;\r
-import io.swagger.annotations.ApiResponses;\r
-\r
-import java.net.URI;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.ws.rs.DELETE;\r
-import javax.ws.rs.DefaultValue;\r
-import javax.ws.rs.GET;\r
-import javax.ws.rs.POST;\r
-import javax.ws.rs.PUT;\r
-import javax.ws.rs.Path;\r
-import javax.ws.rs.PathParam;\r
-import javax.ws.rs.Produces;\r
-import javax.ws.rs.QueryParam;\r
-import javax.ws.rs.core.Context;\r
-import javax.ws.rs.core.MediaType;\r
-import javax.ws.rs.core.Response;\r
-import javax.ws.rs.core.UriInfo;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.apache.http.HttpStatus;\r
-import org.openo.msb.api.MicroServiceFullInfo;\r
-import org.openo.msb.api.MicroServiceInfo;\r
-import org.openo.msb.wrapper.MicroServiceWrapper;\r
-import org.openo.msb.wrapper.util.MicroServiceUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import com.codahale.metrics.annotation.Timed;\r
-\r
-@Path("/services")\r
-@Api(tags = {"MSB-Service Resource"})\r
-@Produces(MediaType.APPLICATION_JSON)\r
-public class MicroServiceResource {\r
-\r
-    @Context\r
-    UriInfo uriInfo; // actual uri info\r
-\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceResource.class);\r
-\r
-    @GET\r
-    @Path("/")\r
-    @ApiOperation(value = "get all microservices ", code = HttpStatus.SC_OK, response = MicroServiceFullInfo.class, responseContainer = "List")\r
-    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get microservice List  fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public MicroServiceFullInfo[] getMicroService() {\r
-        return MicroServiceWrapper.getInstance().getAllMicroServiceInstances();\r
-    }\r
-\r
-    @POST\r
-    @Path("/")\r
-    @ApiOperation(value = "add one microservice ", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add microservice fail", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable MicroServiceInfo JSON REQUEST", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public Response addMicroService(\r
-            @ApiParam(value = "MicroServiceInfo Instance Info", required = true) MicroServiceInfo microServiceInfo,\r
-            @Context HttpServletRequest request,\r
-            @ApiParam(value = "createOrUpdate", required = false) @QueryParam("createOrUpdate") @DefaultValue("true") boolean createOrUpdate,\r
-            @ApiParam(value = "port", required = false) @QueryParam("port") @DefaultValue("") String port) {\r
-       \r
-       String ip=MicroServiceUtil.getRealIp(request);\r
-        \r
-        MicroServiceFullInfo microServiceFullInfo =\r
-                MicroServiceWrapper.getInstance().saveMicroServiceInstance(microServiceInfo,\r
-                    createOrUpdate,ip,port);\r
-        URI returnURI =\r
-                uriInfo.getAbsolutePathBuilder()\r
-                        .path("/" + microServiceInfo.getServiceName() + "/version/"\r
-                                + microServiceInfo.getVersion()).build();\r
-        return Response.created(returnURI).entity(microServiceFullInfo).build();\r
-    }\r
-\r
-\r
-\r
-    @GET\r
-    @Path("/{serviceName}/version/{version}")\r
-    @ApiOperation(value = "get one microservice ", code = HttpStatus.SC_OK, response = MicroServiceFullInfo.class)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get microservice fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public MicroServiceFullInfo getMicroService(\r
-            @ApiParam(value = "microservice serviceName") @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"") @PathParam("version") @DefaultValue("") String version,\r
-            @ApiParam(value = "port", required = false) @QueryParam("port") @DefaultValue("") String port) {\r
-\r
-\r
-        return MicroServiceWrapper.getInstance().getMicroServiceInstance(serviceName, version,port);\r
-\r
-\r
-    }\r
-\r
-    @PUT\r
-    @Path("/{serviceName}/version/{version}")\r
-    @ApiOperation(value = "update one microservice by serviceName and version", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update microservice fail", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable MicroServiceInfo JSON REQUEST", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public Response updateMicroService(\r
-            @ApiParam(value = "microservice serviceName") @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"") @PathParam("version") @DefaultValue("") String version,\r
-            @ApiParam(value = "microservice Instance Info", required = true) MicroServiceInfo microServiceInfo) {\r
-\r
-        MicroServiceFullInfo microServiceFullInfo = MicroServiceWrapper.getInstance().updateMicroServiceInstance(serviceName, version,\r
-                microServiceInfo);\r
-        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(microServiceFullInfo).build();\r
-\r
-    }\r
-\r
-    @PUT\r
-    @Path("/{serviceName}/version/{version}/nodes/{ip}/{port}")\r
-    @ApiOperation(value = "update  single node by serviceName and version and node", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update node fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public Response updateNode(\r
-            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,\r
-            @ApiParam(value = "ip") @PathParam("ip") String ip,\r
-            @ApiParam(value = "port") @PathParam("port") String port,\r
-            @ApiParam(value = "ttl") @QueryParam("ttl") int ttl) {\r
-\r
-        MicroServiceFullInfo microServiceFullInfo = MicroServiceWrapper.getInstance().updateMicroServiceNode(serviceName, version, ip,port, ttl);\r
-\r
-        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(microServiceFullInfo).build();\r
-\r
-    }\r
-\r
-\r
-\r
-    @DELETE\r
-    @Path("/{serviceName}/version/{version}/nodes/{ip}/{port}")\r
-    @ApiOperation(value = "delete single node by serviceName and version and node", code = HttpStatus.SC_NO_CONTENT)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete node succeed "),\r
-            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "node not found", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete node fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public void deleteNode(\r
-            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,\r
-            @ApiParam(value = "ip") @PathParam("ip") String ip,\r
-            @ApiParam(value = "port") @PathParam("port") String port) {\r
-\r
-        MicroServiceWrapper.getInstance().deleteMicroServiceInstance(serviceName, version, ip,port);\r
-\r
-    }\r
-\r
-\r
-    @DELETE\r
-    @Path("/{serviceName}/version/{version}")\r
-    @ApiOperation(value = "delete one full microservice by serviceName and version", code = HttpStatus.SC_NO_CONTENT)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete microservice succeed "),\r
-            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete microservice fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public void deleteMicroService(\r
-            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,\r
-            @ApiParam(value = "port", required = false) @QueryParam("port") @DefaultValue("") String port) {\r
-\r
-\r
-         MicroServiceWrapper.getInstance().deleteMicroService(serviceName, version,port);\r
-\r
-    }\r
-\r
-    @PUT\r
-    @Path("/{serviceName}/version/{version}/status/{status}")\r
-    @ApiOperation(value = "update  microservice status by serviceName and version", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)\r
-    @ApiResponses(value = {\r
-            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),\r
-            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update status fail", response = String.class)})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public Response updateServiceStatus(\r
-            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,\r
-            @ApiParam(value = "status,1:abled  0:disabled") @PathParam("status") String status) {\r
-\r
-        MicroServiceFullInfo microServiceFullInfo = MicroServiceWrapper.getInstance().updateMicroServiceStatus(serviceName, version,status);\r
-\r
-        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(microServiceFullInfo).build();\r
-\r
-    }\r
-\r
-//    @PUT\r
-//    @Path("/ttl")\r
-//    @ApiOperation(value = "test json date iso8601 ", code = 200, response = String.class)\r
-//    @Produces(MediaType.APPLICATION_JSON)\r
-//    @Timed\r
-//    public String testIso8601(\r
-//              @ApiParam(value = "microservice Instance Info", required = true) MicroServiceFullInfo microServiceInfo) {\r
-//        Set<NodeInfo> nodes=microServiceInfo.getNodes();\r
-//        String rtn="rtn:";\r
-//        for(NodeInfo node:nodes){\r
-//            Date date=node.getExpiration();\r
-//            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");\r
-//            String datettl=sdf.format(date);\r
-//            rtn+=datettl;\r
-//        }\r
-//        \r
-//    \r
-//        return rtn;\r
-//    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.resources;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+import java.net.URI;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
+import org.openo.msb.api.MicroServiceFullInfo;
+import org.openo.msb.api.MicroServiceInfo;
+import org.openo.msb.wrapper.MicroServiceWrapper;
+import org.openo.msb.wrapper.util.MicroServiceUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.codahale.metrics.annotation.Timed;
+
+@Path("/services")
+@Api(tags = {"MSB-Service Resource"})
+@Produces(MediaType.APPLICATION_JSON)
+public class MicroServiceResource {
+
+    @Context
+    UriInfo uriInfo; // actual uri info
+
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceResource.class);
+
+    @GET
+    @Path("/")
+    @ApiOperation(value = "get all microservices ", code = HttpStatus.SC_OK, response = MicroServiceFullInfo.class, responseContainer = "List")
+    @ApiResponses(value = {@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get microservice List  fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public MicroServiceFullInfo[] getMicroService() {
+        return MicroServiceWrapper.getInstance().getAllMicroServiceInstances();
+    }
+
+    @POST
+    @Path("/")
+    @ApiOperation(value = "add one microservice ", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "add microservice fail", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable MicroServiceInfo JSON REQUEST", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public Response addMicroService(
+            @ApiParam(value = "MicroServiceInfo Instance Info", required = true) MicroServiceInfo microServiceInfo,
+            @Context HttpServletRequest request,
+            @ApiParam(value = "createOrUpdate", required = false) @QueryParam("createOrUpdate") @DefaultValue("true") boolean createOrUpdate,
+            @ApiParam(value = "port", required = false) @QueryParam("port") @DefaultValue("") String port) {
+       
+       String ip=MicroServiceUtil.getRealIp(request);
+        
+        MicroServiceFullInfo microServiceFullInfo =
+                MicroServiceWrapper.getInstance().saveMicroServiceInstance(microServiceInfo,
+                    createOrUpdate,ip,port);
+        URI returnURI =
+                uriInfo.getAbsolutePathBuilder()
+                        .path("/" + microServiceInfo.getServiceName() + "/version/"
+                                + microServiceInfo.getVersion()).build();
+        return Response.created(returnURI).entity(microServiceFullInfo).build();
+    }
+
+
+
+    @GET
+    @Path("/{serviceName}/version/{version}")
+    @ApiOperation(value = "get one microservice ", code = HttpStatus.SC_OK, response = MicroServiceFullInfo.class)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "get microservice fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public MicroServiceFullInfo getMicroService(
+            @ApiParam(value = "microservice serviceName") @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"") @PathParam("version") @DefaultValue("") String version,
+            @ApiParam(value = "port", required = false) @QueryParam("port") @DefaultValue("") String port) {
+
+
+        return MicroServiceWrapper.getInstance().getMicroServiceInstance(serviceName, version,port);
+
+
+    }
+
+    @PUT
+    @Path("/{serviceName}/version/{version}")
+    @ApiOperation(value = "update one microservice by serviceName and version", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update microservice fail", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = "Unprocessable MicroServiceInfo JSON REQUEST", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public Response updateMicroService(
+            @ApiParam(value = "microservice serviceName") @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"") @PathParam("version") @DefaultValue("") String version,
+            @ApiParam(value = "microservice Instance Info", required = true) MicroServiceInfo microServiceInfo) {
+
+        MicroServiceFullInfo microServiceFullInfo = MicroServiceWrapper.getInstance().updateMicroServiceInstance(serviceName, version,
+                microServiceInfo);
+        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(microServiceFullInfo).build();
+
+    }
+
+    @PUT
+    @Path("/{serviceName}/version/{version}/nodes/{ip}/{port}")
+    @ApiOperation(value = "update  single node by serviceName and version and node", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update node fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public Response updateNode(
+            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,
+            @ApiParam(value = "ip") @PathParam("ip") String ip,
+            @ApiParam(value = "port") @PathParam("port") String port,
+            @ApiParam(value = "ttl") @QueryParam("ttl") int ttl) {
+
+        MicroServiceFullInfo microServiceFullInfo = MicroServiceWrapper.getInstance().updateMicroServiceNode(serviceName, version, ip,port, ttl);
+
+        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(microServiceFullInfo).build();
+
+    }
+
+
+
+    @DELETE
+    @Path("/{serviceName}/version/{version}/nodes/{ip}/{port}")
+    @ApiOperation(value = "delete single node by serviceName and version and node", code = HttpStatus.SC_NO_CONTENT)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete node succeed "),
+            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "node not found", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete node fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public void deleteNode(
+            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,
+            @ApiParam(value = "ip") @PathParam("ip") String ip,
+            @ApiParam(value = "port") @PathParam("port") String port) {
+
+        MicroServiceWrapper.getInstance().deleteMicroServiceInstance(serviceName, version, ip,port);
+
+    }
+
+
+    @DELETE
+    @Path("/{serviceName}/version/{version}")
+    @ApiOperation(value = "delete one full microservice by serviceName and version", code = HttpStatus.SC_NO_CONTENT)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_NO_CONTENT, message = "delete microservice succeed "),
+            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "delete microservice fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public void deleteMicroService(
+            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,
+            @ApiParam(value = "port", required = false) @QueryParam("port") @DefaultValue("") String port) {
+
+
+         MicroServiceWrapper.getInstance().deleteMicroService(serviceName, version,port);
+
+    }
+
+    @PUT
+    @Path("/{serviceName}/version/{version}/status/{status}")
+    @ApiOperation(value = "update  microservice status by serviceName and version", code = HttpStatus.SC_CREATED, response = MicroServiceFullInfo.class)
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "microservice not found", response = String.class),
+            @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "update status fail", response = String.class)})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public Response updateServiceStatus(
+            @ApiParam(value = "microservice serviceName", required = true) @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "microservice version,if the version is empty, please enter \"null\"", required = false) @PathParam("version") @DefaultValue("") String version,
+            @ApiParam(value = "status,1:abled  0:disabled") @PathParam("status") String status) {
+
+        MicroServiceFullInfo microServiceFullInfo = MicroServiceWrapper.getInstance().updateMicroServiceStatus(serviceName, version,status);
+
+        return Response.created(uriInfo.getAbsolutePathBuilder().build()).entity(microServiceFullInfo).build();
+
+    }
+
+//    @PUT
+//    @Path("/ttl")
+//    @ApiOperation(value = "test json date iso8601 ", code = 200, response = String.class)
+//    @Produces(MediaType.APPLICATION_JSON)
+//    @Timed
+//    public String testIso8601(
+//              @ApiParam(value = "microservice Instance Info", required = true) MicroServiceFullInfo microServiceInfo) {
+//        Set<NodeInfo> nodes=microServiceInfo.getNodes();
+//        String rtn="rtn:";
+//        for(NodeInfo node:nodes){
+//            Date date=node.getExpiration();
+//            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
+//            String datettl=sdf.format(date);
+//            rtn+=datettl;
+//        }
+//        
+//    
+//        return rtn;
+//    }
+}
index 7e000e9..814f979 100644 (file)
@@ -1,65 +1,64 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.resources;\r
-\r
-import io.swagger.annotations.Api;\r
-import io.swagger.annotations.ApiOperation;\r
-import io.swagger.annotations.ApiParam;\r
-import io.swagger.annotations.ApiResponse;\r
-import io.swagger.annotations.ApiResponses;\r
-\r
-import java.util.List;\r
-\r
-import javax.ws.rs.DefaultValue;\r
-import javax.ws.rs.GET;\r
-import javax.ws.rs.HeaderParam;\r
-import javax.ws.rs.Path;\r
-import javax.ws.rs.PathParam;\r
-import javax.ws.rs.Produces;\r
-import javax.ws.rs.QueryParam;\r
-import javax.ws.rs.core.MediaType;\r
-\r
-import org.openo.msb.api.ServiceAccessInfo;\r
-import org.openo.msb.wrapper.ServiceAccessWrapper;\r
-\r
-import com.codahale.metrics.annotation.Timed;\r
-\r
-\r
-@Path("/serviceaccess")\r
-@Api(tags = {"ServiceAccess"})\r
-@Produces(MediaType.APPLICATION_JSON)\r
-public class ServiceAccessResource {\r
-\r
-    @GET\r
-    @Path("/{serviceName}")\r
-    @ApiOperation(value = "get the msb access address of the service ", response = ServiceAccessInfo.class)\r
-    @ApiResponses(value = {@ApiResponse(code = 500, message = "get access address error ")})\r
-    @Produces(MediaType.APPLICATION_JSON)\r
-    @Timed\r
-    public List<ServiceAccessInfo> getApiRoute(\r
-            @ApiParam(value = "serviceName") @PathParam("serviceName") String serviceName,\r
-            @ApiParam(value = "service type", allowableValues = "api,iui,custom,p2p") @QueryParam("type") String serviceType,\r
-            @ApiParam(value = "version") @QueryParam("version") @DefaultValue("") String version,\r
-            @ApiParam(hidden = true) @HeaderParam("Host") String host) {\r
-        \r
-        host=host.split(":")[0];\r
-\r
-        return ServiceAccessWrapper.getInstance().getApiRouteAccessAddr(serviceType, serviceName,\r
-                version, host);\r
-\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.resources;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+import java.util.List;
+
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.openo.msb.api.ServiceAccessInfo;
+import org.openo.msb.wrapper.ServiceAccessWrapper;
+
+import com.codahale.metrics.annotation.Timed;
+
+
+@Path("/serviceaccess")
+@Api(tags = {"ServiceAccess"})
+@Produces(MediaType.APPLICATION_JSON)
+public class ServiceAccessResource {
+
+    @GET
+    @Path("/{serviceName}")
+    @ApiOperation(value = "get the msb access address of the service ", response = ServiceAccessInfo.class)
+    @ApiResponses(value = {@ApiResponse(code = 500, message = "get access address error ")})
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public List<ServiceAccessInfo> getApiRoute(
+            @ApiParam(value = "serviceName") @PathParam("serviceName") String serviceName,
+            @ApiParam(value = "service type", allowableValues = "api,iui,custom,p2p") @QueryParam("type") String serviceType,
+            @ApiParam(value = "version") @QueryParam("version") @DefaultValue("") String version,
+            @ApiParam(hidden = true) @HeaderParam("Host") String host) {
+        
+        host=host.split(":")[0];
+
+        return ServiceAccessWrapper.getInstance().getApiRouteAccessAddr(serviceType, serviceName,
+                version, host);
+
+    }
+}
index d43bc76..9680a1a 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import java.io.File;\r
-import java.io.FileNotFoundException;\r
-import java.io.IOException;\r
-import java.net.URL;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.ApiRouteInfo;\r
-import org.openo.msb.api.DiscoverInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-import org.openo.msb.api.exception.ExtendedNotSupportedException;\r
-import org.openo.msb.wrapper.util.JedisUtil;\r
-import org.openo.msb.wrapper.util.RegExpTestUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import redis.clients.jedis.Jedis;\r
-\r
-\r
-\r
-/**\r
- * @ClassName: ApiRouteServiceWrapper\r
- * @Description: TODO(ApiRoute服务类)\r
- * @author tanghua10186366\r
- * @date 2015年9月25日 上午9:44:04\r
- * \r
- */\r
-public class ApiRouteServiceWrapper {\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(ApiRouteServiceWrapper.class);\r
-\r
-\r
-    private static ApiRouteServiceWrapper instance = new ApiRouteServiceWrapper();\r
-\r
-    private ApiRouteServiceWrapper() {}\r
-\r
-    public static ApiRouteServiceWrapper getInstance() {\r
-        return instance;\r
-    }\r
-\r
-    /**\r
-     * @Title: getAllApiRouteInstances\r
-     * @Description: TODO(获取全部服务列表)\r
-     * @param: @return\r
-     * @return: ApiRouteInfoBean[]\r
-     */\r
-    public ApiRouteInfo[] getAllApiRouteInstances() {\r
-\r
-\r
-        Jedis jedis = null;\r
-        ApiRouteInfo[] apiRouteList = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            // 获取全部服务列表\r
-            String routekey =\r
-                    RouteUtil\r
-                            .getPrefixedKey("", RouteUtil.APIROUTE, "*", RouteUtil.ROUTE_PATH_INFO);\r
-            Set<String> routeSet = jedis.keys(routekey);\r
-            apiRouteList = new ApiRouteInfo[routeSet.size()];\r
-\r
-            int i = 0;\r
-            for (String routePath : routeSet) {\r
-                String[] routePathArray = routePath.split(":");\r
-                ApiRouteInfo apiRoute =\r
-                        getApiRouteInstance(routePathArray[3], routePathArray[4], jedis);\r
-                apiRouteList[i] = apiRoute;\r
-                i++;\r
-            }\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return apiRouteList;\r
-    }\r
-\r
-\r
-\r
-    public static boolean checkRedisConnect() {\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis != null) {\r
-                return true;\r
-            }\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return false;\r
-    }\r
-\r
-    /**\r
-     * @Title: getApiRouteInstance\r
-     * @Description: TODO(通过服务名+版本号获取单个服务对象信息)\r
-     * @param: @param serviceName\r
-     * @param: @param version\r
-     * @param: @return\r
-     * @return: ApiRouteInfo\r
-     */\r
-    public ApiRouteInfo getApiRouteInstance(String serviceName, String version) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException("version (" + version\r
-                        + ") is not a valid  format");\r
-            }\r
-        }\r
-\r
-\r
-        ApiRouteInfo apiRouteInfo = null;\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            apiRouteInfo = getApiRouteInstance(serviceName, version, jedis);\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        if (null == apiRouteInfo) {\r
-            String errInfo =\r
-                    "ApiRouteInfo not found: serviceName-" + serviceName + " ,version-" + version;\r
-            LOGGER.warn(errInfo);\r
-            throw new ExtendedNotFoundException(errInfo);\r
-\r
-        }\r
-\r
-        return apiRouteInfo;\r
-\r
-    }\r
-\r
-    public ApiRouteInfo getApiRouteInstance(String serviceName, String version, Jedis jedis)\r
-            throws Exception {\r
-        if ("null".equals(version)) {\r
-            version = "";\r
-        }\r
-\r
-        ApiRouteInfo apiRouteInfo = null;\r
-\r
-\r
-        // 获取info信息\r
-        String routekey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> infomap = jedis.hgetAll(routekey);\r
-        if (!infomap.isEmpty()) {\r
-            apiRouteInfo = new ApiRouteInfo();\r
-            apiRouteInfo.setServiceName(serviceName);\r
-            apiRouteInfo.setVersion(version);\r
-            apiRouteInfo.setUrl(infomap.get("url"));\r
-            apiRouteInfo.setMetricsUrl(infomap.get("metricsUrl"));\r
-            apiRouteInfo.setApiJson(infomap.get("apijson"));\r
-            apiRouteInfo.setApiJsonType(infomap.get("apiJsonType"));\r
-            apiRouteInfo.setControl(infomap.get("control"));\r
-            apiRouteInfo.setStatus(infomap.get("status"));\r
-            apiRouteInfo.setVisualRange(infomap.get("visualRange"));\r
-            apiRouteInfo.setUseOwnUpstream(infomap.get("useOwnUpstream"));\r
-\r
-\r
-            // 获取负载均衡信息\r
-            String serviceLBkey =\r
-                    RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,\r
-                            RouteUtil.ROUTE_PATH_LOADBALANCE);\r
-            Set<String> serviceLBset = jedis.keys(serviceLBkey + ":*");\r
-            int serverNum = serviceLBset.size();\r
-            RouteServer[] apiRouteServerList = new RouteServer[serverNum];\r
-            int i = 0;\r
-            for (String serviceInfo : serviceLBset) {\r
-                Map<String, String> serviceLBmap = jedis.hgetAll(serviceInfo);\r
-                RouteServer server = new RouteServer();\r
-                server.setIp(serviceLBmap.get("ip"));\r
-                server.setPort(serviceLBmap.get("port"));\r
-                server.setWeight(Integer.parseInt(serviceLBmap.get("weight")));\r
-                apiRouteServerList[i] = server;\r
-                i++;\r
-            }\r
-\r
-            apiRouteInfo.setServers(apiRouteServerList);\r
-\r
-            // 获取生命周期信息\r
-\r
-//            ApiRouteLifeCycle lifeCycle = new ApiRouteLifeCycle();\r
-//            String serviceLifekey =\r
-//                    RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,\r
-//                            RouteUtil.APIROUTE_PATH_LIFE);\r
-//            Map<String, String> serviceLifeMap = jedis.hgetAll(serviceLifekey);\r
-//\r
-//            lifeCycle.setInstallPath(serviceLifeMap.get("path"));\r
-//            lifeCycle.setStartScript(serviceLifeMap.get("start"));\r
-//            lifeCycle.setStopScript(serviceLifeMap.get("stop"));\r
-//\r
-//            apiRouteInfo.setLifeCycle(lifeCycle);\r
-        }\r
-\r
-\r
-        return apiRouteInfo;\r
-    }\r
-\r
-    /**\r
-     * @Title: updateApiRouteInstance\r
-     * @Description: TODO(更新单个服务信息)\r
-     * @param: @param serviceName\r
-     * @param: @param version\r
-     * @param: @param apiRouteInfo\r
-     * @param: @return\r
-     * @return: ApiRouteInfo\r
-     */\r
-    public synchronized ApiRouteInfo updateApiRouteInstance(String serviceName, String version,\r
-            ApiRouteInfo apiRouteInfo, String serverPort) {\r
-\r
-        if ("null".equals(version)) {\r
-            version = "";\r
-        }\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException("version (" + version\r
-                        + ") is not a valid  format");\r
-            }\r
-        }\r
-\r
-        \r
-\r
-\r
-        try {\r
-\r
-\r
-            if (serviceName.equals(apiRouteInfo.getServiceName())\r
-                    && version.equals(apiRouteInfo.getVersion())) {\r
-                // 删除已存在负载均衡服务器信息\r
-                deleteApiRoute(serviceName, version, RouteUtil.ROUTE_PATH_LOADBALANCE + "*",\r
-                        serverPort);\r
-\r
-            } else {\r
-                // 如果已修改服务名或者版本号,先删除此服务全部已有信息\r
-                deleteApiRoute(serviceName, version, "*", serverPort);\r
-            }\r
-\r
-\r
-            saveApiRouteInstance(apiRouteInfo, serverPort);\r
-\r
-\r
-        } catch (ExtendedNotSupportedException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("update ApiRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("update apiRouteInfo throw exception"\r
-                    + e.getMessage());\r
-\r
-        }\r
-\r
-        return apiRouteInfo;\r
-\r
-    }\r
-\r
-    /**\r
-     * @Title updateApiRouteStatus\r
-     * @Description TODO(更新单个服务状态)\r
-     * @param serviceName\r
-     * @param version\r
-     * @param status\r
-     * @return\r
-     * @return RouteResult\r
-     */\r
-    public synchronized ApiRouteInfo updateApiRouteStatus(String serviceName, String version,\r
-            String status) {\r
-\r
-        if ("null".equals(version)) {\r
-            version = "";\r
-        }\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException("version (" + version\r
-                        + ") is not a valid  format");\r
-            }\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, status)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save ApiRouteInfo  Status FAIL:status is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");\r
-        }\r
-\r
-        ApiRouteInfo new_apiRouteInfo = getApiRouteInstance(serviceName, version);\r
-\r
-\r
-        // 准备info信息\r
-        String serviceInfokey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("status", status);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new Exception("fetch from jedis pool failed,null object!");\r
-            }\r
-            // 保存info信息\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-            new_apiRouteInfo.setStatus(status);\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("update ApiRoute status throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("update ApiRoute status throw exception"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return new_apiRouteInfo;\r
-    }\r
-\r
-\r
-    /**\r
-     * @Title: saveApiRouteInstance\r
-     * @Description: TODO(存储单个服务信息)\r
-     * @param: @param apiRouteInfo\r
-     * @param: @return\r
-     * @return: ApiRouteInfo\r
-     */\r
-    public synchronized ApiRouteInfo saveApiRouteInstance(ApiRouteInfo apiRouteInfo,\r
-            String serverPort) {\r
-\r
-       \r
-        \r
-        if (StringUtils.isBlank(apiRouteInfo.getServiceName())\r
-                || apiRouteInfo.getServers().length == 0) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL: Some required fields are empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(apiRouteInfo.getVersion())) {\r
-            if (!RegExpTestUtil.versionRegExpTest(apiRouteInfo.getVersion())) {\r
-                throw new ExtendedNotSupportedException("version (" + apiRouteInfo.getVersion()\r
-                        + ") is not a valid  format");\r
-            }\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(apiRouteInfo.getUrl())) {\r
-            if (!RegExpTestUtil.urlRegExpTest(apiRouteInfo.getUrl())) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "save apiRouteInfo FAIL:url is not a valid format(url must be begin with /)");\r
-    \r
-            }\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.visualRangeRange, apiRouteInfo.getVisualRange())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL:VisualRange is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.visualRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.controlRangeMatches, apiRouteInfo.getControl())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL:control is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.controlRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, apiRouteInfo.getStatus())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL:status is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.useOwnUpstreamRangeMatches, apiRouteInfo.getUseOwnUpstream())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL:useOwnUpstream is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.useOwnUpstreamRangeMatches) + ")");\r
-        }\r
-\r
-        // 检查服务实例格式\r
-        RouteServer[] serverList = apiRouteInfo.getServers();\r
-        for (int i = 0; i < serverList.length; i++) {\r
-            RouteServer server = serverList[i];\r
-            if (!RegExpTestUtil.ipRegExpTest(server.getIp())) {\r
-                throw new ExtendedNotSupportedException("save apiRouteInfo FAIL:IP("\r
-                        + server.getIp() + ")is not a valid ip address");\r
-            }\r
-\r
-            if (!RegExpTestUtil.portRegExpTest(server.getPort())) {\r
-                throw new ExtendedNotSupportedException("save apiRouteInfo FAIL:Port("\r
-                        + server.getPort() + ")is not a valid Port address");\r
-            }\r
-        }\r
-\r
-        // 准备info信息\r
-        String serviceInfokey =\r
-                RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE,\r
-                        apiRouteInfo.getServiceName().trim(), apiRouteInfo.getVersion().trim(),\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("url", "/".equals(apiRouteInfo.getUrl().trim()) ? "" : apiRouteInfo\r
-                .getUrl().trim());\r
-        serviceInfoMap.put("apijson", apiRouteInfo.getApiJson());\r
-        serviceInfoMap.put("apiJsonType", apiRouteInfo.getApiJsonType());\r
-        serviceInfoMap.put("metricsUrl", apiRouteInfo.getMetricsUrl());\r
-        serviceInfoMap.put("control", apiRouteInfo.getControl());\r
-        serviceInfoMap.put("status", apiRouteInfo.getStatus());\r
-        serviceInfoMap.put("visualRange", apiRouteInfo.getVisualRange());\r
-        serviceInfoMap.put("useOwnUpstream", apiRouteInfo.getUseOwnUpstream());\r
-\r
-        // 准备负载均衡信息\r
-        String serviceLBkey =\r
-                RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE,\r
-                        apiRouteInfo.getServiceName(), apiRouteInfo.getVersion(),\r
-                        RouteUtil.ROUTE_PATH_LOADBALANCE);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-            // 保存info信息\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-\r
-            // 保存负载均衡信息\r
-            for (int i = 0; i < serverList.length; i++) {\r
-                Map<String, String> servermap = new HashMap<String, String>();\r
-                RouteServer server = serverList[i];\r
-\r
-                servermap.put("ip", server.getIp());\r
-                servermap.put("port", server.getPort());\r
-                servermap.put("weight", Integer.toString(server.getWeight()));\r
-\r
-                jedis.hmset(serviceLBkey + ":server" + (i + 1), servermap);\r
-            }\r
-            // 保存生命周期信息\r
-\r
-//            ApiRouteLifeCycle lifeCycle = apiRouteInfo.getLifeCycle();\r
-//            if (lifeCycle != null) {\r
-//                String serviceLifekey =\r
-//                        RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE,\r
-//                                apiRouteInfo.getServiceName(), apiRouteInfo.getVersion(),\r
-//                                RouteUtil.APIROUTE_PATH_LIFE);\r
-//                Map<String, String> serviceLifeMap = new HashMap<String, String>();\r
-//                serviceLifeMap.put("path", lifeCycle.getInstallPath());\r
-//                serviceLifeMap.put("start", lifeCycle.getStartScript());\r
-//                serviceLifeMap.put("stop", lifeCycle.getStopScript());\r
-//                jedis.hmset(serviceLifekey, serviceLifeMap);\r
-//            }\r
-\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return apiRouteInfo;\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * @Title: deleteApiRoute\r
-     * @Description: TODO(删除单个服务信息)\r
-     * @param: @param type\r
-     * @param: @param serviceName\r
-     * @param: @param version\r
-     * @param: @param delKey\r
-     * @param: @return\r
-     * @return: void\r
-     */\r
-    public synchronized void deleteApiRoute(String serviceName, String version, String delKey,\r
-            String serverPort) {\r
-\r
-        if ("null".equals(version)) {\r
-            version = "";\r
-        }\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException("version (" + version\r
-                        + ") is not a valid  format");\r
-            }\r
-        }\r
-\r
-        \r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            // 获取info信息\r
-            String routekey =\r
-                    RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE, serviceName, version,\r
-                            delKey);\r
-            Set<String> infoSet = jedis.keys(routekey);\r
-\r
-            if (infoSet.isEmpty()) {\r
-                throw new ExtendedNotFoundException("delete ApiRoute FAIL:serviceName-"\r
-                        + serviceName + ",version:" + version + " not fond ");\r
-            }\r
-\r
-            String[] paths = new String[infoSet.size()];\r
-\r
-            // Set-->数组\r
-            infoSet.toArray(paths);\r
-\r
-            jedis.del(paths);\r
-\r
-\r
-        } catch (ExtendedNotFoundException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("delete ApiRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("delete ApiRoute throw exception:"\r
-                    + e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-\r
-    }\r
-\r
-    /**\r
-     * @Title: getAllApiDocs\r
-     * @Description: TODO(获取本地ext\initSwaggerJson目录的全部json文件目录)\r
-     * @param: @return\r
-     * @return: String[]\r
-     */\r
-    public String[] getAllApiDocs() {\r
-        URL apiDocsPath = ApiRouteServiceWrapper.class.getResource("/ext/initSwaggerJson");\r
-        if (apiDocsPath != null) {\r
-            String path = apiDocsPath.getPath();\r
-\r
-            try {\r
-                return readfile(path);\r
-            } catch (FileNotFoundException e) {\r
-                // TODO Auto-generated catch block\r
-                LOGGER.error("read  ApiDocs Files throw FileNotFoundException", e);\r
-                throw new ExtendedInternalServerErrorException("read  ApiDocs Files throw FileNotFoundException:"\r
-                        + e.getMessage());\r
-            } catch (IOException e) {\r
-                // TODO Auto-generated catch block\r
-                LOGGER.error("read  ApiDocs Files throw IOexception", e);\r
-                throw new ExtendedInternalServerErrorException("read  ApiDocs Files throw IOexception:"\r
-                        + e.getMessage());\r
-            }\r
-\r
-        }\r
-\r
-\r
-        return null;\r
-    }\r
-\r
-    /**\r
-     * 读取某个文件夹下的所有文件\r
-     */\r
-    public String[] readfile(String filepath) throws FileNotFoundException, IOException {\r
-        File file = new File(filepath);\r
-        if (file.isDirectory()) {\r
-            String[] filelist = file.list();\r
-            return filelist;\r
-        }\r
-        return null;\r
-    }\r
-\r
-    public String getApiGatewayPort() {\r
-        // return JedisUtil.serverIp+":"+JedisUtil.serverPort;\r
-        return System.getenv("APIGATEWAY_EXPOSE_PORT") == null ? String\r
-                .valueOf(JedisUtil.serverPort) : System.getenv("APIGATEWAY_EXPOSE_PORT");\r
-\r
-    }\r
-\r
-    public DiscoverInfo getServiceDiscoverInfo() {\r
-        return RouteUtil.discoverInfo;\r
-\r
-    }\r
-\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.ApiRouteInfo;
+import org.openo.msb.api.DiscoverInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+import org.openo.msb.api.exception.ExtendedNotSupportedException;
+import org.openo.msb.wrapper.util.JedisUtil;
+import org.openo.msb.wrapper.util.RegExpTestUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+
+
+/**
+ * @ClassName: ApiRouteServiceWrapper
+ * @Description: TODO(ApiRoute服务类)
+ * @author tanghua10186366
+ * @date 2015年9月25日 上午9:44:04
+ * 
+ */
+public class ApiRouteServiceWrapper {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ApiRouteServiceWrapper.class);
+
+
+    private static ApiRouteServiceWrapper instance = new ApiRouteServiceWrapper();
+
+    private ApiRouteServiceWrapper() {}
+
+    public static ApiRouteServiceWrapper getInstance() {
+        return instance;
+    }
+
+    /**
+     * @Title: getAllApiRouteInstances
+     * @Description: TODO(获取全部服务列表)
+     * @param: @return
+     * @return: ApiRouteInfoBean[]
+     */
+    public ApiRouteInfo[] getAllApiRouteInstances() {
+
+
+        Jedis jedis = null;
+        ApiRouteInfo[] apiRouteList = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            // 获取全部服务列表
+            String routekey =
+                    RouteUtil
+                            .getPrefixedKey("", RouteUtil.APIROUTE, "*", RouteUtil.ROUTE_PATH_INFO);
+            Set<String> routeSet = jedis.keys(routekey);
+            apiRouteList = new ApiRouteInfo[routeSet.size()];
+
+            int i = 0;
+            for (String routePath : routeSet) {
+                String[] routePathArray = routePath.split(":");
+                ApiRouteInfo apiRoute =
+                        getApiRouteInstance(routePathArray[3], routePathArray[4], jedis);
+                apiRouteList[i] = apiRoute;
+                i++;
+            }
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return apiRouteList;
+    }
+
+
+
+    public static boolean checkRedisConnect() {
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis != null) {
+                return true;
+            }
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return false;
+    }
+
+    /**
+     * @Title: getApiRouteInstance
+     * @Description: TODO(通过服务名+版本号获取单个服务对象信息)
+     * @param: @param serviceName
+     * @param: @param version
+     * @param: @return
+     * @return: ApiRouteInfo
+     */
+    public ApiRouteInfo getApiRouteInstance(String serviceName, String version) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException("version (" + version
+                        + ") is not a valid  format");
+            }
+        }
+
+
+        ApiRouteInfo apiRouteInfo = null;
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            apiRouteInfo = getApiRouteInstance(serviceName, version, jedis);
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        if (null == apiRouteInfo) {
+            String errInfo =
+                    "ApiRouteInfo not found: serviceName-" + serviceName + " ,version-" + version;
+            LOGGER.warn(errInfo);
+            throw new ExtendedNotFoundException(errInfo);
+
+        }
+
+        return apiRouteInfo;
+
+    }
+
+    public ApiRouteInfo getApiRouteInstance(String serviceName, String version, Jedis jedis)
+            throws Exception {
+        if ("null".equals(version)) {
+            version = "";
+        }
+
+        ApiRouteInfo apiRouteInfo = null;
+
+
+        // 获取info信息
+        String routekey =
+                RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> infomap = jedis.hgetAll(routekey);
+        if (!infomap.isEmpty()) {
+            apiRouteInfo = new ApiRouteInfo();
+            apiRouteInfo.setServiceName(serviceName);
+            apiRouteInfo.setVersion(version);
+            apiRouteInfo.setUrl(infomap.get("url"));
+            apiRouteInfo.setMetricsUrl(infomap.get("metricsUrl"));
+            apiRouteInfo.setApiJson(infomap.get("apijson"));
+            apiRouteInfo.setApiJsonType(infomap.get("apiJsonType"));
+            apiRouteInfo.setControl(infomap.get("control"));
+            apiRouteInfo.setStatus(infomap.get("status"));
+            apiRouteInfo.setVisualRange(infomap.get("visualRange"));
+            apiRouteInfo.setUseOwnUpstream(infomap.get("useOwnUpstream"));
+
+
+            // 获取负载均衡信息
+            String serviceLBkey =
+                    RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,
+                            RouteUtil.ROUTE_PATH_LOADBALANCE);
+            Set<String> serviceLBset = jedis.keys(serviceLBkey + ":*");
+            int serverNum = serviceLBset.size();
+            RouteServer[] apiRouteServerList = new RouteServer[serverNum];
+            int i = 0;
+            for (String serviceInfo : serviceLBset) {
+                Map<String, String> serviceLBmap = jedis.hgetAll(serviceInfo);
+                RouteServer server = new RouteServer();
+                server.setIp(serviceLBmap.get("ip"));
+                server.setPort(serviceLBmap.get("port"));
+                server.setWeight(Integer.parseInt(serviceLBmap.get("weight")));
+                apiRouteServerList[i] = server;
+                i++;
+            }
+
+            apiRouteInfo.setServers(apiRouteServerList);
+
+            // 获取生命周期信息
+
+//            ApiRouteLifeCycle lifeCycle = new ApiRouteLifeCycle();
+//            String serviceLifekey =
+//                    RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,
+//                            RouteUtil.APIROUTE_PATH_LIFE);
+//            Map<String, String> serviceLifeMap = jedis.hgetAll(serviceLifekey);
+//
+//            lifeCycle.setInstallPath(serviceLifeMap.get("path"));
+//            lifeCycle.setStartScript(serviceLifeMap.get("start"));
+//            lifeCycle.setStopScript(serviceLifeMap.get("stop"));
+//
+//            apiRouteInfo.setLifeCycle(lifeCycle);
+        }
+
+
+        return apiRouteInfo;
+    }
+
+    /**
+     * @Title: updateApiRouteInstance
+     * @Description: TODO(更新单个服务信息)
+     * @param: @param serviceName
+     * @param: @param version
+     * @param: @param apiRouteInfo
+     * @param: @return
+     * @return: ApiRouteInfo
+     */
+    public synchronized ApiRouteInfo updateApiRouteInstance(String serviceName, String version,
+            ApiRouteInfo apiRouteInfo, String serverPort) {
+
+        if ("null".equals(version)) {
+            version = "";
+        }
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException("version (" + version
+                        + ") is not a valid  format");
+            }
+        }
+
+        
+
+
+        try {
+
+
+            if (serviceName.equals(apiRouteInfo.getServiceName())
+                    && version.equals(apiRouteInfo.getVersion())) {
+                // 删除已存在负载均衡服务器信息
+                deleteApiRoute(serviceName, version, RouteUtil.ROUTE_PATH_LOADBALANCE + "*",
+                        serverPort);
+
+            } else {
+                // 如果已修改服务名或者版本号,先删除此服务全部已有信息
+                deleteApiRoute(serviceName, version, "*", serverPort);
+            }
+
+
+            saveApiRouteInstance(apiRouteInfo, serverPort);
+
+
+        } catch (ExtendedNotSupportedException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("update ApiRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException("update apiRouteInfo throw exception"
+                    + e.getMessage());
+
+        }
+
+        return apiRouteInfo;
+
+    }
+
+    /**
+     * @Title updateApiRouteStatus
+     * @Description TODO(更新单个服务状态)
+     * @param serviceName
+     * @param version
+     * @param status
+     * @return
+     * @return RouteResult
+     */
+    public synchronized ApiRouteInfo updateApiRouteStatus(String serviceName, String version,
+            String status) {
+
+        if ("null".equals(version)) {
+            version = "";
+        }
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException("version (" + version
+                        + ") is not a valid  format");
+            }
+        }
+
+        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, status)) {
+            throw new ExtendedNotSupportedException(
+                    "save ApiRouteInfo  Status FAIL:status is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");
+        }
+
+        ApiRouteInfo new_apiRouteInfo = getApiRouteInstance(serviceName, version);
+
+
+        // 准备info信息
+        String serviceInfokey =
+                RouteUtil.getPrefixedKey("", RouteUtil.APIROUTE, serviceName, version,
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("status", status);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new Exception("fetch from jedis pool failed,null object!");
+            }
+            // 保存info信息
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+            new_apiRouteInfo.setStatus(status);
+
+
+        } catch (Exception e) {
+            LOGGER.error("update ApiRoute status throw exception", e);
+            throw new ExtendedInternalServerErrorException("update ApiRoute status throw exception"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return new_apiRouteInfo;
+    }
+
+
+    /**
+     * @Title: saveApiRouteInstance
+     * @Description: TODO(存储单个服务信息)
+     * @param: @param apiRouteInfo
+     * @param: @return
+     * @return: ApiRouteInfo
+     */
+    public synchronized ApiRouteInfo saveApiRouteInstance(ApiRouteInfo apiRouteInfo,
+            String serverPort) {
+
+       
+        
+        if (StringUtils.isBlank(apiRouteInfo.getServiceName())
+                || apiRouteInfo.getServers().length == 0) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL: Some required fields are empty");
+        }
+
+        if (StringUtils.isNotBlank(apiRouteInfo.getVersion())) {
+            if (!RegExpTestUtil.versionRegExpTest(apiRouteInfo.getVersion())) {
+                throw new ExtendedNotSupportedException("version (" + apiRouteInfo.getVersion()
+                        + ") is not a valid  format");
+            }
+        }
+
+        if (StringUtils.isNotBlank(apiRouteInfo.getUrl())) {
+            if (!RegExpTestUtil.urlRegExpTest(apiRouteInfo.getUrl())) {
+                throw new ExtendedNotSupportedException(
+                        "save apiRouteInfo FAIL:url is not a valid format(url must be begin with /)");
+    
+            }
+        }
+
+        if (!RouteUtil.contain(RouteUtil.visualRangeRange, apiRouteInfo.getVisualRange())) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL:VisualRange is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.visualRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.controlRangeMatches, apiRouteInfo.getControl())) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL:control is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.controlRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, apiRouteInfo.getStatus())) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL:status is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.useOwnUpstreamRangeMatches, apiRouteInfo.getUseOwnUpstream())) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL:useOwnUpstream is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.useOwnUpstreamRangeMatches) + ")");
+        }
+
+        // 检查服务实例格式
+        RouteServer[] serverList = apiRouteInfo.getServers();
+        for (int i = 0; i < serverList.length; i++) {
+            RouteServer server = serverList[i];
+            if (!RegExpTestUtil.ipRegExpTest(server.getIp())) {
+                throw new ExtendedNotSupportedException("save apiRouteInfo FAIL:IP("
+                        + server.getIp() + ")is not a valid ip address");
+            }
+
+            if (!RegExpTestUtil.portRegExpTest(server.getPort())) {
+                throw new ExtendedNotSupportedException("save apiRouteInfo FAIL:Port("
+                        + server.getPort() + ")is not a valid Port address");
+            }
+        }
+
+        // 准备info信息
+        String serviceInfokey =
+                RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE,
+                        apiRouteInfo.getServiceName().trim(), apiRouteInfo.getVersion().trim(),
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("url", "/".equals(apiRouteInfo.getUrl().trim()) ? "" : apiRouteInfo
+                .getUrl().trim());
+        serviceInfoMap.put("apijson", apiRouteInfo.getApiJson());
+        serviceInfoMap.put("apiJsonType", apiRouteInfo.getApiJsonType());
+        serviceInfoMap.put("metricsUrl", apiRouteInfo.getMetricsUrl());
+        serviceInfoMap.put("control", apiRouteInfo.getControl());
+        serviceInfoMap.put("status", apiRouteInfo.getStatus());
+        serviceInfoMap.put("visualRange", apiRouteInfo.getVisualRange());
+        serviceInfoMap.put("useOwnUpstream", apiRouteInfo.getUseOwnUpstream());
+
+        // 准备负载均衡信息
+        String serviceLBkey =
+                RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE,
+                        apiRouteInfo.getServiceName(), apiRouteInfo.getVersion(),
+                        RouteUtil.ROUTE_PATH_LOADBALANCE);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+            // 保存info信息
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+
+            // 保存负载均衡信息
+            for (int i = 0; i < serverList.length; i++) {
+                Map<String, String> servermap = new HashMap<String, String>();
+                RouteServer server = serverList[i];
+
+                servermap.put("ip", server.getIp());
+                servermap.put("port", server.getPort());
+                servermap.put("weight", Integer.toString(server.getWeight()));
+
+                jedis.hmset(serviceLBkey + ":server" + (i + 1), servermap);
+            }
+            // 保存生命周期信息
+
+//            ApiRouteLifeCycle lifeCycle = apiRouteInfo.getLifeCycle();
+//            if (lifeCycle != null) {
+//                String serviceLifekey =
+//                        RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE,
+//                                apiRouteInfo.getServiceName(), apiRouteInfo.getVersion(),
+//                                RouteUtil.APIROUTE_PATH_LIFE);
+//                Map<String, String> serviceLifeMap = new HashMap<String, String>();
+//                serviceLifeMap.put("path", lifeCycle.getInstallPath());
+//                serviceLifeMap.put("start", lifeCycle.getStartScript());
+//                serviceLifeMap.put("stop", lifeCycle.getStopScript());
+//                jedis.hmset(serviceLifekey, serviceLifeMap);
+//            }
+
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return apiRouteInfo;
+    }
+
+
+
+    /**
+     * @Title: deleteApiRoute
+     * @Description: TODO(删除单个服务信息)
+     * @param: @param type
+     * @param: @param serviceName
+     * @param: @param version
+     * @param: @param delKey
+     * @param: @return
+     * @return: void
+     */
+    public synchronized void deleteApiRoute(String serviceName, String version, String delKey,
+            String serverPort) {
+
+        if ("null".equals(version)) {
+            version = "";
+        }
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException("version (" + version
+                        + ") is not a valid  format");
+            }
+        }
+
+        
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            // 获取info信息
+            String routekey =
+                    RouteUtil.getPrefixedKey(serverPort, RouteUtil.APIROUTE, serviceName, version,
+                            delKey);
+            Set<String> infoSet = jedis.keys(routekey);
+
+            if (infoSet.isEmpty()) {
+                throw new ExtendedNotFoundException("delete ApiRoute FAIL:serviceName-"
+                        + serviceName + ",version:" + version + " not fond ");
+            }
+
+            String[] paths = new String[infoSet.size()];
+
+            // Set-->数组
+            infoSet.toArray(paths);
+
+            jedis.del(paths);
+
+
+        } catch (ExtendedNotFoundException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("delete ApiRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException("delete ApiRoute throw exception:"
+                    + e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+
+    }
+
+    /**
+     * @Title: getAllApiDocs
+     * @Description: TODO(获取本地ext\initSwaggerJson目录的全部json文件目录)
+     * @param: @return
+     * @return: String[]
+     */
+    public String[] getAllApiDocs() {
+        URL apiDocsPath = ApiRouteServiceWrapper.class.getResource("/ext/initSwaggerJson");
+        if (apiDocsPath != null) {
+            String path = apiDocsPath.getPath();
+
+            try {
+                return readfile(path);
+            } catch (FileNotFoundException e) {
+                // TODO Auto-generated catch block
+                LOGGER.error("read  ApiDocs Files throw FileNotFoundException", e);
+                throw new ExtendedInternalServerErrorException("read  ApiDocs Files throw FileNotFoundException:"
+                        + e.getMessage());
+            } catch (IOException e) {
+                // TODO Auto-generated catch block
+                LOGGER.error("read  ApiDocs Files throw IOexception", e);
+                throw new ExtendedInternalServerErrorException("read  ApiDocs Files throw IOexception:"
+                        + e.getMessage());
+            }
+
+        }
+
+
+        return null;
+    }
+
+    /**
+     * 读取某个文件夹下的所有文件
+     */
+    public String[] readfile(String filepath) throws FileNotFoundException, IOException {
+        File file = new File(filepath);
+        if (file.isDirectory()) {
+            String[] filelist = file.list();
+            return filelist;
+        }
+        return null;
+    }
+
+    public String getApiGatewayPort() {
+        // return JedisUtil.serverIp+":"+JedisUtil.serverPort;
+        return System.getenv("APIGATEWAY_EXPOSE_PORT") == null ? String
+                .valueOf(JedisUtil.serverPort) : System.getenv("APIGATEWAY_EXPOSE_PORT");
+
+    }
+
+    public DiscoverInfo getServiceDiscoverInfo() {
+        return RouteUtil.discoverInfo;
+
+    }
+
+
+}
index f99e71a..f5a642b 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.CustomRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-import org.openo.msb.api.exception.ExtendedNotSupportedException;\r
-import org.openo.msb.wrapper.util.JedisUtil;\r
-import org.openo.msb.wrapper.util.RegExpTestUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import redis.clients.jedis.Jedis;\r
-\r
-public class CustomRouteServiceWrapper {\r
-\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(CustomRouteServiceWrapper.class);\r
-\r
-    private static CustomRouteServiceWrapper instance = new CustomRouteServiceWrapper();\r
-\r
-    private CustomRouteServiceWrapper() {}\r
-\r
-    public static CustomRouteServiceWrapper getInstance() {\r
-        return instance;\r
-    }\r
-\r
-\r
-    /**\r
-     * @Title: getAllCustomRouteService\r
-     * @Description: TODO(获取全部内容服务列表)\r
-     * @param: @return\r
-     * @return: CustomRouteInfo[]\r
-     */\r
-    public CustomRouteInfo[] getAllCustomRouteInstances() {\r
-\r
-\r
-        Jedis jedis = null;\r
-        CustomRouteInfo[] customRouteList = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            // 获取全部服务列表\r
-            String routekey =\r
-                    RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, "*",\r
-                            RouteUtil.ROUTE_PATH_INFO);\r
-            Set<String> routeSet = jedis.keys(routekey);\r
-            customRouteList = new CustomRouteInfo[routeSet.size()];\r
-\r
-            int i = 0;\r
-            for (String routePath : routeSet) {\r
-                String[] routePathArray = routePath.split(":");\r
-                CustomRouteInfo customRoute = getCustomRouteInstance(routePathArray[3], jedis);\r
-                customRouteList[i] = customRoute;\r
-                i++;\r
-            }\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return customRouteList;\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * @Title: getCustomRouteInstance\r
-     * @Description: TODO(通过服务名获取单个内容服务对象信息)\r
-     * @param: @param serviceName\r
-     * @param: @return\r
-     * @return: CustomRouteInfo\r
-     */\r
-    public CustomRouteInfo getCustomRouteInstance(String serviceName) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        CustomRouteInfo customRouteInfo;\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            customRouteInfo = getCustomRouteInstance(serviceName, jedis);\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        if (null == customRouteInfo) {\r
-            String errInfo = "customRouteInfo not found: serviceName-" + serviceName;\r
-            LOGGER.warn(errInfo);\r
-            throw new ExtendedNotFoundException(errInfo);\r
-\r
-        }\r
-\r
-        return customRouteInfo;\r
-\r
-    }\r
-\r
-    public CustomRouteInfo getCustomRouteInstance(String serviceName, Jedis jedis) throws Exception {\r
-\r
-\r
-        CustomRouteInfo customRouteInfo = null;\r
-\r
-\r
-        // 获取info信息\r
-        String routekey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, serviceName,\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> infomap = jedis.hgetAll(routekey);\r
-        if (!infomap.isEmpty()) {\r
-            customRouteInfo = new CustomRouteInfo();\r
-            customRouteInfo.setServiceName(serviceName);\r
-            customRouteInfo.setUrl(infomap.get("url"));\r
-            customRouteInfo.setControl(infomap.get("control"));\r
-            customRouteInfo.setStatus(infomap.get("status"));\r
-            customRouteInfo.setVisualRange(infomap.get("visualRange"));\r
-            customRouteInfo.setUseOwnUpstream(infomap.get("useOwnUpstream"));\r
-\r
-\r
-            // 获取负载均衡信息\r
-            String serviceLBkey =\r
-                    RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, serviceName,\r
-                            RouteUtil.ROUTE_PATH_LOADBALANCE);\r
-            Set<String> serviceLBset = jedis.keys(serviceLBkey + ":*");\r
-            int serverNum = serviceLBset.size();\r
-            RouteServer[] CustomRouteServerList = new RouteServer[serverNum];\r
-            int i = 0;\r
-            for (String serviceInfo : serviceLBset) {\r
-                Map<String, String> serviceLBmap = jedis.hgetAll(serviceInfo);\r
-                RouteServer server = new RouteServer();\r
-                server.setIp(serviceLBmap.get("ip"));\r
-                server.setPort(serviceLBmap.get("port"));\r
-                server.setWeight(Integer.parseInt(serviceLBmap.get("weight")));\r
-                CustomRouteServerList[i] = server;\r
-                i++;\r
-            }\r
-\r
-            customRouteInfo.setServers(CustomRouteServerList);\r
-        }\r
-\r
-\r
-        return customRouteInfo;\r
-    }\r
-\r
-    /**\r
-     * @Title: updateCustomRouteInstance\r
-     * @Description: TODO(更新单个服务信息)\r
-     * @param: @param serviceName\r
-     * @param: @param CustomRouteInfo\r
-     * @param: @return\r
-     * @return: CustomRouteInfo\r
-     */\r
-    public synchronized CustomRouteInfo updateCustomRouteInstance(String serviceName,\r
-            CustomRouteInfo customRouteInfo, String serverPort) {\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        try {\r
-\r
-            if (serviceName.equals(customRouteInfo.getServiceName())) {\r
-                // 删除已存在负载均衡服务器信息\r
-                deleteCustomRoute(serviceName, RouteUtil.ROUTE_PATH_LOADBALANCE + "*", serverPort);\r
-            } else {\r
-                // 如果已修改服务名,先删除此服务全部已有信息\r
-                deleteCustomRoute(serviceName, "*", serverPort);\r
-            }\r
-\r
-\r
-            saveCustomRouteInstance(customRouteInfo, serverPort);\r
-\r
-\r
-\r
-        } catch (ExtendedNotSupportedException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("updateCustomRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("update CustomRoute throw exception"\r
-                    + e.getMessage());\r
-\r
-        }\r
-\r
-        return customRouteInfo;\r
-\r
-    }\r
-\r
-    /**\r
-     * @Title updateCustomRouteStatus\r
-     * @Description TODO(更新单个服务状态)\r
-     * @param serviceName\r
-     * @param status\r
-     * @return\r
-     * @return RouteResult\r
-     */\r
-    public synchronized CustomRouteInfo updateCustomRouteStatus(String serviceName, String status) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, status)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save CustomRouteInfo Status FAIL:status is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");\r
-        }\r
-\r
-        CustomRouteInfo new_customRouteInfo = getCustomRouteInstance(serviceName);\r
-\r
-\r
-\r
-        // 准备info信息\r
-        String serviceInfokey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, serviceName,\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("status", status);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-            // 保存info信息\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-            new_customRouteInfo.setStatus(status);\r
-\r
-        } catch (Exception e) {\r
-\r
-            LOGGER.error("update CustomRoute status throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(\r
-                    "update CustomRoute status throw exception" + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return new_customRouteInfo;\r
-    }\r
-\r
-    /**\r
-     * @Title: saveCustomRouteInstance\r
-     * @Description: TODO(存储单个服务信息)\r
-     * @param: @param CustomRouteInfo\r
-     * @param: @return\r
-     * @return: CustomRouteInfo\r
-     */\r
-    public synchronized CustomRouteInfo saveCustomRouteInstance(CustomRouteInfo customRouteInfo,\r
-            String serverPort) {\r
-\r
-        if (StringUtils.isBlank(customRouteInfo.getServiceName())\r
-                || customRouteInfo.getServers().length == 0) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save CustomRouteInfo FAIL: Some required fields are empty");\r
-        }\r
-\r
-       \r
-            if (!RegExpTestUtil.urlRegExpTest(customRouteInfo.getServiceName())) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "save CustomRouteInfo FAIL: ServiceName is not a valid format(ServiceName must be begin with /)");\r
-    \r
-            }\r
-        \r
-            if (StringUtils.isNotBlank(customRouteInfo.getUrl())){\r
-                if (!RegExpTestUtil.urlRegExpTest(customRouteInfo.getUrl())) {\r
-                    throw new ExtendedNotSupportedException(\r
-                            "save CustomRouteInfo FAIL:url is not a valid format(url must be begin with /)");\r
-        \r
-                }\r
-            }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.visualRangeRange, customRouteInfo.getVisualRange())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save CustomRouteInfo FAIL:VisualRange is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.visualRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.controlRangeMatches, customRouteInfo.getControl())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save CustomRouteInfo FAIL:control is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.controlRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, customRouteInfo.getStatus())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save CustomRouteInfo FAIL:status is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.useOwnUpstreamRangeMatches, customRouteInfo.getUseOwnUpstream())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL:useOwnUpstream is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.useOwnUpstreamRangeMatches) + ")");\r
-        }\r
-\r
-        // 检查服务实例格式\r
-        RouteServer[] serverList = customRouteInfo.getServers();\r
-        for (int i = 0; i < serverList.length; i++) {\r
-            RouteServer server = serverList[i];\r
-            if (!RegExpTestUtil.ipRegExpTest(server.getIp())) {\r
-                throw new ExtendedNotSupportedException("save CustomRouteInfo FAIL:IP("\r
-                        + server.getIp() + ")is not a valid ip address");\r
-            }\r
-\r
-            if (!RegExpTestUtil.portRegExpTest(server.getPort())) {\r
-                throw new ExtendedNotSupportedException("save CustomRouteInfo FAIL:Port("\r
-                        + server.getPort() + ")is not a valid Port address");\r
-            }\r
-        }\r
-\r
-\r
-        // 准备info信息\r
-        String serviceInfokey =\r
-                RouteUtil.getPrefixedKey(serverPort, RouteUtil.CUSTOMROUTE,\r
-                        customRouteInfo.getServiceName().trim(), RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("url", "/".equals(customRouteInfo.getUrl().trim())\r
-                ? ""\r
-                : customRouteInfo.getUrl().trim());\r
-        serviceInfoMap.put("control", customRouteInfo.getControl());\r
-        serviceInfoMap.put("status", customRouteInfo.getStatus());\r
-        serviceInfoMap.put("visualRange", customRouteInfo.getVisualRange());\r
-        serviceInfoMap.put("useOwnUpstream", customRouteInfo.getUseOwnUpstream());\r
-\r
-\r
-\r
-        // 准备负载均衡信息\r
-        String serviceLBkey =\r
-                RouteUtil.getPrefixedKey(serverPort, RouteUtil.CUSTOMROUTE,\r
-                        customRouteInfo.getServiceName(), RouteUtil.ROUTE_PATH_LOADBALANCE);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-            // 保存info信息\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-\r
-            // 保存负载均衡信息\r
-\r
-            for (int i = 0; i < serverList.length; i++) {\r
-                Map<String, String> servermap = new HashMap<String, String>();\r
-                RouteServer server = serverList[i];\r
-\r
-                servermap.put("ip", server.getIp());\r
-                servermap.put("port", server.getPort());\r
-                servermap.put("weight", Integer.toString(server.getWeight()));\r
-\r
-                jedis.hmset(serviceLBkey + ":server" + (i + 1), servermap);\r
-            }\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);;\r
-        }\r
-\r
-        return customRouteInfo;\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * @Title: deleteCustomRoute\r
-     * @Description: TODO(删除单个服务信息)\r
-     * @param: @param type\r
-     * @param: @param serviceName\r
-     * @param: @param delKey\r
-     * @param: @return\r
-     * @return: void\r
-     */\r
-    public synchronized void deleteCustomRoute(String serviceName, String delKey, String serverPort) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        Jedis jedis = null;\r
-\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            // 获取info信息\r
-            String routekey =\r
-                    RouteUtil\r
-                            .getPrefixedKey(serverPort, RouteUtil.CUSTOMROUTE, serviceName, delKey);\r
-            Set<String> infoSet = jedis.keys(routekey);\r
-\r
-            if (infoSet.isEmpty()) {\r
-                throw new ExtendedNotFoundException("delete CustomRoute FAIL:serviceName-"\r
-                        + serviceName + " not fond ");\r
-            }\r
-\r
-\r
-            String[] paths = new String[infoSet.size()];\r
-\r
-            // Set-->数组\r
-            infoSet.toArray(paths);\r
-\r
-            jedis.del(paths);\r
-\r
-        } catch (ExtendedNotFoundException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-\r
-            LOGGER.error("delete CustomRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("delete CustomRoute throw exception:"\r
-                    + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.CustomRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+import org.openo.msb.api.exception.ExtendedNotSupportedException;
+import org.openo.msb.wrapper.util.JedisUtil;
+import org.openo.msb.wrapper.util.RegExpTestUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+public class CustomRouteServiceWrapper {
+
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(CustomRouteServiceWrapper.class);
+
+    private static CustomRouteServiceWrapper instance = new CustomRouteServiceWrapper();
+
+    private CustomRouteServiceWrapper() {}
+
+    public static CustomRouteServiceWrapper getInstance() {
+        return instance;
+    }
+
+
+    /**
+     * @Title: getAllCustomRouteService
+     * @Description: TODO(获取全部内容服务列表)
+     * @param: @return
+     * @return: CustomRouteInfo[]
+     */
+    public CustomRouteInfo[] getAllCustomRouteInstances() {
+
+
+        Jedis jedis = null;
+        CustomRouteInfo[] customRouteList = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            // 获取全部服务列表
+            String routekey =
+                    RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, "*",
+                            RouteUtil.ROUTE_PATH_INFO);
+            Set<String> routeSet = jedis.keys(routekey);
+            customRouteList = new CustomRouteInfo[routeSet.size()];
+
+            int i = 0;
+            for (String routePath : routeSet) {
+                String[] routePathArray = routePath.split(":");
+                CustomRouteInfo customRoute = getCustomRouteInstance(routePathArray[3], jedis);
+                customRouteList[i] = customRoute;
+                i++;
+            }
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return customRouteList;
+    }
+
+
+
+    /**
+     * @Title: getCustomRouteInstance
+     * @Description: TODO(通过服务名获取单个内容服务对象信息)
+     * @param: @param serviceName
+     * @param: @return
+     * @return: CustomRouteInfo
+     */
+    public CustomRouteInfo getCustomRouteInstance(String serviceName) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        CustomRouteInfo customRouteInfo;
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            customRouteInfo = getCustomRouteInstance(serviceName, jedis);
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        if (null == customRouteInfo) {
+            String errInfo = "customRouteInfo not found: serviceName-" + serviceName;
+            LOGGER.warn(errInfo);
+            throw new ExtendedNotFoundException(errInfo);
+
+        }
+
+        return customRouteInfo;
+
+    }
+
+    public CustomRouteInfo getCustomRouteInstance(String serviceName, Jedis jedis) throws Exception {
+
+
+        CustomRouteInfo customRouteInfo = null;
+
+
+        // 获取info信息
+        String routekey =
+                RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, serviceName,
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> infomap = jedis.hgetAll(routekey);
+        if (!infomap.isEmpty()) {
+            customRouteInfo = new CustomRouteInfo();
+            customRouteInfo.setServiceName(serviceName);
+            customRouteInfo.setUrl(infomap.get("url"));
+            customRouteInfo.setControl(infomap.get("control"));
+            customRouteInfo.setStatus(infomap.get("status"));
+            customRouteInfo.setVisualRange(infomap.get("visualRange"));
+            customRouteInfo.setUseOwnUpstream(infomap.get("useOwnUpstream"));
+
+
+            // 获取负载均衡信息
+            String serviceLBkey =
+                    RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, serviceName,
+                            RouteUtil.ROUTE_PATH_LOADBALANCE);
+            Set<String> serviceLBset = jedis.keys(serviceLBkey + ":*");
+            int serverNum = serviceLBset.size();
+            RouteServer[] CustomRouteServerList = new RouteServer[serverNum];
+            int i = 0;
+            for (String serviceInfo : serviceLBset) {
+                Map<String, String> serviceLBmap = jedis.hgetAll(serviceInfo);
+                RouteServer server = new RouteServer();
+                server.setIp(serviceLBmap.get("ip"));
+                server.setPort(serviceLBmap.get("port"));
+                server.setWeight(Integer.parseInt(serviceLBmap.get("weight")));
+                CustomRouteServerList[i] = server;
+                i++;
+            }
+
+            customRouteInfo.setServers(CustomRouteServerList);
+        }
+
+
+        return customRouteInfo;
+    }
+
+    /**
+     * @Title: updateCustomRouteInstance
+     * @Description: TODO(更新单个服务信息)
+     * @param: @param serviceName
+     * @param: @param CustomRouteInfo
+     * @param: @return
+     * @return: CustomRouteInfo
+     */
+    public synchronized CustomRouteInfo updateCustomRouteInstance(String serviceName,
+            CustomRouteInfo customRouteInfo, String serverPort) {
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        try {
+
+            if (serviceName.equals(customRouteInfo.getServiceName())) {
+                // 删除已存在负载均衡服务器信息
+                deleteCustomRoute(serviceName, RouteUtil.ROUTE_PATH_LOADBALANCE + "*", serverPort);
+            } else {
+                // 如果已修改服务名,先删除此服务全部已有信息
+                deleteCustomRoute(serviceName, "*", serverPort);
+            }
+
+
+            saveCustomRouteInstance(customRouteInfo, serverPort);
+
+
+
+        } catch (ExtendedNotSupportedException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("updateCustomRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException("update CustomRoute throw exception"
+                    + e.getMessage());
+
+        }
+
+        return customRouteInfo;
+
+    }
+
+    /**
+     * @Title updateCustomRouteStatus
+     * @Description TODO(更新单个服务状态)
+     * @param serviceName
+     * @param status
+     * @return
+     * @return RouteResult
+     */
+    public synchronized CustomRouteInfo updateCustomRouteStatus(String serviceName, String status) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, status)) {
+            throw new ExtendedNotSupportedException(
+                    "save CustomRouteInfo Status FAIL:status is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");
+        }
+
+        CustomRouteInfo new_customRouteInfo = getCustomRouteInstance(serviceName);
+
+
+
+        // 准备info信息
+        String serviceInfokey =
+                RouteUtil.getPrefixedKey("", RouteUtil.CUSTOMROUTE, serviceName,
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("status", status);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+            // 保存info信息
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+            new_customRouteInfo.setStatus(status);
+
+        } catch (Exception e) {
+
+            LOGGER.error("update CustomRoute status throw exception", e);
+            throw new ExtendedInternalServerErrorException(
+                    "update CustomRoute status throw exception" + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return new_customRouteInfo;
+    }
+
+    /**
+     * @Title: saveCustomRouteInstance
+     * @Description: TODO(存储单个服务信息)
+     * @param: @param CustomRouteInfo
+     * @param: @return
+     * @return: CustomRouteInfo
+     */
+    public synchronized CustomRouteInfo saveCustomRouteInstance(CustomRouteInfo customRouteInfo,
+            String serverPort) {
+
+        if (StringUtils.isBlank(customRouteInfo.getServiceName())
+                || customRouteInfo.getServers().length == 0) {
+            throw new ExtendedNotSupportedException(
+                    "save CustomRouteInfo FAIL: Some required fields are empty");
+        }
+
+       
+            if (!RegExpTestUtil.urlRegExpTest(customRouteInfo.getServiceName())) {
+                throw new ExtendedNotSupportedException(
+                        "save CustomRouteInfo FAIL: ServiceName is not a valid format(ServiceName must be begin with /)");
+    
+            }
+        
+            if (StringUtils.isNotBlank(customRouteInfo.getUrl())){
+                if (!RegExpTestUtil.urlRegExpTest(customRouteInfo.getUrl())) {
+                    throw new ExtendedNotSupportedException(
+                            "save CustomRouteInfo FAIL:url is not a valid format(url must be begin with /)");
+        
+                }
+            }
+
+        if (!RouteUtil.contain(RouteUtil.visualRangeRange, customRouteInfo.getVisualRange())) {
+            throw new ExtendedNotSupportedException(
+                    "save CustomRouteInfo FAIL:VisualRange is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.visualRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.controlRangeMatches, customRouteInfo.getControl())) {
+            throw new ExtendedNotSupportedException(
+                    "save CustomRouteInfo FAIL:control is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.controlRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, customRouteInfo.getStatus())) {
+            throw new ExtendedNotSupportedException(
+                    "save CustomRouteInfo FAIL:status is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.useOwnUpstreamRangeMatches, customRouteInfo.getUseOwnUpstream())) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL:useOwnUpstream is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.useOwnUpstreamRangeMatches) + ")");
+        }
+
+        // 检查服务实例格式
+        RouteServer[] serverList = customRouteInfo.getServers();
+        for (int i = 0; i < serverList.length; i++) {
+            RouteServer server = serverList[i];
+            if (!RegExpTestUtil.ipRegExpTest(server.getIp())) {
+                throw new ExtendedNotSupportedException("save CustomRouteInfo FAIL:IP("
+                        + server.getIp() + ")is not a valid ip address");
+            }
+
+            if (!RegExpTestUtil.portRegExpTest(server.getPort())) {
+                throw new ExtendedNotSupportedException("save CustomRouteInfo FAIL:Port("
+                        + server.getPort() + ")is not a valid Port address");
+            }
+        }
+
+
+        // 准备info信息
+        String serviceInfokey =
+                RouteUtil.getPrefixedKey(serverPort, RouteUtil.CUSTOMROUTE,
+                        customRouteInfo.getServiceName().trim(), RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("url", "/".equals(customRouteInfo.getUrl().trim())
+                ? ""
+                : customRouteInfo.getUrl().trim());
+        serviceInfoMap.put("control", customRouteInfo.getControl());
+        serviceInfoMap.put("status", customRouteInfo.getStatus());
+        serviceInfoMap.put("visualRange", customRouteInfo.getVisualRange());
+        serviceInfoMap.put("useOwnUpstream", customRouteInfo.getUseOwnUpstream());
+
+
+
+        // 准备负载均衡信息
+        String serviceLBkey =
+                RouteUtil.getPrefixedKey(serverPort, RouteUtil.CUSTOMROUTE,
+                        customRouteInfo.getServiceName(), RouteUtil.ROUTE_PATH_LOADBALANCE);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+            // 保存info信息
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+
+            // 保存负载均衡信息
+
+            for (int i = 0; i < serverList.length; i++) {
+                Map<String, String> servermap = new HashMap<String, String>();
+                RouteServer server = serverList[i];
+
+                servermap.put("ip", server.getIp());
+                servermap.put("port", server.getPort());
+                servermap.put("weight", Integer.toString(server.getWeight()));
+
+                jedis.hmset(serviceLBkey + ":server" + (i + 1), servermap);
+            }
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);;
+        }
+
+        return customRouteInfo;
+    }
+
+
+
+    /**
+     * @Title: deleteCustomRoute
+     * @Description: TODO(删除单个服务信息)
+     * @param: @param type
+     * @param: @param serviceName
+     * @param: @param delKey
+     * @param: @return
+     * @return: void
+     */
+    public synchronized void deleteCustomRoute(String serviceName, String delKey, String serverPort) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        Jedis jedis = null;
+
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            // 获取info信息
+            String routekey =
+                    RouteUtil
+                            .getPrefixedKey(serverPort, RouteUtil.CUSTOMROUTE, serviceName, delKey);
+            Set<String> infoSet = jedis.keys(routekey);
+
+            if (infoSet.isEmpty()) {
+                throw new ExtendedNotFoundException("delete CustomRoute FAIL:serviceName-"
+                        + serviceName + " not fond ");
+            }
+
+
+            String[] paths = new String[infoSet.size()];
+
+            // Set-->数组
+            infoSet.toArray(paths);
+
+            jedis.del(paths);
+
+        } catch (ExtendedNotFoundException e) {
+            throw e;
+        } catch (Exception e) {
+
+            LOGGER.error("delete CustomRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException("delete CustomRoute throw exception:"
+                    + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+
+    }
+}
index 1ee03b8..c3419a0 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.IuiRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-import org.openo.msb.api.exception.ExtendedNotSupportedException;\r
-import org.openo.msb.wrapper.util.JedisUtil;\r
-import org.openo.msb.wrapper.util.RegExpTestUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import redis.clients.jedis.Jedis;\r
-\r
-public class IuiRouteServiceWrapper {\r
-\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(IuiRouteServiceWrapper.class);\r
-\r
-    private static IuiRouteServiceWrapper instance = new IuiRouteServiceWrapper();\r
-\r
-    private IuiRouteServiceWrapper() {}\r
-\r
-    public static IuiRouteServiceWrapper getInstance() {\r
-        return instance;\r
-    }\r
-\r
-\r
-    /**\r
-     * @Title: getAllIuiRouteService\r
-     * @Description: TODO(获取全部内容服务列表)\r
-     * @param: @return\r
-     * @return: IuiRouteInfo[]\r
-     */\r
-    public IuiRouteInfo[] getAllIuiRouteInstances() {\r
-\r
-\r
-        Jedis jedis = null;\r
-        IuiRouteInfo[] iuiRouteList = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            // 获取全部服务列表\r
-            String routekey =\r
-                    RouteUtil\r
-                            .getPrefixedKey("", RouteUtil.IUIROUTE, "*", RouteUtil.ROUTE_PATH_INFO);\r
-            Set<String> routeSet = jedis.keys(routekey);\r
-            iuiRouteList = new IuiRouteInfo[routeSet.size()];\r
-\r
-            int i = 0;\r
-            for (String routePath : routeSet) {\r
-                String[] routePathArray = routePath.split(":");\r
-                IuiRouteInfo iuiRoute = getIuiRouteInstance(routePathArray[3], jedis);\r
-                iuiRouteList[i] = iuiRoute;\r
-                i++;\r
-            }\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return iuiRouteList;\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * @Title: getIuiRouteInstance\r
-     * @Description: TODO(通过服务名获取单个内容服务对象信息)\r
-     * @param: @param serviceName\r
-     * @param: @return\r
-     * @return: IuiRouteInfo\r
-     */\r
-    public IuiRouteInfo getIuiRouteInstance(String serviceName) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        IuiRouteInfo iuiRouteInfo = null;\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            iuiRouteInfo = getIuiRouteInstance(serviceName, jedis);\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        if (null == iuiRouteInfo) {\r
-            String errInfo = "iuiRouteInfo not found: serviceName-" + serviceName;\r
-            LOGGER.warn(errInfo);\r
-            throw new ExtendedNotFoundException(errInfo);\r
-\r
-        }\r
-\r
-        return iuiRouteInfo;\r
-\r
-    }\r
-\r
-    public IuiRouteInfo getIuiRouteInstance(String serviceName, Jedis jedis) throws Exception {\r
-\r
-\r
-        IuiRouteInfo iuiRouteInfo = null;\r
-\r
-\r
-        // 获取info信息\r
-        String routekey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName,\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> infomap = jedis.hgetAll(routekey);\r
-        if (!infomap.isEmpty()) {\r
-            iuiRouteInfo = new IuiRouteInfo();\r
-            iuiRouteInfo.setServiceName(serviceName);\r
-            iuiRouteInfo.setUrl(infomap.get("url"));\r
-            iuiRouteInfo.setControl(infomap.get("control"));\r
-            iuiRouteInfo.setStatus(infomap.get("status"));\r
-            iuiRouteInfo.setVisualRange(infomap.get("visualRange"));\r
-            iuiRouteInfo.setUseOwnUpstream(infomap.get("useOwnUpstream"));\r
-\r
-\r
-            // 获取负载均衡信息\r
-            String serviceLBkey =\r
-                    RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName,\r
-                            RouteUtil.ROUTE_PATH_LOADBALANCE);\r
-            Set<String> serviceLBset = jedis.keys(serviceLBkey + ":*");\r
-            int serverNum = serviceLBset.size();\r
-            RouteServer[] iuiRouteServerList = new RouteServer[serverNum];\r
-            int i = 0;\r
-            for (String serviceInfo : serviceLBset) {\r
-                Map<String, String> serviceLBmap = jedis.hgetAll(serviceInfo);\r
-                RouteServer server = new RouteServer();\r
-                server.setIp(serviceLBmap.get("ip"));\r
-                server.setPort(serviceLBmap.get("port"));\r
-                server.setWeight(Integer.parseInt(serviceLBmap.get("weight")));\r
-                iuiRouteServerList[i] = server;\r
-                i++;\r
-            }\r
-\r
-            iuiRouteInfo.setServers(iuiRouteServerList);\r
-        }\r
-\r
-\r
-        return iuiRouteInfo;\r
-    }\r
-\r
-    /**\r
-     * @Title: updateIuiRouteInstance\r
-     * @Description: TODO(更新单个服务信息)\r
-     * @param: @param serviceName\r
-     * @param: @param IuiRouteInfo\r
-     * @param: @return\r
-     * @return: IuiRouteInfo\r
-     */\r
-    public synchronized IuiRouteInfo updateIuiRouteInstance(String serviceName,\r
-            IuiRouteInfo iuiRouteInfo) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        try {\r
-            if (serviceName.equals(iuiRouteInfo.getServiceName())) {\r
-                // 删除已存在负载均衡服务器信息\r
-                deleteIuiRoute(serviceName, RouteUtil.ROUTE_PATH_LOADBALANCE + "*");\r
-\r
-            } else {\r
-                // 如果已修改服务名,先删除此服务全部已有信息\r
-                deleteIuiRoute(serviceName, "*");\r
-            }\r
-            saveIuiRouteInstance(iuiRouteInfo);\r
-\r
-        } catch (ExtendedNotSupportedException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("updateIuiRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("update IuiRouteInfo throw exception"\r
-                    + e.getMessage());\r
-        }\r
-\r
-        return iuiRouteInfo;\r
-\r
-    }\r
-\r
-    /**\r
-     * @Title updateIuiRouteStatus\r
-     * @Description TODO(更新单个服务状态)\r
-     * @param serviceName\r
-     * @param status\r
-     * @return\r
-     * @return RouteResult\r
-     */\r
-    public synchronized IuiRouteInfo updateIuiRouteStatus(String serviceName, String status) {\r
-\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, status)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save IuiRouteInfo Status FAIL:status is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");\r
-        }\r
-\r
-        IuiRouteInfo new_iuiRouteInfo = getIuiRouteInstance(serviceName);\r
-\r
-        // 准备info信息\r
-        String serviceInfokey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName,\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("status", status);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-            // 保存info信息\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-            new_iuiRouteInfo.setStatus(status);\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("update IuiRoute status throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(\r
-                    "update IuiRouteInfo status throw exception" + e.getMessage());\r
-\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-        return new_iuiRouteInfo;\r
-    }\r
-\r
-    /**\r
-     * @Title: saveIuiRouteInstance\r
-     * @Description: TODO(存储单个服务信息)\r
-     * @param: @param IuiRouteInfo\r
-     * @param: @return\r
-     * @return: IuiRouteInfo\r
-     */\r
-    public synchronized IuiRouteInfo saveIuiRouteInstance(IuiRouteInfo iuiRouteInfo) {\r
-\r
-        if (StringUtils.isBlank(iuiRouteInfo.getServiceName())\r
-                || iuiRouteInfo.getServers().length == 0) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save iuiRouteInfo FAIL: Some required fields are empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(iuiRouteInfo.getUrl())){\r
-            if (!RegExpTestUtil.urlRegExpTest(iuiRouteInfo.getUrl())) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "save iuiRouteInfo FAIL:url is not a valid format(url must be begin with /)");\r
-    \r
-            }\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.visualRangeRange, iuiRouteInfo.getVisualRange())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save iuiRouteInfo FAIL:VisualRange is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.visualRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.controlRangeMatches, iuiRouteInfo.getControl())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save iuiRouteInfo FAIL:control is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.controlRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, iuiRouteInfo.getStatus())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save iuiRouteInfo FAIL:status is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");\r
-        }\r
-\r
-        if (!RouteUtil.contain(RouteUtil.useOwnUpstreamRangeMatches, iuiRouteInfo.getUseOwnUpstream())) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "save apiRouteInfo FAIL:useOwnUpstream is wrong,value range:("\r
-                            + RouteUtil.show(RouteUtil.useOwnUpstreamRangeMatches) + ")");\r
-        }\r
-\r
-        // 检查服务实例格式\r
-        RouteServer[] serverList = iuiRouteInfo.getServers();\r
-        for (int i = 0; i < serverList.length; i++) {\r
-            RouteServer server = serverList[i];\r
-            if (!RegExpTestUtil.ipRegExpTest(server.getIp())) {\r
-                throw new ExtendedNotSupportedException("save iuiRouteInfo FAIL:IP("\r
-                        + server.getIp() + ")is not a valid ip address");\r
-            }\r
-\r
-            if (!RegExpTestUtil.portRegExpTest(server.getPort())) {\r
-                throw new ExtendedNotSupportedException("save iuiRouteInfo FAIL:Port("\r
-                        + server.getPort() + ")is not a valid Port address");\r
-            }\r
-        }\r
-\r
-\r
-        // 准备info信息\r
-        String serviceInfokey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, iuiRouteInfo.getServiceName().trim(),\r
-                        RouteUtil.ROUTE_PATH_INFO);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("url", "/".equals(iuiRouteInfo.getUrl().trim()) ? "" : iuiRouteInfo\r
-                .getUrl().trim());\r
-        serviceInfoMap.put("control", iuiRouteInfo.getControl());\r
-        serviceInfoMap.put("status", iuiRouteInfo.getStatus());\r
-        serviceInfoMap.put("visualRange", iuiRouteInfo.getVisualRange());\r
-        serviceInfoMap.put("useOwnUpstream", iuiRouteInfo.getUseOwnUpstream());\r
-\r
-\r
-        // 准备负载均衡信息\r
-        String serviceLBkey =\r
-                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, iuiRouteInfo.getServiceName(),\r
-                        RouteUtil.ROUTE_PATH_LOADBALANCE);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-            // 保存info信息\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-\r
-            // 保存负载均衡信息\r
-            for (int i = 0; i < serverList.length; i++) {\r
-                Map<String, String> servermap = new HashMap<String, String>();\r
-                RouteServer server = serverList[i];\r
-\r
-                servermap.put("ip", server.getIp());\r
-                servermap.put("port", server.getPort());\r
-                servermap.put("weight", Integer.toString(server.getWeight()));\r
-\r
-                jedis.hmset(serviceLBkey + ":server" + (i + 1), servermap);\r
-            }\r
-\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("call redis throw exception:"\r
-                    + e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);;\r
-        }\r
-\r
-        return iuiRouteInfo;\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * @Title: deleteIuiRoute\r
-     * @Description: TODO(删除单个服务信息)\r
-     * @param: @param type\r
-     * @param: @param serviceName\r
-     * @param: @param delKey\r
-     * @param: @return\r
-     * @return: void\r
-     */\r
-    public synchronized void deleteIuiRoute(String serviceName, String delKey) {\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new ExtendedInternalServerErrorException(\r
-                        "fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            // 获取info信息\r
-            String routekey = RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName, delKey);\r
-            Set<String> infoSet = jedis.keys(routekey);\r
-\r
-            if (infoSet.isEmpty()) {\r
-                throw new ExtendedNotFoundException("delete IuiRoute FAIL:serviceName-"\r
-                        + serviceName + " not fond ");\r
-            }\r
-\r
-            String[] paths = new String[infoSet.size()];\r
-\r
-            // Set-->数组\r
-            infoSet.toArray(paths);\r
-\r
-            jedis.del(paths);\r
-\r
-\r
-        } catch (ExtendedNotFoundException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("delete IuiRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException("delete IuiRoute throw exception:"\r
-                    + e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-\r
-    }\r
-\r
-\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.IuiRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+import org.openo.msb.api.exception.ExtendedNotSupportedException;
+import org.openo.msb.wrapper.util.JedisUtil;
+import org.openo.msb.wrapper.util.RegExpTestUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+public class IuiRouteServiceWrapper {
+
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(IuiRouteServiceWrapper.class);
+
+    private static IuiRouteServiceWrapper instance = new IuiRouteServiceWrapper();
+
+    private IuiRouteServiceWrapper() {}
+
+    public static IuiRouteServiceWrapper getInstance() {
+        return instance;
+    }
+
+
+    /**
+     * @Title: getAllIuiRouteService
+     * @Description: TODO(获取全部内容服务列表)
+     * @param: @return
+     * @return: IuiRouteInfo[]
+     */
+    public IuiRouteInfo[] getAllIuiRouteInstances() {
+
+
+        Jedis jedis = null;
+        IuiRouteInfo[] iuiRouteList = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            // 获取全部服务列表
+            String routekey =
+                    RouteUtil
+                            .getPrefixedKey("", RouteUtil.IUIROUTE, "*", RouteUtil.ROUTE_PATH_INFO);
+            Set<String> routeSet = jedis.keys(routekey);
+            iuiRouteList = new IuiRouteInfo[routeSet.size()];
+
+            int i = 0;
+            for (String routePath : routeSet) {
+                String[] routePathArray = routePath.split(":");
+                IuiRouteInfo iuiRoute = getIuiRouteInstance(routePathArray[3], jedis);
+                iuiRouteList[i] = iuiRoute;
+                i++;
+            }
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return iuiRouteList;
+    }
+
+
+
+    /**
+     * @Title: getIuiRouteInstance
+     * @Description: TODO(通过服务名获取单个内容服务对象信息)
+     * @param: @param serviceName
+     * @param: @return
+     * @return: IuiRouteInfo
+     */
+    public IuiRouteInfo getIuiRouteInstance(String serviceName) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        IuiRouteInfo iuiRouteInfo = null;
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            iuiRouteInfo = getIuiRouteInstance(serviceName, jedis);
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        if (null == iuiRouteInfo) {
+            String errInfo = "iuiRouteInfo not found: serviceName-" + serviceName;
+            LOGGER.warn(errInfo);
+            throw new ExtendedNotFoundException(errInfo);
+
+        }
+
+        return iuiRouteInfo;
+
+    }
+
+    public IuiRouteInfo getIuiRouteInstance(String serviceName, Jedis jedis) throws Exception {
+
+
+        IuiRouteInfo iuiRouteInfo = null;
+
+
+        // 获取info信息
+        String routekey =
+                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName,
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> infomap = jedis.hgetAll(routekey);
+        if (!infomap.isEmpty()) {
+            iuiRouteInfo = new IuiRouteInfo();
+            iuiRouteInfo.setServiceName(serviceName);
+            iuiRouteInfo.setUrl(infomap.get("url"));
+            iuiRouteInfo.setControl(infomap.get("control"));
+            iuiRouteInfo.setStatus(infomap.get("status"));
+            iuiRouteInfo.setVisualRange(infomap.get("visualRange"));
+            iuiRouteInfo.setUseOwnUpstream(infomap.get("useOwnUpstream"));
+
+
+            // 获取负载均衡信息
+            String serviceLBkey =
+                    RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName,
+                            RouteUtil.ROUTE_PATH_LOADBALANCE);
+            Set<String> serviceLBset = jedis.keys(serviceLBkey + ":*");
+            int serverNum = serviceLBset.size();
+            RouteServer[] iuiRouteServerList = new RouteServer[serverNum];
+            int i = 0;
+            for (String serviceInfo : serviceLBset) {
+                Map<String, String> serviceLBmap = jedis.hgetAll(serviceInfo);
+                RouteServer server = new RouteServer();
+                server.setIp(serviceLBmap.get("ip"));
+                server.setPort(serviceLBmap.get("port"));
+                server.setWeight(Integer.parseInt(serviceLBmap.get("weight")));
+                iuiRouteServerList[i] = server;
+                i++;
+            }
+
+            iuiRouteInfo.setServers(iuiRouteServerList);
+        }
+
+
+        return iuiRouteInfo;
+    }
+
+    /**
+     * @Title: updateIuiRouteInstance
+     * @Description: TODO(更新单个服务信息)
+     * @param: @param serviceName
+     * @param: @param IuiRouteInfo
+     * @param: @return
+     * @return: IuiRouteInfo
+     */
+    public synchronized IuiRouteInfo updateIuiRouteInstance(String serviceName,
+            IuiRouteInfo iuiRouteInfo) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        try {
+            if (serviceName.equals(iuiRouteInfo.getServiceName())) {
+                // 删除已存在负载均衡服务器信息
+                deleteIuiRoute(serviceName, RouteUtil.ROUTE_PATH_LOADBALANCE + "*");
+
+            } else {
+                // 如果已修改服务名,先删除此服务全部已有信息
+                deleteIuiRoute(serviceName, "*");
+            }
+            saveIuiRouteInstance(iuiRouteInfo);
+
+        } catch (ExtendedNotSupportedException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("updateIuiRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException("update IuiRouteInfo throw exception"
+                    + e.getMessage());
+        }
+
+        return iuiRouteInfo;
+
+    }
+
+    /**
+     * @Title updateIuiRouteStatus
+     * @Description TODO(更新单个服务状态)
+     * @param serviceName
+     * @param status
+     * @return
+     * @return RouteResult
+     */
+    public synchronized IuiRouteInfo updateIuiRouteStatus(String serviceName, String status) {
+
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, status)) {
+            throw new ExtendedNotSupportedException(
+                    "save IuiRouteInfo Status FAIL:status is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");
+        }
+
+        IuiRouteInfo new_iuiRouteInfo = getIuiRouteInstance(serviceName);
+
+        // 准备info信息
+        String serviceInfokey =
+                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName,
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("status", status);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+            // 保存info信息
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+            new_iuiRouteInfo.setStatus(status);
+
+        } catch (Exception e) {
+            LOGGER.error("update IuiRoute status throw exception", e);
+            throw new ExtendedInternalServerErrorException(
+                    "update IuiRouteInfo status throw exception" + e.getMessage());
+
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+        return new_iuiRouteInfo;
+    }
+
+    /**
+     * @Title: saveIuiRouteInstance
+     * @Description: TODO(存储单个服务信息)
+     * @param: @param IuiRouteInfo
+     * @param: @return
+     * @return: IuiRouteInfo
+     */
+    public synchronized IuiRouteInfo saveIuiRouteInstance(IuiRouteInfo iuiRouteInfo) {
+
+        if (StringUtils.isBlank(iuiRouteInfo.getServiceName())
+                || iuiRouteInfo.getServers().length == 0) {
+            throw new ExtendedNotSupportedException(
+                    "save iuiRouteInfo FAIL: Some required fields are empty");
+        }
+
+        if (StringUtils.isNotBlank(iuiRouteInfo.getUrl())){
+            if (!RegExpTestUtil.urlRegExpTest(iuiRouteInfo.getUrl())) {
+                throw new ExtendedNotSupportedException(
+                        "save iuiRouteInfo FAIL:url is not a valid format(url must be begin with /)");
+    
+            }
+        }
+
+        if (!RouteUtil.contain(RouteUtil.visualRangeRange, iuiRouteInfo.getVisualRange())) {
+            throw new ExtendedNotSupportedException(
+                    "save iuiRouteInfo FAIL:VisualRange is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.visualRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.controlRangeMatches, iuiRouteInfo.getControl())) {
+            throw new ExtendedNotSupportedException(
+                    "save iuiRouteInfo FAIL:control is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.controlRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.statusRangeMatches, iuiRouteInfo.getStatus())) {
+            throw new ExtendedNotSupportedException(
+                    "save iuiRouteInfo FAIL:status is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.statusRangeMatches) + ")");
+        }
+
+        if (!RouteUtil.contain(RouteUtil.useOwnUpstreamRangeMatches, iuiRouteInfo.getUseOwnUpstream())) {
+            throw new ExtendedNotSupportedException(
+                    "save apiRouteInfo FAIL:useOwnUpstream is wrong,value range:("
+                            + RouteUtil.show(RouteUtil.useOwnUpstreamRangeMatches) + ")");
+        }
+
+        // 检查服务实例格式
+        RouteServer[] serverList = iuiRouteInfo.getServers();
+        for (int i = 0; i < serverList.length; i++) {
+            RouteServer server = serverList[i];
+            if (!RegExpTestUtil.ipRegExpTest(server.getIp())) {
+                throw new ExtendedNotSupportedException("save iuiRouteInfo FAIL:IP("
+                        + server.getIp() + ")is not a valid ip address");
+            }
+
+            if (!RegExpTestUtil.portRegExpTest(server.getPort())) {
+                throw new ExtendedNotSupportedException("save iuiRouteInfo FAIL:Port("
+                        + server.getPort() + ")is not a valid Port address");
+            }
+        }
+
+
+        // 准备info信息
+        String serviceInfokey =
+                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, iuiRouteInfo.getServiceName().trim(),
+                        RouteUtil.ROUTE_PATH_INFO);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("url", "/".equals(iuiRouteInfo.getUrl().trim()) ? "" : iuiRouteInfo
+                .getUrl().trim());
+        serviceInfoMap.put("control", iuiRouteInfo.getControl());
+        serviceInfoMap.put("status", iuiRouteInfo.getStatus());
+        serviceInfoMap.put("visualRange", iuiRouteInfo.getVisualRange());
+        serviceInfoMap.put("useOwnUpstream", iuiRouteInfo.getUseOwnUpstream());
+
+
+        // 准备负载均衡信息
+        String serviceLBkey =
+                RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, iuiRouteInfo.getServiceName(),
+                        RouteUtil.ROUTE_PATH_LOADBALANCE);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+            // 保存info信息
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+
+            // 保存负载均衡信息
+            for (int i = 0; i < serverList.length; i++) {
+                Map<String, String> servermap = new HashMap<String, String>();
+                RouteServer server = serverList[i];
+
+                servermap.put("ip", server.getIp());
+                servermap.put("port", server.getPort());
+                servermap.put("weight", Integer.toString(server.getWeight()));
+
+                jedis.hmset(serviceLBkey + ":server" + (i + 1), servermap);
+            }
+
+
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new ExtendedInternalServerErrorException("call redis throw exception:"
+                    + e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);;
+        }
+
+        return iuiRouteInfo;
+    }
+
+
+
+    /**
+     * @Title: deleteIuiRoute
+     * @Description: TODO(删除单个服务信息)
+     * @param: @param type
+     * @param: @param serviceName
+     * @param: @param delKey
+     * @param: @return
+     * @return: void
+     */
+    public synchronized void deleteIuiRoute(String serviceName, String delKey) {
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new ExtendedInternalServerErrorException(
+                        "fetch from jedis pool failed,null object!");
+            }
+
+            // 获取info信息
+            String routekey = RouteUtil.getPrefixedKey("", RouteUtil.IUIROUTE, serviceName, delKey);
+            Set<String> infoSet = jedis.keys(routekey);
+
+            if (infoSet.isEmpty()) {
+                throw new ExtendedNotFoundException("delete IuiRoute FAIL:serviceName-"
+                        + serviceName + " not fond ");
+            }
+
+            String[] paths = new String[infoSet.size()];
+
+            // Set-->数组
+            infoSet.toArray(paths);
+
+            jedis.del(paths);
+
+
+        } catch (ExtendedNotFoundException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("delete IuiRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException("delete IuiRoute throw exception:"
+                    + e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+
+    }
+
+
+
+}
index fec1946..d0d9ed9 100644 (file)
@@ -1,92 +1,91 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper;\r
-\r
-import java.io.IOException;\r
-\r
-import org.apache.http.ParseException;\r
-import org.apache.http.client.methods.CloseableHttpResponse;\r
-import org.apache.http.client.methods.HttpGet;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.apache.http.impl.client.HttpClients;\r
-import org.apache.http.util.EntityUtils;\r
-import org.openo.msb.api.MetricsInfo;\r
-import org.openo.msb.wrapper.util.MetricsUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;\r
-import com.fasterxml.jackson.annotation.PropertyAccessor;\r
-import com.fasterxml.jackson.databind.DeserializationFeature;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-public class MetricsServiceWrapper {\r
-\r
-       private static final Logger LOGGER = LoggerFactory\r
-                       .getLogger(MetricsServiceWrapper.class);\r
-\r
-       public static MetricsInfo getMetricsInfo() {\r
-\r
-               String metricsUrl = MetricsUtil.adminContextPath;\r
-               String metricsJson = sendGetRequest(metricsUrl);\r
-\r
-               metricsJson = metricsJson.replace("E_", "");//.replaceAll("(?![0-9])(\\.)(?![0-9])", "_").replace("-", "_")\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);\r
-               mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,\r
-                               false);\r
-               MetricsInfo metricsInfo = new MetricsInfo();\r
-               try {\r
-                       metricsInfo = mapper.readValue(metricsJson, MetricsInfo.class);\r
-               } catch (Exception e) {\r
-                       // TODO Auto-generated catch block\r
-                       LOGGER.error("Jackson readValue to metricsInfo throw exception", e);\r
-               }\r
-\r
-               return metricsInfo;\r
-       }\r
-\r
-       public static String sendGetRequest(String url) {\r
-               CloseableHttpClient httpClient = HttpClients.createDefault();  \r
-               HttpGet httpGet = new HttpGet(url);\r
-\r
-               try {\r
-                       CloseableHttpResponse res = httpClient.execute(httpGet);\r
-                       try {\r
-                               if (res.getStatusLine().getStatusCode() == MetricsUtil.SC_OK) {\r
-                                       return EntityUtils.toString(res.getEntity());\r
-                               }\r
-                       } finally {\r
-                               res.close();\r
-                       }\r
-               } catch (ParseException e) {\r
-                       LOGGER.error("HttpClient throw ParseException:" + url, e);\r
-               } catch (IOException e) {\r
-                       LOGGER.error("HttpClient throw IOException:" + url, e);\r
-               }\r
-               finally{\r
-                       try {\r
-                               httpClient.close();\r
-                       } catch (IOException e) {\r
-                               // TODO Auto-generated catch block\r
-                               LOGGER.error("HttpClient Close throw IOException", e);\r
-                       }\r
-               }\r
-\r
-               return null;\r
-       }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.io.IOException;
+
+import org.apache.http.ParseException;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.openo.msb.api.MetricsInfo;
+import org.openo.msb.wrapper.util.MetricsUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class MetricsServiceWrapper {
+
+       private static final Logger LOGGER = LoggerFactory
+                       .getLogger(MetricsServiceWrapper.class);
+
+       public static MetricsInfo getMetricsInfo() {
+
+               String metricsUrl = MetricsUtil.adminContextPath;
+               String metricsJson = sendGetRequest(metricsUrl);
+
+               metricsJson = metricsJson.replace("E_", "");//.replaceAll("(?![0-9])(\\.)(?![0-9])", "_").replace("-", "_")
+               ObjectMapper mapper = new ObjectMapper();
+               mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
+               mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
+                               false);
+               MetricsInfo metricsInfo = new MetricsInfo();
+               try {
+                       metricsInfo = mapper.readValue(metricsJson, MetricsInfo.class);
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       LOGGER.error("Jackson readValue to metricsInfo throw exception", e);
+               }
+
+               return metricsInfo;
+       }
+
+       public static String sendGetRequest(String url) {
+               CloseableHttpClient httpClient = HttpClients.createDefault();  
+               HttpGet httpGet = new HttpGet(url);
+
+               try {
+                       CloseableHttpResponse res = httpClient.execute(httpGet);
+                       try {
+                               if (res.getStatusLine().getStatusCode() == MetricsUtil.SC_OK) {
+                                       return EntityUtils.toString(res.getEntity());
+                               }
+                       } finally {
+                               res.close();
+                       }
+               } catch (ParseException e) {
+                       LOGGER.error("HttpClient throw ParseException:" + url, e);
+               } catch (IOException e) {
+                       LOGGER.error("HttpClient throw IOException:" + url, e);
+               }
+               finally{
+                       try {
+                               httpClient.close();
+                       } catch (IOException e) {
+                               // TODO Auto-generated catch block
+                               LOGGER.error("HttpClient Close throw IOException", e);
+                       }
+               }
+
+               return null;
+       }
+}
index f9b3cdd..08e3e26 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper;\r
-\r
-import java.util.Set;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.MicroServiceFullInfo;\r
-import org.openo.msb.api.MicroServiceInfo;\r
-import org.openo.msb.api.Node;\r
-import org.openo.msb.api.NodeInfo;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-import org.openo.msb.api.exception.ExtendedNotSupportedException;\r
-import org.openo.msb.wrapper.util.MicroServiceDB;\r
-import org.openo.msb.wrapper.util.RegExpTestUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-public class MicroServiceWrapper {\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceWrapper.class);\r
-\r
-    private static MicroServiceWrapper instance = new MicroServiceWrapper();\r
-\r
-\r
-    private MicroServiceWrapper() {}\r
-\r
-    public static MicroServiceWrapper getInstance() {\r
-        return instance;\r
-    }\r
-\r
-\r
-    /**\r
-     * @Title: getAllMicroServiceInstances\r
-     * @Description: getAllMicroServiceInstances\r
-     * @param: @return\r
-     * @return: Response\r
-     * @throws Exception\r
-     */\r
-    public MicroServiceFullInfo[] getAllMicroServiceInstances(){\r
-\r
-        try {\r
-            return MicroServiceDB.getInstance().getAllMicroServiceInstances();\r
-\r
-        } catch (Exception e) {\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-        }\r
-\r
-    }\r
-\r
-    /**\r
-     * @Title: getMicroServiceInstance\r
-     * @Description: (getMicroServiceInstance)\r
-     * @param: @param serviceName\r
-     * @param: @param version\r
-     * @param: @return\r
-     * @return: ApiRouteInfo\r
-     */\r
-    public MicroServiceFullInfo getMicroServiceInstance(String serviceName, String version,String serverPort) {\r
-        if("null".equals(version)) {\r
-            version="";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException("serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException("version (" + version\r
-                        + ") is not a valid  format");\r
-            }\r
-        }\r
-\r
-        MicroServiceFullInfo microServiceInfo;\r
-        try {\r
-            microServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,serverPort);\r
-\r
-        } catch (Exception e) {\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-        }\r
-\r
-        if (null == microServiceInfo) {\r
-            String errInfo =\r
-                    "microservice not found: serviceName-" + serviceName + ",version-" + version;\r
-            LOGGER.warn(errInfo);\r
-            throw new ExtendedNotFoundException(errInfo);\r
-\r
-        }\r
-\r
-        return microServiceInfo;\r
-    }\r
-\r
-\r
-\r
-    /**\r
-     * @Title: updateMicroServiceInstance\r
-     * @Description: updateMicroServiceInstance\r
-     * @param: serviceName\r
-     * @param: version\r
-     * @param: microServiceInfo\r
-     * @return: RouteResult\r
-     */\r
-    public synchronized MicroServiceFullInfo updateMicroServiceInstance(String serviceName,\r
-            String version, MicroServiceInfo microServiceInfo) {\r
-        if("null".equals(version)) {\r
-            version="";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-\r
-        try {\r
-       \r
-            \r
-            MicroServiceFullInfo oldService= getMicroServiceInstance(serviceName,version,"");\r
-\r
-            // Delete the original record\r
-            MicroServiceDB.getInstance().deleteMicroService(serviceName, version,"");\r
-            // Notify the listeners\r
-            MicroServiceDB.getInstance().noticeApiListener(oldService, "DELETE","");\r
-            // Save the new record\r
-            MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,"");\r
-          \r
-            MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "ADD","");\r
-            MicroServiceFullInfo newMicroServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(\r
-                            microServiceInfo.getServiceName(), microServiceInfo.getVersion(),"");\r
-            return newMicroServiceInfo;\r
-        } catch (Exception e) {\r
-            LOGGER.error("update MicroService throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-        }\r
-\r
-\r
-    }\r
-\r
-    public synchronized MicroServiceFullInfo updateMicroServiceNode(String serviceName,\r
-            String version, String ip,String port, int ttl) {\r
-        if("null".equals(version)) {\r
-            version="";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "update MicroService Node FAIL:serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "update MicroService Node FAIL:version is not a valid  format");\r
-            }\r
-        }\r
-\r
-        if (!RegExpTestUtil.ipRegExpTest(ip)) {\r
-            throw new ExtendedNotSupportedException("update MicroService Node FAIL:ip(" + ip\r
-                    + ")is not a valid IP address");\r
-        }\r
-        \r
-        if (!RegExpTestUtil.portRegExpTest(port)) {\r
-            throw new ExtendedNotSupportedException("update MicroService Node FAIL:port(" + port\r
-                    + ")is not a valid Port address");\r
-        }\r
-        \r
-        try {\r
-\r
-            MicroServiceDB.getInstance().updateMicroServiceNode2Redis(serviceName, version, ip,port,ttl);\r
-\r
-            MicroServiceFullInfo newMicroServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");\r
-\r
-            return newMicroServiceInfo;\r
-        } catch (NullPointerException e) {\r
-            throw new ExtendedNotFoundException(e.getMessage());\r
-        } catch (Exception e) {\r
-            LOGGER.error("update MicroServiceNode throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-        }\r
-    }\r
-\r
-    /**\r
-     * @Title updateMicroServiceStatus\r
-     * @Description updateMicroServiceStatus\r
-     * @param serviceName\r
-     * @param version\r
-     * @param status\r
-     * @return\r
-     * @return RouteResult\r
-     */\r
\r
-    public synchronized MicroServiceFullInfo updateMicroServiceStatus(String serviceName, String version,\r
-            String status) {\r
-\r
-        if ("null".equals(version)) {\r
-            version = "";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-\r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "update MicroService status FAIL:serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "update MicroService status FAIL:version is not a valid  format");\r
-            }\r
-        }\r
-        \r
-        if(!"0".equals(status) && !"2".equals(status) && !"1".equals(status)){\r
-\r
-            throw new ExtendedNotSupportedException("update MicroService status FAIL:status is wrong");\r
-        }\r
-        \r
-        \r
-        try {\r
-\r
-            MicroServiceDB.getInstance().updateMicroServiceStatus(serviceName, version, status);\r
-\r
-            MicroServiceFullInfo newMicroServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");\r
-            \r
-            // Notify the listeners\r
-            MicroServiceDB.getInstance().noticeUpdateStatusListener(newMicroServiceInfo, status);\r
-\r
-\r
-            return newMicroServiceInfo;\r
-        } catch (NullPointerException e) {\r
-            throw new ExtendedNotFoundException(e.getMessage());\r
-        } catch (Exception e) {\r
-            LOGGER.error("update MicroServiceNode throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-        }\r
\r
-\r
-    }\r
-\r
-\r
-    public synchronized MicroServiceFullInfo saveMicroServiceInstance(\r
-            MicroServiceInfo microServiceInfo, boolean createOrUpdate,String requestIP,String serverPort) {\r
-        // 保存数据格式判断\r
-\r
-        if (StringUtils.isBlank(microServiceInfo.getServiceName())\r
-                || StringUtils.isBlank(microServiceInfo.getProtocol())\r
-                || microServiceInfo.getNodes().size() == 0) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "register MicroServiceInfo FAIL: Some required fields are empty");\r
-        }\r
-\r
-        for (Node node : microServiceInfo.getNodes()) {\r
-         \r
-            if(node.getIp()==null || node.getIp().isEmpty()){\r
-                node.setIp(requestIP);\r
-            }\r
-            else if (!RegExpTestUtil.ipRegExpTest(node.getIp())) {\r
-                throw new ExtendedNotSupportedException("register MicroServiceInfo FAIL:IP("\r
-                        + node.getIp() + ")is not a valid ip address");\r
-            }\r
-            \r
-            if (!RegExpTestUtil.portRegExpTest(node.getPort())) {\r
-                throw new ExtendedNotSupportedException("register MicroServiceInfo FAIL:Port("\r
-                        + node.getPort() + ")is not a valid Port address");\r
-            }\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(microServiceInfo.getVersion())) {\r
-            if (!RegExpTestUtil.versionRegExpTest(microServiceInfo.getVersion())) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "register MicroServiceInfo FAIL:version is not a valid  format");\r
-\r
-            }\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(microServiceInfo.getUrl().trim())) {\r
-            if (!RegExpTestUtil.urlRegExpTest(microServiceInfo.getUrl())) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "register MicroServiceInfo FAIL:url is not a valid format(url must be begin with /)");\r
-\r
-            }\r
-        }\r
-\r
-\r
-        if (RouteUtil.PROTOCOL_LIST.indexOf(microServiceInfo.getProtocol().trim()) == -1) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "register MicroServiceInfo FAIL:Protocol is wrong,value range:("\r
-                            + RouteUtil.PROTOCOL_LIST + ")");\r
-        }\r
-\r
-        MicroServiceFullInfo existingMicroServiceInfo;\r
-        try {\r
-            //To determine whether a service already exists\r
-            existingMicroServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(\r
-                            microServiceInfo.getServiceName().trim(), microServiceInfo.getVersion().trim(),serverPort);\r
-\r
-            MicroServiceFullInfo newMicroServiceInfo ;\r
-            if (existingMicroServiceInfo != null) {\r
-                //a service already exists\r
-\r
-                if (!existingMicroServiceInfo.getProtocol().equals(microServiceInfo.getProtocol())) {\r
-                    throw new ExtendedNotSupportedException(\r
-                            "MicroServiceInfo with different protocols and same serviceName is already existing");\r
-                }\r
-\r
-                if (createOrUpdate == false) {\r
-                    //After the first remove added\r
-                    MicroServiceDB.getInstance().deleteMicroService(\r
-                            microServiceInfo.getServiceName(), microServiceInfo.getVersion(),serverPort);\r
-\r
-                    MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,serverPort);\r
-         \r
-                } else {\r
-                    //Add the original record and save directly\r
-                    MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,serverPort);\r
-                }\r
-                \r
-                newMicroServiceInfo =\r
-                        MicroServiceDB.getInstance().getMicroServiceInstance(\r
-                                microServiceInfo.getServiceName(), microServiceInfo.getVersion(),serverPort);\r
-\r
-                //Notify the listeners\r
-                MicroServiceDB.getInstance().noticeUpdateApiListener(microServiceInfo.getServiceName(),microServiceInfo.getVersion(),newMicroServiceInfo,serverPort);\r
-\r
-            } else {\r
-                //Save the new record\r
-                MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,serverPort);\r
-                //Notify the listeners\r
-                MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "ADD",serverPort);\r
-                newMicroServiceInfo =\r
-                        MicroServiceDB.getInstance().getMicroServiceInstance(\r
-                                microServiceInfo.getServiceName(), microServiceInfo.getVersion(),serverPort);\r
-            }\r
-\r
-  \r
-\r
-            return newMicroServiceInfo;\r
-\r
-        } catch (ExtendedNotSupportedException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-        }\r
-\r
-    }\r
-    \r
-    \r
-    public synchronized void deleteMicroService(String serviceName, String version) {\r
-        if("null".equals(version)) {\r
-            version="";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "delete MicroServiceInfo FAIL:serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "delete MicroServiceInfo FAIL:version is not a valid  format");\r
-\r
-            }\r
-        }\r
-\r
-        try {\r
-\r
-            MicroServiceFullInfo microServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");\r
-\r
-            if (microServiceInfo == null) {\r
-                LOGGER.warn("serviceName-"+ serviceName + ",version-" + version + " not fond ");\r
-                return;\r
-            }\r
-\r
-            MicroServiceDB.getInstance().deleteMicroService(serviceName, version,"");\r
-            //Notify the listeners\r
-            MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "DELETE","");\r
-        \r
-        } catch (Exception e) {\r
-            LOGGER.error("delete MicroServiceInfo throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-\r
-        }\r
-        \r
-        LOGGER.info("delete MicroServiceInfo success:serviceName-"\r
-                + serviceName + ",version-" + version );\r
-\r
-    }\r
-\r
-\r
-    public synchronized void deleteMicroService(String serviceName, String version,String serverPort) {\r
-        if("null".equals(version)) {\r
-            version="";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "delete MicroServiceInfo FAIL:serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "delete MicroServiceInfo FAIL:version is not a valid  format");\r
-\r
-            }\r
-        }\r
-\r
-        try {\r
-\r
-            MicroServiceFullInfo microServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,serverPort);\r
-\r
-            if (microServiceInfo == null) {\r
-                throw new ExtendedNotFoundException("delete MicroServiceInfo FAIL:serviceName-"\r
-                        + serviceName + ",version-" + version + " not fond ");\r
-            }\r
-\r
-            MicroServiceDB.getInstance().deleteMicroService(serviceName, version,serverPort);\r
-            //Notify the listeners\r
-            MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "DELETE",serverPort);\r
-        } catch (ExtendedNotFoundException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("delete MicroServiceInfo throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-\r
-        }\r
-        \r
-        LOGGER.info("delete MicroServiceInfo success:serviceName-"\r
-                + serviceName + ",version-" + version );\r
-\r
-    }\r
-\r
-    public synchronized void deleteMicroServiceInstance(String serviceName, String version,\r
-            String ip,String port) {\r
-        if("null".equals(version)) {\r
-            version="";\r
-        }\r
-        serviceName=serviceName.replace("*", "/");\r
-        \r
-        if (StringUtils.isBlank(serviceName)) {\r
-            throw new ExtendedNotSupportedException(\r
-                    "delete MicroServiceInfo FAIL:serviceName  can't be empty");\r
-        }\r
-\r
-        if (StringUtils.isNotBlank(version)) {\r
-            if (!RegExpTestUtil.versionRegExpTest(version)) {\r
-                throw new ExtendedNotSupportedException(\r
-                        "delete MicroServiceInfo FAIL:version is not a valid  format");\r
-            }\r
-        }\r
-\r
-        if (!RegExpTestUtil.ipRegExpTest(ip)) {\r
-            throw new ExtendedNotSupportedException("delete MicroServiceInfo FAIL:IP(" + ip\r
-                    + ")is not a valid IP address");\r
-        }\r
-        \r
-        if (!RegExpTestUtil.portRegExpTest(port)) {\r
-            throw new ExtendedNotSupportedException("delete MicroServiceInfo FAIL:Port(" + port\r
-                    + ")is not a valid Port address");\r
-        }\r
-\r
-\r
-        try {\r
-            MicroServiceFullInfo microServiceInfo =\r
-                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");\r
-\r
-            if (microServiceInfo == null) {\r
-                throw new ExtendedNotFoundException("delete MicroServiceInfo FAIL:serviceName-"\r
-                        + serviceName + ",version-" + version + " not fond ");\r
-            }\r
-\r
-            Set<NodeInfo> nodes = microServiceInfo.getNodes();\r
-\r
-            boolean ifFindBNode = false;\r
-\r
-            for (Node node : nodes) {\r
-                if (node.getIp().equals(ip) && node.getPort().equals(port)) {\r
-                    ifFindBNode = true;\r
-                    nodes.remove(node);\r
-\r
-                    if (nodes.isEmpty()) {\r
-                        //delete MicroService\r
-                        MicroServiceDB.getInstance().deleteMicroService(serviceName, version,"");\r
-                        //Notify the listeners\r
-                        MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "DELETE","");\r
-                    } else {\r
-                        //delete Node\r
-                        MicroServiceDB.getInstance().deleteNode(serviceName, version, ip,port);\r
-                        MicroServiceDB.getInstance().noticeUpdateApiListener(serviceName, version,microServiceInfo,"");\r
-                    }\r
-\r
-                    break;\r
-                }\r
-            }\r
-\r
-            if (!ifFindBNode) {\r
-                throw new ExtendedNotFoundException("delete MicroServiceInfo FAIL: node-" + ip+":"+port\r
-                        + " not fond ");\r
-            }\r
-\r
-\r
-        } catch (ExtendedNotFoundException e) {\r
-            throw e;\r
-        } catch (Exception e) {\r
-            LOGGER.error("deleteApiRoute throw exception", e);\r
-            throw new ExtendedInternalServerErrorException(e.getMessage());\r
-\r
-        }\r
-\r
-    }\r
-\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.MicroServiceFullInfo;
+import org.openo.msb.api.MicroServiceInfo;
+import org.openo.msb.api.Node;
+import org.openo.msb.api.NodeInfo;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+import org.openo.msb.api.exception.ExtendedNotSupportedException;
+import org.openo.msb.wrapper.util.MicroServiceDB;
+import org.openo.msb.wrapper.util.RegExpTestUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MicroServiceWrapper {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceWrapper.class);
+
+    private static MicroServiceWrapper instance = new MicroServiceWrapper();
+
+
+    private MicroServiceWrapper() {}
+
+    public static MicroServiceWrapper getInstance() {
+        return instance;
+    }
+
+
+    /**
+     * @Title: getAllMicroServiceInstances
+     * @Description: getAllMicroServiceInstances
+     * @param: @return
+     * @return: Response
+     * @throws Exception
+     */
+    public MicroServiceFullInfo[] getAllMicroServiceInstances(){
+
+        try {
+            return MicroServiceDB.getInstance().getAllMicroServiceInstances();
+
+        } catch (Exception e) {
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+        }
+
+    }
+
+    /**
+     * @Title: getMicroServiceInstance
+     * @Description: (getMicroServiceInstance)
+     * @param: @param serviceName
+     * @param: @param version
+     * @param: @return
+     * @return: ApiRouteInfo
+     */
+    public MicroServiceFullInfo getMicroServiceInstance(String serviceName, String version,String serverPort) {
+        if("null".equals(version)) {
+            version="";
+        }
+        serviceName=serviceName.replace("*", "/");
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException("serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException("version (" + version
+                        + ") is not a valid  format");
+            }
+        }
+
+        MicroServiceFullInfo microServiceInfo;
+        try {
+            microServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,serverPort);
+
+        } catch (Exception e) {
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+        }
+
+        if (null == microServiceInfo) {
+            String errInfo =
+                    "microservice not found: serviceName-" + serviceName + ",version-" + version;
+            LOGGER.warn(errInfo);
+            throw new ExtendedNotFoundException(errInfo);
+
+        }
+
+        return microServiceInfo;
+    }
+
+
+
+    /**
+     * @Title: updateMicroServiceInstance
+     * @Description: updateMicroServiceInstance
+     * @param: serviceName
+     * @param: version
+     * @param: microServiceInfo
+     * @return: RouteResult
+     */
+    public synchronized MicroServiceFullInfo updateMicroServiceInstance(String serviceName,
+            String version, MicroServiceInfo microServiceInfo) {
+        if("null".equals(version)) {
+            version="";
+        }
+        serviceName=serviceName.replace("*", "/");
+
+        try {
+       
+            
+            MicroServiceFullInfo oldService= getMicroServiceInstance(serviceName,version,"");
+
+            // Delete the original record
+            MicroServiceDB.getInstance().deleteMicroService(serviceName, version,"");
+            // Notify the listeners
+            MicroServiceDB.getInstance().noticeApiListener(oldService, "DELETE","");
+            // Save the new record
+            MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,"");
+          
+            MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "ADD","");
+            MicroServiceFullInfo newMicroServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(
+                            microServiceInfo.getServiceName(), microServiceInfo.getVersion(),"");
+            return newMicroServiceInfo;
+        } catch (Exception e) {
+            LOGGER.error("update MicroService throw exception", e);
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+        }
+
+
+    }
+
+    public synchronized MicroServiceFullInfo updateMicroServiceNode(String serviceName,
+            String version, String ip,String port, int ttl) {
+        if("null".equals(version)) {
+            version="";
+        }
+        serviceName=serviceName.replace("*", "/");
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException(
+                    "update MicroService Node FAIL:serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException(
+                        "update MicroService Node FAIL:version is not a valid  format");
+            }
+        }
+
+        if (!RegExpTestUtil.ipRegExpTest(ip)) {
+            throw new ExtendedNotSupportedException("update MicroService Node FAIL:ip(" + ip
+                    + ")is not a valid IP address");
+        }
+        
+        if (!RegExpTestUtil.portRegExpTest(port)) {
+            throw new ExtendedNotSupportedException("update MicroService Node FAIL:port(" + port
+                    + ")is not a valid Port address");
+        }
+        
+        try {
+
+            MicroServiceDB.getInstance().updateMicroServiceNode2Redis(serviceName, version, ip,port,ttl);
+
+            MicroServiceFullInfo newMicroServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");
+
+            return newMicroServiceInfo;
+        } catch (NullPointerException e) {
+            throw new ExtendedNotFoundException(e.getMessage());
+        } catch (Exception e) {
+            LOGGER.error("update MicroServiceNode throw exception", e);
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+        }
+    }
+
+    /**
+     * @Title updateMicroServiceStatus
+     * @Description updateMicroServiceStatus
+     * @param serviceName
+     * @param version
+     * @param status
+     * @return
+     * @return RouteResult
+     */
+    public synchronized MicroServiceFullInfo updateMicroServiceStatus(String serviceName, String version,
+            String status) {
+
+        if ("null".equals(version)) {
+            version = "";
+        }
+        serviceName=serviceName.replace("*", "/");
+
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException(
+                    "update MicroService status FAIL:serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException(
+                        "update MicroService status FAIL:version is not a valid  format");
+            }
+        }
+        
+        if(!"0".equals(status) && !"2".equals(status) && !"1".equals(status)){
+
+            throw new ExtendedNotSupportedException("update MicroService status FAIL:status is wrong");
+        }
+        
+        
+        try {
+
+            MicroServiceDB.getInstance().updateMicroServiceStatus(serviceName, version, status);
+
+            MicroServiceFullInfo newMicroServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");
+            
+            // Notify the listeners
+            MicroServiceDB.getInstance().noticeUpdateStatusListener(newMicroServiceInfo, status);
+
+
+            return newMicroServiceInfo;
+        } catch (NullPointerException e) {
+            throw new ExtendedNotFoundException(e.getMessage());
+        } catch (Exception e) {
+            LOGGER.error("update MicroServiceNode throw exception", e);
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+        }
+
+    }
+
+
+    public synchronized MicroServiceFullInfo saveMicroServiceInstance(
+            MicroServiceInfo microServiceInfo, boolean createOrUpdate,String requestIP,String serverPort) {
+        // 保存数据格式判断
+
+        if (StringUtils.isBlank(microServiceInfo.getServiceName())
+                || StringUtils.isBlank(microServiceInfo.getProtocol())
+                || microServiceInfo.getNodes().size() == 0) {
+            throw new ExtendedNotSupportedException(
+                    "register MicroServiceInfo FAIL: Some required fields are empty");
+        }
+
+        for (Node node : microServiceInfo.getNodes()) {
+         
+            if(node.getIp()==null || node.getIp().isEmpty()){
+                node.setIp(requestIP);
+            }
+            else if (!RegExpTestUtil.ipRegExpTest(node.getIp())) {
+                throw new ExtendedNotSupportedException("register MicroServiceInfo FAIL:IP("
+                        + node.getIp() + ")is not a valid ip address");
+            }
+            
+            if (!RegExpTestUtil.portRegExpTest(node.getPort())) {
+                throw new ExtendedNotSupportedException("register MicroServiceInfo FAIL:Port("
+                        + node.getPort() + ")is not a valid Port address");
+            }
+        }
+
+        if (StringUtils.isNotBlank(microServiceInfo.getVersion())) {
+            if (!RegExpTestUtil.versionRegExpTest(microServiceInfo.getVersion())) {
+                throw new ExtendedNotSupportedException(
+                        "register MicroServiceInfo FAIL:version is not a valid  format");
+
+            }
+        }
+
+        if (StringUtils.isNotBlank(microServiceInfo.getUrl().trim())) {
+            if (!RegExpTestUtil.urlRegExpTest(microServiceInfo.getUrl())) {
+                throw new ExtendedNotSupportedException(
+                        "register MicroServiceInfo FAIL:url is not a valid format(url must be begin with /)");
+
+            }
+        }
+
+
+        if (RouteUtil.PROTOCOL_LIST.indexOf(microServiceInfo.getProtocol().trim()) == -1) {
+            throw new ExtendedNotSupportedException(
+                    "register MicroServiceInfo FAIL:Protocol is wrong,value range:("
+                            + RouteUtil.PROTOCOL_LIST + ")");
+        }
+
+        MicroServiceFullInfo existingMicroServiceInfo;
+        try {
+            //To determine whether a service already exists
+            existingMicroServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(
+                            microServiceInfo.getServiceName().trim(), microServiceInfo.getVersion().trim(),serverPort);
+
+            MicroServiceFullInfo newMicroServiceInfo ;
+            if (existingMicroServiceInfo != null) {
+                //a service already exists
+
+                if (!existingMicroServiceInfo.getProtocol().equals(microServiceInfo.getProtocol())) {
+                    throw new ExtendedNotSupportedException(
+                            "MicroServiceInfo with different protocols and same serviceName is already existing");
+                }
+
+                if (createOrUpdate == false) {
+                    //After the first remove added
+                    MicroServiceDB.getInstance().deleteMicroService(
+                            microServiceInfo.getServiceName(), microServiceInfo.getVersion(),serverPort);
+
+                    MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,serverPort);
+         
+                } else {
+                    //Add the original record and save directly
+                    MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,serverPort);
+                }
+                
+                newMicroServiceInfo =
+                        MicroServiceDB.getInstance().getMicroServiceInstance(
+                                microServiceInfo.getServiceName(), microServiceInfo.getVersion(),serverPort);
+
+                //Notify the listeners
+                MicroServiceDB.getInstance().noticeUpdateApiListener(microServiceInfo.getServiceName(),microServiceInfo.getVersion(),newMicroServiceInfo,serverPort);
+
+            } else {
+                //Save the new record
+                MicroServiceDB.getInstance().saveMicroServiceInfo2Redis(microServiceInfo,serverPort);
+                //Notify the listeners
+                MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "ADD",serverPort);
+                newMicroServiceInfo =
+                        MicroServiceDB.getInstance().getMicroServiceInstance(
+                                microServiceInfo.getServiceName(), microServiceInfo.getVersion(),serverPort);
+            }
+
+  
+
+            return newMicroServiceInfo;
+
+        } catch (ExtendedNotSupportedException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+        }
+
+    }
+    
+    
+    public synchronized void deleteMicroService(String serviceName, String version) {
+        if("null".equals(version)) {
+            version="";
+        }
+        serviceName=serviceName.replace("*", "/");
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException(
+                    "delete MicroServiceInfo FAIL:serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException(
+                        "delete MicroServiceInfo FAIL:version is not a valid  format");
+
+            }
+        }
+
+        try {
+
+            MicroServiceFullInfo microServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");
+
+            if (microServiceInfo == null) {
+                LOGGER.warn("serviceName-"+ serviceName + ",version-" + version + " not fond ");
+                return;
+            }
+
+            MicroServiceDB.getInstance().deleteMicroService(serviceName, version,"");
+            //Notify the listeners
+            MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "DELETE","");
+        
+        } catch (Exception e) {
+            LOGGER.error("delete MicroServiceInfo throw exception", e);
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+
+        }
+        
+        LOGGER.info("delete MicroServiceInfo success:serviceName-"
+                + serviceName + ",version-" + version );
+
+    }
+
+
+    public synchronized void deleteMicroService(String serviceName, String version,String serverPort) {
+        if("null".equals(version)) {
+            version="";
+        }
+        serviceName=serviceName.replace("*", "/");
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException(
+                    "delete MicroServiceInfo FAIL:serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException(
+                        "delete MicroServiceInfo FAIL:version is not a valid  format");
+
+            }
+        }
+
+        try {
+
+            MicroServiceFullInfo microServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,serverPort);
+
+            if (microServiceInfo == null) {
+                throw new ExtendedNotFoundException("delete MicroServiceInfo FAIL:serviceName-"
+                        + serviceName + ",version-" + version + " not fond ");
+            }
+
+            MicroServiceDB.getInstance().deleteMicroService(serviceName, version,serverPort);
+            //Notify the listeners
+            MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "DELETE",serverPort);
+        } catch (ExtendedNotFoundException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("delete MicroServiceInfo throw exception", e);
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+
+        }
+        
+        LOGGER.info("delete MicroServiceInfo success:serviceName-"
+                + serviceName + ",version-" + version );
+
+    }
+
+    public synchronized void deleteMicroServiceInstance(String serviceName, String version,
+            String ip,String port) {
+        if("null".equals(version)) {
+            version="";
+        }
+        serviceName=serviceName.replace("*", "/");
+        
+        if (StringUtils.isBlank(serviceName)) {
+            throw new ExtendedNotSupportedException(
+                    "delete MicroServiceInfo FAIL:serviceName  can't be empty");
+        }
+
+        if (StringUtils.isNotBlank(version)) {
+            if (!RegExpTestUtil.versionRegExpTest(version)) {
+                throw new ExtendedNotSupportedException(
+                        "delete MicroServiceInfo FAIL:version is not a valid  format");
+            }
+        }
+
+        if (!RegExpTestUtil.ipRegExpTest(ip)) {
+            throw new ExtendedNotSupportedException("delete MicroServiceInfo FAIL:IP(" + ip
+                    + ")is not a valid IP address");
+        }
+        
+        if (!RegExpTestUtil.portRegExpTest(port)) {
+            throw new ExtendedNotSupportedException("delete MicroServiceInfo FAIL:Port(" + port
+                    + ")is not a valid Port address");
+        }
+
+
+        try {
+            MicroServiceFullInfo microServiceInfo =
+                    MicroServiceDB.getInstance().getMicroServiceInstance(serviceName, version,"");
+
+            if (microServiceInfo == null) {
+                throw new ExtendedNotFoundException("delete MicroServiceInfo FAIL:serviceName-"
+                        + serviceName + ",version-" + version + " not fond ");
+            }
+
+            Set<NodeInfo> nodes = microServiceInfo.getNodes();
+
+            boolean ifFindBNode = false;
+
+            for (Node node : nodes) {
+                if (node.getIp().equals(ip) && node.getPort().equals(port)) {
+                    ifFindBNode = true;
+                    nodes.remove(node);
+
+                    if (nodes.isEmpty()) {
+                        //delete MicroService
+                        MicroServiceDB.getInstance().deleteMicroService(serviceName, version,"");
+                        //Notify the listeners
+                        MicroServiceDB.getInstance().noticeApiListener(microServiceInfo, "DELETE","");
+                    } else {
+                        //delete Node
+                        MicroServiceDB.getInstance().deleteNode(serviceName, version, ip,port);
+                        MicroServiceDB.getInstance().noticeUpdateApiListener(serviceName, version,microServiceInfo,"");
+                    }
+
+                    break;
+                }
+            }
+
+            if (!ifFindBNode) {
+                throw new ExtendedNotFoundException("delete MicroServiceInfo FAIL: node-" + ip+":"+port
+                        + " not fond ");
+            }
+
+
+        } catch (ExtendedNotFoundException e) {
+            throw e;
+        } catch (Exception e) {
+            LOGGER.error("deleteApiRoute throw exception", e);
+            throw new ExtendedInternalServerErrorException(e.getMessage());
+
+        }
+
+    }
+
+
+}
index 6a67bba..69be552 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Set;\r
-import java.util.regex.Matcher;\r
-import java.util.regex.Pattern;\r
-\r
-import org.openo.msb.api.ServiceAccessInfo;\r
-import org.openo.msb.wrapper.util.JedisUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import redis.clients.jedis.Jedis;\r
-\r
-public class ServiceAccessWrapper {\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(ServiceAccessWrapper.class);\r
-\r
-    private static ServiceAccessWrapper instance = new ServiceAccessWrapper();\r
-\r
-    private ServiceAccessWrapper() {}\r
-\r
-    public static ServiceAccessWrapper getInstance() {\r
-        return instance;\r
-    }\r
-\r
-    public ServiceAccessInfo getApiServiceAccessAddr(String serviceName, String version, String host) {\r
-\r
-        ServiceAccessInfo apiRouteAccessInfo = null;\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new Exception("fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            if ("null".equals(version)) {\r
-                version = "";\r
-            }\r
-\r
-            String routekey =\r
-                    RouteUtil.getPrefixedKey("",RouteUtil.APIROUTE, serviceName, version,\r
-                            RouteUtil.ROUTE_PATH_INFO);\r
-            Boolean isExist = jedis.exists(routekey);\r
-            if (isExist) {\r
-                apiRouteAccessInfo = new ServiceAccessInfo();\r
-                apiRouteAccessInfo.setServiceName(serviceName);\r
-                apiRouteAccessInfo.setVersion(version);\r
-                String accessAddr = "http://" + host + "/api/" + serviceName + "/" + version;\r
-                apiRouteAccessInfo.setAccessAddr(accessAddr);\r
-            }\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-        return apiRouteAccessInfo;\r
-\r
-    }\r
-\r
-    public List<ServiceAccessInfo> getApiRouteAccessAddr(String serviceType, String serviceName,\r
-            String version, String host) {\r
-        List<ServiceAccessInfo> serviceList = new ArrayList<ServiceAccessInfo>();\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new Exception("fetch from jedis pool failed,null object!");\r
-            }\r
-\r
-            String keyPattern = this.getRedisSearchPattern(serviceType, serviceName, version);\r
-            Set<String> infoKeys = jedis.keys(keyPattern);\r
-            Pattern pattern = this.getKeyPattern();\r
-            for (Iterator<String> iterator = infoKeys.iterator(); iterator.hasNext();) {\r
-                String infoKey = (String) iterator.next();\r
-                Matcher matcher = pattern.matcher(infoKey);\r
-                if (matcher.matches()) {\r
-                    ServiceAccessInfo serviceAccessInfo = new ServiceAccessInfo();\r
-                    serviceAccessInfo.setServiceType(matcher.group("servicetype"));\r
-                    serviceAccessInfo.setServiceName(matcher.group("servicename"));\r
-                    serviceAccessInfo.setVersion(matcher.group("version"));\r
-                    this.buildServiceAccessAddr(serviceAccessInfo, host, infoKey, jedis);\r
-                    serviceList.add(serviceAccessInfo);\r
-                }\r
-            }\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-        return serviceList;\r
-\r
-    }\r
-\r
-    private void buildServiceAccessAddr(ServiceAccessInfo serviceAccessInfo, String host,\r
-            String infoKey, Jedis jedis) {\r
-        String serviceType = serviceAccessInfo.getServiceType();\r
-        StringBuffer accessAddr = new StringBuffer();\r
-        switch (serviceType) {\r
-            case RouteUtil.APIROUTE:\r
-                accessAddr.append("http://").append(host).append(":").append(JedisUtil.serverPort)\r
-                        .append("/").append(serviceAccessInfo.getServiceType()).append("/")\r
-                        .append(serviceAccessInfo.getServiceName()).append("/")\r
-                        .append(serviceAccessInfo.getVersion());\r
-                serviceAccessInfo.setAccessAddr(accessAddr.toString());\r
-                break;\r
-            case RouteUtil.IUIROUTE:\r
-                accessAddr.append("http://").append(host).append(":").append(JedisUtil.serverPort)\r
-                        .append("/").append(serviceAccessInfo.getServiceType()).append("/")\r
-                        .append(serviceAccessInfo.getServiceName());\r
-                serviceAccessInfo.setAccessAddr(accessAddr.toString());\r
-                break;\r
-            case RouteUtil.CUSTOMROUTE:\r
-                accessAddr.append("http://").append(host).append(":").append(JedisUtil.serverPort)\r
-                        .append(serviceAccessInfo.getServiceName());\r
-                serviceAccessInfo.setAccessAddr(accessAddr.toString());\r
-                break;\r
-            case RouteUtil.P2PROUTE:\r
-                accessAddr.append(jedis.hget(infoKey, "url"));\r
-                serviceAccessInfo.setAccessAddr(accessAddr.toString());\r
-                break;\r
-            default:\r
-                serviceAccessInfo.setAccessAddr("not supported now");\r
-                break;\r
-        }\r
-    }\r
-\r
-    private String getRedisSearchPattern(String serviceType, String serviceName, String version) {\r
-        StringBuffer sb = new StringBuffer();\r
-        sb.append(RouteUtil.ROUTE_PATH);\r
-        if (null != serviceType && !"".equals(serviceType)) {\r
-            sb.append(":").append(serviceType);\r
-        } else {\r
-            sb.append(":").append("*");\r
-        }\r
-        sb.append(":").append(serviceName);\r
-        if (null != version && !"".equals(version)) {\r
-            sb.append(":");\r
-            sb.append(version);\r
-            sb.append(":");\r
-        } else {\r
-            sb.append(":*");\r
-        }\r
-        sb.append(RouteUtil.ROUTE_PATH_INFO);\r
-        return sb.toString();\r
-    }\r
-\r
-    private Pattern getKeyPattern() {\r
-        String pStr =\r
-                "conductor:routing:(?<servicetype>api|iui|custom|p2p):(?<servicename>[^:]+)(:(?<version>[^:]*))?:info";\r
-        return Pattern.compile(pStr);\r
-    }\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.openo.msb.api.ServiceAccessInfo;
+import org.openo.msb.wrapper.util.JedisUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+public class ServiceAccessWrapper {
+    private static final Logger LOGGER = LoggerFactory.getLogger(ServiceAccessWrapper.class);
+
+    private static ServiceAccessWrapper instance = new ServiceAccessWrapper();
+
+    private ServiceAccessWrapper() {}
+
+    public static ServiceAccessWrapper getInstance() {
+        return instance;
+    }
+
+    public ServiceAccessInfo getApiServiceAccessAddr(String serviceName, String version, String host) {
+
+        ServiceAccessInfo apiRouteAccessInfo = null;
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new Exception("fetch from jedis pool failed,null object!");
+            }
+
+            if ("null".equals(version)) {
+                version = "";
+            }
+
+            String routekey =
+                    RouteUtil.getPrefixedKey("",RouteUtil.APIROUTE, serviceName, version,
+                            RouteUtil.ROUTE_PATH_INFO);
+            Boolean isExist = jedis.exists(routekey);
+            if (isExist) {
+                apiRouteAccessInfo = new ServiceAccessInfo();
+                apiRouteAccessInfo.setServiceName(serviceName);
+                apiRouteAccessInfo.setVersion(version);
+                String accessAddr = "http://" + host + "/api/" + serviceName + "/" + version;
+                apiRouteAccessInfo.setAccessAddr(accessAddr);
+            }
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+        return apiRouteAccessInfo;
+
+    }
+
+    public List<ServiceAccessInfo> getApiRouteAccessAddr(String serviceType, String serviceName,
+            String version, String host) {
+        List<ServiceAccessInfo> serviceList = new ArrayList<ServiceAccessInfo>();
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new Exception("fetch from jedis pool failed,null object!");
+            }
+
+            String keyPattern = this.getRedisSearchPattern(serviceType, serviceName, version);
+            Set<String> infoKeys = jedis.keys(keyPattern);
+            Pattern pattern = this.getKeyPattern();
+            for (Iterator<String> iterator = infoKeys.iterator(); iterator.hasNext();) {
+                String infoKey = (String) iterator.next();
+                Matcher matcher = pattern.matcher(infoKey);
+                if (matcher.matches()) {
+                    ServiceAccessInfo serviceAccessInfo = new ServiceAccessInfo();
+                    serviceAccessInfo.setServiceType(matcher.group("servicetype"));
+                    serviceAccessInfo.setServiceName(matcher.group("servicename"));
+                    serviceAccessInfo.setVersion(matcher.group("version"));
+                    this.buildServiceAccessAddr(serviceAccessInfo, host, infoKey, jedis);
+                    serviceList.add(serviceAccessInfo);
+                }
+            }
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+        return serviceList;
+
+    }
+
+    private void buildServiceAccessAddr(ServiceAccessInfo serviceAccessInfo, String host,
+            String infoKey, Jedis jedis) {
+        String serviceType = serviceAccessInfo.getServiceType();
+        StringBuffer accessAddr = new StringBuffer();
+        switch (serviceType) {
+            case RouteUtil.APIROUTE:
+                accessAddr.append("http://").append(host).append(":").append(JedisUtil.serverPort)
+                        .append("/").append(serviceAccessInfo.getServiceType()).append("/")
+                        .append(serviceAccessInfo.getServiceName()).append("/")
+                        .append(serviceAccessInfo.getVersion());
+                serviceAccessInfo.setAccessAddr(accessAddr.toString());
+                break;
+            case RouteUtil.IUIROUTE:
+                accessAddr.append("http://").append(host).append(":").append(JedisUtil.serverPort)
+                        .append("/").append(serviceAccessInfo.getServiceType()).append("/")
+                        .append(serviceAccessInfo.getServiceName());
+                serviceAccessInfo.setAccessAddr(accessAddr.toString());
+                break;
+            case RouteUtil.CUSTOMROUTE:
+                accessAddr.append("http://").append(host).append(":").append(JedisUtil.serverPort)
+                        .append(serviceAccessInfo.getServiceName());
+                serviceAccessInfo.setAccessAddr(accessAddr.toString());
+                break;
+            case RouteUtil.P2PROUTE:
+                accessAddr.append(jedis.hget(infoKey, "url"));
+                serviceAccessInfo.setAccessAddr(accessAddr.toString());
+                break;
+            default:
+                serviceAccessInfo.setAccessAddr("not supported now");
+                break;
+        }
+    }
+
+    private String getRedisSearchPattern(String serviceType, String serviceName, String version) {
+        StringBuffer sb = new StringBuffer();
+        sb.append(RouteUtil.ROUTE_PATH);
+        if (null != serviceType && !"".equals(serviceType)) {
+            sb.append(":").append(serviceType);
+        } else {
+            sb.append(":").append("*");
+        }
+        sb.append(":").append(serviceName);
+        if (null != version && !"".equals(version)) {
+            sb.append(":");
+            sb.append(version);
+            sb.append(":");
+        } else {
+            sb.append(":*");
+        }
+        sb.append(RouteUtil.ROUTE_PATH_INFO);
+        return sb.toString();
+    }
+
+    private Pattern getKeyPattern() {
+        String pStr =
+                "conductor:routing:(?<servicetype>api|iui|custom|p2p):(?<servicename>[^:]+)(:(?<version>[^:]*))?:info";
+        return Pattern.compile(pStr);
+    }
 }
\ No newline at end of file
 }
\ No newline at end of file
index 2bc3914..cd881b0 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index ce02c27..67c9ef3 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index b21edcb..9fd62a6 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 7c41bc8..96d62e6 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index c61433a..c74f4a2 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 7672ae1..e928dcf 100644 (file)
@@ -1,70 +1,69 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.cache;\r
-\r
-import java.math.BigInteger;\r
-import java.util.List;\r
-\r
-import org.openo.msb.wrapper.consul.CatalogClient;\r
-import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;\r
-import org.openo.msb.wrapper.consul.model.catalog.CatalogService;\r
-\r
-import com.google.common.base.Function;\r
-\r
-public class CatalogCache extends ConsulCache<String, CatalogService>{\r
-    \r
-    private  final String serviceName;\r
-\r
-    private  CatalogCache(Function<CatalogService, String> keyConversion,\r
-            ConsulCache.CallbackConsumer<CatalogService> callbackConsumer,String serviceName) {\r
-        super(keyConversion, callbackConsumer);\r
-        this.serviceName=serviceName;\r
-        // TODO Auto-generated constructor stub\r
-    }\r
-    \r
-    \r
-    public static CatalogCache newCache(\r
-        final CatalogClient catalogClient,\r
-        final String serviceName,\r
-        final int watchSeconds){\r
-       Function<CatalogService,String> keyExtractor = new Function<CatalogService, String>() {\r
-           @Override\r
-           public String apply(CatalogService input) {\r
-               //return input.getKey().substring(rootPath.length() + 1);\r
-               return input.getServiceId();\r
-           }\r
-       };  \r
-       \r
-       final CallbackConsumer<CatalogService> callbackConsumer = new CallbackConsumer<CatalogService>() {\r
-           @Override\r
-           public void consume(BigInteger index, ConsulResponseCallback<List<CatalogService>> callback) {\r
-               catalogClient.getService(serviceName,  watchParams(index, watchSeconds),callback);\r
-           }\r
-       };\r
-       \r
-        \r
-       return new CatalogCache(keyExtractor, callbackConsumer,serviceName);\r
-        \r
-        \r
-    }\r
-    \r
-    public String getServiceName(){\r
-        return this.serviceName;\r
-    }\r
-    \r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.cache;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import org.openo.msb.wrapper.consul.CatalogClient;
+import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;
+import org.openo.msb.wrapper.consul.model.catalog.CatalogService;
+
+import com.google.common.base.Function;
+
+public class CatalogCache extends ConsulCache<String, CatalogService>{
+    
+    private  final String serviceName;
+
+    private  CatalogCache(Function<CatalogService, String> keyConversion,
+            ConsulCache.CallbackConsumer<CatalogService> callbackConsumer,String serviceName) {
+        super(keyConversion, callbackConsumer);
+        this.serviceName=serviceName;
+        // TODO Auto-generated constructor stub
+    }
+    
+    
+    public static CatalogCache newCache(
+        final CatalogClient catalogClient,
+        final String serviceName,
+        final int watchSeconds){
+       Function<CatalogService,String> keyExtractor = new Function<CatalogService, String>() {
+           @Override
+           public String apply(CatalogService input) {
+               //return input.getKey().substring(rootPath.length() + 1);
+               return input.getServiceId();
+           }
+       };  
+       
+       final CallbackConsumer<CatalogService> callbackConsumer = new CallbackConsumer<CatalogService>() {
+           @Override
+           public void consume(BigInteger index, ConsulResponseCallback<List<CatalogService>> callback) {
+               catalogClient.getService(serviceName,  watchParams(index, watchSeconds),callback);
+           }
+       };
+       
+        
+       return new CatalogCache(keyExtractor, callbackConsumer,serviceName);
+        
+        
+    }
+    
+    public String getServiceName(){
+        return this.serviceName;
+    }
+    
+
+}
index 5f431f1..1e0071c 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 83f1717..ec0e54a 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.cache;\r
-\r
-\r
-import static com.google.common.base.Preconditions.checkState;\r
-\r
-import java.math.BigInteger;\r
-import java.util.HashSet;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-import java.util.concurrent.CopyOnWriteArrayList;\r
-import java.util.concurrent.CountDownLatch;\r
-import java.util.concurrent.Executors;\r
-import java.util.concurrent.ScheduledExecutorService;\r
-import java.util.concurrent.TimeUnit;\r
-import java.util.concurrent.atomic.AtomicReference;\r
-\r
-import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;\r
-import org.openo.msb.wrapper.consul.model.ConsulResponse;\r
-import org.openo.msb.wrapper.consul.model.catalog.CatalogService;\r
-import org.openo.msb.wrapper.consul.model.catalog.ServiceInfo;\r
-import org.openo.msb.wrapper.consul.option.QueryOptions;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import com.google.common.annotations.VisibleForTesting;\r
-import com.google.common.collect.ImmutableList;\r
-\r
-/**\r
- * A cache structure that can provide an up-to-date read-only\r
- * map backed by consul data\r
- *\r
- * @param <V>\r
- */\r
-public class ConsulCache4Map<K, V> {\r
-\r
-    enum State {latent, starting, started, stopped }\r
-\r
-    private final static Logger LOGGER = LoggerFactory.getLogger(ConsulCache4Map.class);\r
-\r
-    private final AtomicReference<BigInteger> latestIndex = new AtomicReference<BigInteger>(null);\r
-    private final AtomicReference<ImmutableList<ServiceInfo>> lastResponse = new AtomicReference<ImmutableList<ServiceInfo>>(ImmutableList.<ServiceInfo>of());\r
-    private final AtomicReference<State> state = new AtomicReference<State>(State.latent);\r
-    private final CountDownLatch initLatch = new CountDownLatch(1);\r
-    private final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();\r
-    private final CopyOnWriteArrayList<Listener<K, V>> listeners = new CopyOnWriteArrayList<Listener<K, V>>();\r
-\r
-    private final CallbackConsumer<V> callBackConsumer;\r
-    private final ConsulResponseCallback<Map<String,List<String>>> responseCallback;\r
-\r
-    ConsulCache4Map(CallbackConsumer<V> callbackConsumer) {\r
-        this( callbackConsumer, 10, TimeUnit.SECONDS);\r
-    }\r
-\r
-    ConsulCache4Map(\r
-            CallbackConsumer<V> callbackConsumer,\r
-            final long backoffDelayQty,\r
-            final TimeUnit backoffDelayUnit) {\r
-\r
-        this.callBackConsumer = callbackConsumer;\r
-\r
-        this.responseCallback = new ConsulResponseCallback<Map<String,List<String>>>() {\r
-            @Override\r
-            public void onComplete(ConsulResponse<Map<String,List<String>>> consulResponse) {\r
-\r
-                if (!isRunning()) {\r
-                    return;\r
-                }\r
-                updateIndex(consulResponse);\r
-                ImmutableList<ServiceInfo> full = convertToList(consulResponse);\r
-                List<ServiceInfo> oldList=lastResponse.get();\r
-                boolean changed = !full.equals(lastResponse.get());\r
-//                LOGGER.info("service changed:"+changed+"----"+full);\r
-                if (changed) {\r
-                    // changes\r
-                    lastResponse.set(full);\r
-                }\r
-\r
-                if (changed) {\r
-                    for (Listener<K, V> l : listeners) {\r
-                        l.notify(oldList,full);\r
-                    }\r
-                }\r
-\r
-                if (state.compareAndSet(State.starting, State.started)) {\r
-                    initLatch.countDown();\r
-                }\r
-                runCallback();\r
-            }\r
-\r
-            @Override\r
-            public void onFailure(Throwable throwable) {\r
-\r
-                if (!isRunning()) {\r
-                    return;\r
-                }\r
-                LOGGER.error(String.format("Error getting response from consul. will retry in %d %s", backoffDelayQty, backoffDelayUnit), throwable);\r
-\r
-                executorService.schedule(new Runnable() {\r
-                    @Override\r
-                    public void run() {\r
-                        runCallback();\r
-                    }\r
-                }, backoffDelayQty, backoffDelayUnit);\r
-            }\r
-        };\r
-    }\r
-\r
-    public void start() throws Exception {\r
-        checkState(state.compareAndSet(State.latent, State.starting),"Cannot transition from state %s to %s", state.get(), State.starting);\r
-        runCallback();\r
-    }\r
-\r
-    public void stop() throws Exception {\r
-        State previous = state.getAndSet(State.stopped);\r
-        if (previous != State.stopped) {\r
-            executorService.shutdownNow();\r
-        }\r
-    }\r
-\r
-    private void runCallback() {\r
-        if (isRunning()) {\r
-            callBackConsumer.consume(latestIndex.get(), responseCallback);\r
-        }\r
-    }\r
-\r
-    private boolean isRunning() {\r
-        return state.get() == State.started || state.get() == State.starting;\r
-    }\r
-\r
-    public boolean awaitInitialized(long timeout, TimeUnit unit) throws InterruptedException {\r
-        return initLatch.await(timeout, unit);\r
-    }\r
-\r
-    public ImmutableList<ServiceInfo> getMap() {\r
-        return lastResponse.get();\r
-    }\r
-\r
-    @VisibleForTesting\r
-    ImmutableList<ServiceInfo> convertToList(final ConsulResponse<Map<String,List<String>>> response) {\r
-        if (response == null || response.getResponse() == null || response.getResponse().isEmpty()) {\r
-            return ImmutableList.of();\r
-        }\r
-\r
-        final ImmutableList.Builder<ServiceInfo> builder = ImmutableList.builder();\r
-        final Set<String> keySet = new HashSet<>();\r
-        \r
-        for(Map.Entry<String,List<String>> entry : response.getResponse().entrySet()) {\r
\r
-            String key = entry.getKey();  \r
-           \r
-            if (key != null && !"consul".equals(key)) {\r
-                if (!keySet.contains(key)) {\r
-                    ServiceInfo serviceInfo=new ServiceInfo();\r
-                    serviceInfo.setServiceName(key);\r
-                    \r
-                    List<String> value=entry.getValue();\r
-                    for(String tag:value){\r
-                       \r
-                        if(tag.startsWith("version")){\r
-                             String version; \r
-                            if(tag.split(":").length==2)\r
-                            {\r
-                            version = tag.split(":")[1];\r
-                            }\r
-                            else{\r
-                                version=""; \r
-                            }\r
-                            \r
-                            serviceInfo.setVersion(version);\r
-                            break;\r
-                        }\r
-                    }\r
-                    \r
-                    builder.add(serviceInfo);\r
-                } else {\r
-                    System.out.println(key.toString());\r
-                    LOGGER.warn("Duplicate service encountered. May differ by tags. Try using more specific tags? " + key.toString());\r
-                }\r
-            }\r
-            keySet.add(key);\r
-         \r
-        }  \r
-        \r
-        \r
-        return builder.build();\r
-    }\r
-\r
-    private void updateIndex(ConsulResponse<Map<String,List<String>>> consulResponse) {\r
-        if (consulResponse != null && consulResponse.getIndex() != null) {\r
-            this.latestIndex.set(consulResponse.getIndex());\r
-        }\r
-    }\r
-\r
-    protected static QueryOptions watchParams(BigInteger index, int blockSeconds) {\r
-        if (index == null) {\r
-            return QueryOptions.BLANK;\r
-        } else {\r
-            return QueryOptions.blockSeconds(blockSeconds, index).build();\r
-        }\r
-    }\r
-\r
-    /**\r
-     * passed in by creators to vary the content of the cached values\r
-     *\r
-     * @param <V>\r
-     */\r
-    protected interface CallbackConsumer<V> {\r
-        void consume(BigInteger index, ConsulResponseCallback<Map<String,List<String>>> callback);\r
-    }\r
-\r
-    /**\r
-     * Implementers can register a listener to receive\r
-     * a new map when it changes\r
-     *\r
-     * @param <V>\r
-     */\r
-    public interface Listener<K, V> {\r
-        void notify(List<ServiceInfo> oldValues,List<ServiceInfo> newValues);\r
-    }\r
-\r
-    public boolean addListener(Listener<K, V> listener) {\r
-        boolean added = listeners.add(listener);\r
-        if (state.get() == State.started) {\r
-            listener.notify(lastResponse.get(),lastResponse.get());\r
-        }\r
-        return added;\r
-    }\r
-\r
-    public boolean removeListener(Listener<K, V> listener) {\r
-        return listeners.remove(listener);\r
-    }\r
-\r
-    @VisibleForTesting\r
-    protected State getState() {\r
-        return state.get();\r
-    }\r
-    \r
\r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.cache;
+
+
+import static com.google.common.base.Preconditions.checkState;
+
+import java.math.BigInteger;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;
+import org.openo.msb.wrapper.consul.model.ConsulResponse;
+import org.openo.msb.wrapper.consul.model.catalog.CatalogService;
+import org.openo.msb.wrapper.consul.model.catalog.ServiceInfo;
+import org.openo.msb.wrapper.consul.option.QueryOptions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.collect.ImmutableList;
+
+/**
+ * A cache structure that can provide an up-to-date read-only
+ * map backed by consul data
+ *
+ * @param <V>
+ */
+public class ConsulCache4Map<K, V> {
+
+    enum State {latent, starting, started, stopped }
+
+    private final static Logger LOGGER = LoggerFactory.getLogger(ConsulCache4Map.class);
+
+    private final AtomicReference<BigInteger> latestIndex = new AtomicReference<BigInteger>(null);
+    private final AtomicReference<ImmutableList<ServiceInfo>> lastResponse = new AtomicReference<ImmutableList<ServiceInfo>>(ImmutableList.<ServiceInfo>of());
+    private final AtomicReference<State> state = new AtomicReference<State>(State.latent);
+    private final CountDownLatch initLatch = new CountDownLatch(1);
+    private final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
+    private final CopyOnWriteArrayList<Listener<K, V>> listeners = new CopyOnWriteArrayList<Listener<K, V>>();
+
+    private final CallbackConsumer<V> callBackConsumer;
+    private final ConsulResponseCallback<Map<String,List<String>>> responseCallback;
+
+    ConsulCache4Map(CallbackConsumer<V> callbackConsumer) {
+        this( callbackConsumer, 10, TimeUnit.SECONDS);
+    }
+
+    ConsulCache4Map(
+            CallbackConsumer<V> callbackConsumer,
+            final long backoffDelayQty,
+            final TimeUnit backoffDelayUnit) {
+
+        this.callBackConsumer = callbackConsumer;
+
+        this.responseCallback = new ConsulResponseCallback<Map<String,List<String>>>() {
+            @Override
+            public void onComplete(ConsulResponse<Map<String,List<String>>> consulResponse) {
+
+                if (!isRunning()) {
+                    return;
+                }
+                updateIndex(consulResponse);
+                ImmutableList<ServiceInfo> full = convertToList(consulResponse);
+                List<ServiceInfo> oldList=lastResponse.get();
+                boolean changed = !full.equals(lastResponse.get());
+//                LOGGER.info("service changed:"+changed+"----"+full);
+                if (changed) {
+                    // changes
+                    lastResponse.set(full);
+                }
+
+                if (changed) {
+                    for (Listener<K, V> l : listeners) {
+                        l.notify(oldList,full);
+                    }
+                }
+
+                if (state.compareAndSet(State.starting, State.started)) {
+                    initLatch.countDown();
+                }
+                runCallback();
+            }
+
+            @Override
+            public void onFailure(Throwable throwable) {
+
+                if (!isRunning()) {
+                    return;
+                }
+                LOGGER.error(String.format("Error getting response from consul. will retry in %d %s", backoffDelayQty, backoffDelayUnit), throwable);
+
+                executorService.schedule(new Runnable() {
+                    @Override
+                    public void run() {
+                        runCallback();
+                    }
+                }, backoffDelayQty, backoffDelayUnit);
+            }
+        };
+    }
+
+    public void start() throws Exception {
+        checkState(state.compareAndSet(State.latent, State.starting),"Cannot transition from state %s to %s", state.get(), State.starting);
+        runCallback();
+    }
+
+    public void stop() throws Exception {
+        State previous = state.getAndSet(State.stopped);
+        if (previous != State.stopped) {
+            executorService.shutdownNow();
+        }
+    }
+
+    private void runCallback() {
+        if (isRunning()) {
+            callBackConsumer.consume(latestIndex.get(), responseCallback);
+        }
+    }
+
+    private boolean isRunning() {
+        return state.get() == State.started || state.get() == State.starting;
+    }
+
+    public boolean awaitInitialized(long timeout, TimeUnit unit) throws InterruptedException {
+        return initLatch.await(timeout, unit);
+    }
+
+    public ImmutableList<ServiceInfo> getMap() {
+        return lastResponse.get();
+    }
+
+    @VisibleForTesting
+    ImmutableList<ServiceInfo> convertToList(final ConsulResponse<Map<String,List<String>>> response) {
+        if (response == null || response.getResponse() == null || response.getResponse().isEmpty()) {
+            return ImmutableList.of();
+        }
+
+        final ImmutableList.Builder<ServiceInfo> builder = ImmutableList.builder();
+        final Set<String> keySet = new HashSet<>();
+        
+        for(Map.Entry<String,List<String>> entry : response.getResponse().entrySet()) {
+            String key = entry.getKey();  
+           
+            if (key != null && !"consul".equals(key)) {
+                if (!keySet.contains(key)) {
+                    ServiceInfo serviceInfo=new ServiceInfo();
+                    serviceInfo.setServiceName(key);
+                    
+                    List<String> value=entry.getValue();
+                    for(String tag:value){
+                       
+                        if(tag.startsWith("version")){
+                             String version; 
+                            if(tag.split(":").length==2)
+                            {
+                            version = tag.split(":")[1];
+                            }
+                            else{
+                                version=""; 
+                            }
+                            
+                            serviceInfo.setVersion(version);
+                            break;
+                        }
+                    }
+                    
+                    builder.add(serviceInfo);
+                } else {
+                    System.out.println(key.toString());
+                    LOGGER.warn("Duplicate service encountered. May differ by tags. Try using more specific tags? " + key.toString());
+                }
+            }
+            keySet.add(key);
+         
+        }  
+        
+        
+        return builder.build();
+    }
+
+    private void updateIndex(ConsulResponse<Map<String,List<String>>> consulResponse) {
+        if (consulResponse != null && consulResponse.getIndex() != null) {
+            this.latestIndex.set(consulResponse.getIndex());
+        }
+    }
+
+    protected static QueryOptions watchParams(BigInteger index, int blockSeconds) {
+        if (index == null) {
+            return QueryOptions.BLANK;
+        } else {
+            return QueryOptions.blockSeconds(blockSeconds, index).build();
+        }
+    }
+
+    /**
+     * passed in by creators to vary the content of the cached values
+     *
+     * @param <V>
+     */
+    protected interface CallbackConsumer<V> {
+        void consume(BigInteger index, ConsulResponseCallback<Map<String,List<String>>> callback);
+    }
+
+    /**
+     * Implementers can register a listener to receive
+     * a new map when it changes
+     *
+     * @param <V>
+     */
+    public interface Listener<K, V> {
+        void notify(List<ServiceInfo> oldValues,List<ServiceInfo> newValues);
+    }
+
+    public boolean addListener(Listener<K, V> listener) {
+        boolean added = listeners.add(listener);
+        if (state.get() == State.started) {
+            listener.notify(lastResponse.get(),lastResponse.get());
+        }
+        return added;
+    }
+
+    public boolean removeListener(Listener<K, V> listener) {
+        return listeners.remove(listener);
+    }
+
+    @VisibleForTesting
+    protected State getState() {
+        return state.get();
+    }
+    
+    
+}
index 7bf40a7..54caab6 100644 (file)
@@ -1,70 +1,69 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.cache;\r
-\r
-import java.math.BigInteger;\r
-import java.util.List;\r
-\r
-import org.openo.msb.wrapper.consul.HealthClient;\r
-import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;\r
-import org.openo.msb.wrapper.consul.model.health.ServiceHealth;\r
-\r
-import com.google.common.base.Function;\r
-\r
-public class HealthCache extends ConsulCache<String, ServiceHealth>{\r
-    \r
-    private  final String serviceName;\r
-\r
-    private  HealthCache(Function<ServiceHealth, String> keyConversion,\r
-            ConsulCache.CallbackConsumer<ServiceHealth> callbackConsumer,String serviceName) {\r
-        super(keyConversion, callbackConsumer);\r
-        this.serviceName=serviceName;\r
-        // TODO Auto-generated constructor stub\r
-    }\r
-    \r
-    \r
-    public static HealthCache newCache(\r
-        final HealthClient healthClient,\r
-        final String serviceName,\r
-        final int watchSeconds){\r
-       Function<ServiceHealth,String> keyExtractor = new Function<ServiceHealth, String>() {\r
-           @Override\r
-           public String apply(ServiceHealth input) {\r
-               //return input.getKey().substring(rootPath.length() + 1);\r
-               return input.getService().getId();\r
-           }\r
-       };  \r
-       \r
-       final CallbackConsumer<ServiceHealth> callbackConsumer = new CallbackConsumer<ServiceHealth>() {\r
-           @Override\r
-           public void consume(BigInteger index, ConsulResponseCallback<List<ServiceHealth>> callback) {\r
-               healthClient.getHealthyServiceInstances(serviceName,  watchParams(index, watchSeconds),callback);\r
-           }\r
-       };\r
-       \r
-        \r
-       return new HealthCache(keyExtractor, callbackConsumer,serviceName);\r
-        \r
-        \r
-    }\r
-    \r
-    public String getServiceName(){\r
-        return this.serviceName;\r
-    }\r
-    \r
-\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.cache;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import org.openo.msb.wrapper.consul.HealthClient;
+import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;
+import org.openo.msb.wrapper.consul.model.health.ServiceHealth;
+
+import com.google.common.base.Function;
+
+public class HealthCache extends ConsulCache<String, ServiceHealth>{
+    
+    private  final String serviceName;
+
+    private  HealthCache(Function<ServiceHealth, String> keyConversion,
+            ConsulCache.CallbackConsumer<ServiceHealth> callbackConsumer,String serviceName) {
+        super(keyConversion, callbackConsumer);
+        this.serviceName=serviceName;
+        // TODO Auto-generated constructor stub
+    }
+    
+    
+    public static HealthCache newCache(
+        final HealthClient healthClient,
+        final String serviceName,
+        final int watchSeconds){
+       Function<ServiceHealth,String> keyExtractor = new Function<ServiceHealth, String>() {
+           @Override
+           public String apply(ServiceHealth input) {
+               //return input.getKey().substring(rootPath.length() + 1);
+               return input.getService().getId();
+           }
+       };  
+       
+       final CallbackConsumer<ServiceHealth> callbackConsumer = new CallbackConsumer<ServiceHealth>() {
+           @Override
+           public void consume(BigInteger index, ConsulResponseCallback<List<ServiceHealth>> callback) {
+               healthClient.getHealthyServiceInstances(serviceName,  watchParams(index, watchSeconds),callback);
+           }
+       };
+       
+        
+       return new HealthCache(keyExtractor, callbackConsumer,serviceName);
+        
+        
+    }
+    
+    public String getServiceName(){
+        return this.serviceName;
+    }
+    
+
 }
\ No newline at end of file
 }
\ No newline at end of file
index f82c6fd..78c4b92 100644 (file)
@@ -1,50 +1,49 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.cache;\r
-\r
-import java.math.BigInteger;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.openo.msb.wrapper.consul.CatalogClient;\r
-import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;\r
-\r
-public class ServiceCache  extends ConsulCache4Map<String, Map<String, List<String>>> {\r
-    private  ServiceCache( ConsulCache4Map.CallbackConsumer<Map<String, List<String>>> callbackConsumer) {\r
-                      super(callbackConsumer);\r
-                      // TODO Auto-generated constructor stub\r
-                  }\r
-                  \r
-                  \r
-                  public static ServiceCache newCache(\r
-                      final CatalogClient catalogClient,\r
-                      final int watchSeconds){\r
-                   \r
-                     \r
-                     final CallbackConsumer<Map<String, List<String>>> callbackConsumer = new CallbackConsumer<Map<String, List<String>>>() {\r
-                         @Override\r
-                         public void consume(BigInteger index, ConsulResponseCallback<Map<String, List<String>>> callback) {\r
-                             catalogClient.getService(watchParams(index, watchSeconds),callback);\r
-                         }\r
-                     };\r
-                     \r
-                      \r
-                     return new ServiceCache(callbackConsumer);\r
-                      \r
-                      \r
-                  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.cache;
+
+import java.math.BigInteger;
+import java.util.List;
+import java.util.Map;
+
+import org.openo.msb.wrapper.consul.CatalogClient;
+import org.openo.msb.wrapper.consul.async.ConsulResponseCallback;
+
+public class ServiceCache  extends ConsulCache4Map<String, Map<String, List<String>>> {
+    private  ServiceCache( ConsulCache4Map.CallbackConsumer<Map<String, List<String>>> callbackConsumer) {
+                      super(callbackConsumer);
+                      // TODO Auto-generated constructor stub
+                  }
+                  
+                  
+                  public static ServiceCache newCache(
+                      final CatalogClient catalogClient,
+                      final int watchSeconds){
+                   
+                     
+                     final CallbackConsumer<Map<String, List<String>>> callbackConsumer = new CallbackConsumer<Map<String, List<String>>>() {
+                         @Override
+                         public void consume(BigInteger index, ConsulResponseCallback<Map<String, List<String>>> callback) {
+                             catalogClient.getService(watchParams(index, watchSeconds),callback);
+                         }
+                     };
+                     
+                      
+                     return new ServiceCache(callbackConsumer);
+                      
+                      
+                  }
+}
index 2851921..3ee15f1 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 53320bd..1a33a4f 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index b2ca82a..ec6ecfe 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 4ad2743..de872df 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.model.catalog;\r
-\r
-import com.fasterxml.jackson.annotation.JsonCreator;\r
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\r
-import com.google.common.base.MoreObjects;\r
-import com.google.common.base.Preconditions;\r
-import com.google.common.collect.ImmutableMap;\r
-import com.google.common.collect.Lists;\r
-\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.annotation.Generated;\r
-\r
-import org.openo.msb.wrapper.consul.model.health.Node;\r
-import org.openo.msb.wrapper.consul.model.health.Service;\r
-\r
-/**\r
- * Immutable implementation of {@link CatalogNode}.\r
- * <p>\r
- * Use the builder to create immutable instances:\r
- * {@code ImmutableCatalogNode.builder()}.\r
- */\r
-@SuppressWarnings("all")\r
-@Generated({"Immutables.generator", "CatalogNode"})\r
-@JsonIgnoreProperties(ignoreUnknown = true)\r
-public final class ImmutableCatalogNode extends CatalogNode {\r
-  private final Node node;\r
-  private final ImmutableMap<String, Service> services;\r
-\r
-  private ImmutableCatalogNode(\r
-      Node node,\r
-      ImmutableMap<String, Service> services) {\r
-    this.node = node;\r
-    this.services = services;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code node} attribute\r
-   */\r
-  @JsonProperty(value = "Node")\r
-  @Override\r
-  public Node getNode() {\r
-    return node;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code services} attribute\r
-   */\r
-  @JsonProperty(value = "Services")\r
-  @Override\r
-  public ImmutableMap<String, Service> getServices() {\r
-    return services;\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogNode#getNode() node} attribute.\r
-   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for node\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogNode withNode(Node value) {\r
-    if (this.node == value) return this;\r
-    return new ImmutableCatalogNode(Preconditions.checkNotNull(value, "node"), this.services);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by replacing the {@link CatalogNode#getServices() services} map with the specified map.\r
-   * Nulls are not permitted as keys or values.\r
-   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param entries The entries to be added to the services map\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogNode withServices(Map<String, ? extends Service> entries) {\r
-    if (this.services == entries) return this;\r
-    ImmutableMap<String, Service> value = ImmutableMap.copyOf(entries);\r
-    return new ImmutableCatalogNode(this.node, value);\r
-  }\r
-\r
-  /**\r
-   * This instance is equal to all instances of {@code ImmutableCatalogNode} that have equal attribute values.\r
-   * @return {@code true} if {@code this} is equal to {@code another} instance\r
-   */\r
-  @Override\r
-  public boolean equals(Object another) {\r
-    if (this == another) return true;\r
-    return another instanceof ImmutableCatalogNode\r
-        && equalTo((ImmutableCatalogNode) another);\r
-  }\r
-\r
-  private boolean equalTo(ImmutableCatalogNode another) {\r
-    return node.equals(another.node)\r
-        && services.equals(another.services);\r
-  }\r
-\r
-  /**\r
-   * Computes a hash code from attributes: {@code node}, {@code services}.\r
-   * @return hashCode value\r
-   */\r
-  @Override\r
-  public int hashCode() {\r
-    int h = 31;\r
-    h = h * 17 + node.hashCode();\r
-    h = h * 17 + services.hashCode();\r
-    return h;\r
-  }\r
-\r
-  /**\r
-   * Prints the immutable value {@code CatalogNode...} with all non-generated\r
-   * and non-auxiliary attribute values.\r
-   * @return A string representation of the value\r
-   */\r
-  @Override\r
-  public String toString() {\r
-    return MoreObjects.toStringHelper("CatalogNode")\r
-        .add("node", node)\r
-        .add("services", services)\r
-        .toString();\r
-  }\r
-\r
-  /**\r
-   * Utility type used to correctly read immutable object from JSON representation.\r
-   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonDeserialize\r
-  static final class Json extends CatalogNode {\r
-    Node node;\r
-    Map<String, Service> services;\r
-    @JsonProperty(value = "Node")\r
-    public void setNode(Node node) {\r
-      this.node = node;\r
-    }\r
-    @JsonProperty(value = "Services")\r
-    public void setServices(Map<String, Service> services) {\r
-      this.services = services;\r
-    }\r
-    @Override\r
-    public Node getNode() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public Map<String, Service> getServices() { throw new UnsupportedOperationException(); }\r
-  }\r
-\r
-  /**\r
-   * @param json A JSON-bindable data structure\r
-   * @return An immutable value type\r
-   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonCreator\r
-  static ImmutableCatalogNode fromJson(Json json) {\r
-    ImmutableCatalogNode.Builder builder = ImmutableCatalogNode.builder();\r
-    if (json.node != null) {\r
-      builder.node(json.node);\r
-    }\r
-    if (json.services != null) {\r
-      builder.putAllServices(json.services);\r
-    }\r
-    return builder.build();\r
-  }\r
-\r
-  /**\r
-   * Creates an immutable copy of a {@link CatalogNode} value.\r
-   * Uses accessors to get values to initialize the new immutable instance.\r
-   * If an instance is already immutable, it is returned as is.\r
-   * @param instance The instance to copy\r
-   * @return A copied immutable CatalogNode instance\r
-   */\r
-  public static ImmutableCatalogNode copyOf(CatalogNode instance) {\r
-    if (instance instanceof ImmutableCatalogNode) {\r
-      return (ImmutableCatalogNode) instance;\r
-    }\r
-    return ImmutableCatalogNode.builder()\r
-        .from(instance)\r
-        .build();\r
-  }\r
-\r
-  /**\r
-   * Creates a builder for {@link ImmutableCatalogNode ImmutableCatalogNode}.\r
-   * @return A new ImmutableCatalogNode builder\r
-   */\r
-  public static ImmutableCatalogNode.Builder builder() {\r
-    return new ImmutableCatalogNode.Builder();\r
-  }\r
-\r
-  /**\r
-   * Builds instances of type {@link ImmutableCatalogNode ImmutableCatalogNode}.\r
-   * Initialize attributes and then invoke the {@link #build()} method to create an\r
-   * immutable instance.\r
-   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
-   * but instead used immediately to create instances.</em>\r
-   */\r
-  public static final class Builder {\r
-    private static final long INIT_BIT_NODE = 0x1L;\r
-    private long initBits = 0x1;\r
-\r
-    private Node node;\r
-    private ImmutableMap.Builder<String, Service> servicesBuilder = ImmutableMap.builder();\r
-\r
-    private Builder() {\r
-    }\r
-\r
-    /**\r
-     * Fill a builder with attribute values from the provided {@code CatalogNode} instance.\r
-     * Regular attribute values will be replaced with those from the given instance.\r
-     * Absent optional values will not replace present values.\r
-     * Collection elements and entries will be added, not replaced.\r
-     * @param instance The instance from which to copy values\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder from(CatalogNode instance) {\r
-      Preconditions.checkNotNull(instance, "instance");\r
-      node(instance.getNode());\r
-      putAllServices(instance.getServices());\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogNode#getNode() node} attribute.\r
-     * @param node The value for node \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder node(Node node) {\r
-      this.node = Preconditions.checkNotNull(node, "node");\r
-      initBits &= ~INIT_BIT_NODE;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Put one entry to the {@link CatalogNode#getServices() services} map.\r
-     * @param key The key in the services map\r
-     * @param value The associated value in the services map\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder putServices(String key, Service value) {\r
-      servicesBuilder.put(key, value);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Put one entry to the {@link CatalogNode#getServices() services} map. Nulls are not permitted\r
-     * @param entry The key and value entry\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder putServices(Map.Entry<String, ? extends Service> entry) {\r
-      servicesBuilder.put(entry);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Sets or replaces all mappings from the specified map as entries for the {@link CatalogNode#getServices() services} map. Nulls are not permitted\r
-     * @param entries The entries that will be added to the services map\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder services(Map<String, ? extends Service> entries) {\r
-      servicesBuilder = ImmutableMap.builder();\r
-      return putAllServices(entries);\r
-    }\r
-\r
-    /**\r
-     * Put all mappings from the specified map as entries to {@link CatalogNode#getServices() services} map. Nulls are not permitted\r
-     * @param entries The entries that will be added to the services map\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder putAllServices(Map<String, ? extends Service> entries) {\r
-      servicesBuilder.putAll(entries);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Builds a new {@link ImmutableCatalogNode ImmutableCatalogNode}.\r
-     * @return An immutable instance of CatalogNode\r
-     * @throws java.lang.IllegalStateException if any required attributes are missing\r
-     */\r
-    public ImmutableCatalogNode build() throws IllegalStateException {\r
-      if (initBits != 0) {\r
-        throw new IllegalStateException(formatRequiredAttributesMessage());\r
-      }\r
-      return new ImmutableCatalogNode(node, servicesBuilder.build());\r
-    }\r
-\r
-    private String formatRequiredAttributesMessage() {\r
-      List<String> attributes = Lists.newArrayList();\r
-      if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");\r
-      return "Cannot build CatalogNode, some of required attributes are not set " + attributes;\r
-    }\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.model.catalog;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.openo.msb.wrapper.consul.model.health.Node;
+import org.openo.msb.wrapper.consul.model.health.Service;
+
+/**
+ * Immutable implementation of {@link CatalogNode}.
+ * <p>
+ * Use the builder to create immutable instances:
+ * {@code ImmutableCatalogNode.builder()}.
+ */
+@SuppressWarnings("all")
+@Generated({"Immutables.generator", "CatalogNode"})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public final class ImmutableCatalogNode extends CatalogNode {
+  private final Node node;
+  private final ImmutableMap<String, Service> services;
+
+  private ImmutableCatalogNode(
+      Node node,
+      ImmutableMap<String, Service> services) {
+    this.node = node;
+    this.services = services;
+  }
+
+  /**
+   * @return The value of the {@code node} attribute
+   */
+  @JsonProperty(value = "Node")
+  @Override
+  public Node getNode() {
+    return node;
+  }
+
+  /**
+   * @return The value of the {@code services} attribute
+   */
+  @JsonProperty(value = "Services")
+  @Override
+  public ImmutableMap<String, Service> getServices() {
+    return services;
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogNode#getNode() node} attribute.
+   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for node
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogNode withNode(Node value) {
+    if (this.node == value) return this;
+    return new ImmutableCatalogNode(Preconditions.checkNotNull(value, "node"), this.services);
+  }
+
+  /**
+   * Copy the current immutable object by replacing the {@link CatalogNode#getServices() services} map with the specified map.
+   * Nulls are not permitted as keys or values.
+   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param entries The entries to be added to the services map
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogNode withServices(Map<String, ? extends Service> entries) {
+    if (this.services == entries) return this;
+    ImmutableMap<String, Service> value = ImmutableMap.copyOf(entries);
+    return new ImmutableCatalogNode(this.node, value);
+  }
+
+  /**
+   * This instance is equal to all instances of {@code ImmutableCatalogNode} that have equal attribute values.
+   * @return {@code true} if {@code this} is equal to {@code another} instance
+   */
+  @Override
+  public boolean equals(Object another) {
+    if (this == another) return true;
+    return another instanceof ImmutableCatalogNode
+        && equalTo((ImmutableCatalogNode) another);
+  }
+
+  private boolean equalTo(ImmutableCatalogNode another) {
+    return node.equals(another.node)
+        && services.equals(another.services);
+  }
+
+  /**
+   * Computes a hash code from attributes: {@code node}, {@code services}.
+   * @return hashCode value
+   */
+  @Override
+  public int hashCode() {
+    int h = 31;
+    h = h * 17 + node.hashCode();
+    h = h * 17 + services.hashCode();
+    return h;
+  }
+
+  /**
+   * Prints the immutable value {@code CatalogNode...} with all non-generated
+   * and non-auxiliary attribute values.
+   * @return A string representation of the value
+   */
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper("CatalogNode")
+        .add("node", node)
+        .add("services", services)
+        .toString();
+  }
+
+  /**
+   * Utility type used to correctly read immutable object from JSON representation.
+   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonDeserialize
+  static final class Json extends CatalogNode {
+    Node node;
+    Map<String, Service> services;
+    @JsonProperty(value = "Node")
+    public void setNode(Node node) {
+      this.node = node;
+    }
+    @JsonProperty(value = "Services")
+    public void setServices(Map<String, Service> services) {
+      this.services = services;
+    }
+    @Override
+    public Node getNode() { throw new UnsupportedOperationException(); }
+    @Override
+    public Map<String, Service> getServices() { throw new UnsupportedOperationException(); }
+  }
+
+  /**
+   * @param json A JSON-bindable data structure
+   * @return An immutable value type
+   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonCreator
+  static ImmutableCatalogNode fromJson(Json json) {
+    ImmutableCatalogNode.Builder builder = ImmutableCatalogNode.builder();
+    if (json.node != null) {
+      builder.node(json.node);
+    }
+    if (json.services != null) {
+      builder.putAllServices(json.services);
+    }
+    return builder.build();
+  }
+
+  /**
+   * Creates an immutable copy of a {@link CatalogNode} value.
+   * Uses accessors to get values to initialize the new immutable instance.
+   * If an instance is already immutable, it is returned as is.
+   * @param instance The instance to copy
+   * @return A copied immutable CatalogNode instance
+   */
+  public static ImmutableCatalogNode copyOf(CatalogNode instance) {
+    if (instance instanceof ImmutableCatalogNode) {
+      return (ImmutableCatalogNode) instance;
+    }
+    return ImmutableCatalogNode.builder()
+        .from(instance)
+        .build();
+  }
+
+  /**
+   * Creates a builder for {@link ImmutableCatalogNode ImmutableCatalogNode}.
+   * @return A new ImmutableCatalogNode builder
+   */
+  public static ImmutableCatalogNode.Builder builder() {
+    return new ImmutableCatalogNode.Builder();
+  }
+
+  /**
+   * Builds instances of type {@link ImmutableCatalogNode ImmutableCatalogNode}.
+   * Initialize attributes and then invoke the {@link #build()} method to create an
+   * immutable instance.
+   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
+   * but instead used immediately to create instances.</em>
+   */
+  public static final class Builder {
+    private static final long INIT_BIT_NODE = 0x1L;
+    private long initBits = 0x1;
+
+    private Node node;
+    private ImmutableMap.Builder<String, Service> servicesBuilder = ImmutableMap.builder();
+
+    private Builder() {
+    }
+
+    /**
+     * Fill a builder with attribute values from the provided {@code CatalogNode} instance.
+     * Regular attribute values will be replaced with those from the given instance.
+     * Absent optional values will not replace present values.
+     * Collection elements and entries will be added, not replaced.
+     * @param instance The instance from which to copy values
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder from(CatalogNode instance) {
+      Preconditions.checkNotNull(instance, "instance");
+      node(instance.getNode());
+      putAllServices(instance.getServices());
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogNode#getNode() node} attribute.
+     * @param node The value for node 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder node(Node node) {
+      this.node = Preconditions.checkNotNull(node, "node");
+      initBits &= ~INIT_BIT_NODE;
+      return this;
+    }
+
+    /**
+     * Put one entry to the {@link CatalogNode#getServices() services} map.
+     * @param key The key in the services map
+     * @param value The associated value in the services map
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder putServices(String key, Service value) {
+      servicesBuilder.put(key, value);
+      return this;
+    }
+
+    /**
+     * Put one entry to the {@link CatalogNode#getServices() services} map. Nulls are not permitted
+     * @param entry The key and value entry
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder putServices(Map.Entry<String, ? extends Service> entry) {
+      servicesBuilder.put(entry);
+      return this;
+    }
+
+    /**
+     * Sets or replaces all mappings from the specified map as entries for the {@link CatalogNode#getServices() services} map. Nulls are not permitted
+     * @param entries The entries that will be added to the services map
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder services(Map<String, ? extends Service> entries) {
+      servicesBuilder = ImmutableMap.builder();
+      return putAllServices(entries);
+    }
+
+    /**
+     * Put all mappings from the specified map as entries to {@link CatalogNode#getServices() services} map. Nulls are not permitted
+     * @param entries The entries that will be added to the services map
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder putAllServices(Map<String, ? extends Service> entries) {
+      servicesBuilder.putAll(entries);
+      return this;
+    }
+
+    /**
+     * Builds a new {@link ImmutableCatalogNode ImmutableCatalogNode}.
+     * @return An immutable instance of CatalogNode
+     * @throws java.lang.IllegalStateException if any required attributes are missing
+     */
+    public ImmutableCatalogNode build() throws IllegalStateException {
+      if (initBits != 0) {
+        throw new IllegalStateException(formatRequiredAttributesMessage());
+      }
+      return new ImmutableCatalogNode(node, servicesBuilder.build());
+    }
+
+    private String formatRequiredAttributesMessage() {
+      List<String> attributes = Lists.newArrayList();
+      if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");
+      return "Cannot build CatalogNode, some of required attributes are not set " + attributes;
+    }
+  }
+}
index d5c0038..738b094 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.model.catalog;\r
-\r
-import com.fasterxml.jackson.annotation.JsonCreator;\r
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\r
-import com.google.common.base.MoreObjects;\r
-import com.google.common.base.Preconditions;\r
-import com.google.common.collect.ImmutableList;\r
-import com.google.common.collect.Lists;\r
-import java.util.List;\r
-import javax.annotation.Generated;\r
-\r
-/**\r
- * Immutable implementation of {@link CatalogService}.\r
- * <p>\r
- * Use the builder to create immutable instances:\r
- * {@code ImmutableCatalogService.builder()}.\r
- */\r
-@SuppressWarnings("all")\r
-@Generated({"Immutables.generator", "CatalogService"})\r
-@JsonIgnoreProperties(ignoreUnknown = true)\r
-public final class ImmutableCatalogService extends CatalogService {\r
-  private final String node;\r
-  private final String address;\r
-  private final String serviceName;\r
-  private final String serviceId;\r
-  private final String serviceAddress;\r
-  private final int servicePort;\r
-  private final ImmutableList<String> serviceTags;\r
-\r
-  private ImmutableCatalogService(\r
-      String node,\r
-      String address,\r
-      String serviceName,\r
-      String serviceId,\r
-      String serviceAddress,\r
-      int servicePort,\r
-      ImmutableList<String> serviceTags) {\r
-    this.node = node;\r
-    this.address = address;\r
-    this.serviceName = serviceName;\r
-    this.serviceId = serviceId;\r
-    this.serviceAddress = serviceAddress;\r
-    this.servicePort = servicePort;\r
-    this.serviceTags = serviceTags;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code node} attribute\r
-   */\r
-  @JsonProperty(value = "Node")\r
-  @Override\r
-  public String getNode() {\r
-    return node;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code address} attribute\r
-   */\r
-  @JsonProperty(value = "Address")\r
-  @Override\r
-  public String getAddress() {\r
-    return address;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code serviceName} attribute\r
-   */\r
-  @JsonProperty(value = "ServiceName")\r
-  @Override\r
-  public String getServiceName() {\r
-    return serviceName;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code serviceId} attribute\r
-   */\r
-  @JsonProperty(value = "ServiceID")\r
-  @Override\r
-  public String getServiceId() {\r
-    return serviceId;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code serviceAddress} attribute\r
-   */\r
-  @JsonProperty(value = "ServiceAddress")\r
-  @Override\r
-  public String getServiceAddress() {\r
-    return serviceAddress;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code servicePort} attribute\r
-   */\r
-  @JsonProperty(value = "ServicePort")\r
-  @Override\r
-  public int getServicePort() {\r
-    return servicePort;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code serviceTags} attribute\r
-   */\r
-  @JsonProperty(value = "ServiceTags")\r
-  @Override\r
-  public ImmutableList<String> getServiceTags() {\r
-    return serviceTags;\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogService#getNode() node} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for node\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withNode(String value) {\r
-    if (this.node.equals(value)) return this;\r
-    return new ImmutableCatalogService(\r
-        Preconditions.checkNotNull(value, "node"),\r
-        this.address,\r
-        this.serviceName,\r
-        this.serviceId,\r
-        this.serviceAddress,\r
-        this.servicePort,\r
-        this.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogService#getAddress() address} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for address\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withAddress(String value) {\r
-    if (this.address.equals(value)) return this;\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        Preconditions.checkNotNull(value, "address"),\r
-        this.serviceName,\r
-        this.serviceId,\r
-        this.serviceAddress,\r
-        this.servicePort,\r
-        this.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceName() serviceName} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for serviceName\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withServiceName(String value) {\r
-    if (this.serviceName.equals(value)) return this;\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        this.address,\r
-        Preconditions.checkNotNull(value, "serviceName"),\r
-        this.serviceId,\r
-        this.serviceAddress,\r
-        this.servicePort,\r
-        this.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceId() serviceId} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for serviceId\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withServiceId(String value) {\r
-    if (this.serviceId.equals(value)) return this;\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        this.address,\r
-        this.serviceName,\r
-        Preconditions.checkNotNull(value, "serviceId"),\r
-        this.serviceAddress,\r
-        this.servicePort,\r
-        this.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceAddress() serviceAddress} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for serviceAddress\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withServiceAddress(String value) {\r
-    if (this.serviceAddress.equals(value)) return this;\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        this.address,\r
-        this.serviceName,\r
-        this.serviceId,\r
-        Preconditions.checkNotNull(value, "serviceAddress"),\r
-        this.servicePort,\r
-        this.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link CatalogService#getServicePort() servicePort} attribute.\r
-   * A value equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for servicePort\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withServicePort(int value) {\r
-    if (this.servicePort == value) return this;\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        this.address,\r
-        this.serviceName,\r
-        this.serviceId,\r
-        this.serviceAddress,\r
-        value,\r
-        this.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object with elements that replace the content of {@link CatalogService#getServiceTags() serviceTags}.\r
-   * @param elements The elements to set\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withServiceTags(String... elements) {\r
-    ImmutableList<String> newValue = ImmutableList.copyOf(elements);\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        this.address,\r
-        this.serviceName,\r
-        this.serviceId,\r
-        this.serviceAddress,\r
-        this.servicePort,\r
-        newValue);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object with elements that replace the content of {@link CatalogService#getServiceTags() serviceTags}.\r
-   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param elements An iterable of serviceTags elements to set\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogService withServiceTags(Iterable<String> elements) {\r
-    if (this.serviceTags == elements) return this;\r
-    ImmutableList<String> newValue = ImmutableList.copyOf(elements);\r
-    return new ImmutableCatalogService(\r
-        this.node,\r
-        this.address,\r
-        this.serviceName,\r
-        this.serviceId,\r
-        this.serviceAddress,\r
-        this.servicePort,\r
-        newValue);\r
-  }\r
-\r
-  /**\r
-   * This instance is equal to all instances of {@code ImmutableCatalogService} that have equal attribute values.\r
-   * @return {@code true} if {@code this} is equal to {@code another} instance\r
-   */\r
-  @Override\r
-  public boolean equals(Object another) {\r
-    if (this == another) return true;\r
-    return another instanceof ImmutableCatalogService\r
-        && equalTo((ImmutableCatalogService) another);\r
-  }\r
-\r
-  private boolean equalTo(ImmutableCatalogService another) {\r
-    return node.equals(another.node)\r
-        && address.equals(another.address)\r
-        && serviceName.equals(another.serviceName)\r
-        && serviceId.equals(another.serviceId)\r
-        && serviceAddress.equals(another.serviceAddress)\r
-        && servicePort == another.servicePort\r
-        && serviceTags.equals(another.serviceTags);\r
-  }\r
-\r
-  /**\r
-   * Computes a hash code from attributes: {@code node}, {@code address}, {@code serviceName}, {@code serviceId}, {@code serviceAddress}, {@code servicePort}, {@code serviceTags}.\r
-   * @return hashCode value\r
-   */\r
-  @Override\r
-  public int hashCode() {\r
-    int h = 31;\r
-    h = h * 17 + node.hashCode();\r
-    h = h * 17 + address.hashCode();\r
-    h = h * 17 + serviceName.hashCode();\r
-    h = h * 17 + serviceId.hashCode();\r
-    h = h * 17 + serviceAddress.hashCode();\r
-    h = h * 17 + servicePort;\r
-    h = h * 17 + serviceTags.hashCode();\r
-    return h;\r
-  }\r
-\r
-  /**\r
-   * Prints the immutable value {@code CatalogService...} with all non-generated\r
-   * and non-auxiliary attribute values.\r
-   * @return A string representation of the value\r
-   */\r
-  @Override\r
-  public String toString() {\r
-    return MoreObjects.toStringHelper("CatalogService")\r
-        .add("node", node)\r
-        .add("address", address)\r
-        .add("serviceName", serviceName)\r
-        .add("serviceId", serviceId)\r
-        .add("serviceAddress", serviceAddress)\r
-        .add("servicePort", servicePort)\r
-        .add("serviceTags", serviceTags)\r
-        .toString();\r
-  }\r
-\r
-  /**\r
-   * Utility type used to correctly read immutable object from JSON representation.\r
-   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonDeserialize\r
-  static final class Json extends CatalogService {\r
-    String node;\r
-    String address;\r
-    String serviceName;\r
-    String serviceId;\r
-    String serviceAddress;\r
-    Integer servicePort;\r
-    List<String> serviceTags = ImmutableList.of();\r
-    @JsonProperty(value = "Node")\r
-    public void setNode(String node) {\r
-      this.node = node;\r
-    }\r
-    @JsonProperty(value = "Address")\r
-    public void setAddress(String address) {\r
-      this.address = address;\r
-    }\r
-    @JsonProperty(value = "ServiceName")\r
-    public void setServiceName(String serviceName) {\r
-      this.serviceName = serviceName;\r
-    }\r
-    @JsonProperty(value = "ServiceID")\r
-    public void setServiceId(String serviceId) {\r
-      this.serviceId = serviceId;\r
-    }\r
-    @JsonProperty(value = "ServiceAddress")\r
-    public void setServiceAddress(String serviceAddress) {\r
-      this.serviceAddress = serviceAddress;\r
-    }\r
-    @JsonProperty(value = "ServicePort")\r
-    public void setServicePort(int servicePort) {\r
-      this.servicePort = servicePort;\r
-    }\r
-    @JsonProperty(value = "ServiceTags")\r
-    public void setServiceTags(List<String> serviceTags) {\r
-      this.serviceTags = serviceTags;\r
-    }\r
-    @Override\r
-    public String getNode() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getAddress() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getServiceName() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getServiceId() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getServiceAddress() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public int getServicePort() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public List<String> getServiceTags() { throw new UnsupportedOperationException(); }\r
-  }\r
-\r
-  /**\r
-   * @param json A JSON-bindable data structure\r
-   * @return An immutable value type\r
-   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonCreator\r
-  static ImmutableCatalogService fromJson(Json json) {\r
-    ImmutableCatalogService.Builder builder = ImmutableCatalogService.builder();\r
-    if (json.node != null) {\r
-      builder.node(json.node);\r
-    }\r
-    if (json.address != null) {\r
-      builder.address(json.address);\r
-    }\r
-    if (json.serviceName != null) {\r
-      builder.serviceName(json.serviceName);\r
-    }\r
-    if (json.serviceId != null) {\r
-      builder.serviceId(json.serviceId);\r
-    }\r
-    if (json.serviceAddress != null) {\r
-      builder.serviceAddress(json.serviceAddress);\r
-    }\r
-    if (json.servicePort != null) {\r
-      builder.servicePort(json.servicePort);\r
-    }\r
-    if (json.serviceTags != null) {\r
-      builder.addAllServiceTags(json.serviceTags);\r
-    }\r
-    return builder.build();\r
-  }\r
-\r
-  /**\r
-   * Creates an immutable copy of a {@link CatalogService} value.\r
-   * Uses accessors to get values to initialize the new immutable instance.\r
-   * If an instance is already immutable, it is returned as is.\r
-   * @param instance The instance to copy\r
-   * @return A copied immutable CatalogService instance\r
-   */\r
-  public static ImmutableCatalogService copyOf(CatalogService instance) {\r
-    if (instance instanceof ImmutableCatalogService) {\r
-      return (ImmutableCatalogService) instance;\r
-    }\r
-    return ImmutableCatalogService.builder()\r
-        .from(instance)\r
-        .build();\r
-  }\r
-\r
-  /**\r
-   * Creates a builder for {@link ImmutableCatalogService ImmutableCatalogService}.\r
-   * @return A new ImmutableCatalogService builder\r
-   */\r
-  public static ImmutableCatalogService.Builder builder() {\r
-    return new ImmutableCatalogService.Builder();\r
-  }\r
-\r
-  /**\r
-   * Builds instances of type {@link ImmutableCatalogService ImmutableCatalogService}.\r
-   * Initialize attributes and then invoke the {@link #build()} method to create an\r
-   * immutable instance.\r
-   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
-   * but instead used immediately to create instances.</em>\r
-   */\r
-  public static final class Builder {\r
-    private static final long INIT_BIT_NODE = 0x1L;\r
-    private static final long INIT_BIT_ADDRESS = 0x2L;\r
-    private static final long INIT_BIT_SERVICE_NAME = 0x4L;\r
-    private static final long INIT_BIT_SERVICE_ID = 0x8L;\r
-    private static final long INIT_BIT_SERVICE_ADDRESS = 0x10L;\r
-    private static final long INIT_BIT_SERVICE_PORT = 0x20L;\r
-    private long initBits = 0x3f;\r
-\r
-    private String node;\r
-    private String address;\r
-    private String serviceName;\r
-    private String serviceId;\r
-    private String serviceAddress;\r
-    private int servicePort;\r
-    private ImmutableList.Builder<String> serviceTagsBuilder = ImmutableList.builder();\r
-\r
-    private Builder() {\r
-    }\r
-\r
-    /**\r
-     * Fill a builder with attribute values from the provided {@code CatalogService} instance.\r
-     * Regular attribute values will be replaced with those from the given instance.\r
-     * Absent optional values will not replace present values.\r
-     * Collection elements and entries will be added, not replaced.\r
-     * @param instance The instance from which to copy values\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder from(CatalogService instance) {\r
-      Preconditions.checkNotNull(instance, "instance");\r
-      node(instance.getNode());\r
-      address(instance.getAddress());\r
-      serviceName(instance.getServiceName());\r
-      serviceId(instance.getServiceId());\r
-      serviceAddress(instance.getServiceAddress());\r
-      servicePort(instance.getServicePort());\r
-      addAllServiceTags(instance.getServiceTags());\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogService#getNode() node} attribute.\r
-     * @param node The value for node \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder node(String node) {\r
-      this.node = Preconditions.checkNotNull(node, "node");\r
-      initBits &= ~INIT_BIT_NODE;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogService#getAddress() address} attribute.\r
-     * @param address The value for address \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder address(String address) {\r
-      this.address = Preconditions.checkNotNull(address, "address");\r
-      initBits &= ~INIT_BIT_ADDRESS;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogService#getServiceName() serviceName} attribute.\r
-     * @param serviceName The value for serviceName \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder serviceName(String serviceName) {\r
-      this.serviceName = Preconditions.checkNotNull(serviceName, "serviceName");\r
-      initBits &= ~INIT_BIT_SERVICE_NAME;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogService#getServiceId() serviceId} attribute.\r
-     * @param serviceId The value for serviceId \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder serviceId(String serviceId) {\r
-      this.serviceId = Preconditions.checkNotNull(serviceId, "serviceId");\r
-      initBits &= ~INIT_BIT_SERVICE_ID;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogService#getServiceAddress() serviceAddress} attribute.\r
-     * @param serviceAddress The value for serviceAddress \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder serviceAddress(String serviceAddress) {\r
-      this.serviceAddress = Preconditions.checkNotNull(serviceAddress, "serviceAddress");\r
-      initBits &= ~INIT_BIT_SERVICE_ADDRESS;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link CatalogService#getServicePort() servicePort} attribute.\r
-     * @param servicePort The value for servicePort \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder servicePort(int servicePort) {\r
-      this.servicePort = servicePort;\r
-      initBits &= ~INIT_BIT_SERVICE_PORT;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Adds one element to {@link CatalogService#getServiceTags() serviceTags} list.\r
-     * @param element A serviceTags element\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder addServiceTags(String element) {\r
-      serviceTagsBuilder.add(element);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Adds elements to {@link CatalogService#getServiceTags() serviceTags} list.\r
-     * @param elements An array of serviceTags elements\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder addServiceTags(String... elements) {\r
-      serviceTagsBuilder.add(elements);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Sets or replaces all elements for {@link CatalogService#getServiceTags() serviceTags} list.\r
-     * @param elements An iterable of serviceTags elements\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder serviceTags(Iterable<String> elements) {\r
-      serviceTagsBuilder = ImmutableList.builder();\r
-      return addAllServiceTags(elements);\r
-    }\r
-\r
-    /**\r
-     * Adds elements to {@link CatalogService#getServiceTags() serviceTags} list.\r
-     * @param elements An iterable of serviceTags elements\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder addAllServiceTags(Iterable<String> elements) {\r
-      serviceTagsBuilder.addAll(elements);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Builds a new {@link ImmutableCatalogService ImmutableCatalogService}.\r
-     * @return An immutable instance of CatalogService\r
-     * @throws java.lang.IllegalStateException if any required attributes are missing\r
-     */\r
-    public ImmutableCatalogService build() throws IllegalStateException {\r
-      if (initBits != 0) {\r
-        throw new IllegalStateException(formatRequiredAttributesMessage());\r
-      }\r
-      return new ImmutableCatalogService(\r
-          node,\r
-          address,\r
-          serviceName,\r
-          serviceId,\r
-          serviceAddress,\r
-          servicePort,\r
-          serviceTagsBuilder.build());\r
-    }\r
-\r
-    private String formatRequiredAttributesMessage() {\r
-      List<String> attributes = Lists.newArrayList();\r
-      if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");\r
-      if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");\r
-      if ((initBits & INIT_BIT_SERVICE_NAME) != 0) attributes.add("serviceName");\r
-      if ((initBits & INIT_BIT_SERVICE_ID) != 0) attributes.add("serviceId");\r
-      if ((initBits & INIT_BIT_SERVICE_ADDRESS) != 0) attributes.add("serviceAddress");\r
-      if ((initBits & INIT_BIT_SERVICE_PORT) != 0) attributes.add("servicePort");\r
-      return "Cannot build CatalogService, some of required attributes are not set " + attributes;\r
-    }\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.model.catalog;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Immutable implementation of {@link CatalogService}.
+ * <p>
+ * Use the builder to create immutable instances:
+ * {@code ImmutableCatalogService.builder()}.
+ */
+@SuppressWarnings("all")
+@Generated({"Immutables.generator", "CatalogService"})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public final class ImmutableCatalogService extends CatalogService {
+  private final String node;
+  private final String address;
+  private final String serviceName;
+  private final String serviceId;
+  private final String serviceAddress;
+  private final int servicePort;
+  private final ImmutableList<String> serviceTags;
+
+  private ImmutableCatalogService(
+      String node,
+      String address,
+      String serviceName,
+      String serviceId,
+      String serviceAddress,
+      int servicePort,
+      ImmutableList<String> serviceTags) {
+    this.node = node;
+    this.address = address;
+    this.serviceName = serviceName;
+    this.serviceId = serviceId;
+    this.serviceAddress = serviceAddress;
+    this.servicePort = servicePort;
+    this.serviceTags = serviceTags;
+  }
+
+  /**
+   * @return The value of the {@code node} attribute
+   */
+  @JsonProperty(value = "Node")
+  @Override
+  public String getNode() {
+    return node;
+  }
+
+  /**
+   * @return The value of the {@code address} attribute
+   */
+  @JsonProperty(value = "Address")
+  @Override
+  public String getAddress() {
+    return address;
+  }
+
+  /**
+   * @return The value of the {@code serviceName} attribute
+   */
+  @JsonProperty(value = "ServiceName")
+  @Override
+  public String getServiceName() {
+    return serviceName;
+  }
+
+  /**
+   * @return The value of the {@code serviceId} attribute
+   */
+  @JsonProperty(value = "ServiceID")
+  @Override
+  public String getServiceId() {
+    return serviceId;
+  }
+
+  /**
+   * @return The value of the {@code serviceAddress} attribute
+   */
+  @JsonProperty(value = "ServiceAddress")
+  @Override
+  public String getServiceAddress() {
+    return serviceAddress;
+  }
+
+  /**
+   * @return The value of the {@code servicePort} attribute
+   */
+  @JsonProperty(value = "ServicePort")
+  @Override
+  public int getServicePort() {
+    return servicePort;
+  }
+
+  /**
+   * @return The value of the {@code serviceTags} attribute
+   */
+  @JsonProperty(value = "ServiceTags")
+  @Override
+  public ImmutableList<String> getServiceTags() {
+    return serviceTags;
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogService#getNode() node} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for node
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogService withNode(String value) {
+    if (this.node.equals(value)) return this;
+    return new ImmutableCatalogService(
+        Preconditions.checkNotNull(value, "node"),
+        this.address,
+        this.serviceName,
+        this.serviceId,
+        this.serviceAddress,
+        this.servicePort,
+        this.serviceTags);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogService#getAddress() address} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for address
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogService withAddress(String value) {
+    if (this.address.equals(value)) return this;
+    return new ImmutableCatalogService(
+        this.node,
+        Preconditions.checkNotNull(value, "address"),
+        this.serviceName,
+        this.serviceId,
+        this.serviceAddress,
+        this.servicePort,
+        this.serviceTags);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceName() serviceName} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for serviceName
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogService withServiceName(String value) {
+    if (this.serviceName.equals(value)) return this;
+    return new ImmutableCatalogService(
+        this.node,
+        this.address,
+        Preconditions.checkNotNull(value, "serviceName"),
+        this.serviceId,
+        this.serviceAddress,
+        this.servicePort,
+        this.serviceTags);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceId() serviceId} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for serviceId
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogService withServiceId(String value) {
+    if (this.serviceId.equals(value)) return this;
+    return new ImmutableCatalogService(
+        this.node,
+        this.address,
+        this.serviceName,
+        Preconditions.checkNotNull(value, "serviceId"),
+        this.serviceAddress,
+        this.servicePort,
+        this.serviceTags);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceAddress() serviceAddress} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for serviceAddress
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogService withServiceAddress(String value) {
+    if (this.serviceAddress.equals(value)) return this;
+    return new ImmutableCatalogService(
+        this.node,
+        this.address,
+        this.serviceName,
+        this.serviceId,
+        Preconditions.checkNotNull(value, "serviceAddress"),
+        this.servicePort,
+        this.serviceTags);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link CatalogService#getServicePort() servicePort} attribute.
+   * A value equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for servicePort
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableCatalogService withServicePort(int value) {
+    if (this.servicePort == value) return this;
+    return new ImmutableCatalogService(
+        this.node,
+        this.address,
+        this.serviceName,
+        this.serviceId,
+        this.serviceAddress,
+        value,
+        this.serviceTags);
+  }
+
+  /**
+   * Copy the current immutable object with elements that replace the content of {@link CatalogService#getServiceTags() serviceTags}.
+   * @param elements The elements to set
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogService withServiceTags(String... elements) {
+    ImmutableList<String> newValue = ImmutableList.copyOf(elements);
+    return new ImmutableCatalogService(
+        this.node,
+        this.address,
+        this.serviceName,
+        this.serviceId,
+        this.serviceAddress,
+        this.servicePort,
+        newValue);
+  }
+
+  /**
+   * Copy the current immutable object with elements that replace the content of {@link CatalogService#getServiceTags() serviceTags}.
+   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param elements An iterable of serviceTags elements to set
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogService withServiceTags(Iterable<String> elements) {
+    if (this.serviceTags == elements) return this;
+    ImmutableList<String> newValue = ImmutableList.copyOf(elements);
+    return new ImmutableCatalogService(
+        this.node,
+        this.address,
+        this.serviceName,
+        this.serviceId,
+        this.serviceAddress,
+        this.servicePort,
+        newValue);
+  }
+
+  /**
+   * This instance is equal to all instances of {@code ImmutableCatalogService} that have equal attribute values.
+   * @return {@code true} if {@code this} is equal to {@code another} instance
+   */
+  @Override
+  public boolean equals(Object another) {
+    if (this == another) return true;
+    return another instanceof ImmutableCatalogService
+        && equalTo((ImmutableCatalogService) another);
+  }
+
+  private boolean equalTo(ImmutableCatalogService another) {
+    return node.equals(another.node)
+        && address.equals(another.address)
+        && serviceName.equals(another.serviceName)
+        && serviceId.equals(another.serviceId)
+        && serviceAddress.equals(another.serviceAddress)
+        && servicePort == another.servicePort
+        && serviceTags.equals(another.serviceTags);
+  }
+
+  /**
+   * Computes a hash code from attributes: {@code node}, {@code address}, {@code serviceName}, {@code serviceId}, {@code serviceAddress}, {@code servicePort}, {@code serviceTags}.
+   * @return hashCode value
+   */
+  @Override
+  public int hashCode() {
+    int h = 31;
+    h = h * 17 + node.hashCode();
+    h = h * 17 + address.hashCode();
+    h = h * 17 + serviceName.hashCode();
+    h = h * 17 + serviceId.hashCode();
+    h = h * 17 + serviceAddress.hashCode();
+    h = h * 17 + servicePort;
+    h = h * 17 + serviceTags.hashCode();
+    return h;
+  }
+
+  /**
+   * Prints the immutable value {@code CatalogService...} with all non-generated
+   * and non-auxiliary attribute values.
+   * @return A string representation of the value
+   */
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper("CatalogService")
+        .add("node", node)
+        .add("address", address)
+        .add("serviceName", serviceName)
+        .add("serviceId", serviceId)
+        .add("serviceAddress", serviceAddress)
+        .add("servicePort", servicePort)
+        .add("serviceTags", serviceTags)
+        .toString();
+  }
+
+  /**
+   * Utility type used to correctly read immutable object from JSON representation.
+   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonDeserialize
+  static final class Json extends CatalogService {
+    String node;
+    String address;
+    String serviceName;
+    String serviceId;
+    String serviceAddress;
+    Integer servicePort;
+    List<String> serviceTags = ImmutableList.of();
+    @JsonProperty(value = "Node")
+    public void setNode(String node) {
+      this.node = node;
+    }
+    @JsonProperty(value = "Address")
+    public void setAddress(String address) {
+      this.address = address;
+    }
+    @JsonProperty(value = "ServiceName")
+    public void setServiceName(String serviceName) {
+      this.serviceName = serviceName;
+    }
+    @JsonProperty(value = "ServiceID")
+    public void setServiceId(String serviceId) {
+      this.serviceId = serviceId;
+    }
+    @JsonProperty(value = "ServiceAddress")
+    public void setServiceAddress(String serviceAddress) {
+      this.serviceAddress = serviceAddress;
+    }
+    @JsonProperty(value = "ServicePort")
+    public void setServicePort(int servicePort) {
+      this.servicePort = servicePort;
+    }
+    @JsonProperty(value = "ServiceTags")
+    public void setServiceTags(List<String> serviceTags) {
+      this.serviceTags = serviceTags;
+    }
+    @Override
+    public String getNode() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getAddress() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getServiceName() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getServiceId() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getServiceAddress() { throw new UnsupportedOperationException(); }
+    @Override
+    public int getServicePort() { throw new UnsupportedOperationException(); }
+    @Override
+    public List<String> getServiceTags() { throw new UnsupportedOperationException(); }
+  }
+
+  /**
+   * @param json A JSON-bindable data structure
+   * @return An immutable value type
+   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonCreator
+  static ImmutableCatalogService fromJson(Json json) {
+    ImmutableCatalogService.Builder builder = ImmutableCatalogService.builder();
+    if (json.node != null) {
+      builder.node(json.node);
+    }
+    if (json.address != null) {
+      builder.address(json.address);
+    }
+    if (json.serviceName != null) {
+      builder.serviceName(json.serviceName);
+    }
+    if (json.serviceId != null) {
+      builder.serviceId(json.serviceId);
+    }
+    if (json.serviceAddress != null) {
+      builder.serviceAddress(json.serviceAddress);
+    }
+    if (json.servicePort != null) {
+      builder.servicePort(json.servicePort);
+    }
+    if (json.serviceTags != null) {
+      builder.addAllServiceTags(json.serviceTags);
+    }
+    return builder.build();
+  }
+
+  /**
+   * Creates an immutable copy of a {@link CatalogService} value.
+   * Uses accessors to get values to initialize the new immutable instance.
+   * If an instance is already immutable, it is returned as is.
+   * @param instance The instance to copy
+   * @return A copied immutable CatalogService instance
+   */
+  public static ImmutableCatalogService copyOf(CatalogService instance) {
+    if (instance instanceof ImmutableCatalogService) {
+      return (ImmutableCatalogService) instance;
+    }
+    return ImmutableCatalogService.builder()
+        .from(instance)
+        .build();
+  }
+
+  /**
+   * Creates a builder for {@link ImmutableCatalogService ImmutableCatalogService}.
+   * @return A new ImmutableCatalogService builder
+   */
+  public static ImmutableCatalogService.Builder builder() {
+    return new ImmutableCatalogService.Builder();
+  }
+
+  /**
+   * Builds instances of type {@link ImmutableCatalogService ImmutableCatalogService}.
+   * Initialize attributes and then invoke the {@link #build()} method to create an
+   * immutable instance.
+   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
+   * but instead used immediately to create instances.</em>
+   */
+  public static final class Builder {
+    private static final long INIT_BIT_NODE = 0x1L;
+    private static final long INIT_BIT_ADDRESS = 0x2L;
+    private static final long INIT_BIT_SERVICE_NAME = 0x4L;
+    private static final long INIT_BIT_SERVICE_ID = 0x8L;
+    private static final long INIT_BIT_SERVICE_ADDRESS = 0x10L;
+    private static final long INIT_BIT_SERVICE_PORT = 0x20L;
+    private long initBits = 0x3f;
+
+    private String node;
+    private String address;
+    private String serviceName;
+    private String serviceId;
+    private String serviceAddress;
+    private int servicePort;
+    private ImmutableList.Builder<String> serviceTagsBuilder = ImmutableList.builder();
+
+    private Builder() {
+    }
+
+    /**
+     * Fill a builder with attribute values from the provided {@code CatalogService} instance.
+     * Regular attribute values will be replaced with those from the given instance.
+     * Absent optional values will not replace present values.
+     * Collection elements and entries will be added, not replaced.
+     * @param instance The instance from which to copy values
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder from(CatalogService instance) {
+      Preconditions.checkNotNull(instance, "instance");
+      node(instance.getNode());
+      address(instance.getAddress());
+      serviceName(instance.getServiceName());
+      serviceId(instance.getServiceId());
+      serviceAddress(instance.getServiceAddress());
+      servicePort(instance.getServicePort());
+      addAllServiceTags(instance.getServiceTags());
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogService#getNode() node} attribute.
+     * @param node The value for node 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder node(String node) {
+      this.node = Preconditions.checkNotNull(node, "node");
+      initBits &= ~INIT_BIT_NODE;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogService#getAddress() address} attribute.
+     * @param address The value for address 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder address(String address) {
+      this.address = Preconditions.checkNotNull(address, "address");
+      initBits &= ~INIT_BIT_ADDRESS;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogService#getServiceName() serviceName} attribute.
+     * @param serviceName The value for serviceName 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder serviceName(String serviceName) {
+      this.serviceName = Preconditions.checkNotNull(serviceName, "serviceName");
+      initBits &= ~INIT_BIT_SERVICE_NAME;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogService#getServiceId() serviceId} attribute.
+     * @param serviceId The value for serviceId 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder serviceId(String serviceId) {
+      this.serviceId = Preconditions.checkNotNull(serviceId, "serviceId");
+      initBits &= ~INIT_BIT_SERVICE_ID;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogService#getServiceAddress() serviceAddress} attribute.
+     * @param serviceAddress The value for serviceAddress 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder serviceAddress(String serviceAddress) {
+      this.serviceAddress = Preconditions.checkNotNull(serviceAddress, "serviceAddress");
+      initBits &= ~INIT_BIT_SERVICE_ADDRESS;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link CatalogService#getServicePort() servicePort} attribute.
+     * @param servicePort The value for servicePort 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder servicePort(int servicePort) {
+      this.servicePort = servicePort;
+      initBits &= ~INIT_BIT_SERVICE_PORT;
+      return this;
+    }
+
+    /**
+     * Adds one element to {@link CatalogService#getServiceTags() serviceTags} list.
+     * @param element A serviceTags element
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder addServiceTags(String element) {
+      serviceTagsBuilder.add(element);
+      return this;
+    }
+
+    /**
+     * Adds elements to {@link CatalogService#getServiceTags() serviceTags} list.
+     * @param elements An array of serviceTags elements
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder addServiceTags(String... elements) {
+      serviceTagsBuilder.add(elements);
+      return this;
+    }
+
+    /**
+     * Sets or replaces all elements for {@link CatalogService#getServiceTags() serviceTags} list.
+     * @param elements An iterable of serviceTags elements
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder serviceTags(Iterable<String> elements) {
+      serviceTagsBuilder = ImmutableList.builder();
+      return addAllServiceTags(elements);
+    }
+
+    /**
+     * Adds elements to {@link CatalogService#getServiceTags() serviceTags} list.
+     * @param elements An iterable of serviceTags elements
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder addAllServiceTags(Iterable<String> elements) {
+      serviceTagsBuilder.addAll(elements);
+      return this;
+    }
+
+    /**
+     * Builds a new {@link ImmutableCatalogService ImmutableCatalogService}.
+     * @return An immutable instance of CatalogService
+     * @throws java.lang.IllegalStateException if any required attributes are missing
+     */
+    public ImmutableCatalogService build() throws IllegalStateException {
+      if (initBits != 0) {
+        throw new IllegalStateException(formatRequiredAttributesMessage());
+      }
+      return new ImmutableCatalogService(
+          node,
+          address,
+          serviceName,
+          serviceId,
+          serviceAddress,
+          servicePort,
+          serviceTagsBuilder.build());
+    }
+
+    private String formatRequiredAttributesMessage() {
+      List<String> attributes = Lists.newArrayList();
+      if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");
+      if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");
+      if ((initBits & INIT_BIT_SERVICE_NAME) != 0) attributes.add("serviceName");
+      if ((initBits & INIT_BIT_SERVICE_ID) != 0) attributes.add("serviceId");
+      if ((initBits & INIT_BIT_SERVICE_ADDRESS) != 0) attributes.add("serviceAddress");
+      if ((initBits & INIT_BIT_SERVICE_PORT) != 0) attributes.add("servicePort");
+      return "Cannot build CatalogService, some of required attributes are not set " + attributes;
+    }
+  }
+}
index 86f1d4c..285b997 100644 (file)
@@ -1,63 +1,62 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.model.catalog;\r
-\r
-import com.google.common.base.Objects;\r
-\r
-public class ServiceInfo {\r
-\r
-    private   String serviceName;\r
-    \r
-    private   String version="";\r
-\r
-    public String getServiceName() {\r
-        return serviceName;\r
-    }\r
-\r
-    public void setServiceName(String serviceName) {\r
-        this.serviceName = serviceName;\r
-    }\r
-\r
-    public String getVersion() {\r
-        return version;\r
-    }\r
-\r
-    public void setVersion(String version) {\r
-        this.version = version;\r
-    }\r
-    \r
-    @Override\r
-    public boolean equals(Object other)\r
-    {\r
-        if(this == other)\r
-            return true;\r
-        if(other instanceof ServiceInfo)\r
-        {\r
-            ServiceInfo that = (ServiceInfo)other;\r
-            return Objects.equal(serviceName, that.serviceName) && Objects.equal(version, that.version);\r
-        } else\r
-        {\r
-            return false;\r
-        }\r
-    }\r
-    \r
-    @Override\r
-    public int hashCode() {\r
-        return Objects.hashCode(serviceName, version);\r
-    }\r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.model.catalog;
+
+import com.google.common.base.Objects;
+
+public class ServiceInfo {
+
+    private   String serviceName;
+    
+    private   String version="";
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+    
+    @Override
+    public boolean equals(Object other)
+    {
+        if(this == other)
+            return true;
+        if(other instanceof ServiceInfo)
+        {
+            ServiceInfo that = (ServiceInfo)other;
+            return Objects.equal(serviceName, that.serviceName) && Objects.equal(version, that.version);
+        } else
+        {
+            return false;
+        }
+    }
+    
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(serviceName, version);
+    }
+    
+}
index 509bde5..56d2cb1 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.model.health;\r
-\r
-import com.fasterxml.jackson.annotation.JsonCreator;\r
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\r
-import com.google.common.base.MoreObjects;\r
-import com.google.common.base.Preconditions;\r
-import com.google.common.collect.Lists;\r
-import java.util.List;\r
-import javax.annotation.Generated;\r
-\r
-/**\r
- * Immutable implementation of {@link Node}.\r
- * <p>\r
- * Use the builder to create immutable instances:\r
- * {@code ImmutableNode.builder()}.\r
- */\r
-@SuppressWarnings("all")\r
-@Generated({"Immutables.generator", "Node"})\r
-@JsonIgnoreProperties(ignoreUnknown = true)\r
-public final class ImmutableNode extends Node {\r
-  private final String node;\r
-  private final String address;\r
-\r
-  private ImmutableNode(String node, String address) {\r
-    this.node = node;\r
-    this.address = address;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code node} attribute\r
-   */\r
-  @JsonProperty(value = "Node")\r
-  @Override\r
-  public String getNode() {\r
-    return node;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code address} attribute\r
-   */\r
-  @JsonProperty(value = "Address")\r
-  @Override\r
-  public String getAddress() {\r
-    return address;\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link Node#getNode() node} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for node\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableNode withNode(String value) {\r
-    if (this.node.equals(value)) return this;\r
-    return new ImmutableNode(Preconditions.checkNotNull(value, "node"), this.address);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link Node#getAddress() address} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for address\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableNode withAddress(String value) {\r
-    if (this.address.equals(value)) return this;\r
-    return new ImmutableNode(this.node, Preconditions.checkNotNull(value, "address"));\r
-  }\r
-\r
-  /**\r
-   * This instance is equal to all instances of {@code ImmutableNode} that have equal attribute values.\r
-   * @return {@code true} if {@code this} is equal to {@code another} instance\r
-   */\r
-  @Override\r
-  public boolean equals(Object another) {\r
-    if (this == another) return true;\r
-    return another instanceof ImmutableNode\r
-        && equalTo((ImmutableNode) another);\r
-  }\r
-\r
-  private boolean equalTo(ImmutableNode another) {\r
-    return node.equals(another.node)\r
-        && address.equals(another.address);\r
-  }\r
-\r
-  /**\r
-   * Computes a hash code from attributes: {@code node}, {@code address}.\r
-   * @return hashCode value\r
-   */\r
-  @Override\r
-  public int hashCode() {\r
-    int h = 31;\r
-    h = h * 17 + node.hashCode();\r
-    h = h * 17 + address.hashCode();\r
-    return h;\r
-  }\r
-\r
-  /**\r
-   * Prints the immutable value {@code Node...} with all non-generated\r
-   * and non-auxiliary attribute values.\r
-   * @return A string representation of the value\r
-   */\r
-  @Override\r
-  public String toString() {\r
-    return MoreObjects.toStringHelper("Node")\r
-        .add("node", node)\r
-        .add("address", address)\r
-        .toString();\r
-  }\r
-\r
-  /**\r
-   * Utility type used to correctly read immutable object from JSON representation.\r
-   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonDeserialize\r
-  static final class Json extends Node {\r
-    String node;\r
-    String address;\r
-    @JsonProperty(value = "Node")\r
-    public void setNode(String node) {\r
-      this.node = node;\r
-    }\r
-    @JsonProperty(value = "Address")\r
-    public void setAddress(String address) {\r
-      this.address = address;\r
-    }\r
-    @Override\r
-    public String getNode() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getAddress() { throw new UnsupportedOperationException(); }\r
-  }\r
-\r
-  /**\r
-   * @param json A JSON-bindable data structure\r
-   * @return An immutable value type\r
-   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonCreator\r
-  static ImmutableNode fromJson(Json json) {\r
-    ImmutableNode.Builder builder = ImmutableNode.builder();\r
-    if (json.node != null) {\r
-      builder.node(json.node);\r
-    }\r
-    if (json.address != null) {\r
-      builder.address(json.address);\r
-    }\r
-    return builder.build();\r
-  }\r
-\r
-  /**\r
-   * Creates an immutable copy of a {@link Node} value.\r
-   * Uses accessors to get values to initialize the new immutable instance.\r
-   * If an instance is already immutable, it is returned as is.\r
-   * @param instance The instance to copy\r
-   * @return A copied immutable Node instance\r
-   */\r
-  public static ImmutableNode copyOf(Node instance) {\r
-    if (instance instanceof ImmutableNode) {\r
-      return (ImmutableNode) instance;\r
-    }\r
-    return ImmutableNode.builder()\r
-        .from(instance)\r
-        .build();\r
-  }\r
-\r
-  /**\r
-   * Creates a builder for {@link ImmutableNode ImmutableNode}.\r
-   * @return A new ImmutableNode builder\r
-   */\r
-  public static ImmutableNode.Builder builder() {\r
-    return new ImmutableNode.Builder();\r
-  }\r
-\r
-  /**\r
-   * Builds instances of type {@link ImmutableNode ImmutableNode}.\r
-   * Initialize attributes and then invoke the {@link #build()} method to create an\r
-   * immutable instance.\r
-   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
-   * but instead used immediately to create instances.</em>\r
-   */\r
-  public static final class Builder {\r
-    private static final long INIT_BIT_NODE = 0x1L;\r
-    private static final long INIT_BIT_ADDRESS = 0x2L;\r
-    private long initBits = 0x3;\r
-\r
-    private String node;\r
-    private String address;\r
-\r
-    private Builder() {\r
-    }\r
-\r
-    /**\r
-     * Fill a builder with attribute values from the provided {@code Node} instance.\r
-     * Regular attribute values will be replaced with those from the given instance.\r
-     * Absent optional values will not replace present values.\r
-     * @param instance The instance from which to copy values\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder from(Node instance) {\r
-      Preconditions.checkNotNull(instance, "instance");\r
-      node(instance.getNode());\r
-      address(instance.getAddress());\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link Node#getNode() node} attribute.\r
-     * @param node The value for node \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder node(String node) {\r
-      this.node = Preconditions.checkNotNull(node, "node");\r
-      initBits &= ~INIT_BIT_NODE;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link Node#getAddress() address} attribute.\r
-     * @param address The value for address \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder address(String address) {\r
-      this.address = Preconditions.checkNotNull(address, "address");\r
-      initBits &= ~INIT_BIT_ADDRESS;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Builds a new {@link ImmutableNode ImmutableNode}.\r
-     * @return An immutable instance of Node\r
-     * @throws java.lang.IllegalStateException if any required attributes are missing\r
-     */\r
-    public ImmutableNode build() throws IllegalStateException {\r
-      if (initBits != 0) {\r
-        throw new IllegalStateException(formatRequiredAttributesMessage());\r
-      }\r
-      return new ImmutableNode(node, address);\r
-    }\r
-\r
-    private String formatRequiredAttributesMessage() {\r
-      List<String> attributes = Lists.newArrayList();\r
-      if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");\r
-      if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");\r
-      return "Cannot build Node, some of required attributes are not set " + attributes;\r
-    }\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.model.health;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Immutable implementation of {@link Node}.
+ * <p>
+ * Use the builder to create immutable instances:
+ * {@code ImmutableNode.builder()}.
+ */
+@SuppressWarnings("all")
+@Generated({"Immutables.generator", "Node"})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public final class ImmutableNode extends Node {
+  private final String node;
+  private final String address;
+
+  private ImmutableNode(String node, String address) {
+    this.node = node;
+    this.address = address;
+  }
+
+  /**
+   * @return The value of the {@code node} attribute
+   */
+  @JsonProperty(value = "Node")
+  @Override
+  public String getNode() {
+    return node;
+  }
+
+  /**
+   * @return The value of the {@code address} attribute
+   */
+  @JsonProperty(value = "Address")
+  @Override
+  public String getAddress() {
+    return address;
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link Node#getNode() node} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for node
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableNode withNode(String value) {
+    if (this.node.equals(value)) return this;
+    return new ImmutableNode(Preconditions.checkNotNull(value, "node"), this.address);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link Node#getAddress() address} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for address
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableNode withAddress(String value) {
+    if (this.address.equals(value)) return this;
+    return new ImmutableNode(this.node, Preconditions.checkNotNull(value, "address"));
+  }
+
+  /**
+   * This instance is equal to all instances of {@code ImmutableNode} that have equal attribute values.
+   * @return {@code true} if {@code this} is equal to {@code another} instance
+   */
+  @Override
+  public boolean equals(Object another) {
+    if (this == another) return true;
+    return another instanceof ImmutableNode
+        && equalTo((ImmutableNode) another);
+  }
+
+  private boolean equalTo(ImmutableNode another) {
+    return node.equals(another.node)
+        && address.equals(another.address);
+  }
+
+  /**
+   * Computes a hash code from attributes: {@code node}, {@code address}.
+   * @return hashCode value
+   */
+  @Override
+  public int hashCode() {
+    int h = 31;
+    h = h * 17 + node.hashCode();
+    h = h * 17 + address.hashCode();
+    return h;
+  }
+
+  /**
+   * Prints the immutable value {@code Node...} with all non-generated
+   * and non-auxiliary attribute values.
+   * @return A string representation of the value
+   */
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper("Node")
+        .add("node", node)
+        .add("address", address)
+        .toString();
+  }
+
+  /**
+   * Utility type used to correctly read immutable object from JSON representation.
+   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonDeserialize
+  static final class Json extends Node {
+    String node;
+    String address;
+    @JsonProperty(value = "Node")
+    public void setNode(String node) {
+      this.node = node;
+    }
+    @JsonProperty(value = "Address")
+    public void setAddress(String address) {
+      this.address = address;
+    }
+    @Override
+    public String getNode() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getAddress() { throw new UnsupportedOperationException(); }
+  }
+
+  /**
+   * @param json A JSON-bindable data structure
+   * @return An immutable value type
+   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonCreator
+  static ImmutableNode fromJson(Json json) {
+    ImmutableNode.Builder builder = ImmutableNode.builder();
+    if (json.node != null) {
+      builder.node(json.node);
+    }
+    if (json.address != null) {
+      builder.address(json.address);
+    }
+    return builder.build();
+  }
+
+  /**
+   * Creates an immutable copy of a {@link Node} value.
+   * Uses accessors to get values to initialize the new immutable instance.
+   * If an instance is already immutable, it is returned as is.
+   * @param instance The instance to copy
+   * @return A copied immutable Node instance
+   */
+  public static ImmutableNode copyOf(Node instance) {
+    if (instance instanceof ImmutableNode) {
+      return (ImmutableNode) instance;
+    }
+    return ImmutableNode.builder()
+        .from(instance)
+        .build();
+  }
+
+  /**
+   * Creates a builder for {@link ImmutableNode ImmutableNode}.
+   * @return A new ImmutableNode builder
+   */
+  public static ImmutableNode.Builder builder() {
+    return new ImmutableNode.Builder();
+  }
+
+  /**
+   * Builds instances of type {@link ImmutableNode ImmutableNode}.
+   * Initialize attributes and then invoke the {@link #build()} method to create an
+   * immutable instance.
+   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
+   * but instead used immediately to create instances.</em>
+   */
+  public static final class Builder {
+    private static final long INIT_BIT_NODE = 0x1L;
+    private static final long INIT_BIT_ADDRESS = 0x2L;
+    private long initBits = 0x3;
+
+    private String node;
+    private String address;
+
+    private Builder() {
+    }
+
+    /**
+     * Fill a builder with attribute values from the provided {@code Node} instance.
+     * Regular attribute values will be replaced with those from the given instance.
+     * Absent optional values will not replace present values.
+     * @param instance The instance from which to copy values
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder from(Node instance) {
+      Preconditions.checkNotNull(instance, "instance");
+      node(instance.getNode());
+      address(instance.getAddress());
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link Node#getNode() node} attribute.
+     * @param node The value for node 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder node(String node) {
+      this.node = Preconditions.checkNotNull(node, "node");
+      initBits &= ~INIT_BIT_NODE;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link Node#getAddress() address} attribute.
+     * @param address The value for address 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder address(String address) {
+      this.address = Preconditions.checkNotNull(address, "address");
+      initBits &= ~INIT_BIT_ADDRESS;
+      return this;
+    }
+
+    /**
+     * Builds a new {@link ImmutableNode ImmutableNode}.
+     * @return An immutable instance of Node
+     * @throws java.lang.IllegalStateException if any required attributes are missing
+     */
+    public ImmutableNode build() throws IllegalStateException {
+      if (initBits != 0) {
+        throw new IllegalStateException(formatRequiredAttributesMessage());
+      }
+      return new ImmutableNode(node, address);
+    }
+
+    private String formatRequiredAttributesMessage() {
+      List<String> attributes = Lists.newArrayList();
+      if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");
+      if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");
+      return "Cannot build Node, some of required attributes are not set " + attributes;
+    }
+  }
+}
index 6d4717d..f350510 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.model.health;\r
-\r
-import com.fasterxml.jackson.annotation.JsonCreator;\r
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\r
-import com.google.common.base.MoreObjects;\r
-import com.google.common.base.Preconditions;\r
-import com.google.common.collect.ImmutableList;\r
-import com.google.common.collect.Lists;\r
-import java.util.List;\r
-import javax.annotation.Generated;\r
-\r
-/**\r
- * Immutable implementation of {@link Service}.\r
- * <p>\r
- * Use the builder to create immutable instances:\r
- * {@code ImmutableService.builder()}.\r
- */\r
-@SuppressWarnings("all")\r
-@Generated({"Immutables.generator", "Service"})\r
-@JsonIgnoreProperties(ignoreUnknown = true)\r
-public final class ImmutableService extends Service {\r
-  private final String id;\r
-  private final String service;\r
-  private final ImmutableList<String> tags;\r
-  private final String address;\r
-  private final int port;\r
-\r
-  private ImmutableService(\r
-      String id,\r
-      String service,\r
-      ImmutableList<String> tags,\r
-      String address,\r
-      int port) {\r
-    this.id = id;\r
-    this.service = service;\r
-    this.tags = tags;\r
-    this.address = address;\r
-    this.port = port;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code id} attribute\r
-   */\r
-  @JsonProperty(value = "ID")\r
-  @Override\r
-  public String getId() {\r
-    return id;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code service} attribute\r
-   */\r
-  @JsonProperty(value = "Service")\r
-  @Override\r
-  public String getService() {\r
-    return service;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code tags} attribute\r
-   */\r
-  @JsonProperty(value = "Tags")\r
-  @JsonDeserialize(as = ImmutableList.class, contentAs = String.class)\r
-  @Override\r
-  public ImmutableList<String> getTags() {\r
-    return tags;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code address} attribute\r
-   */\r
-  @JsonProperty(value = "Address")\r
-  @Override\r
-  public String getAddress() {\r
-    return address;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code port} attribute\r
-   */\r
-  @JsonProperty(value = "Port")\r
-  @Override\r
-  public int getPort() {\r
-    return port;\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link Service#getId() id} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for id\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableService withId(String value) {\r
-    if (this.id.equals(value)) return this;\r
-    return new ImmutableService(\r
-        Preconditions.checkNotNull(value, "id"),\r
-        this.service,\r
-        this.tags,\r
-        this.address,\r
-        this.port);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link Service#getService() service} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for service\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableService withService(String value) {\r
-    if (this.service.equals(value)) return this;\r
-    return new ImmutableService(\r
-        this.id,\r
-        Preconditions.checkNotNull(value, "service"),\r
-        this.tags,\r
-        this.address,\r
-        this.port);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object with elements that replace the content of {@link Service#getTags() tags}.\r
-   * @param elements The elements to set\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableService withTags(String... elements) {\r
-    ImmutableList<String> newValue = ImmutableList.copyOf(elements);\r
-    return new ImmutableService(this.id, this.service, newValue, this.address, this.port);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object with elements that replace the content of {@link Service#getTags() tags}.\r
-   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param elements An iterable of tags elements to set\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableService withTags(Iterable<String> elements) {\r
-    if (this.tags == elements) return this;\r
-    ImmutableList<String> newValue = ImmutableList.copyOf(elements);\r
-    return new ImmutableService(this.id, this.service, newValue, this.address, this.port);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link Service#getAddress() address} attribute.\r
-   * An equals check used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for address\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableService withAddress(String value) {\r
-    if (this.address.equals(value)) return this;\r
-    return new ImmutableService(\r
-        this.id,\r
-        this.service,\r
-        this.tags,\r
-        Preconditions.checkNotNull(value, "address"),\r
-        this.port);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link Service#getPort() port} attribute.\r
-   * A value equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for port\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableService withPort(int value) {\r
-    if (this.port == value) return this;\r
-    return new ImmutableService(this.id, this.service, this.tags, this.address, value);\r
-  }\r
-\r
-  /**\r
-   * This instance is equal to all instances of {@code ImmutableService} that have equal attribute values.\r
-   * @return {@code true} if {@code this} is equal to {@code another} instance\r
-   */\r
-  @Override\r
-  public boolean equals(Object another) {\r
-    if (this == another) return true;\r
-    return another instanceof ImmutableService\r
-        && equalTo((ImmutableService) another);\r
-  }\r
-\r
-  private boolean equalTo(ImmutableService another) {\r
-    return id.equals(another.id)\r
-        && service.equals(another.service)\r
-        && tags.equals(another.tags)\r
-        && address.equals(another.address)\r
-        && port == another.port;\r
-  }\r
-\r
-  /**\r
-   * Computes a hash code from attributes: {@code id}, {@code service}, {@code tags}, {@code address}, {@code port}.\r
-   * @return hashCode value\r
-   */\r
-  @Override\r
-  public int hashCode() {\r
-    int h = 31;\r
-    h = h * 17 + id.hashCode();\r
-    h = h * 17 + service.hashCode();\r
-    h = h * 17 + tags.hashCode();\r
-    h = h * 17 + address.hashCode();\r
-    h = h * 17 + port;\r
-    return h;\r
-  }\r
-\r
-  /**\r
-   * Prints the immutable value {@code Service...} with all non-generated\r
-   * and non-auxiliary attribute values.\r
-   * @return A string representation of the value\r
-   */\r
-  @Override\r
-  public String toString() {\r
-    return MoreObjects.toStringHelper("Service")\r
-        .add("id", id)\r
-        .add("service", service)\r
-        .add("tags", tags)\r
-        .add("address", address)\r
-        .add("port", port)\r
-        .toString();\r
-  }\r
-\r
-  /**\r
-   * Utility type used to correctly read immutable object from JSON representation.\r
-   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonDeserialize\r
-  static final class Json extends Service {\r
-    String id;\r
-    String service;\r
-    List<String> tags = ImmutableList.of();\r
-    String address;\r
-    Integer port;\r
-    @JsonProperty(value = "ID")\r
-    public void setId(String id) {\r
-      this.id = id;\r
-    }\r
-    @JsonProperty(value = "Service")\r
-    public void setService(String service) {\r
-      this.service = service;\r
-    }\r
-    @JsonProperty(value = "Tags")\r
-    @JsonDeserialize(as = ImmutableList.class, contentAs = String.class)\r
-    public void setTags(List<String> tags) {\r
-      this.tags = tags;\r
-    }\r
-    @JsonProperty(value = "Address")\r
-    public void setAddress(String address) {\r
-      this.address = address;\r
-    }\r
-    @JsonProperty(value = "Port")\r
-    public void setPort(int port) {\r
-      this.port = port;\r
-    }\r
-    @Override\r
-    public String getId() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getService() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public List<String> getTags() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public String getAddress() { throw new UnsupportedOperationException(); }\r
-    @Override\r
-    public int getPort() { throw new UnsupportedOperationException(); }\r
-  }\r
-\r
-  /**\r
-   * @param json A JSON-bindable data structure\r
-   * @return An immutable value type\r
-   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
-   */\r
-  @Deprecated\r
-  @JsonCreator\r
-  static ImmutableService fromJson(Json json) {\r
-    ImmutableService.Builder builder = ImmutableService.builder();\r
-    if (json.id != null) {\r
-      builder.id(json.id);\r
-    }\r
-    if (json.service != null) {\r
-      builder.service(json.service);\r
-    }\r
-    if (json.tags != null) {\r
-      builder.addAllTags(json.tags);\r
-    }\r
-    if (json.address != null) {\r
-      builder.address(json.address);\r
-    }\r
-    if (json.port != null) {\r
-      builder.port(json.port);\r
-    }\r
-    return builder.build();\r
-  }\r
-\r
-  /**\r
-   * Creates an immutable copy of a {@link Service} value.\r
-   * Uses accessors to get values to initialize the new immutable instance.\r
-   * If an instance is already immutable, it is returned as is.\r
-   * @param instance The instance to copy\r
-   * @return A copied immutable Service instance\r
-   */\r
-  public static ImmutableService copyOf(Service instance) {\r
-    if (instance instanceof ImmutableService) {\r
-      return (ImmutableService) instance;\r
-    }\r
-    return ImmutableService.builder()\r
-        .from(instance)\r
-        .build();\r
-  }\r
-\r
-  /**\r
-   * Creates a builder for {@link ImmutableService ImmutableService}.\r
-   * @return A new ImmutableService builder\r
-   */\r
-  public static ImmutableService.Builder builder() {\r
-    return new ImmutableService.Builder();\r
-  }\r
-\r
-  /**\r
-   * Builds instances of type {@link ImmutableService ImmutableService}.\r
-   * Initialize attributes and then invoke the {@link #build()} method to create an\r
-   * immutable instance.\r
-   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
-   * but instead used immediately to create instances.</em>\r
-   */\r
-  public static final class Builder {\r
-    private static final long INIT_BIT_ID = 0x1L;\r
-    private static final long INIT_BIT_SERVICE = 0x2L;\r
-    private static final long INIT_BIT_ADDRESS = 0x4L;\r
-    private static final long INIT_BIT_PORT = 0x8L;\r
-    private long initBits = 0xf;\r
-\r
-    private String id;\r
-    private String service;\r
-    private ImmutableList.Builder<String> tagsBuilder = ImmutableList.builder();\r
-    private String address;\r
-    private int port;\r
-\r
-    private Builder() {\r
-    }\r
-\r
-    /**\r
-     * Fill a builder with attribute values from the provided {@code Service} instance.\r
-     * Regular attribute values will be replaced with those from the given instance.\r
-     * Absent optional values will not replace present values.\r
-     * Collection elements and entries will be added, not replaced.\r
-     * @param instance The instance from which to copy values\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder from(Service instance) {\r
-      Preconditions.checkNotNull(instance, "instance");\r
-      id(instance.getId());\r
-      service(instance.getService());\r
-      addAllTags(instance.getTags());\r
-      address(instance.getAddress());\r
-      port(instance.getPort());\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link Service#getId() id} attribute.\r
-     * @param id The value for id \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder id(String id) {\r
-      this.id = Preconditions.checkNotNull(id, "id");\r
-      initBits &= ~INIT_BIT_ID;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link Service#getService() service} attribute.\r
-     * @param service The value for service \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder service(String service) {\r
-      this.service = Preconditions.checkNotNull(service, "service");\r
-      initBits &= ~INIT_BIT_SERVICE;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Adds one element to {@link Service#getTags() tags} list.\r
-     * @param element A tags element\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder addTags(String element) {\r
-      tagsBuilder.add(element);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Adds elements to {@link Service#getTags() tags} list.\r
-     * @param elements An array of tags elements\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder addTags(String... elements) {\r
-      tagsBuilder.add(elements);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Sets or replaces all elements for {@link Service#getTags() tags} list.\r
-     * @param elements An iterable of tags elements\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder tags(Iterable<String> elements) {\r
-      tagsBuilder = ImmutableList.builder();\r
-      return addAllTags(elements);\r
-    }\r
-\r
-    /**\r
-     * Adds elements to {@link Service#getTags() tags} list.\r
-     * @param elements An iterable of tags elements\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder addAllTags(Iterable<String> elements) {\r
-      tagsBuilder.addAll(elements);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link Service#getAddress() address} attribute.\r
-     * @param address The value for address \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder address(String address) {\r
-      this.address = Preconditions.checkNotNull(address, "address");\r
-      initBits &= ~INIT_BIT_ADDRESS;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link Service#getPort() port} attribute.\r
-     * @param port The value for port \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder port(int port) {\r
-      this.port = port;\r
-      initBits &= ~INIT_BIT_PORT;\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Builds a new {@link ImmutableService ImmutableService}.\r
-     * @return An immutable instance of Service\r
-     * @throws java.lang.IllegalStateException if any required attributes are missing\r
-     */\r
-    public ImmutableService build() throws IllegalStateException {\r
-      if (initBits != 0) {\r
-        throw new IllegalStateException(formatRequiredAttributesMessage());\r
-      }\r
-      return new ImmutableService(id, service, tagsBuilder.build(), address, port);\r
-    }\r
-\r
-    private String formatRequiredAttributesMessage() {\r
-      List<String> attributes = Lists.newArrayList();\r
-      if ((initBits & INIT_BIT_ID) != 0) attributes.add("id");\r
-      if ((initBits & INIT_BIT_SERVICE) != 0) attributes.add("service");\r
-      if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");\r
-      if ((initBits & INIT_BIT_PORT) != 0) attributes.add("port");\r
-      return "Cannot build Service, some of required attributes are not set " + attributes;\r
-    }\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.model.health;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Immutable implementation of {@link Service}.
+ * <p>
+ * Use the builder to create immutable instances:
+ * {@code ImmutableService.builder()}.
+ */
+@SuppressWarnings("all")
+@Generated({"Immutables.generator", "Service"})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public final class ImmutableService extends Service {
+  private final String id;
+  private final String service;
+  private final ImmutableList<String> tags;
+  private final String address;
+  private final int port;
+
+  private ImmutableService(
+      String id,
+      String service,
+      ImmutableList<String> tags,
+      String address,
+      int port) {
+    this.id = id;
+    this.service = service;
+    this.tags = tags;
+    this.address = address;
+    this.port = port;
+  }
+
+  /**
+   * @return The value of the {@code id} attribute
+   */
+  @JsonProperty(value = "ID")
+  @Override
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * @return The value of the {@code service} attribute
+   */
+  @JsonProperty(value = "Service")
+  @Override
+  public String getService() {
+    return service;
+  }
+
+  /**
+   * @return The value of the {@code tags} attribute
+   */
+  @JsonProperty(value = "Tags")
+  @JsonDeserialize(as = ImmutableList.class, contentAs = String.class)
+  @Override
+  public ImmutableList<String> getTags() {
+    return tags;
+  }
+
+  /**
+   * @return The value of the {@code address} attribute
+   */
+  @JsonProperty(value = "Address")
+  @Override
+  public String getAddress() {
+    return address;
+  }
+
+  /**
+   * @return The value of the {@code port} attribute
+   */
+  @JsonProperty(value = "Port")
+  @Override
+  public int getPort() {
+    return port;
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link Service#getId() id} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for id
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableService withId(String value) {
+    if (this.id.equals(value)) return this;
+    return new ImmutableService(
+        Preconditions.checkNotNull(value, "id"),
+        this.service,
+        this.tags,
+        this.address,
+        this.port);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link Service#getService() service} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for service
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableService withService(String value) {
+    if (this.service.equals(value)) return this;
+    return new ImmutableService(
+        this.id,
+        Preconditions.checkNotNull(value, "service"),
+        this.tags,
+        this.address,
+        this.port);
+  }
+
+  /**
+   * Copy the current immutable object with elements that replace the content of {@link Service#getTags() tags}.
+   * @param elements The elements to set
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableService withTags(String... elements) {
+    ImmutableList<String> newValue = ImmutableList.copyOf(elements);
+    return new ImmutableService(this.id, this.service, newValue, this.address, this.port);
+  }
+
+  /**
+   * Copy the current immutable object with elements that replace the content of {@link Service#getTags() tags}.
+   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param elements An iterable of tags elements to set
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableService withTags(Iterable<String> elements) {
+    if (this.tags == elements) return this;
+    ImmutableList<String> newValue = ImmutableList.copyOf(elements);
+    return new ImmutableService(this.id, this.service, newValue, this.address, this.port);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link Service#getAddress() address} attribute.
+   * An equals check used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for address
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableService withAddress(String value) {
+    if (this.address.equals(value)) return this;
+    return new ImmutableService(
+        this.id,
+        this.service,
+        this.tags,
+        Preconditions.checkNotNull(value, "address"),
+        this.port);
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link Service#getPort() port} attribute.
+   * A value equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for port
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableService withPort(int value) {
+    if (this.port == value) return this;
+    return new ImmutableService(this.id, this.service, this.tags, this.address, value);
+  }
+
+  /**
+   * This instance is equal to all instances of {@code ImmutableService} that have equal attribute values.
+   * @return {@code true} if {@code this} is equal to {@code another} instance
+   */
+  @Override
+  public boolean equals(Object another) {
+    if (this == another) return true;
+    return another instanceof ImmutableService
+        && equalTo((ImmutableService) another);
+  }
+
+  private boolean equalTo(ImmutableService another) {
+    return id.equals(another.id)
+        && service.equals(another.service)
+        && tags.equals(another.tags)
+        && address.equals(another.address)
+        && port == another.port;
+  }
+
+  /**
+   * Computes a hash code from attributes: {@code id}, {@code service}, {@code tags}, {@code address}, {@code port}.
+   * @return hashCode value
+   */
+  @Override
+  public int hashCode() {
+    int h = 31;
+    h = h * 17 + id.hashCode();
+    h = h * 17 + service.hashCode();
+    h = h * 17 + tags.hashCode();
+    h = h * 17 + address.hashCode();
+    h = h * 17 + port;
+    return h;
+  }
+
+  /**
+   * Prints the immutable value {@code Service...} with all non-generated
+   * and non-auxiliary attribute values.
+   * @return A string representation of the value
+   */
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper("Service")
+        .add("id", id)
+        .add("service", service)
+        .add("tags", tags)
+        .add("address", address)
+        .add("port", port)
+        .toString();
+  }
+
+  /**
+   * Utility type used to correctly read immutable object from JSON representation.
+   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonDeserialize
+  static final class Json extends Service {
+    String id;
+    String service;
+    List<String> tags = ImmutableList.of();
+    String address;
+    Integer port;
+    @JsonProperty(value = "ID")
+    public void setId(String id) {
+      this.id = id;
+    }
+    @JsonProperty(value = "Service")
+    public void setService(String service) {
+      this.service = service;
+    }
+    @JsonProperty(value = "Tags")
+    @JsonDeserialize(as = ImmutableList.class, contentAs = String.class)
+    public void setTags(List<String> tags) {
+      this.tags = tags;
+    }
+    @JsonProperty(value = "Address")
+    public void setAddress(String address) {
+      this.address = address;
+    }
+    @JsonProperty(value = "Port")
+    public void setPort(int port) {
+      this.port = port;
+    }
+    @Override
+    public String getId() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getService() { throw new UnsupportedOperationException(); }
+    @Override
+    public List<String> getTags() { throw new UnsupportedOperationException(); }
+    @Override
+    public String getAddress() { throw new UnsupportedOperationException(); }
+    @Override
+    public int getPort() { throw new UnsupportedOperationException(); }
+  }
+
+  /**
+   * @param json A JSON-bindable data structure
+   * @return An immutable value type
+   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure
+   */
+  @Deprecated
+  @JsonCreator
+  static ImmutableService fromJson(Json json) {
+    ImmutableService.Builder builder = ImmutableService.builder();
+    if (json.id != null) {
+      builder.id(json.id);
+    }
+    if (json.service != null) {
+      builder.service(json.service);
+    }
+    if (json.tags != null) {
+      builder.addAllTags(json.tags);
+    }
+    if (json.address != null) {
+      builder.address(json.address);
+    }
+    if (json.port != null) {
+      builder.port(json.port);
+    }
+    return builder.build();
+  }
+
+  /**
+   * Creates an immutable copy of a {@link Service} value.
+   * Uses accessors to get values to initialize the new immutable instance.
+   * If an instance is already immutable, it is returned as is.
+   * @param instance The instance to copy
+   * @return A copied immutable Service instance
+   */
+  public static ImmutableService copyOf(Service instance) {
+    if (instance instanceof ImmutableService) {
+      return (ImmutableService) instance;
+    }
+    return ImmutableService.builder()
+        .from(instance)
+        .build();
+  }
+
+  /**
+   * Creates a builder for {@link ImmutableService ImmutableService}.
+   * @return A new ImmutableService builder
+   */
+  public static ImmutableService.Builder builder() {
+    return new ImmutableService.Builder();
+  }
+
+  /**
+   * Builds instances of type {@link ImmutableService ImmutableService}.
+   * Initialize attributes and then invoke the {@link #build()} method to create an
+   * immutable instance.
+   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
+   * but instead used immediately to create instances.</em>
+   */
+  public static final class Builder {
+    private static final long INIT_BIT_ID = 0x1L;
+    private static final long INIT_BIT_SERVICE = 0x2L;
+    private static final long INIT_BIT_ADDRESS = 0x4L;
+    private static final long INIT_BIT_PORT = 0x8L;
+    private long initBits = 0xf;
+
+    private String id;
+    private String service;
+    private ImmutableList.Builder<String> tagsBuilder = ImmutableList.builder();
+    private String address;
+    private int port;
+
+    private Builder() {
+    }
+
+    /**
+     * Fill a builder with attribute values from the provided {@code Service} instance.
+     * Regular attribute values will be replaced with those from the given instance.
+     * Absent optional values will not replace present values.
+     * Collection elements and entries will be added, not replaced.
+     * @param instance The instance from which to copy values
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder from(Service instance) {
+      Preconditions.checkNotNull(instance, "instance");
+      id(instance.getId());
+      service(instance.getService());
+      addAllTags(instance.getTags());
+      address(instance.getAddress());
+      port(instance.getPort());
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link Service#getId() id} attribute.
+     * @param id The value for id 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder id(String id) {
+      this.id = Preconditions.checkNotNull(id, "id");
+      initBits &= ~INIT_BIT_ID;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link Service#getService() service} attribute.
+     * @param service The value for service 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder service(String service) {
+      this.service = Preconditions.checkNotNull(service, "service");
+      initBits &= ~INIT_BIT_SERVICE;
+      return this;
+    }
+
+    /**
+     * Adds one element to {@link Service#getTags() tags} list.
+     * @param element A tags element
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder addTags(String element) {
+      tagsBuilder.add(element);
+      return this;
+    }
+
+    /**
+     * Adds elements to {@link Service#getTags() tags} list.
+     * @param elements An array of tags elements
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder addTags(String... elements) {
+      tagsBuilder.add(elements);
+      return this;
+    }
+
+    /**
+     * Sets or replaces all elements for {@link Service#getTags() tags} list.
+     * @param elements An iterable of tags elements
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder tags(Iterable<String> elements) {
+      tagsBuilder = ImmutableList.builder();
+      return addAllTags(elements);
+    }
+
+    /**
+     * Adds elements to {@link Service#getTags() tags} list.
+     * @param elements An iterable of tags elements
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder addAllTags(Iterable<String> elements) {
+      tagsBuilder.addAll(elements);
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link Service#getAddress() address} attribute.
+     * @param address The value for address 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder address(String address) {
+      this.address = Preconditions.checkNotNull(address, "address");
+      initBits &= ~INIT_BIT_ADDRESS;
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link Service#getPort() port} attribute.
+     * @param port The value for port 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder port(int port) {
+      this.port = port;
+      initBits &= ~INIT_BIT_PORT;
+      return this;
+    }
+
+    /**
+     * Builds a new {@link ImmutableService ImmutableService}.
+     * @return An immutable instance of Service
+     * @throws java.lang.IllegalStateException if any required attributes are missing
+     */
+    public ImmutableService build() throws IllegalStateException {
+      if (initBits != 0) {
+        throw new IllegalStateException(formatRequiredAttributesMessage());
+      }
+      return new ImmutableService(id, service, tagsBuilder.build(), address, port);
+    }
+
+    private String formatRequiredAttributesMessage() {
+      List<String> attributes = Lists.newArrayList();
+      if ((initBits & INIT_BIT_ID) != 0) attributes.add("id");
+      if ((initBits & INIT_BIT_SERVICE) != 0) attributes.add("service");
+      if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");
+      if ((initBits & INIT_BIT_PORT) != 0) attributes.add("port");
+      return "Cannot build Service, some of required attributes are not set " + attributes;
+    }
+  }
+}
index 56eb94d..0933c5b 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 0a64737..0af11f8 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index f11b5b2..c543203 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index da422bf..1408cca 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 37df9ca..7320e8a 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 87a3a62..3e530f1 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.option;\r
-\r
-import com.google.common.base.MoreObjects;\r
-import com.google.common.base.Optional;\r
-import com.google.common.base.Preconditions;\r
-import javax.annotation.Generated;\r
-\r
-/**\r
- * Immutable implementation of {@link CatalogOptions}.\r
- * <p>\r
- * Use the builder to create immutable instances:\r
- * {@code ImmutableCatalogOptions.builder()}.\r
- */\r
-@SuppressWarnings("all")\r
-@Generated({"Immutables.generator", "CatalogOptions"})\r
-public final class ImmutableCatalogOptions extends CatalogOptions {\r
-  private final Optional<String> datacenter;\r
-  private final Optional<String> tag;\r
-\r
-  private ImmutableCatalogOptions(\r
-      Optional<String> datacenter,\r
-      Optional<String> tag) {\r
-    this.datacenter = datacenter;\r
-    this.tag = tag;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code datacenter} attribute\r
-   */\r
-  @Override\r
-  public Optional<String> getDatacenter() {\r
-    return datacenter;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code tag} attribute\r
-   */\r
-  @Override\r
-  public Optional<String> getTag() {\r
-    return tag;\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link CatalogOptions#getDatacenter() datacenter} attribute.\r
-   * @param value The value for datacenter\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogOptions withDatacenter(String value) {\r
-    Optional<String> newValue = Optional.of(value);\r
-    return new ImmutableCatalogOptions(newValue, this.tag);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting an optional value for the {@link CatalogOptions#getDatacenter() datacenter} attribute.\r
-   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.\r
-   * @param optional A value for datacenter\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogOptions withDatacenter(Optional<String> optional) {\r
-    Optional<String> value = Preconditions.checkNotNull(optional, "datacenter");\r
-    if (this.datacenter == value) return this;\r
-    return new ImmutableCatalogOptions(value, this.tag);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link CatalogOptions#getTag() tag} attribute.\r
-   * @param value The value for tag\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogOptions withTag(String value) {\r
-    Optional<String> newValue = Optional.of(value);\r
-    return new ImmutableCatalogOptions(this.datacenter, newValue);\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting an optional value for the {@link CatalogOptions#getTag() tag} attribute.\r
-   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.\r
-   * @param optional A value for tag\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableCatalogOptions withTag(Optional<String> optional) {\r
-    Optional<String> value = Preconditions.checkNotNull(optional, "tag");\r
-    if (this.tag == value) return this;\r
-    return new ImmutableCatalogOptions(this.datacenter, value);\r
-  }\r
-\r
-  /**\r
-   * This instance is equal to all instances of {@code ImmutableCatalogOptions} that have equal attribute values.\r
-   * @return {@code true} if {@code this} is equal to {@code another} instance\r
-   */\r
-  @Override\r
-  public boolean equals(Object another) {\r
-    if (this == another) return true;\r
-    return another instanceof ImmutableCatalogOptions\r
-        && equalTo((ImmutableCatalogOptions) another);\r
-  }\r
-\r
-  private boolean equalTo(ImmutableCatalogOptions another) {\r
-    return datacenter.equals(another.datacenter)\r
-        && tag.equals(another.tag);\r
-  }\r
-\r
-  /**\r
-   * Computes a hash code from attributes: {@code datacenter}, {@code tag}.\r
-   * @return hashCode value\r
-   */\r
-  @Override\r
-  public int hashCode() {\r
-    int h = 31;\r
-    h = h * 17 + datacenter.hashCode();\r
-    h = h * 17 + tag.hashCode();\r
-    return h;\r
-  }\r
-\r
-  /**\r
-   * Prints the immutable value {@code CatalogOptions...} with all non-generated\r
-   * and non-auxiliary attribute values.\r
-   * @return A string representation of the value\r
-   */\r
-  @Override\r
-  public String toString() {\r
-    return MoreObjects.toStringHelper("CatalogOptions")\r
-        .add("datacenter", datacenter)\r
-        .add("tag", tag)\r
-        .toString();\r
-  }\r
-\r
-  /**\r
-   * Creates an immutable copy of a {@link CatalogOptions} value.\r
-   * Uses accessors to get values to initialize the new immutable instance.\r
-   * If an instance is already immutable, it is returned as is.\r
-   * @param instance The instance to copy\r
-   * @return A copied immutable CatalogOptions instance\r
-   */\r
-  public static ImmutableCatalogOptions copyOf(CatalogOptions instance) {\r
-    if (instance instanceof ImmutableCatalogOptions) {\r
-      return (ImmutableCatalogOptions) instance;\r
-    }\r
-    return ImmutableCatalogOptions.builder()\r
-        .from(instance)\r
-        .build();\r
-  }\r
-\r
-  /**\r
-   * Creates a builder for {@link ImmutableCatalogOptions ImmutableCatalogOptions}.\r
-   * @return A new ImmutableCatalogOptions builder\r
-   */\r
-  public static ImmutableCatalogOptions.Builder builder() {\r
-    return new ImmutableCatalogOptions.Builder();\r
-  }\r
-\r
-  /**\r
-   * Builds instances of type {@link ImmutableCatalogOptions ImmutableCatalogOptions}.\r
-   * Initialize attributes and then invoke the {@link #build()} method to create an\r
-   * immutable instance.\r
-   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
-   * but instead used immediately to create instances.</em>\r
-   */\r
-  public static final class Builder {\r
-    private Optional<String> datacenter = Optional.absent();\r
-    private Optional<String> tag = Optional.absent();\r
-\r
-    private Builder() {\r
-    }\r
-\r
-    /**\r
-     * Fill a builder with attribute values from the provided {@code CatalogOptions} instance.\r
-     * Regular attribute values will be replaced with those from the given instance.\r
-     * Absent optional values will not replace present values.\r
-     * @param instance The instance from which to copy values\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder from(CatalogOptions instance) {\r
-      Preconditions.checkNotNull(instance, "instance");\r
-      Optional<String> datacenterOptional = instance.getDatacenter();\r
-      if (datacenterOptional.isPresent()) {\r
-        datacenter(datacenterOptional);\r
-      }\r
-      Optional<String> tagOptional = instance.getTag();\r
-      if (tagOptional.isPresent()) {\r
-        tag(tagOptional);\r
-      }\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link CatalogOptions#getDatacenter() datacenter} to datacenter.\r
-     * @param datacenter The value for datacenter\r
-     * @return {@code this} builder for chained invocation\r
-     */\r
-    public final Builder datacenter(String datacenter) {\r
-      this.datacenter = Optional.of(datacenter);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link CatalogOptions#getDatacenter() datacenter} to datacenter.\r
-     * @param datacenter The value for datacenter\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder datacenter(Optional<String> datacenter) {\r
-      this.datacenter = Preconditions.checkNotNull(datacenter, "datacenter");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link CatalogOptions#getTag() tag} to tag.\r
-     * @param tag The value for tag\r
-     * @return {@code this} builder for chained invocation\r
-     */\r
-    public final Builder tag(String tag) {\r
-      this.tag = Optional.of(tag);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link CatalogOptions#getTag() tag} to tag.\r
-     * @param tag The value for tag\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder tag(Optional<String> tag) {\r
-      this.tag = Preconditions.checkNotNull(tag, "tag");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Builds a new {@link ImmutableCatalogOptions ImmutableCatalogOptions}.\r
-     * @return An immutable instance of CatalogOptions\r
-     * @throws java.lang.IllegalStateException if any required attributes are missing\r
-     */\r
-    public ImmutableCatalogOptions build() throws IllegalStateException {\r
-      return new ImmutableCatalogOptions(datacenter, tag);\r
-    }\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.option;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import javax.annotation.Generated;
+
+/**
+ * Immutable implementation of {@link CatalogOptions}.
+ * <p>
+ * Use the builder to create immutable instances:
+ * {@code ImmutableCatalogOptions.builder()}.
+ */
+@SuppressWarnings("all")
+@Generated({"Immutables.generator", "CatalogOptions"})
+public final class ImmutableCatalogOptions extends CatalogOptions {
+  private final Optional<String> datacenter;
+  private final Optional<String> tag;
+
+  private ImmutableCatalogOptions(
+      Optional<String> datacenter,
+      Optional<String> tag) {
+    this.datacenter = datacenter;
+    this.tag = tag;
+  }
+
+  /**
+   * @return The value of the {@code datacenter} attribute
+   */
+  @Override
+  public Optional<String> getDatacenter() {
+    return datacenter;
+  }
+
+  /**
+   * @return The value of the {@code tag} attribute
+   */
+  @Override
+  public Optional<String> getTag() {
+    return tag;
+  }
+
+  /**
+   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link CatalogOptions#getDatacenter() datacenter} attribute.
+   * @param value The value for datacenter
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogOptions withDatacenter(String value) {
+    Optional<String> newValue = Optional.of(value);
+    return new ImmutableCatalogOptions(newValue, this.tag);
+  }
+
+  /**
+   * Copy the current immutable object by setting an optional value for the {@link CatalogOptions#getDatacenter() datacenter} attribute.
+   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.
+   * @param optional A value for datacenter
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogOptions withDatacenter(Optional<String> optional) {
+    Optional<String> value = Preconditions.checkNotNull(optional, "datacenter");
+    if (this.datacenter == value) return this;
+    return new ImmutableCatalogOptions(value, this.tag);
+  }
+
+  /**
+   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link CatalogOptions#getTag() tag} attribute.
+   * @param value The value for tag
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogOptions withTag(String value) {
+    Optional<String> newValue = Optional.of(value);
+    return new ImmutableCatalogOptions(this.datacenter, newValue);
+  }
+
+  /**
+   * Copy the current immutable object by setting an optional value for the {@link CatalogOptions#getTag() tag} attribute.
+   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.
+   * @param optional A value for tag
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableCatalogOptions withTag(Optional<String> optional) {
+    Optional<String> value = Preconditions.checkNotNull(optional, "tag");
+    if (this.tag == value) return this;
+    return new ImmutableCatalogOptions(this.datacenter, value);
+  }
+
+  /**
+   * This instance is equal to all instances of {@code ImmutableCatalogOptions} that have equal attribute values.
+   * @return {@code true} if {@code this} is equal to {@code another} instance
+   */
+  @Override
+  public boolean equals(Object another) {
+    if (this == another) return true;
+    return another instanceof ImmutableCatalogOptions
+        && equalTo((ImmutableCatalogOptions) another);
+  }
+
+  private boolean equalTo(ImmutableCatalogOptions another) {
+    return datacenter.equals(another.datacenter)
+        && tag.equals(another.tag);
+  }
+
+  /**
+   * Computes a hash code from attributes: {@code datacenter}, {@code tag}.
+   * @return hashCode value
+   */
+  @Override
+  public int hashCode() {
+    int h = 31;
+    h = h * 17 + datacenter.hashCode();
+    h = h * 17 + tag.hashCode();
+    return h;
+  }
+
+  /**
+   * Prints the immutable value {@code CatalogOptions...} with all non-generated
+   * and non-auxiliary attribute values.
+   * @return A string representation of the value
+   */
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper("CatalogOptions")
+        .add("datacenter", datacenter)
+        .add("tag", tag)
+        .toString();
+  }
+
+  /**
+   * Creates an immutable copy of a {@link CatalogOptions} value.
+   * Uses accessors to get values to initialize the new immutable instance.
+   * If an instance is already immutable, it is returned as is.
+   * @param instance The instance to copy
+   * @return A copied immutable CatalogOptions instance
+   */
+  public static ImmutableCatalogOptions copyOf(CatalogOptions instance) {
+    if (instance instanceof ImmutableCatalogOptions) {
+      return (ImmutableCatalogOptions) instance;
+    }
+    return ImmutableCatalogOptions.builder()
+        .from(instance)
+        .build();
+  }
+
+  /**
+   * Creates a builder for {@link ImmutableCatalogOptions ImmutableCatalogOptions}.
+   * @return A new ImmutableCatalogOptions builder
+   */
+  public static ImmutableCatalogOptions.Builder builder() {
+    return new ImmutableCatalogOptions.Builder();
+  }
+
+  /**
+   * Builds instances of type {@link ImmutableCatalogOptions ImmutableCatalogOptions}.
+   * Initialize attributes and then invoke the {@link #build()} method to create an
+   * immutable instance.
+   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
+   * but instead used immediately to create instances.</em>
+   */
+  public static final class Builder {
+    private Optional<String> datacenter = Optional.absent();
+    private Optional<String> tag = Optional.absent();
+
+    private Builder() {
+    }
+
+    /**
+     * Fill a builder with attribute values from the provided {@code CatalogOptions} instance.
+     * Regular attribute values will be replaced with those from the given instance.
+     * Absent optional values will not replace present values.
+     * @param instance The instance from which to copy values
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder from(CatalogOptions instance) {
+      Preconditions.checkNotNull(instance, "instance");
+      Optional<String> datacenterOptional = instance.getDatacenter();
+      if (datacenterOptional.isPresent()) {
+        datacenter(datacenterOptional);
+      }
+      Optional<String> tagOptional = instance.getTag();
+      if (tagOptional.isPresent()) {
+        tag(tagOptional);
+      }
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link CatalogOptions#getDatacenter() datacenter} to datacenter.
+     * @param datacenter The value for datacenter
+     * @return {@code this} builder for chained invocation
+     */
+    public final Builder datacenter(String datacenter) {
+      this.datacenter = Optional.of(datacenter);
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link CatalogOptions#getDatacenter() datacenter} to datacenter.
+     * @param datacenter The value for datacenter
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder datacenter(Optional<String> datacenter) {
+      this.datacenter = Preconditions.checkNotNull(datacenter, "datacenter");
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link CatalogOptions#getTag() tag} to tag.
+     * @param tag The value for tag
+     * @return {@code this} builder for chained invocation
+     */
+    public final Builder tag(String tag) {
+      this.tag = Optional.of(tag);
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link CatalogOptions#getTag() tag} to tag.
+     * @param tag The value for tag
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder tag(Optional<String> tag) {
+      this.tag = Preconditions.checkNotNull(tag, "tag");
+      return this;
+    }
+
+    /**
+     * Builds a new {@link ImmutableCatalogOptions ImmutableCatalogOptions}.
+     * @return An immutable instance of CatalogOptions
+     * @throws java.lang.IllegalStateException if any required attributes are missing
+     */
+    public ImmutableCatalogOptions build() throws IllegalStateException {
+      return new ImmutableCatalogOptions(datacenter, tag);
+    }
+  }
+}
index 2b8d14a..23fc5e7 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.consul.option;\r
-\r
-import com.google.common.base.MoreObjects;\r
-import com.google.common.base.Optional;\r
-import com.google.common.base.Preconditions;\r
-import com.google.common.collect.Lists;\r
-import com.google.common.primitives.Booleans;\r
-import java.math.BigInteger;\r
-import java.util.ArrayList;\r
-import javax.annotation.Generated;\r
-\r
-/**\r
- * Immutable implementation of {@link QueryOptions}.\r
- * <p>\r
- * Use the builder to create immutable instances:\r
- * {@code ImmutableQueryOptions.builder()}.\r
- */\r
-@SuppressWarnings("all")\r
-@Generated({"Immutables.generator", "QueryOptions"})\r
-public final class ImmutableQueryOptions extends QueryOptions {\r
-  private final Optional<String> wait;\r
-  private final Optional<String> token;\r
-  private final Optional<BigInteger> index;\r
-  private final Optional<String> near;\r
-  private final ConsistencyMode consistencyMode;\r
-  private final boolean isBlocking;\r
-  private final boolean hasToken;\r
-\r
-  private ImmutableQueryOptions(ImmutableQueryOptions.Builder builder) {\r
-    this.wait = builder.wait;\r
-    this.token = builder.token;\r
-    this.index = builder.index;\r
-    this.near = builder.near;\r
-    if (builder.consistencyMode != null) {\r
-      initShim.consistencyMode(builder.consistencyMode);\r
-    }\r
-    this.consistencyMode = initShim.getConsistencyMode();\r
-    this.isBlocking = initShim.isBlocking();\r
-    this.hasToken = initShim.hasToken();\r
-    this.initShim = null;\r
-  }\r
-\r
-  private ImmutableQueryOptions(\r
-      Optional<String> wait,\r
-      Optional<String> token,\r
-      Optional<BigInteger> index,\r
-      Optional<String> near,\r
-      ConsistencyMode consistencyMode) {\r
-    this.wait = wait;\r
-    this.token = token;\r
-    this.index = index;\r
-    this.near = near;\r
-    this.consistencyMode = consistencyMode;\r
-    initShim.consistencyMode(consistencyMode);\r
-    this.isBlocking = initShim.isBlocking();\r
-    this.hasToken = initShim.hasToken();\r
-    this.initShim = null;\r
-  }\r
-\r
-  private static final int STAGE_INITIALIZING = -1;\r
-  private static final int STAGE_UNINITIALIZED = 0;\r
-  private static final int STAGE_INITIALIZED = 1;\r
-  private volatile InitShim initShim = new InitShim();\r
-\r
-  private final class InitShim {\r
-    private ConsistencyMode consistencyMode;\r
-    private byte consistencyModeStage;\r
-\r
-    ConsistencyMode getConsistencyMode() {\r
-      if (consistencyModeStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage());\r
-      if (consistencyModeStage == STAGE_UNINITIALIZED) {\r
-        consistencyModeStage = STAGE_INITIALIZING;\r
-        this.consistencyMode = Preconditions.checkNotNull(ImmutableQueryOptions.super.getConsistencyMode(), "consistencyMode");\r
-        consistencyModeStage = STAGE_INITIALIZED;\r
-      }\r
-      return consistencyMode;\r
-    }\r
-\r
-    ConsistencyMode consistencyMode(ConsistencyMode value) {\r
-      this.consistencyMode = value;\r
-      consistencyModeStage = STAGE_INITIALIZED;\r
-      return value;\r
-    }\r
-    private boolean isBlocking;\r
-    private byte isBlockingStage;\r
-\r
-    boolean isBlocking() {\r
-      if (isBlockingStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage());\r
-      if (isBlockingStage == STAGE_UNINITIALIZED) {\r
-        isBlockingStage = STAGE_INITIALIZING;\r
-        this.isBlocking = ImmutableQueryOptions.super.isBlocking();\r
-        isBlockingStage = STAGE_INITIALIZED;\r
-      }\r
-      return isBlocking;\r
-    }\r
-    private boolean hasToken;\r
-    private byte hasTokenStage;\r
-\r
-    boolean hasToken() {\r
-      if (hasTokenStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage());\r
-      if (hasTokenStage == STAGE_UNINITIALIZED) {\r
-        hasTokenStage = STAGE_INITIALIZING;\r
-        this.hasToken = ImmutableQueryOptions.super.hasToken();\r
-        hasTokenStage = STAGE_INITIALIZED;\r
-      }\r
-      return hasToken;\r
-    }\r
-\r
-    private String formatInitCycleMessage() {\r
-      ArrayList<String> attributes = Lists.newArrayList();\r
-      if (consistencyModeStage == STAGE_INITIALIZING) attributes.add("consistencyMode");\r
-      if (isBlockingStage == STAGE_INITIALIZING) attributes.add("isBlocking");\r
-      if (hasTokenStage == STAGE_INITIALIZING) attributes.add("hasToken");\r
-      return "Cannot build QueryOptions, attribute initializers form cycle" + attributes;\r
-    }\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code wait} attribute\r
-   */\r
-  @Override\r
-  public Optional<String> getWait() {\r
-    return wait;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code token} attribute\r
-   */\r
-  @Override\r
-  public Optional<String> getToken() {\r
-    return token;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code index} attribute\r
-   */\r
-  @Override\r
-  public Optional<BigInteger> getIndex() {\r
-    return index;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code near} attribute\r
-   */\r
-  @Override\r
-  public Optional<String> getNear() {\r
-    return near;\r
-  }\r
-\r
-  /**\r
-   * @return The value of the {@code consistencyMode} attribute\r
-   */\r
-  @Override\r
-  public ConsistencyMode getConsistencyMode() {\r
-    return initShim != null\r
-        ? initShim.getConsistencyMode()\r
-        : consistencyMode;\r
-  }\r
-\r
-  /**\r
-   * @return The computed-at-construction value of the {@code isBlocking} attribute\r
-   */\r
-  @Override\r
-  public boolean isBlocking() {\r
-    return initShim != null\r
-        ? initShim.isBlocking()\r
-        : isBlocking;\r
-  }\r
-\r
-  /**\r
-   * @return The computed-at-construction value of the {@code hasToken} attribute\r
-   */\r
-  @Override\r
-  public boolean hasToken() {\r
-    return initShim != null\r
-        ? initShim.hasToken()\r
-        : hasToken;\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getWait() wait} attribute.\r
-   * @param value The value for wait\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withWait(String value) {\r
-    Optional<String> newValue = Optional.of(value);\r
-    return validate(new ImmutableQueryOptions(newValue, this.token, this.index, this.near, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getWait() wait} attribute.\r
-   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.\r
-   * @param optional A value for wait\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withWait(Optional<String> optional) {\r
-    Optional<String> value = Preconditions.checkNotNull(optional, "wait");\r
-    if (this.wait == value) return this;\r
-    return validate(new ImmutableQueryOptions(value, this.token, this.index, this.near, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getToken() token} attribute.\r
-   * @param value The value for token\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withToken(String value) {\r
-    Optional<String> newValue = Optional.of(value);\r
-    return validate(new ImmutableQueryOptions(this.wait, newValue, this.index, this.near, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getToken() token} attribute.\r
-   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.\r
-   * @param optional A value for token\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withToken(Optional<String> optional) {\r
-    Optional<String> value = Preconditions.checkNotNull(optional, "token");\r
-    if (this.token == value) return this;\r
-    return validate(new ImmutableQueryOptions(this.wait, value, this.index, this.near, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getIndex() index} attribute.\r
-   * @param value The value for index\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withIndex(BigInteger value) {\r
-    Optional<BigInteger> newValue = Optional.of(value);\r
-    return validate(new ImmutableQueryOptions(this.wait, this.token, newValue, this.near, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getIndex() index} attribute.\r
-   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.\r
-   * @param optional A value for index\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withIndex(Optional<BigInteger> optional) {\r
-    Optional<BigInteger> value = Preconditions.checkNotNull(optional, "index");\r
-    if (this.index == value) return this;\r
-    return validate(new ImmutableQueryOptions(this.wait, this.token, value, this.near, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getNear() near} attribute.\r
-   * @param value The value for near\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withNear(String value) {\r
-    Optional<String> newValue = Optional.of(value);\r
-    return validate(new ImmutableQueryOptions(this.wait, this.token, this.index, newValue, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getNear() near} attribute.\r
-   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.\r
-   * @param optional A value for near\r
-   * @return A modified copy of {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withNear(Optional<String> optional) {\r
-    Optional<String> value = Preconditions.checkNotNull(optional, "near");\r
-    if (this.near == value) return this;\r
-    return validate(new ImmutableQueryOptions(this.wait, this.token, this.index, value, this.consistencyMode));\r
-  }\r
-\r
-  /**\r
-   * Copy the current immutable object by setting a value for the {@link QueryOptions#getConsistencyMode() consistencyMode} attribute.\r
-   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.\r
-   * @param value A new value for consistencyMode\r
-   * @return A modified copy of the {@code this} object\r
-   */\r
-  public final ImmutableQueryOptions withConsistencyMode(ConsistencyMode value) {\r
-    if (this.consistencyMode == value) return this;\r
-    return validate(new ImmutableQueryOptions(\r
-        this.wait,\r
-        this.token,\r
-        this.index,\r
-        this.near,\r
-        Preconditions.checkNotNull(value, "consistencyMode")));\r
-  }\r
-\r
-  /**\r
-   * This instance is equal to all instances of {@code ImmutableQueryOptions} that have equal attribute values.\r
-   * @return {@code true} if {@code this} is equal to {@code another} instance\r
-   */\r
-  @Override\r
-  public boolean equals(Object another) {\r
-    if (this == another) return true;\r
-    return another instanceof ImmutableQueryOptions\r
-        && equalTo((ImmutableQueryOptions) another);\r
-  }\r
-\r
-  private boolean equalTo(ImmutableQueryOptions another) {\r
-    return wait.equals(another.wait)\r
-        && token.equals(another.token)\r
-        && index.equals(another.index)\r
-        && near.equals(another.near)\r
-        && consistencyMode.equals(another.consistencyMode)\r
-        && isBlocking == another.isBlocking\r
-        && hasToken == another.hasToken;\r
-  }\r
-\r
-  /**\r
-   * Computes a hash code from attributes: {@code wait}, {@code token}, {@code index}, {@code near}, {@code consistencyMode}, {@code isBlocking}, {@code hasToken}.\r
-   * @return hashCode value\r
-   */\r
-  @Override\r
-  public int hashCode() {\r
-    int h = 31;\r
-    h = h * 17 + wait.hashCode();\r
-    h = h * 17 + token.hashCode();\r
-    h = h * 17 + index.hashCode();\r
-    h = h * 17 + near.hashCode();\r
-    h = h * 17 + consistencyMode.hashCode();\r
-    h = h * 17 + Booleans.hashCode(isBlocking);\r
-    h = h * 17 + Booleans.hashCode(hasToken);\r
-    return h;\r
-  }\r
-\r
-  /**\r
-   * Prints the immutable value {@code QueryOptions...} with all non-generated\r
-   * and non-auxiliary attribute values.\r
-   * @return A string representation of the value\r
-   */\r
-  @Override\r
-  public String toString() {\r
-    return MoreObjects.toStringHelper("QueryOptions")\r
-        .add("wait", wait)\r
-        .add("token", token)\r
-        .add("index", index)\r
-        .add("near", near)\r
-        .add("consistencyMode", consistencyMode)\r
-        .add("isBlocking", isBlocking)\r
-        .add("hasToken", hasToken)\r
-        .toString();\r
-  }\r
-\r
-  private static ImmutableQueryOptions validate(ImmutableQueryOptions instance) {\r
-    instance.validate();\r
-    return instance;\r
-  }\r
-\r
-  /**\r
-   * Creates an immutable copy of a {@link QueryOptions} value.\r
-   * Uses accessors to get values to initialize the new immutable instance.\r
-   * If an instance is already immutable, it is returned as is.\r
-   * @param instance The instance to copy\r
-   * @return A copied immutable QueryOptions instance\r
-   */\r
-  public static ImmutableQueryOptions copyOf(QueryOptions instance) {\r
-    if (instance instanceof ImmutableQueryOptions) {\r
-      return (ImmutableQueryOptions) instance;\r
-    }\r
-    return ImmutableQueryOptions.builder()\r
-        .from(instance)\r
-        .build();\r
-  }\r
-\r
-  /**\r
-   * Creates a builder for {@link ImmutableQueryOptions ImmutableQueryOptions}.\r
-   * @return A new ImmutableQueryOptions builder\r
-   */\r
-  public static ImmutableQueryOptions.Builder builder() {\r
-    return new ImmutableQueryOptions.Builder();\r
-  }\r
-\r
-  /**\r
-   * Builds instances of type {@link ImmutableQueryOptions ImmutableQueryOptions}.\r
-   * Initialize attributes and then invoke the {@link #build()} method to create an\r
-   * immutable instance.\r
-   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
-   * but instead used immediately to create instances.</em>\r
-   */\r
-  public static final class Builder {\r
-    private Optional<String> wait = Optional.absent();\r
-    private Optional<String> token = Optional.absent();\r
-    private Optional<BigInteger> index = Optional.absent();\r
-    private Optional<String> near = Optional.absent();\r
-    private ConsistencyMode consistencyMode;\r
-\r
-    private Builder() {\r
-    }\r
-\r
-    /**\r
-     * Fill a builder with attribute values from the provided {@code QueryOptions} instance.\r
-     * Regular attribute values will be replaced with those from the given instance.\r
-     * Absent optional values will not replace present values.\r
-     * @param instance The instance from which to copy values\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder from(QueryOptions instance) {\r
-      Preconditions.checkNotNull(instance, "instance");\r
-      Optional<String> waitOptional = instance.getWait();\r
-      if (waitOptional.isPresent()) {\r
-        wait(waitOptional);\r
-      }\r
-      Optional<String> tokenOptional = instance.getToken();\r
-      if (tokenOptional.isPresent()) {\r
-        token(tokenOptional);\r
-      }\r
-      Optional<BigInteger> indexOptional = instance.getIndex();\r
-      if (indexOptional.isPresent()) {\r
-        index(indexOptional);\r
-      }\r
-      Optional<String> nearOptional = instance.getNear();\r
-      if (nearOptional.isPresent()) {\r
-        near(nearOptional);\r
-      }\r
-      consistencyMode(instance.getConsistencyMode());\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getWait() wait} to wait.\r
-     * @param wait The value for wait\r
-     * @return {@code this} builder for chained invocation\r
-     */\r
-    public final Builder wait(String wait) {\r
-      this.wait = Optional.of(wait);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getWait() wait} to wait.\r
-     * @param wait The value for wait\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder wait(Optional<String> wait) {\r
-      this.wait = Preconditions.checkNotNull(wait, "wait");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getToken() token} to token.\r
-     * @param token The value for token\r
-     * @return {@code this} builder for chained invocation\r
-     */\r
-    public final Builder token(String token) {\r
-      this.token = Optional.of(token);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getToken() token} to token.\r
-     * @param token The value for token\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder token(Optional<String> token) {\r
-      this.token = Preconditions.checkNotNull(token, "token");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getIndex() index} to index.\r
-     * @param index The value for index\r
-     * @return {@code this} builder for chained invocation\r
-     */\r
-    public final Builder index(BigInteger index) {\r
-      this.index = Optional.of(index);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getIndex() index} to index.\r
-     * @param index The value for index\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder index(Optional<BigInteger> index) {\r
-      this.index = Preconditions.checkNotNull(index, "index");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getNear() near} to near.\r
-     * @param near The value for near\r
-     * @return {@code this} builder for chained invocation\r
-     */\r
-    public final Builder near(String near) {\r
-      this.near = Optional.of(near);\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the optional value {@link QueryOptions#getNear() near} to near.\r
-     * @param near The value for near\r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder near(Optional<String> near) {\r
-      this.near = Preconditions.checkNotNull(near, "near");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Initializes the value for the {@link QueryOptions#getConsistencyMode() consistencyMode} attribute.\r
-     * <p><em>If not set, this attribute will have a default value as returned by the initializer of {@link QueryOptions#getConsistencyMode() consistencyMode}.</em>\r
-     * @param consistencyMode The value for consistencyMode \r
-     * @return {@code this} builder for use in a chained invocation\r
-     */\r
-    public final Builder consistencyMode(ConsistencyMode consistencyMode) {\r
-      this.consistencyMode = Preconditions.checkNotNull(consistencyMode, "consistencyMode");\r
-      return this;\r
-    }\r
-\r
-    /**\r
-     * Builds a new {@link ImmutableQueryOptions ImmutableQueryOptions}.\r
-     * @return An immutable instance of QueryOptions\r
-     * @throws java.lang.IllegalStateException if any required attributes are missing\r
-     */\r
-    public ImmutableQueryOptions build() throws IllegalStateException {\r
-      return ImmutableQueryOptions.validate(new ImmutableQueryOptions(this));\r
-    }\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.consul.option;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.primitives.Booleans;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import javax.annotation.Generated;
+
+/**
+ * Immutable implementation of {@link QueryOptions}.
+ * <p>
+ * Use the builder to create immutable instances:
+ * {@code ImmutableQueryOptions.builder()}.
+ */
+@SuppressWarnings("all")
+@Generated({"Immutables.generator", "QueryOptions"})
+public final class ImmutableQueryOptions extends QueryOptions {
+  private final Optional<String> wait;
+  private final Optional<String> token;
+  private final Optional<BigInteger> index;
+  private final Optional<String> near;
+  private final ConsistencyMode consistencyMode;
+  private final boolean isBlocking;
+  private final boolean hasToken;
+
+  private ImmutableQueryOptions(ImmutableQueryOptions.Builder builder) {
+    this.wait = builder.wait;
+    this.token = builder.token;
+    this.index = builder.index;
+    this.near = builder.near;
+    if (builder.consistencyMode != null) {
+      initShim.consistencyMode(builder.consistencyMode);
+    }
+    this.consistencyMode = initShim.getConsistencyMode();
+    this.isBlocking = initShim.isBlocking();
+    this.hasToken = initShim.hasToken();
+    this.initShim = null;
+  }
+
+  private ImmutableQueryOptions(
+      Optional<String> wait,
+      Optional<String> token,
+      Optional<BigInteger> index,
+      Optional<String> near,
+      ConsistencyMode consistencyMode) {
+    this.wait = wait;
+    this.token = token;
+    this.index = index;
+    this.near = near;
+    this.consistencyMode = consistencyMode;
+    initShim.consistencyMode(consistencyMode);
+    this.isBlocking = initShim.isBlocking();
+    this.hasToken = initShim.hasToken();
+    this.initShim = null;
+  }
+
+  private static final int STAGE_INITIALIZING = -1;
+  private static final int STAGE_UNINITIALIZED = 0;
+  private static final int STAGE_INITIALIZED = 1;
+  private volatile InitShim initShim = new InitShim();
+
+  private final class InitShim {
+    private ConsistencyMode consistencyMode;
+    private byte consistencyModeStage;
+
+    ConsistencyMode getConsistencyMode() {
+      if (consistencyModeStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage());
+      if (consistencyModeStage == STAGE_UNINITIALIZED) {
+        consistencyModeStage = STAGE_INITIALIZING;
+        this.consistencyMode = Preconditions.checkNotNull(ImmutableQueryOptions.super.getConsistencyMode(), "consistencyMode");
+        consistencyModeStage = STAGE_INITIALIZED;
+      }
+      return consistencyMode;
+    }
+
+    ConsistencyMode consistencyMode(ConsistencyMode value) {
+      this.consistencyMode = value;
+      consistencyModeStage = STAGE_INITIALIZED;
+      return value;
+    }
+    private boolean isBlocking;
+    private byte isBlockingStage;
+
+    boolean isBlocking() {
+      if (isBlockingStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage());
+      if (isBlockingStage == STAGE_UNINITIALIZED) {
+        isBlockingStage = STAGE_INITIALIZING;
+        this.isBlocking = ImmutableQueryOptions.super.isBlocking();
+        isBlockingStage = STAGE_INITIALIZED;
+      }
+      return isBlocking;
+    }
+    private boolean hasToken;
+    private byte hasTokenStage;
+
+    boolean hasToken() {
+      if (hasTokenStage == STAGE_INITIALIZING) throw new IllegalStateException(formatInitCycleMessage());
+      if (hasTokenStage == STAGE_UNINITIALIZED) {
+        hasTokenStage = STAGE_INITIALIZING;
+        this.hasToken = ImmutableQueryOptions.super.hasToken();
+        hasTokenStage = STAGE_INITIALIZED;
+      }
+      return hasToken;
+    }
+
+    private String formatInitCycleMessage() {
+      ArrayList<String> attributes = Lists.newArrayList();
+      if (consistencyModeStage == STAGE_INITIALIZING) attributes.add("consistencyMode");
+      if (isBlockingStage == STAGE_INITIALIZING) attributes.add("isBlocking");
+      if (hasTokenStage == STAGE_INITIALIZING) attributes.add("hasToken");
+      return "Cannot build QueryOptions, attribute initializers form cycle" + attributes;
+    }
+  }
+
+  /**
+   * @return The value of the {@code wait} attribute
+   */
+  @Override
+  public Optional<String> getWait() {
+    return wait;
+  }
+
+  /**
+   * @return The value of the {@code token} attribute
+   */
+  @Override
+  public Optional<String> getToken() {
+    return token;
+  }
+
+  /**
+   * @return The value of the {@code index} attribute
+   */
+  @Override
+  public Optional<BigInteger> getIndex() {
+    return index;
+  }
+
+  /**
+   * @return The value of the {@code near} attribute
+   */
+  @Override
+  public Optional<String> getNear() {
+    return near;
+  }
+
+  /**
+   * @return The value of the {@code consistencyMode} attribute
+   */
+  @Override
+  public ConsistencyMode getConsistencyMode() {
+    return initShim != null
+        ? initShim.getConsistencyMode()
+        : consistencyMode;
+  }
+
+  /**
+   * @return The computed-at-construction value of the {@code isBlocking} attribute
+   */
+  @Override
+  public boolean isBlocking() {
+    return initShim != null
+        ? initShim.isBlocking()
+        : isBlocking;
+  }
+
+  /**
+   * @return The computed-at-construction value of the {@code hasToken} attribute
+   */
+  @Override
+  public boolean hasToken() {
+    return initShim != null
+        ? initShim.hasToken()
+        : hasToken;
+  }
+
+  /**
+   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getWait() wait} attribute.
+   * @param value The value for wait
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withWait(String value) {
+    Optional<String> newValue = Optional.of(value);
+    return validate(new ImmutableQueryOptions(newValue, this.token, this.index, this.near, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getWait() wait} attribute.
+   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.
+   * @param optional A value for wait
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withWait(Optional<String> optional) {
+    Optional<String> value = Preconditions.checkNotNull(optional, "wait");
+    if (this.wait == value) return this;
+    return validate(new ImmutableQueryOptions(value, this.token, this.index, this.near, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getToken() token} attribute.
+   * @param value The value for token
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withToken(String value) {
+    Optional<String> newValue = Optional.of(value);
+    return validate(new ImmutableQueryOptions(this.wait, newValue, this.index, this.near, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getToken() token} attribute.
+   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.
+   * @param optional A value for token
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withToken(Optional<String> optional) {
+    Optional<String> value = Preconditions.checkNotNull(optional, "token");
+    if (this.token == value) return this;
+    return validate(new ImmutableQueryOptions(this.wait, value, this.index, this.near, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getIndex() index} attribute.
+   * @param value The value for index
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withIndex(BigInteger value) {
+    Optional<BigInteger> newValue = Optional.of(value);
+    return validate(new ImmutableQueryOptions(this.wait, this.token, newValue, this.near, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getIndex() index} attribute.
+   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.
+   * @param optional A value for index
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withIndex(Optional<BigInteger> optional) {
+    Optional<BigInteger> value = Preconditions.checkNotNull(optional, "index");
+    if (this.index == value) return this;
+    return validate(new ImmutableQueryOptions(this.wait, this.token, value, this.near, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting a <i>present</i> value for the optional {@link QueryOptions#getNear() near} attribute.
+   * @param value The value for near
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withNear(String value) {
+    Optional<String> newValue = Optional.of(value);
+    return validate(new ImmutableQueryOptions(this.wait, this.token, this.index, newValue, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting an optional value for the {@link QueryOptions#getNear() near} attribute.
+   * A shallow reference equality check on the optional value is used to prevent copying of the same value by returning {@code this}.
+   * @param optional A value for near
+   * @return A modified copy of {@code this} object
+   */
+  public final ImmutableQueryOptions withNear(Optional<String> optional) {
+    Optional<String> value = Preconditions.checkNotNull(optional, "near");
+    if (this.near == value) return this;
+    return validate(new ImmutableQueryOptions(this.wait, this.token, this.index, value, this.consistencyMode));
+  }
+
+  /**
+   * Copy the current immutable object by setting a value for the {@link QueryOptions#getConsistencyMode() consistencyMode} attribute.
+   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
+   * @param value A new value for consistencyMode
+   * @return A modified copy of the {@code this} object
+   */
+  public final ImmutableQueryOptions withConsistencyMode(ConsistencyMode value) {
+    if (this.consistencyMode == value) return this;
+    return validate(new ImmutableQueryOptions(
+        this.wait,
+        this.token,
+        this.index,
+        this.near,
+        Preconditions.checkNotNull(value, "consistencyMode")));
+  }
+
+  /**
+   * This instance is equal to all instances of {@code ImmutableQueryOptions} that have equal attribute values.
+   * @return {@code true} if {@code this} is equal to {@code another} instance
+   */
+  @Override
+  public boolean equals(Object another) {
+    if (this == another) return true;
+    return another instanceof ImmutableQueryOptions
+        && equalTo((ImmutableQueryOptions) another);
+  }
+
+  private boolean equalTo(ImmutableQueryOptions another) {
+    return wait.equals(another.wait)
+        && token.equals(another.token)
+        && index.equals(another.index)
+        && near.equals(another.near)
+        && consistencyMode.equals(another.consistencyMode)
+        && isBlocking == another.isBlocking
+        && hasToken == another.hasToken;
+  }
+
+  /**
+   * Computes a hash code from attributes: {@code wait}, {@code token}, {@code index}, {@code near}, {@code consistencyMode}, {@code isBlocking}, {@code hasToken}.
+   * @return hashCode value
+   */
+  @Override
+  public int hashCode() {
+    int h = 31;
+    h = h * 17 + wait.hashCode();
+    h = h * 17 + token.hashCode();
+    h = h * 17 + index.hashCode();
+    h = h * 17 + near.hashCode();
+    h = h * 17 + consistencyMode.hashCode();
+    h = h * 17 + Booleans.hashCode(isBlocking);
+    h = h * 17 + Booleans.hashCode(hasToken);
+    return h;
+  }
+
+  /**
+   * Prints the immutable value {@code QueryOptions...} with all non-generated
+   * and non-auxiliary attribute values.
+   * @return A string representation of the value
+   */
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper("QueryOptions")
+        .add("wait", wait)
+        .add("token", token)
+        .add("index", index)
+        .add("near", near)
+        .add("consistencyMode", consistencyMode)
+        .add("isBlocking", isBlocking)
+        .add("hasToken", hasToken)
+        .toString();
+  }
+
+  private static ImmutableQueryOptions validate(ImmutableQueryOptions instance) {
+    instance.validate();
+    return instance;
+  }
+
+  /**
+   * Creates an immutable copy of a {@link QueryOptions} value.
+   * Uses accessors to get values to initialize the new immutable instance.
+   * If an instance is already immutable, it is returned as is.
+   * @param instance The instance to copy
+   * @return A copied immutable QueryOptions instance
+   */
+  public static ImmutableQueryOptions copyOf(QueryOptions instance) {
+    if (instance instanceof ImmutableQueryOptions) {
+      return (ImmutableQueryOptions) instance;
+    }
+    return ImmutableQueryOptions.builder()
+        .from(instance)
+        .build();
+  }
+
+  /**
+   * Creates a builder for {@link ImmutableQueryOptions ImmutableQueryOptions}.
+   * @return A new ImmutableQueryOptions builder
+   */
+  public static ImmutableQueryOptions.Builder builder() {
+    return new ImmutableQueryOptions.Builder();
+  }
+
+  /**
+   * Builds instances of type {@link ImmutableQueryOptions ImmutableQueryOptions}.
+   * Initialize attributes and then invoke the {@link #build()} method to create an
+   * immutable instance.
+   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
+   * but instead used immediately to create instances.</em>
+   */
+  public static final class Builder {
+    private Optional<String> wait = Optional.absent();
+    private Optional<String> token = Optional.absent();
+    private Optional<BigInteger> index = Optional.absent();
+    private Optional<String> near = Optional.absent();
+    private ConsistencyMode consistencyMode;
+
+    private Builder() {
+    }
+
+    /**
+     * Fill a builder with attribute values from the provided {@code QueryOptions} instance.
+     * Regular attribute values will be replaced with those from the given instance.
+     * Absent optional values will not replace present values.
+     * @param instance The instance from which to copy values
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder from(QueryOptions instance) {
+      Preconditions.checkNotNull(instance, "instance");
+      Optional<String> waitOptional = instance.getWait();
+      if (waitOptional.isPresent()) {
+        wait(waitOptional);
+      }
+      Optional<String> tokenOptional = instance.getToken();
+      if (tokenOptional.isPresent()) {
+        token(tokenOptional);
+      }
+      Optional<BigInteger> indexOptional = instance.getIndex();
+      if (indexOptional.isPresent()) {
+        index(indexOptional);
+      }
+      Optional<String> nearOptional = instance.getNear();
+      if (nearOptional.isPresent()) {
+        near(nearOptional);
+      }
+      consistencyMode(instance.getConsistencyMode());
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getWait() wait} to wait.
+     * @param wait The value for wait
+     * @return {@code this} builder for chained invocation
+     */
+    public final Builder wait(String wait) {
+      this.wait = Optional.of(wait);
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getWait() wait} to wait.
+     * @param wait The value for wait
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder wait(Optional<String> wait) {
+      this.wait = Preconditions.checkNotNull(wait, "wait");
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getToken() token} to token.
+     * @param token The value for token
+     * @return {@code this} builder for chained invocation
+     */
+    public final Builder token(String token) {
+      this.token = Optional.of(token);
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getToken() token} to token.
+     * @param token The value for token
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder token(Optional<String> token) {
+      this.token = Preconditions.checkNotNull(token, "token");
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getIndex() index} to index.
+     * @param index The value for index
+     * @return {@code this} builder for chained invocation
+     */
+    public final Builder index(BigInteger index) {
+      this.index = Optional.of(index);
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getIndex() index} to index.
+     * @param index The value for index
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder index(Optional<BigInteger> index) {
+      this.index = Preconditions.checkNotNull(index, "index");
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getNear() near} to near.
+     * @param near The value for near
+     * @return {@code this} builder for chained invocation
+     */
+    public final Builder near(String near) {
+      this.near = Optional.of(near);
+      return this;
+    }
+
+    /**
+     * Initializes the optional value {@link QueryOptions#getNear() near} to near.
+     * @param near The value for near
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder near(Optional<String> near) {
+      this.near = Preconditions.checkNotNull(near, "near");
+      return this;
+    }
+
+    /**
+     * Initializes the value for the {@link QueryOptions#getConsistencyMode() consistencyMode} attribute.
+     * <p><em>If not set, this attribute will have a default value as returned by the initializer of {@link QueryOptions#getConsistencyMode() consistencyMode}.</em>
+     * @param consistencyMode The value for consistencyMode 
+     * @return {@code this} builder for use in a chained invocation
+     */
+    public final Builder consistencyMode(ConsistencyMode consistencyMode) {
+      this.consistencyMode = Preconditions.checkNotNull(consistencyMode, "consistencyMode");
+      return this;
+    }
+
+    /**
+     * Builds a new {@link ImmutableQueryOptions ImmutableQueryOptions}.
+     * @return An immutable instance of QueryOptions
+     * @throws java.lang.IllegalStateException if any required attributes are missing
+     */
+    public ImmutableQueryOptions build() throws IllegalStateException {
+      return ImmutableQueryOptions.validate(new ImmutableQueryOptions(this));
+    }
+  }
+}
index f27c60a..2593c48 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 0ef9816..188f04e 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index bca98ab..0d7abe8 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 48fd005..2502c2f 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 2a6d165..03264c0 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 945cafb..d573c50 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index bc0d4c6..4a5cd1b 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index b5aa808..2c34e37 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index f72ff50..1d1f9e3 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 423ec3a..f3aeb09 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2016 ZTE, Inc. and others.
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 11b2a7c..30b179b 100644 (file)
@@ -1,33 +1,31 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package org.openo.msb.wrapper.serviceListener;\r
-\r
-import org.openo.msb.api.MicroServiceInfo;\r
-import org.openo.msb.api.Service;\r
-\r
-\r
-public interface IMicroServiceChangeListener {\r
-    public void onSave(Service microServiceInfo,String serverPort);\r
-    \r
-    public void onChange(String serviceName,String version,Service microServiceInfo,String serverPort);\r
-    \r
-    public void onStatusChange(String serviceName,String url,String version,String protocol,String status);\r
-    \r
-    public void onDelete(String serviceName, String url,String version,String protocol,String serverPort);\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.serviceListener;
+
+import org.openo.msb.api.MicroServiceInfo;
+import org.openo.msb.api.Service;
+
+
+public interface IMicroServiceChangeListener {
+    public void onSave(Service microServiceInfo,String serverPort);
+    
+    public void onChange(String serviceName,String version,Service microServiceInfo,String serverPort);
+    
+    public void onStatusChange(String serviceName,String url,String version,String protocol,String status);
+    
+    public void onDelete(String serviceName, String url,String version,String protocol,String serverPort);
+
+}
index e861782..45c085c 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.serviceListener;\r
-\r
-import java.util.Set;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.ApiRouteInfo;\r
-import org.openo.msb.api.CustomRouteInfo;\r
-import org.openo.msb.api.IuiRouteInfo;\r
-import org.openo.msb.api.Node;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.Service;\r
-import org.openo.msb.wrapper.ApiRouteServiceWrapper;\r
-import org.openo.msb.wrapper.CustomRouteServiceWrapper;\r
-import org.openo.msb.wrapper.IuiRouteServiceWrapper;\r
-import org.openo.msb.wrapper.util.RegExpTestUtil;\r
-import org.openo.msb.wrapper.util.RouteUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-\r
-public class MicroServiceChangeListener implements IMicroServiceChangeListener {\r
-    \r
-    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceChangeListener.class);\r
-    \r
-    @Override\r
-    public void onSave(Service microServiceInfo,String serverPort) {\r
-        \r
-        if("UI".equals(microServiceInfo.getProtocol())){\r
-            IuiRouteInfo iuiRouteInfo = this.buildIuiRouteInfo(microServiceInfo);\r
-            if(null != iuiRouteInfo){\r
-                IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(iuiRouteInfo);\r
-            }\r
-        }\r
-        else{        \r
-        \r
-            if(ifApiRouteUrl(microServiceInfo.getUrl())){\r
-                ApiRouteInfo apiRouteInfo = this.buildApiRouteInfo(microServiceInfo);\r
-                if(null != apiRouteInfo){\r
-                    ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(apiRouteInfo,serverPort);\r
-                }\r
-            }\r
-            else{\r
-                CustomRouteInfo customRouteInfo = this.buildCustomRouteInfo(microServiceInfo);\r
-                if(null != customRouteInfo){\r
-                    CustomRouteServiceWrapper.getInstance().saveCustomRouteInstance(customRouteInfo,serverPort);\r
-                }\r
-            }\r
-        }\r
-        \r
-        \r
-    }\r
-    \r
-    @Override\r
-    public void onChange(String serviceName, String version, Service microServiceInfo,String serverPort) {\r
-        \r
-        if("UI".equals(microServiceInfo.getProtocol())){\r
-            if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){\r
-                serviceName=serviceName.substring(4);\r
-            }\r
-            IuiRouteInfo iuiRouteInfo = this.buildIuiRouteInfo(microServiceInfo);\r
-            if(null != iuiRouteInfo){\r
-                IuiRouteServiceWrapper.getInstance().updateIuiRouteInstance(serviceName, iuiRouteInfo);\r
-            }\r
-        }\r
-        else{\r
-        \r
-            if(ifApiRouteUrl(microServiceInfo.getUrl())){\r
-                ApiRouteInfo apiRouteInfo = this.buildApiRouteInfo(microServiceInfo);\r
-                if(null != apiRouteInfo){\r
-                    ApiRouteServiceWrapper.getInstance().updateApiRouteInstance(serviceName, version, apiRouteInfo,serverPort);\r
-                }\r
-            }\r
-            else{\r
-                if(!serviceName.startsWith("/")){\r
-                    serviceName="/"+serviceName;\r
-                }\r
-                CustomRouteInfo customRouteInfo = this.buildCustomRouteInfo(microServiceInfo);\r
-                if(null != customRouteInfo){\r
-                    CustomRouteServiceWrapper.getInstance().updateCustomRouteInstance(serviceName,customRouteInfo,serverPort);\r
-                }\r
-            }\r
-        }\r
-        \r
-    }\r
-    \r
-    @Override\r
-    public void onStatusChange(String serviceName,String url,String version,String protocol,String status) {\r
-        if("UI".equals(protocol)){\r
-\r
-            if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){\r
-                serviceName=serviceName.substring(4);\r
-            } \r
-           IuiRouteServiceWrapper.getInstance().updateIuiRouteStatus(serviceName, status);\r
-            \r
-        }\r
-        else{\r
-            if(ifApiRouteUrl(url)){\r
-                ApiRouteServiceWrapper.getInstance().updateApiRouteStatus(serviceName, version, status);\r
-            }\r
-            else{\r
-                if(!serviceName.startsWith("/")){\r
-                    serviceName="/"+serviceName;\r
-                }\r
-                CustomRouteServiceWrapper.getInstance().updateCustomRouteStatus(serviceName, status); \r
-            }\r
-        }\r
-        \r
-      \r
-\r
-    }\r
-\r
-    @Override\r
-    public void onDelete(String serviceName,String url, String version,String protocol,String serverPort) {\r
-        \r
-        if("UI".equals(protocol)){\r
-            if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){\r
-                serviceName=serviceName.substring(4);\r
-            } \r
-           IuiRouteServiceWrapper.getInstance().deleteIuiRoute(serviceName, "*");\r
-            \r
-        }\r
-        else{\r
-            if(ifApiRouteUrl(url)){\r
-                ApiRouteServiceWrapper.getInstance().deleteApiRoute(serviceName, version, "*",serverPort);\r
-            }\r
-            else{\r
-\r
-              \r
-                if(!serviceName.startsWith("/")){\r
-                    serviceName="/"+serviceName;\r
-                }\r
-                \r
-                CustomRouteServiceWrapper.getInstance().deleteCustomRoute(serviceName, "*",serverPort); \r
-            }\r
-        }\r
-    }\r
-    \r
-    \r
-    /** \r
-    * @Title ifApiRouteUrl \r
-    * @Description TODO(According to judge whether the API registration URL format) \r
-    * @param url\r
-    * @return      \r
-    * @return boolean    \r
-    */\r
-    private boolean ifApiRouteUrl(String url){\r
-        return RegExpTestUtil.apiRouteUrlRegExpTest(url);\r
-    }\r
-    \r
-   \r
-    /**\r
-     * From MicroServiceInfo to ApiRouteInfo\r
-     * @param microServiceInfo\r
-     * @return\r
-     */\r
-    private ApiRouteInfo buildApiRouteInfo(Service microServiceInfo){\r
\r
-        ApiRouteInfo apiRouteInfo = new ApiRouteInfo();\r
-        apiRouteInfo.setUrl(microServiceInfo.getUrl());\r
-        \r
-        Set<Node> nodes=microServiceInfo.getNodes();\r
-        RouteServer[] routeServers=new RouteServer[nodes.size()];\r
-         \r
-        \r
-        int i=0;\r
-        for(Node node:nodes){\r
-            RouteServer routeServer = new RouteServer(node.getIp(),node.getPort()); \r
-            routeServers[i]=routeServer;\r
-            i++;\r
-        }      \r
-        \r
-               \r
-        apiRouteInfo.setServers(routeServers);\r
-        String[] rangs=StringUtils.split(microServiceInfo.getVisualRange(), "|");\r
-        if(RouteUtil.contain(rangs, "0")){\r
-            apiRouteInfo.setVisualRange("0");\r
-        }\r
-        else{\r
-            apiRouteInfo.setVisualRange("1");\r
-        }\r
-       \r
-        \r
-      if("ip_hash".equals(microServiceInfo.getLb_policy())){\r
-          apiRouteInfo.setUseOwnUpstream("1");\r
-    }\r
-       \r
-        \r
-        \r
-        apiRouteInfo.setServiceName(microServiceInfo.getServiceName());\r
-        apiRouteInfo.setVersion(microServiceInfo.getVersion());\r
-        //TODO:set json and metrics defaultValue\r
-        String version="".equals(microServiceInfo.getVersion())?"":"/"+microServiceInfo.getVersion();\r
-        apiRouteInfo.setApiJson(microServiceInfo.getUrl()+"/swagger.json");\r
-        apiRouteInfo.setMetricsUrl("/admin/metrics");\r
-        return apiRouteInfo;\r
-    }\r
-    \r
-    \r
-    /**\r
-     * From MicroServiceInfo to CustomRouteInfo\r
-     * @param microServiceInfo\r
-     * @return\r
-     */\r
-    private CustomRouteInfo buildCustomRouteInfo(Service microServiceInfo){\r
-      \r
-        CustomRouteInfo customRouteInfo = new CustomRouteInfo();\r
-        customRouteInfo.setUrl(microServiceInfo.getUrl());\r
-        \r
-        Set<Node> nodes=microServiceInfo.getNodes();\r
-        RouteServer[] routeServers=new RouteServer[nodes.size()];\r
-         \r
-        \r
-        int i=0;\r
-        for(Node node:nodes){\r
-            RouteServer routeServer = new RouteServer(node.getIp(),node.getPort()); \r
-            routeServers[i]=routeServer;\r
-            i++;\r
-        }      \r
-               \r
-        customRouteInfo.setServers(routeServers);\r
-        String[] rangs=StringUtils.split(microServiceInfo.getVisualRange(), "|");\r
-        if(RouteUtil.contain(rangs, "0")){\r
-            customRouteInfo.setVisualRange("0");\r
-        }\r
-        else{\r
-            customRouteInfo.setVisualRange("1");\r
-        }\r
-        \r
-        if("ip_hash".equals(microServiceInfo.getLb_policy())){\r
-            customRouteInfo.setUseOwnUpstream("1");\r
-        }\r
-        \r
-        String serviceName;\r
-        if(!microServiceInfo.getServiceName().startsWith("/")){\r
-            serviceName="/"+microServiceInfo.getServiceName();\r
-        }\r
-        else{\r
-            serviceName=microServiceInfo.getServiceName();\r
-        }\r
-        customRouteInfo.setServiceName(serviceName);\r
-       \r
-        return customRouteInfo;\r
-    }\r
-    \r
-    \r
-    /**\r
-     * From MicroServiceInfo to IuiRouteInfo\r
-     * @param microServiceInfo\r
-     * @return\r
-     */\r
-    private IuiRouteInfo buildIuiRouteInfo(Service microServiceInfo){\r
-      \r
-        IuiRouteInfo iuiRouteInfo = new IuiRouteInfo();\r
-        iuiRouteInfo.setUrl(microServiceInfo.getUrl());\r
-               \r
-        Set<Node> nodes=microServiceInfo.getNodes();\r
-        RouteServer[] routeServers=new RouteServer[nodes.size()];\r
-         \r
-        \r
-        int i=0;\r
-        for(Node node:nodes){\r
-            RouteServer routeServer = new RouteServer(node.getIp(),node.getPort()); \r
-            routeServers[i]=routeServer;\r
-            i++;\r
-        }      \r
-               \r
-        iuiRouteInfo.setServers(routeServers);\r
-        String[] rangs=StringUtils.split(microServiceInfo.getVisualRange(), "|");\r
-        if(RouteUtil.contain(rangs, "0")){\r
-            iuiRouteInfo.setVisualRange("0");\r
-        }\r
-        else{\r
-            iuiRouteInfo.setVisualRange("1");\r
-        }\r
-        \r
-        if("ip_hash".equals(microServiceInfo.getLb_policy())){\r
-            iuiRouteInfo.setUseOwnUpstream("1");\r
-        }\r
-\r
-        String serviceName=microServiceInfo.getServiceName();\r
-        if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){\r
-            serviceName=serviceName.substring(4);\r
-        }\r
-        \r
-        \r
-        iuiRouteInfo.setServiceName(serviceName);\r
-       \r
-        return iuiRouteInfo;\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.serviceListener;
+
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.ApiRouteInfo;
+import org.openo.msb.api.CustomRouteInfo;
+import org.openo.msb.api.IuiRouteInfo;
+import org.openo.msb.api.Node;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.Service;
+import org.openo.msb.wrapper.ApiRouteServiceWrapper;
+import org.openo.msb.wrapper.CustomRouteServiceWrapper;
+import org.openo.msb.wrapper.IuiRouteServiceWrapper;
+import org.openo.msb.wrapper.util.RegExpTestUtil;
+import org.openo.msb.wrapper.util.RouteUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class MicroServiceChangeListener implements IMicroServiceChangeListener {
+    
+    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceChangeListener.class);
+    
+    @Override
+    public void onSave(Service microServiceInfo,String serverPort) {
+        
+        if("UI".equals(microServiceInfo.getProtocol())){
+            IuiRouteInfo iuiRouteInfo = this.buildIuiRouteInfo(microServiceInfo);
+            if(null != iuiRouteInfo){
+                IuiRouteServiceWrapper.getInstance().saveIuiRouteInstance(iuiRouteInfo);
+            }
+        }
+        else{        
+        
+            if(ifApiRouteUrl(microServiceInfo.getUrl())){
+                ApiRouteInfo apiRouteInfo = this.buildApiRouteInfo(microServiceInfo);
+                if(null != apiRouteInfo){
+                    ApiRouteServiceWrapper.getInstance().saveApiRouteInstance(apiRouteInfo,serverPort);
+                }
+            }
+            else{
+                CustomRouteInfo customRouteInfo = this.buildCustomRouteInfo(microServiceInfo);
+                if(null != customRouteInfo){
+                    CustomRouteServiceWrapper.getInstance().saveCustomRouteInstance(customRouteInfo,serverPort);
+                }
+            }
+        }
+        
+        
+    }
+    
+    @Override
+    public void onChange(String serviceName, String version, Service microServiceInfo,String serverPort) {
+        
+        if("UI".equals(microServiceInfo.getProtocol())){
+            if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){
+                serviceName=serviceName.substring(4);
+            }
+            IuiRouteInfo iuiRouteInfo = this.buildIuiRouteInfo(microServiceInfo);
+            if(null != iuiRouteInfo){
+                IuiRouteServiceWrapper.getInstance().updateIuiRouteInstance(serviceName, iuiRouteInfo);
+            }
+        }
+        else{
+        
+            if(ifApiRouteUrl(microServiceInfo.getUrl())){
+                ApiRouteInfo apiRouteInfo = this.buildApiRouteInfo(microServiceInfo);
+                if(null != apiRouteInfo){
+                    ApiRouteServiceWrapper.getInstance().updateApiRouteInstance(serviceName, version, apiRouteInfo,serverPort);
+                }
+            }
+            else{
+                if(!serviceName.startsWith("/")){
+                    serviceName="/"+serviceName;
+                }
+                CustomRouteInfo customRouteInfo = this.buildCustomRouteInfo(microServiceInfo);
+                if(null != customRouteInfo){
+                    CustomRouteServiceWrapper.getInstance().updateCustomRouteInstance(serviceName,customRouteInfo,serverPort);
+                }
+            }
+        }
+        
+    }
+    
+    @Override
+    public void onStatusChange(String serviceName,String url,String version,String protocol,String status) {
+        if("UI".equals(protocol)){
+
+            if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){
+                serviceName=serviceName.substring(4);
+            } 
+           IuiRouteServiceWrapper.getInstance().updateIuiRouteStatus(serviceName, status);
+            
+        }
+        else{
+            if(ifApiRouteUrl(url)){
+                ApiRouteServiceWrapper.getInstance().updateApiRouteStatus(serviceName, version, status);
+            }
+            else{
+                if(!serviceName.startsWith("/")){
+                    serviceName="/"+serviceName;
+                }
+                CustomRouteServiceWrapper.getInstance().updateCustomRouteStatus(serviceName, status); 
+            }
+        }
+        
+      
+
+    }
+
+    @Override
+    public void onDelete(String serviceName,String url, String version,String protocol,String serverPort) {
+        
+        if("UI".equals(protocol)){
+            if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){
+                serviceName=serviceName.substring(4);
+            } 
+           IuiRouteServiceWrapper.getInstance().deleteIuiRoute(serviceName, "*");
+            
+        }
+        else{
+            if(ifApiRouteUrl(url)){
+                ApiRouteServiceWrapper.getInstance().deleteApiRoute(serviceName, version, "*",serverPort);
+            }
+            else{
+
+              
+                if(!serviceName.startsWith("/")){
+                    serviceName="/"+serviceName;
+                }
+                
+                CustomRouteServiceWrapper.getInstance().deleteCustomRoute(serviceName, "*",serverPort); 
+            }
+        }
+    }
+    
+    
+    /** 
+    * @Title ifApiRouteUrl 
+    * @Description TODO(According to judge whether the API registration URL format) 
+    * @param url
+    * @return      
+    * @return boolean    
+    */
+    private boolean ifApiRouteUrl(String url){
+        return RegExpTestUtil.apiRouteUrlRegExpTest(url);
+    }
+    
+   
+    /**
+     * From MicroServiceInfo to ApiRouteInfo
+     * @param microServiceInfo
+     * @return
+     */
+    private ApiRouteInfo buildApiRouteInfo(Service microServiceInfo){
+        ApiRouteInfo apiRouteInfo = new ApiRouteInfo();
+        apiRouteInfo.setUrl(microServiceInfo.getUrl());
+        
+        Set<Node> nodes=microServiceInfo.getNodes();
+        RouteServer[] routeServers=new RouteServer[nodes.size()];
+         
+        
+        int i=0;
+        for(Node node:nodes){
+            RouteServer routeServer = new RouteServer(node.getIp(),node.getPort()); 
+            routeServers[i]=routeServer;
+            i++;
+        }      
+        
+               
+        apiRouteInfo.setServers(routeServers);
+        String[] rangs=StringUtils.split(microServiceInfo.getVisualRange(), "|");
+        if(RouteUtil.contain(rangs, "0")){
+            apiRouteInfo.setVisualRange("0");
+        }
+        else{
+            apiRouteInfo.setVisualRange("1");
+        }
+       
+        
+      if("ip_hash".equals(microServiceInfo.getLb_policy())){
+          apiRouteInfo.setUseOwnUpstream("1");
+    }
+       
+        
+        
+        apiRouteInfo.setServiceName(microServiceInfo.getServiceName());
+        apiRouteInfo.setVersion(microServiceInfo.getVersion());
+        //TODO:set json and metrics defaultValue
+        String version="".equals(microServiceInfo.getVersion())?"":"/"+microServiceInfo.getVersion();
+        apiRouteInfo.setApiJson(microServiceInfo.getUrl()+"/swagger.json");
+        apiRouteInfo.setMetricsUrl("/admin/metrics");
+        return apiRouteInfo;
+    }
+    
+    
+    /**
+     * From MicroServiceInfo to CustomRouteInfo
+     * @param microServiceInfo
+     * @return
+     */
+    private CustomRouteInfo buildCustomRouteInfo(Service microServiceInfo){
+      
+        CustomRouteInfo customRouteInfo = new CustomRouteInfo();
+        customRouteInfo.setUrl(microServiceInfo.getUrl());
+        
+        Set<Node> nodes=microServiceInfo.getNodes();
+        RouteServer[] routeServers=new RouteServer[nodes.size()];
+         
+        
+        int i=0;
+        for(Node node:nodes){
+            RouteServer routeServer = new RouteServer(node.getIp(),node.getPort()); 
+            routeServers[i]=routeServer;
+            i++;
+        }      
+               
+        customRouteInfo.setServers(routeServers);
+        String[] rangs=StringUtils.split(microServiceInfo.getVisualRange(), "|");
+        if(RouteUtil.contain(rangs, "0")){
+            customRouteInfo.setVisualRange("0");
+        }
+        else{
+            customRouteInfo.setVisualRange("1");
+        }
+        
+        if("ip_hash".equals(microServiceInfo.getLb_policy())){
+            customRouteInfo.setUseOwnUpstream("1");
+        }
+        
+        String serviceName;
+        if(!microServiceInfo.getServiceName().startsWith("/")){
+            serviceName="/"+microServiceInfo.getServiceName();
+        }
+        else{
+            serviceName=microServiceInfo.getServiceName();
+        }
+        customRouteInfo.setServiceName(serviceName);
+       
+        return customRouteInfo;
+    }
+    
+    
+    /**
+     * From MicroServiceInfo to IuiRouteInfo
+     * @param microServiceInfo
+     * @return
+     */
+    private IuiRouteInfo buildIuiRouteInfo(Service microServiceInfo){
+      
+        IuiRouteInfo iuiRouteInfo = new IuiRouteInfo();
+        iuiRouteInfo.setUrl(microServiceInfo.getUrl());
+               
+        Set<Node> nodes=microServiceInfo.getNodes();
+        RouteServer[] routeServers=new RouteServer[nodes.size()];
+         
+        
+        int i=0;
+        for(Node node:nodes){
+            RouteServer routeServer = new RouteServer(node.getIp(),node.getPort()); 
+            routeServers[i]=routeServer;
+            i++;
+        }      
+               
+        iuiRouteInfo.setServers(routeServers);
+        String[] rangs=StringUtils.split(microServiceInfo.getVisualRange(), "|");
+        if(RouteUtil.contain(rangs, "0")){
+            iuiRouteInfo.setVisualRange("0");
+        }
+        else{
+            iuiRouteInfo.setVisualRange("1");
+        }
+        
+        if("ip_hash".equals(microServiceInfo.getLb_policy())){
+            iuiRouteInfo.setUseOwnUpstream("1");
+        }
+
+        String serviceName=microServiceInfo.getServiceName();
+        if(serviceName.startsWith("iui_")||serviceName.startsWith("IUI_")){
+            serviceName=serviceName.substring(4);
+        }
+        
+        
+        iuiRouteInfo.setServiceName(serviceName);
+       
+        return iuiRouteInfo;
+    }
+}
index d1f73cf..e739ceb 100644 (file)
@@ -1,66 +1,65 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-import java.io.BufferedReader;\r
-import java.io.File;\r
-import java.io.FileInputStream;\r
-import java.io.FileNotFoundException;\r
-import java.io.IOException;\r
-import java.io.InputStreamReader;\r
-\r
-public final class FileUtil {\r
-\r
-    /**\r
-     * Read all the files under a folder\r
-     */\r
-    public static File[] readFileFolder(String filepath) throws FileNotFoundException, IOException {\r
-        File file = new File(filepath);\r
-        if (file.isDirectory()) {\r
-            File[] filelist = file.listFiles();\r
-            return filelist;\r
-        }\r
-       \r
-        return null;\r
-    }\r
-\r
-    public static String readFile(String Path) throws IOException{\r
-        BufferedReader reader = null;\r
-        String fileContent = "";\r
-        try {\r
-            FileInputStream fileInputStream = new FileInputStream(Path);\r
-            InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");\r
-            reader = new BufferedReader(inputStreamReader);\r
-            String tempString = null;\r
-            while ((tempString = reader.readLine()) != null) {\r
-                fileContent += tempString;\r
-            }\r
-            reader.close();\r
-        } catch (IOException e) {\r
-            throw e;\r
-        } finally {\r
-            if (reader != null) {\r
-                try {\r
-                    reader.close();\r
-                } catch (IOException e) {\r
-                    throw e;\r
-                }\r
-            }\r
-        }\r
-        return fileContent;\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public final class FileUtil {
+
+    /**
+     * Read all the files under a folder
+     */
+    public static File[] readFileFolder(String filepath) throws FileNotFoundException, IOException {
+        File file = new File(filepath);
+        if (file.isDirectory()) {
+            File[] filelist = file.listFiles();
+            return filelist;
+        }
+       
+        return null;
+    }
+
+    public static String readFile(String Path) throws IOException{
+        BufferedReader reader = null;
+        String fileContent = "";
+        try {
+            FileInputStream fileInputStream = new FileInputStream(Path);
+            InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");
+            reader = new BufferedReader(inputStreamReader);
+            String tempString = null;
+            while ((tempString = reader.readLine()) != null) {
+                fileContent += tempString;
+            }
+            reader.close();
+        } catch (IOException e) {
+            throw e;
+        } finally {
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (IOException e) {
+                    throw e;
+                }
+            }
+        }
+        return fileContent;
+    }
+}
index 998ecc6..9f6f236 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-import java.util.List;\r
-\r
-import org.openo.msb.api.ApiRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import com.fasterxml.jackson.core.type.TypeReference;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-import com.fasterxml.jackson.databind.SerializationFeature;\r
-\r
-\r
-public class JacksonJsonUtil {\r
-       \r
-        private static final Logger logger = LoggerFactory.getLogger(JacksonJsonUtil.class);\r
-        \r
-       private static ObjectMapper mapper;\r
-       \r
-       \r
-       public static synchronized ObjectMapper getMapperInstance() {   \r
-       if (mapper == null) {   \r
-            mapper = new ObjectMapper();   \r
-        }   \r
-        return mapper;   \r
-    } \r
-       \r
-       /**\r
-        * from java object to json \r
-        * @param obj \r
-        * @return json\r
-        * @throws Exception \r
-        */\r
-       public static String beanToJson(Object obj) throws Exception {\r
-               String json=null;\r
-               try {\r
-                       ObjectMapper objectMapper = getMapperInstance();\r
-                        objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);  \r
-                       json =objectMapper.writeValueAsString(obj);\r
-               } catch (Exception e) {\r
-                   logger.error("Class beanToJson faild");\r
-                        throw new Exception("Class beanToJson faild");\r
-               }               \r
-               return json;\r
-       }\r
-       \r
-       \r
-       \r
-       /**\r
-        * from json to java object\r
-        * @param json \r
-        * @param cls  \r
-        * @return \r
-        * @throws Exception \r
-        */\r
-       public static Object jsonToBean(String json, Class<?> cls) throws Exception {\r
-               Object vo =null;\r
-               try {\r
-               ObjectMapper objectMapper = getMapperInstance();\r
-                 objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);  \r
-                vo = objectMapper.readValue(json, cls);\r
-               \r
-               } catch (Exception e) {\r
-                   logger.error(cls+" JsonTobean faild");\r
-                       throw new Exception(cls+" JsonTobean faild");\r
-               }       \r
-               return vo;\r
-       }\r
-       \r
-       /**\r
-     * from json to java List\r
-     * @param json \r
-     * @return \r
-     * @throws Exception \r
-     */\r
-    public static List<ApiRouteInfo> jsonToListBean(String json) throws Exception {\r
-        List<ApiRouteInfo> vo =null;\r
-        try {\r
-      \r
-        ObjectMapper objectMapper = getMapperInstance();\r
-    \r
-\r
-         vo = objectMapper.readValue(json, new TypeReference<List<ApiRouteInfo>>() {});\r
-        \r
-        } catch (Exception e) {\r
-            throw new Exception( "JSON_TO_BEAN_FAILD");\r
-        }   \r
-        return vo;\r
-    }\r
-    \r
-    public static void main(String[] args) {\r
-        RouteServer server=new RouteServer("127.0.0.1","80");\r
-        try {\r
-            String json=beanToJson(server);\r
-            System.out.println(json);\r
-        } catch (Exception e) {\r
-            // TODO Auto-generated catch block\r
-            e.printStackTrace();\r
-        }\r
-    }\r
-       \r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import java.util.List;
+
+import org.openo.msb.api.ApiRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+
+public class JacksonJsonUtil {
+       
+        private static final Logger logger = LoggerFactory.getLogger(JacksonJsonUtil.class);
+        
+       private static ObjectMapper mapper;
+       
+       
+       public static synchronized ObjectMapper getMapperInstance() {   
+       if (mapper == null) {   
+            mapper = new ObjectMapper();   
+        }   
+        return mapper;   
+    } 
+       
+       /**
+        * from java object to json 
+        * @param obj 
+        * @return json
+        * @throws Exception 
+        */
+       public static String beanToJson(Object obj) throws Exception {
+               String json=null;
+               try {
+                       ObjectMapper objectMapper = getMapperInstance();
+                        objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);  
+                       json =objectMapper.writeValueAsString(obj);
+               } catch (Exception e) {
+                   logger.error("Class beanToJson faild");
+                        throw new Exception("Class beanToJson faild");
+               }               
+               return json;
+       }
+       
+       
+       
+       /**
+        * from json to java object
+        * @param json 
+        * @param cls  
+        * @return 
+        * @throws Exception 
+        */
+       public static Object jsonToBean(String json, Class<?> cls) throws Exception {
+               Object vo =null;
+               try {
+               ObjectMapper objectMapper = getMapperInstance();
+                 objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);  
+                vo = objectMapper.readValue(json, cls);
+               
+               } catch (Exception e) {
+                   logger.error(cls+" JsonTobean faild");
+                       throw new Exception(cls+" JsonTobean faild");
+               }       
+               return vo;
+       }
+       
+       /**
+     * from json to java List
+     * @param json 
+     * @return 
+     * @throws Exception 
+     */
+    public static List<ApiRouteInfo> jsonToListBean(String json) throws Exception {
+        List<ApiRouteInfo> vo =null;
+        try {
+      
+        ObjectMapper objectMapper = getMapperInstance();
+    
+
+         vo = objectMapper.readValue(json, new TypeReference<List<ApiRouteInfo>>() {});
+        
+        } catch (Exception e) {
+            throw new Exception( "JSON_TO_BEAN_FAILD");
+        }   
+        return vo;
+    }
+    
+    public static void main(String[] args) {
+        RouteServer server=new RouteServer("127.0.0.1","80");
+        try {
+            String json=beanToJson(server);
+            System.out.println(json);
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+       
+
+}
index d7e1eb9..97309e8 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-import java.io.BufferedInputStream;\r
-import java.io.File;\r
-import java.io.FileInputStream;\r
-import java.util.PropertyResourceBundle;\r
-import java.util.ResourceBundle;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import redis.clients.jedis.Jedis;\r
-import redis.clients.jedis.JedisPool;\r
-import redis.clients.jedis.JedisPoolConfig;\r
-\r
-\r
-\r
-public final class JedisUtil {\r
-       private static final Logger LOGGER = LoggerFactory.getLogger(JedisUtil.class);\r
-       private static String host = "127.0.0.1";\r
-       private static int port = 6379;\r
-       private static int connectionTimeout = 2000;\r
-       private static int DEFAULT_DB_INDEX = 0;\r
-\r
-       private static JedisPool jedisPool = null;\r
-       \r
-       public static String serverIp="127.0.0.1";\r
-       \r
-       public static int serverPort=10080;\r
-       \r
-       public static String propertiesName="redis.properties";\r
-           \r
-       public static String propertiesPath="";\r
-\r
-       \r
-       \r
-public static void main(String[] args) {\r
-       \r
-}\r
-\r
-       private JedisUtil() {\r
-               // private constructor\r
-\r
-       }\r
-       \r
-       private static void initialPool() {\r
-               try {\r
-                   JedisPoolConfig config = new JedisPoolConfig();\r
-                       \r
-//                     String pathtest=JedisUtil.class.getResource("").getPath();\r
-//                     String path ="/"+ pathtest.substring(0, pathtest.indexOf("assembly")).replace("file:/", "") +"assembly/"+defaultWorkspace;\r
-               \r
-                       File propertiesFile = new File(propertiesPath);\r
-                       \r
-                          if (propertiesFile.exists()) {\r
-                                 \r
-                                \r
-                                BufferedInputStream inputStream =new BufferedInputStream(new FileInputStream(propertiesPath));  \r
-                                ResourceBundle bundle =new PropertyResourceBundle(inputStream);\r
-                                \r
-                                if (bundle == null) {\r
-                                               throw new IllegalArgumentException(\r
-                                                               "[redis.properties] is not found!");\r
-                                       }\r
-                                \r
-\r
-                                       // 设置连接池基本信息\r
-                                       String strHost = bundle.getString("redis.host");\r
-                                       if(StringUtils.isNotEmpty(strHost)){\r
-                                               host = strHost;\r
-                                       }\r
-                                       String strPort = bundle.getString("redis.port");\r
-                                       if(StringUtils.isNotEmpty(strPort)){\r
-                                               port = Integer.valueOf(strPort);\r
-                                       }\r
-                               \r
-                                       \r
-                                       String strTimeout = bundle.getString("redis.connectionTimeout");\r
-                                       if (StringUtils.isNotEmpty(strTimeout) ){\r
-                                               connectionTimeout = Integer.valueOf(strTimeout);\r
-                                       }\r
-                                       \r
-//                                     serverIp=bundle.getString("server.ip");\r
-                                       serverPort=Integer.valueOf(bundle.getString("server.port"));\r
-                                       \r
-                                       String strDbIndex = bundle.getString("redis.db_index");\r
-                                       if (StringUtils.isNotEmpty(strDbIndex)) {\r
-                                               DEFAULT_DB_INDEX = Integer.valueOf(strDbIndex);\r
-                                       }\r
-\r
-                                       String strMaxTotal = bundle.getString("redis.pool.maxTotal");\r
-                                       if (StringUtils.isNotEmpty(strMaxTotal)) {\r
-                                               config.setMaxTotal(Integer.valueOf(strMaxTotal));\r
-                                       }\r
-\r
-                                       String strMaxIdle = bundle.getString("redis.pool.maxIdle");\r
-                                       if (StringUtils.isNotEmpty(strMaxIdle)) {\r
-                                               config.setMaxIdle(Integer.valueOf(strMaxIdle));\r
-                                       }\r
-\r
-                                       String strMaxWaitMillis = bundle.getString("redis.pool.maxWaitMillis");\r
-                                       if (StringUtils.isNotEmpty(strMaxWaitMillis)) {\r
-                                               config.setMaxWaitMillis(Long.valueOf(strMaxWaitMillis));\r
-                                       }\r
-\r
-                                       String strTestOnBorrow = bundle\r
-                                                       .getString("redis.pool.testOnBorrow");\r
-                                       if (StringUtils.isNotEmpty(strTestOnBorrow)) {\r
-                                               config.setTestOnBorrow(Boolean.valueOf(strTestOnBorrow));\r
-                                       }\r
-\r
-                                       String strTestOnReturn = bundle\r
-                                                       .getString("redis.pool.testOnReturn");\r
-                                       if (StringUtils.isNotEmpty(strTestOnReturn)) {\r
-                                               config.setTestOnReturn(Boolean.valueOf(strTestOnReturn));\r
-                                       }\r
-\r
-                          }\r
-                       \r
-                               LOGGER.info("Redis server info: " + host + ":" + port);\r
-                               LOGGER.info("nginx server info: " + serverIp + ":" + serverPort);\r
-       \r
-                       \r
-//                     ResourceBundle bundle = ResourceBundle.getBundle("conf.redis");\r
-       \r
-                       jedisPool = new JedisPool(config, host, port, connectionTimeout);\r
-               } catch (Exception e) {\r
-                       LOGGER.error("Initiate Jedis pool failed!", e);\r
-               }\r
-       }\r
-       /**\r
-        * From the connection pool to obtain jedis instance, use the default database index number 0\r
-        * @return\r
-        */\r
-       public synchronized static Jedis borrowJedisInstance() {\r
-               if (jedisPool == null) {\r
-                       initialPool();\r
-               }\r
-               try {\r
-                       if (jedisPool != null) {\r
-                               Jedis resource = jedisPool.getResource();\r
-                               resource.select(DEFAULT_DB_INDEX);\r
-                               return resource;\r
-                       } else {\r
-                               return null;\r
-                       }\r
-               } catch (Exception e) {\r
-                       LOGGER.error("Get Jedis from pool failed!", e);\r
-                       return null;\r
-               }\r
-       }\r
-       /**\r
-        * From the connection pool to obtain jedis instance, using the specified database index number\r
-        * @return\r
-        */\r
-       public synchronized static Jedis borrowJedisInstance(final int dbIndex) {\r
-               if (jedisPool == null) {\r
-                       initialPool();\r
-               }\r
-               try {\r
-                       if (jedisPool != null) {\r
-                               Jedis resource = jedisPool.getResource();\r
-                               resource.select(dbIndex);\r
-                               return resource;\r
-                       } else {\r
-                               return null;\r
-                       }\r
-               } catch (Exception e) {\r
-                       LOGGER.error("Get Jedis from pool failed!", e);\r
-                       return null;\r
-               }\r
-       }\r
-       \r
-       /**\r
-        *  returned to the pool jedis instance\r
-        * @param jedis\r
-        */\r
-       public static void returnJedisInstance(final Jedis jedis) {\r
-               if (jedis != null) {\r
-                       jedis.close();\r
-               }\r
-       }\r
-       \r
-       \r
-       /** \r
-       * @Title getJedis \r
-       * @Description TODO(From the connection pool to obtain jedis instance) \r
-       * @throws Exception      \r
-       * @return Jedis    \r
-       */\r
-       public static Jedis getJedis() throws Exception{\r
-            \r
-  \r
-               Jedis jedis = borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new Exception("fetch from jedis pool failed,null object!");\r
-                \r
-            }\r
-            \r
-            return jedis;\r
-      \r
-       }\r
-\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.JedisPoolConfig;
+
+
+
+public final class JedisUtil {
+       private static final Logger LOGGER = LoggerFactory.getLogger(JedisUtil.class);
+       private static String host = "127.0.0.1";
+       private static int port = 6379;
+       private static int connectionTimeout = 2000;
+       private static int DEFAULT_DB_INDEX = 0;
+
+       private static JedisPool jedisPool = null;
+       
+       public static String serverIp="127.0.0.1";
+       
+       public static int serverPort=10080;
+       
+       public static String propertiesName="redis.properties";
+           
+       public static String propertiesPath="";
+
+       
+       
+public static void main(String[] args) {
+       
+}
+
+       private JedisUtil() {
+               // private constructor
+
+       }
+       
+       private static void initialPool() {
+               try {
+                   JedisPoolConfig config = new JedisPoolConfig();
+                       
+//                     String pathtest=JedisUtil.class.getResource("").getPath();
+//                     String path ="/"+ pathtest.substring(0, pathtest.indexOf("assembly")).replace("file:/", "") +"assembly/"+defaultWorkspace;
+               
+                       File propertiesFile = new File(propertiesPath);
+                       
+                          if (propertiesFile.exists()) {
+                                 
+                                
+                                BufferedInputStream inputStream =new BufferedInputStream(new FileInputStream(propertiesPath));  
+                                ResourceBundle bundle =new PropertyResourceBundle(inputStream);
+                                
+                                if (bundle == null) {
+                                               throw new IllegalArgumentException(
+                                                               "[redis.properties] is not found!");
+                                       }
+                                
+
+                                       // 设置连接池基本信息
+                                       String strHost = bundle.getString("redis.host");
+                                       if(StringUtils.isNotEmpty(strHost)){
+                                               host = strHost;
+                                       }
+                                       String strPort = bundle.getString("redis.port");
+                                       if(StringUtils.isNotEmpty(strPort)){
+                                               port = Integer.valueOf(strPort);
+                                       }
+                               
+                                       
+                                       String strTimeout = bundle.getString("redis.connectionTimeout");
+                                       if (StringUtils.isNotEmpty(strTimeout) ){
+                                               connectionTimeout = Integer.valueOf(strTimeout);
+                                       }
+                                       
+//                                     serverIp=bundle.getString("server.ip");
+                                       serverPort=Integer.valueOf(bundle.getString("server.port"));
+                                       
+                                       String strDbIndex = bundle.getString("redis.db_index");
+                                       if (StringUtils.isNotEmpty(strDbIndex)) {
+                                               DEFAULT_DB_INDEX = Integer.valueOf(strDbIndex);
+                                       }
+
+                                       String strMaxTotal = bundle.getString("redis.pool.maxTotal");
+                                       if (StringUtils.isNotEmpty(strMaxTotal)) {
+                                               config.setMaxTotal(Integer.valueOf(strMaxTotal));
+                                       }
+
+                                       String strMaxIdle = bundle.getString("redis.pool.maxIdle");
+                                       if (StringUtils.isNotEmpty(strMaxIdle)) {
+                                               config.setMaxIdle(Integer.valueOf(strMaxIdle));
+                                       }
+
+                                       String strMaxWaitMillis = bundle.getString("redis.pool.maxWaitMillis");
+                                       if (StringUtils.isNotEmpty(strMaxWaitMillis)) {
+                                               config.setMaxWaitMillis(Long.valueOf(strMaxWaitMillis));
+                                       }
+
+                                       String strTestOnBorrow = bundle
+                                                       .getString("redis.pool.testOnBorrow");
+                                       if (StringUtils.isNotEmpty(strTestOnBorrow)) {
+                                               config.setTestOnBorrow(Boolean.valueOf(strTestOnBorrow));
+                                       }
+
+                                       String strTestOnReturn = bundle
+                                                       .getString("redis.pool.testOnReturn");
+                                       if (StringUtils.isNotEmpty(strTestOnReturn)) {
+                                               config.setTestOnReturn(Boolean.valueOf(strTestOnReturn));
+                                       }
+
+                          }
+                       
+                               LOGGER.info("Redis server info: " + host + ":" + port);
+                               LOGGER.info("nginx server info: " + serverIp + ":" + serverPort);
+       
+                       
+//                     ResourceBundle bundle = ResourceBundle.getBundle("conf.redis");
+       
+                       jedisPool = new JedisPool(config, host, port, connectionTimeout);
+               } catch (Exception e) {
+                       LOGGER.error("Initiate Jedis pool failed!", e);
+               }
+       }
+       /**
+        * From the connection pool to obtain jedis instance, use the default database index number 0
+        * @return
+        */
+       public synchronized static Jedis borrowJedisInstance() {
+               if (jedisPool == null) {
+                       initialPool();
+               }
+               try {
+                       if (jedisPool != null) {
+                               Jedis resource = jedisPool.getResource();
+                               resource.select(DEFAULT_DB_INDEX);
+                               return resource;
+                       } else {
+                               return null;
+                       }
+               } catch (Exception e) {
+                       LOGGER.error("Get Jedis from pool failed!", e);
+                       return null;
+               }
+       }
+       /**
+        * From the connection pool to obtain jedis instance, using the specified database index number
+        * @return
+        */
+       public synchronized static Jedis borrowJedisInstance(final int dbIndex) {
+               if (jedisPool == null) {
+                       initialPool();
+               }
+               try {
+                       if (jedisPool != null) {
+                               Jedis resource = jedisPool.getResource();
+                               resource.select(dbIndex);
+                               return resource;
+                       } else {
+                               return null;
+                       }
+               } catch (Exception e) {
+                       LOGGER.error("Get Jedis from pool failed!", e);
+                       return null;
+               }
+       }
+       
+       /**
+        *  returned to the pool jedis instance
+        * @param jedis
+        */
+       public static void returnJedisInstance(final Jedis jedis) {
+               if (jedis != null) {
+                       jedis.close();
+               }
+       }
+       
+       
+       /** 
+       * @Title getJedis 
+       * @Description TODO(From the connection pool to obtain jedis instance) 
+       * @throws Exception      
+       * @return Jedis    
+       */
+       public static Jedis getJedis() throws Exception{
+            
+  
+               Jedis jedis = borrowJedisInstance();
+            if (jedis == null) {
+                throw new Exception("fetch from jedis pool failed,null object!");
+                
+            }
+            
+            return jedis;
+      
+       }
+
 }
\ No newline at end of file
 }
\ No newline at end of file
index a70c33d..6a579b1 100644 (file)
@@ -1,24 +1,23 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-public class MetricsUtil {\r
-\r
-       public static String adminContextPath = "http://127.0.0.1:8086/admin/metrics";\r
-       \r
-       public static final int SC_OK = 200;\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+public class MetricsUtil {
+
+       public static String adminContextPath = "http://127.0.0.1:8086/admin/metrics";
+       
+       public static final int SC_OK = 200;
+}
index 8b87c31..98e051f 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-import java.sql.Date;\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-import java.util.regex.Matcher;\r
-import java.util.regex.Pattern;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.MicroServiceFullInfo;\r
-import org.openo.msb.api.MicroServiceInfo;\r
-import org.openo.msb.api.Node;\r
-import org.openo.msb.api.NodeInfo;\r
-import org.openo.msb.api.Service;\r
-import org.openo.msb.wrapper.serviceListener.IMicroServiceChangeListener;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import redis.clients.jedis.Jedis;\r
-\r
-public class MicroServiceDB {\r
-\r
-    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceDB.class);\r
-\r
-    private static MicroServiceDB instance = new MicroServiceDB();\r
-\r
-    private List<IMicroServiceChangeListener> serviceListenerlist =\r
-            new ArrayList<IMicroServiceChangeListener>();\r
-\r
-    private MicroServiceDB() {}\r
-\r
-    public static MicroServiceDB getInstance() {\r
-        return instance;\r
-    }\r
-\r
-   \r
-    public void addServiceChangeListener(IMicroServiceChangeListener listener) {\r
-        synchronized (serviceListenerlist) {\r
-            serviceListenerlist.add(listener);\r
-        }\r
-    }\r
-\r
-   \r
-    public void removeServiceChangeListener(IMicroServiceChangeListener listener) {\r
-        synchronized (serviceListenerlist) {\r
-            serviceListenerlist.remove(listener);\r
-        }\r
-    }\r
-    \r
-    \r
-    public MicroServiceFullInfo[] getAllMicroServiceInstances() throws Exception {\r
-        Jedis jedis = null;\r
-        MicroServiceFullInfo[] microServiceList;\r
-        try {\r
-            jedis = JedisUtil.getJedis();\r
-\r
-            String routekey =\r
-                    MicroServiceUtil.getPrefixedKey("","*", MicroServiceUtil.SUFFIX_PATH_INFO);\r
-            Set<String> serviceSet = jedis.keys(routekey);\r
-            microServiceList = new MicroServiceFullInfo[serviceSet.size()];\r
-\r
-            Pattern redisKeyPattern = MicroServiceUtil.getRedisKeyPattern();\r
-            int i = 0;\r
-            for (String servicePath : serviceSet) {\r
-                Matcher matcher = redisKeyPattern.matcher(servicePath);\r
-                if (matcher.matches()) {\r
-                    microServiceList[i] = getMicroServiceByJedis(jedis, matcher.group("servicename"),matcher.group("version"), "");\r
-                    i++;\r
-                }\r
-            }\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new Exception("call redis throw exception:"+e.getMessage());       \r
-       } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-        \r
-        return microServiceList;\r
-    }\r
-\r
-    public void saveMicroServiceInfo2Redis(MicroServiceInfo microServiceInfo,String serverPort) throws Exception {\r
-        // 1.1 set info\r
-        String serviceInfokey =\r
-                MicroServiceUtil.getServiceInfoKey(serverPort,microServiceInfo.getServiceName(),\r
-                        microServiceInfo.getVersion());\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("url", microServiceInfo.getUrl());\r
-        serviceInfoMap.put("protocol", microServiceInfo.getProtocol());\r
-        serviceInfoMap.put("visualRange",microServiceInfo.getVisualRange());\r
-        serviceInfoMap.put("lb_policy",microServiceInfo.getLb_policy());\r
-        serviceInfoMap.put("status", "0");\r
-        \r
-        \r
-\r
-        // 1.2 set lb info\r
-        String serviceLBkey =\r
-                MicroServiceUtil.getPrefixedKey(serverPort,microServiceInfo.getServiceName(),\r
-                        microServiceInfo.getVersion(), MicroServiceUtil.ROUTE_PATH_LOADBALANCE);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.getJedis();\r
-            // 2.1 save info\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-\r
-\r
-            for(Node node:microServiceInfo.getNodes()){\r
-               \r
-                String key=serviceLBkey+":"+node.getIp()+"-"+node.getPort();\r
-                \r
-                Map<String,String> nodeMap = new HashMap<String,String>();\r
-               \r
-                nodeMap.put("ip", node.getIp());\r
-                nodeMap.put("port", node.getPort());\r
-                nodeMap.put("ttl", Integer.toString(node.getTtl()));\r
-                long expiration_time=System.currentTimeMillis()+node.getTtl()*1000;\r
-                nodeMap.put("expiration", Long.toString(expiration_time));\r
-                \r
-                if(jedis.keys(key).isEmpty()){\r
-                    nodeMap.put("created_at",  Long.toString(System.currentTimeMillis()));\r
-                }\r
-//                else{\r
-//                    Map<String,String> nodeLBmap = jedis.hgetAll(key); \r
-//                    nodeMap.put("created_at", nodeLBmap.get("created_at"));\r
-//                }\r
-                nodeMap.put("updated_at", Long.toString(System.currentTimeMillis()));\r
-                \r
-                jedis.hmset(key, nodeMap);\r
-            }\r
-            \r
-//            jedis.sadd(serviceLBkey, nodeArray);\r
-\r
-        } catch (Exception e) {\r
-            LOGGER.error("save to redis throw exception", e);\r
-            throw new Exception("save to  redis throw exception:"+e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-\r
-\r
-    }\r
-    \r
-    public void updateMicroServiceStatus(String serviceName, String version,String status) throws Exception{\r
-        \r
-        \r
-        String serviceInfokey = MicroServiceUtil.getServiceInfoKey("",serviceName, version);\r
-        Map<String, String> serviceInfoMap = new HashMap<String, String>();\r
-        serviceInfoMap.put("status", status);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.borrowJedisInstance();\r
-            if (jedis == null) {\r
-                throw new Exception("fetch from jedis pool failed,null object!");\r
-            }\r
-            jedis.hmset(serviceInfokey, serviceInfoMap);\r
-        }\r
-        catch (Exception e) {\r
-            LOGGER.error("update MicroService status throw exception", e);\r
-            throw new Exception("update MicroService status throw exception:"+e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-        \r
-    }\r
-    \r
-    \r
-    public void  updateMicroServiceNode2Redis(String serviceName, String version,String ip,String port,int ttl) throws Exception {\r
-        String serviceLBkey =\r
-                MicroServiceUtil.getPrefixedKey("",serviceName,version, MicroServiceUtil.ROUTE_PATH_LOADBALANCE);\r
-\r
-\r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.getJedis();\r
-          \r
-               \r
-                String nodeKey=serviceLBkey+":"+ip+"-"+port;                \r
-                Map<String,String> nodeLBmap = jedis.hgetAll(nodeKey);\r
-                \r
-                if(nodeLBmap.isEmpty()){\r
-                    throw new NullPointerException(" MicroService Node not fond ");  \r
-                }\r
-                \r
-               \r
-                nodeLBmap.put("ttl", Integer.toString(ttl));\r
-                long expiration_time=System.currentTimeMillis()+ttl*1000;\r
-                nodeLBmap.put("expiration", Long.toString(expiration_time));\r
-                nodeLBmap.put("updated_at", Long.toString(System.currentTimeMillis()));\r
-                \r
-                jedis.hmset(nodeKey, nodeLBmap);\r
-\r
-\r
-        } \r
-        catch (NullPointerException e){\r
-            throw e;  \r
-        }\r
-        catch (Exception e) {\r
-            LOGGER.error("update MicroService Node throw exception", e);\r
-            throw new Exception("update MicroService Node throw exception:"+e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-    }\r
-    \r
-    \r
-    public void noticeUpdateApiListener(String serviceName,String version,Service microServiceInfo,String serverPort) {\r
-        if (isNeedNotify(microServiceInfo)) {\r
-            for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {\r
-                serviceListener.onChange(serviceName,version, microServiceInfo,serverPort);\r
-            }\r
-        }\r
-        \r
-    }\r
-    \r
-    public void noticeUpdateStatusListener(Service microServiceInfo,String status) {\r
-       \r
-        for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {\r
-            serviceListener.onStatusChange(microServiceInfo.getServiceName(),microServiceInfo.getUrl(),\r
-                    microServiceInfo.getVersion(),microServiceInfo.getProtocol(),status);\r
-        }\r
-    }\r
-    \r
\r
-\r
-    public void noticeApiListener(Service microServiceInfo, String type,String serverPort) {\r
-        if (isNeedNotify(microServiceInfo)) {\r
-\r
-            if ("ADD".equals(type)) {\r
-                for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {\r
-                    serviceListener.onSave(microServiceInfo,serverPort);\r
-                }\r
-            } else if ("DELETE".equals(type)) {\r
-                for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {\r
-                    serviceListener.onDelete(microServiceInfo.getServiceName(),microServiceInfo.getUrl(),\r
-                            microServiceInfo.getVersion(),microServiceInfo.getProtocol(),serverPort);\r
-                }\r
-            } \r
-\r
-        }\r
-    }\r
-\r
-\r
-    public MicroServiceFullInfo getMicroServiceInstance(String serviceName, String version,String serverPort)\r
-            throws Exception {\r
-        if (null == version || "null".equals(version)) {\r
-            version = "";\r
-        }\r
-\r
-        Jedis jedis = null;\r
-        MicroServiceFullInfo microServiceInfo = null;\r
-       \r
-        try {\r
-            jedis = JedisUtil.getJedis();\r
-            \r
-            microServiceInfo= getMicroServiceByJedis(jedis,serviceName,version, serverPort);\r
-\r
-           \r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new Exception("call redis throw exception:"+e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-        \r
-        return microServiceInfo;\r
-       \r
-    }\r
-\r
-    private MicroServiceFullInfo getMicroServiceByJedis(Jedis jedis,String serviceName, String version,String serverPort){\r
-        MicroServiceFullInfo microServiceInfo = null;\r
-        String serviceInfoKey = MicroServiceUtil.getServiceInfoKey(serverPort,serviceName, version);\r
-        Map<String, String> infomap = jedis.hgetAll(serviceInfoKey);\r
-        if (!infomap.isEmpty()) {\r
-            microServiceInfo = new MicroServiceFullInfo();\r
-            microServiceInfo.setServiceName(serviceName);\r
-            microServiceInfo.setVersion(version);\r
-            microServiceInfo.setUrl(infomap.get("url"));\r
-            microServiceInfo.setProtocol(infomap.get("protocol"));\r
-            microServiceInfo.setVisualRange(infomap.get("visualRange"));\r
-            microServiceInfo.setStatus(infomap.get("status"));\r
-            microServiceInfo.setLb_policy(infomap.get("lb_policy"));\r
-\r
-            String nodeLBkey =\r
-                    MicroServiceUtil.getPrefixedKey(serverPort,microServiceInfo.getServiceName(),\r
-                            microServiceInfo.getVersion(),\r
-                            MicroServiceUtil.ROUTE_PATH_LOADBALANCE);\r
-            \r
-            Set<String>  nodeKeys=jedis.keys(nodeLBkey+":*");\r
-            \r
-            Set<NodeInfo> nodes=new HashSet<NodeInfo>();\r
-            for(String nodeKey:nodeKeys){\r
-                Map<String,String> nodeLBmap = jedis.hgetAll(nodeKey);\r
-                NodeInfo nodeInfo=new NodeInfo();\r
-                nodeInfo.setNodeId(serviceName+"_"+nodeLBmap.get("ip")+"_"+nodeLBmap.get("port"));\r
-                nodeInfo.setIp(nodeLBmap.get("ip"));\r
-                nodeInfo.setPort(nodeLBmap.get("port"));\r
-                nodeInfo.setTtl(Integer.parseInt(nodeLBmap.get("ttl")));\r
-                nodeInfo.setCreated_at(new Date(Long.parseLong(nodeLBmap.get("created_at"))));\r
-                nodeInfo.setUpdated_at(new Date(Long.parseLong(nodeLBmap.get("updated_at"))));\r
-                nodeInfo.setExpiration(new Date(Long.parseLong(nodeLBmap.get("expiration"))));\r
-              \r
-                nodes.add(nodeInfo);\r
-            }\r
-            \r
-            microServiceInfo.setNodes(nodes);\r
-        }\r
-            \r
-           \r
-           \r
-            \r
-            return microServiceInfo;\r
-    }\r
-        \r
-\r
-    public void deleteMicroService(String serviceName, String version,String serverPort) throws Exception {\r
-        if (null == version || "null".equals(version)) {\r
-            version = "";\r
-        }\r
-        \r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.getJedis();\r
-            String routekey = MicroServiceUtil.getPrefixedKey(serverPort,serviceName, version, "*");\r
-            Set<String> infoSet = jedis.keys(routekey);\r
-\r
-            String[] paths = new String[infoSet.size()];\r
-\r
-            infoSet.toArray(paths);\r
-\r
-            jedis.del(paths);\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new Exception("call redis throw exception:"+e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-    }\r
-\r
-    public void deleteNode(String serviceName, String version, String ip,String port) throws Exception {\r
-        if (null == version || "null".equals(version)) {\r
-            version = "";\r
-        }\r
-        \r
-        Jedis jedis = null;\r
-        try {\r
-            jedis = JedisUtil.getJedis();\r
-            String serviceLBkey =\r
-                    MicroServiceUtil.getPrefixedKey("",serviceName, version,\r
-                            MicroServiceUtil.ROUTE_PATH_LOADBALANCE,ip+"-"+port);\r
-            jedis.del(serviceLBkey);\r
-        } catch (Exception e) {\r
-            LOGGER.error("call redis throw exception", e);\r
-            throw new Exception("call redis throw exception:"+e.getMessage());\r
-        } finally {\r
-            JedisUtil.returnJedisInstance(jedis);\r
-        }\r
-\r
-    }\r
-\r
-\r
-    /**\r
-     * Determine whether the service needs to send a notification \r
-     * TODO: filter according to the agreement,\r
-     * the only notice of agreement for REST \ UI interface MSB - REST     \r
-     * @param protocol\r
-     * @return\r
-     */\r
-    private boolean isNeedNotifyByProtocol(String protocol) {\r
-        return "UI".equalsIgnoreCase(protocol) ||("REST".equalsIgnoreCase(protocol));\r
-    }\r
-    \r
-    /**\r
-     * Determine whether the service needs to send a notification \r
-     * TODO: according to the visual range filter conditions   \r
-     * @param visualRange\r
-     * @return\r
-     */\r
-    private boolean isNeedNotifyByVisualRange(String visualRange) {\r
-        String[] rangeArray=StringUtils.split(visualRange, "|");\r
-        return RouteUtil.contain(RouteUtil.visualRangeMatches, rangeArray);\r
-    }\r
-\r
-    /**\r
-     * According to the MicroServiceInfo entity information to judge whether need to send a notification\r
-     * @param microServiceInfo\r
-     * @return\r
-     */\r
-    private boolean isNeedNotify(Service microServiceInfo) {\r
-        if (null != microServiceInfo) {\r
-            return isNeedNotifyByProtocol(microServiceInfo.getProtocol()) &&\r
-                   isNeedNotifyByVisualRange(microServiceInfo.getVisualRange());\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-    \r
-    \r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import java.sql.Date;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.MicroServiceFullInfo;
+import org.openo.msb.api.MicroServiceInfo;
+import org.openo.msb.api.Node;
+import org.openo.msb.api.NodeInfo;
+import org.openo.msb.api.Service;
+import org.openo.msb.wrapper.serviceListener.IMicroServiceChangeListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+public class MicroServiceDB {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(MicroServiceDB.class);
+
+    private static MicroServiceDB instance = new MicroServiceDB();
+
+    private List<IMicroServiceChangeListener> serviceListenerlist =
+            new ArrayList<IMicroServiceChangeListener>();
+
+    private MicroServiceDB() {}
+
+    public static MicroServiceDB getInstance() {
+        return instance;
+    }
+
+   
+    public void addServiceChangeListener(IMicroServiceChangeListener listener) {
+        synchronized (serviceListenerlist) {
+            serviceListenerlist.add(listener);
+        }
+    }
+
+   
+    public void removeServiceChangeListener(IMicroServiceChangeListener listener) {
+        synchronized (serviceListenerlist) {
+            serviceListenerlist.remove(listener);
+        }
+    }
+    
+    
+    public MicroServiceFullInfo[] getAllMicroServiceInstances() throws Exception {
+        Jedis jedis = null;
+        MicroServiceFullInfo[] microServiceList;
+        try {
+            jedis = JedisUtil.getJedis();
+
+            String routekey =
+                    MicroServiceUtil.getPrefixedKey("","*", MicroServiceUtil.SUFFIX_PATH_INFO);
+            Set<String> serviceSet = jedis.keys(routekey);
+            microServiceList = new MicroServiceFullInfo[serviceSet.size()];
+
+            Pattern redisKeyPattern = MicroServiceUtil.getRedisKeyPattern();
+            int i = 0;
+            for (String servicePath : serviceSet) {
+                Matcher matcher = redisKeyPattern.matcher(servicePath);
+                if (matcher.matches()) {
+                    microServiceList[i] = getMicroServiceByJedis(jedis, matcher.group("servicename"),matcher.group("version"), "");
+                    i++;
+                }
+            }
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new Exception("call redis throw exception:"+e.getMessage());       
+       } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+        
+        return microServiceList;
+    }
+
+    public void saveMicroServiceInfo2Redis(MicroServiceInfo microServiceInfo,String serverPort) throws Exception {
+        // 1.1 set info
+        String serviceInfokey =
+                MicroServiceUtil.getServiceInfoKey(serverPort,microServiceInfo.getServiceName(),
+                        microServiceInfo.getVersion());
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("url", microServiceInfo.getUrl());
+        serviceInfoMap.put("protocol", microServiceInfo.getProtocol());
+        serviceInfoMap.put("visualRange",microServiceInfo.getVisualRange());
+        serviceInfoMap.put("lb_policy",microServiceInfo.getLb_policy());
+        serviceInfoMap.put("status", "0");
+        
+        
+
+        // 1.2 set lb info
+        String serviceLBkey =
+                MicroServiceUtil.getPrefixedKey(serverPort,microServiceInfo.getServiceName(),
+                        microServiceInfo.getVersion(), MicroServiceUtil.ROUTE_PATH_LOADBALANCE);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.getJedis();
+            // 2.1 save info
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+
+
+            for(Node node:microServiceInfo.getNodes()){
+               
+                String key=serviceLBkey+":"+node.getIp()+"-"+node.getPort();
+                
+                Map<String,String> nodeMap = new HashMap<String,String>();
+               
+                nodeMap.put("ip", node.getIp());
+                nodeMap.put("port", node.getPort());
+                nodeMap.put("ttl", Integer.toString(node.getTtl()));
+                long expiration_time=System.currentTimeMillis()+node.getTtl()*1000;
+                nodeMap.put("expiration", Long.toString(expiration_time));
+                
+                if(jedis.keys(key).isEmpty()){
+                    nodeMap.put("created_at",  Long.toString(System.currentTimeMillis()));
+                }
+//                else{
+//                    Map<String,String> nodeLBmap = jedis.hgetAll(key); 
+//                    nodeMap.put("created_at", nodeLBmap.get("created_at"));
+//                }
+                nodeMap.put("updated_at", Long.toString(System.currentTimeMillis()));
+                
+                jedis.hmset(key, nodeMap);
+            }
+            
+//            jedis.sadd(serviceLBkey, nodeArray);
+
+        } catch (Exception e) {
+            LOGGER.error("save to redis throw exception", e);
+            throw new Exception("save to  redis throw exception:"+e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+
+
+    }
+    
+    public void updateMicroServiceStatus(String serviceName, String version,String status) throws Exception{
+        
+        
+        String serviceInfokey = MicroServiceUtil.getServiceInfoKey("",serviceName, version);
+        Map<String, String> serviceInfoMap = new HashMap<String, String>();
+        serviceInfoMap.put("status", status);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.borrowJedisInstance();
+            if (jedis == null) {
+                throw new Exception("fetch from jedis pool failed,null object!");
+            }
+            jedis.hmset(serviceInfokey, serviceInfoMap);
+        }
+        catch (Exception e) {
+            LOGGER.error("update MicroService status throw exception", e);
+            throw new Exception("update MicroService status throw exception:"+e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+        
+    }
+    
+    
+    public void  updateMicroServiceNode2Redis(String serviceName, String version,String ip,String port,int ttl) throws Exception {
+        String serviceLBkey =
+                MicroServiceUtil.getPrefixedKey("",serviceName,version, MicroServiceUtil.ROUTE_PATH_LOADBALANCE);
+
+
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.getJedis();
+          
+               
+                String nodeKey=serviceLBkey+":"+ip+"-"+port;                
+                Map<String,String> nodeLBmap = jedis.hgetAll(nodeKey);
+                
+                if(nodeLBmap.isEmpty()){
+                    throw new NullPointerException(" MicroService Node not fond ");  
+                }
+                
+               
+                nodeLBmap.put("ttl", Integer.toString(ttl));
+                long expiration_time=System.currentTimeMillis()+ttl*1000;
+                nodeLBmap.put("expiration", Long.toString(expiration_time));
+                nodeLBmap.put("updated_at", Long.toString(System.currentTimeMillis()));
+                
+                jedis.hmset(nodeKey, nodeLBmap);
+
+
+        } 
+        catch (NullPointerException e){
+            throw e;  
+        }
+        catch (Exception e) {
+            LOGGER.error("update MicroService Node throw exception", e);
+            throw new Exception("update MicroService Node throw exception:"+e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+    }
+    
+    
+    public void noticeUpdateApiListener(String serviceName,String version,Service microServiceInfo,String serverPort) {
+        if (isNeedNotify(microServiceInfo)) {
+            for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {
+                serviceListener.onChange(serviceName,version, microServiceInfo,serverPort);
+            }
+        }
+        
+    }
+    
+    public void noticeUpdateStatusListener(Service microServiceInfo,String status) {
+       
+        for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {
+            serviceListener.onStatusChange(microServiceInfo.getServiceName(),microServiceInfo.getUrl(),
+                    microServiceInfo.getVersion(),microServiceInfo.getProtocol(),status);
+        }
+    }
+    
+
+    public void noticeApiListener(Service microServiceInfo, String type,String serverPort) {
+        if (isNeedNotify(microServiceInfo)) {
+
+            if ("ADD".equals(type)) {
+                for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {
+                    serviceListener.onSave(microServiceInfo,serverPort);
+                }
+            } else if ("DELETE".equals(type)) {
+                for (IMicroServiceChangeListener serviceListener : serviceListenerlist) {
+                    serviceListener.onDelete(microServiceInfo.getServiceName(),microServiceInfo.getUrl(),
+                            microServiceInfo.getVersion(),microServiceInfo.getProtocol(),serverPort);
+                }
+            } 
+
+        }
+    }
+
+
+    public MicroServiceFullInfo getMicroServiceInstance(String serviceName, String version,String serverPort)
+            throws Exception {
+        if (null == version || "null".equals(version)) {
+            version = "";
+        }
+
+        Jedis jedis = null;
+        MicroServiceFullInfo microServiceInfo = null;
+       
+        try {
+            jedis = JedisUtil.getJedis();
+            
+            microServiceInfo= getMicroServiceByJedis(jedis,serviceName,version, serverPort);
+
+           
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new Exception("call redis throw exception:"+e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+        
+        return microServiceInfo;
+       
+    }
+
+    private MicroServiceFullInfo getMicroServiceByJedis(Jedis jedis,String serviceName, String version,String serverPort){
+        MicroServiceFullInfo microServiceInfo = null;
+        String serviceInfoKey = MicroServiceUtil.getServiceInfoKey(serverPort,serviceName, version);
+        Map<String, String> infomap = jedis.hgetAll(serviceInfoKey);
+        if (!infomap.isEmpty()) {
+            microServiceInfo = new MicroServiceFullInfo();
+            microServiceInfo.setServiceName(serviceName);
+            microServiceInfo.setVersion(version);
+            microServiceInfo.setUrl(infomap.get("url"));
+            microServiceInfo.setProtocol(infomap.get("protocol"));
+            microServiceInfo.setVisualRange(infomap.get("visualRange"));
+            microServiceInfo.setStatus(infomap.get("status"));
+            microServiceInfo.setLb_policy(infomap.get("lb_policy"));
+
+            String nodeLBkey =
+                    MicroServiceUtil.getPrefixedKey(serverPort,microServiceInfo.getServiceName(),
+                            microServiceInfo.getVersion(),
+                            MicroServiceUtil.ROUTE_PATH_LOADBALANCE);
+            
+            Set<String>  nodeKeys=jedis.keys(nodeLBkey+":*");
+            
+            Set<NodeInfo> nodes=new HashSet<NodeInfo>();
+            for(String nodeKey:nodeKeys){
+                Map<String,String> nodeLBmap = jedis.hgetAll(nodeKey);
+                NodeInfo nodeInfo=new NodeInfo();
+                nodeInfo.setNodeId(serviceName+"_"+nodeLBmap.get("ip")+"_"+nodeLBmap.get("port"));
+                nodeInfo.setIp(nodeLBmap.get("ip"));
+                nodeInfo.setPort(nodeLBmap.get("port"));
+                nodeInfo.setTtl(Integer.parseInt(nodeLBmap.get("ttl")));
+                nodeInfo.setCreated_at(new Date(Long.parseLong(nodeLBmap.get("created_at"))));
+                nodeInfo.setUpdated_at(new Date(Long.parseLong(nodeLBmap.get("updated_at"))));
+                nodeInfo.setExpiration(new Date(Long.parseLong(nodeLBmap.get("expiration"))));
+              
+                nodes.add(nodeInfo);
+            }
+            
+            microServiceInfo.setNodes(nodes);
+        }
+            
+           
+           
+            
+            return microServiceInfo;
+    }
+        
+
+    public void deleteMicroService(String serviceName, String version,String serverPort) throws Exception {
+        if (null == version || "null".equals(version)) {
+            version = "";
+        }
+        
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.getJedis();
+            String routekey = MicroServiceUtil.getPrefixedKey(serverPort,serviceName, version, "*");
+            Set<String> infoSet = jedis.keys(routekey);
+
+            String[] paths = new String[infoSet.size()];
+
+            infoSet.toArray(paths);
+
+            jedis.del(paths);
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new Exception("call redis throw exception:"+e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+    }
+
+    public void deleteNode(String serviceName, String version, String ip,String port) throws Exception {
+        if (null == version || "null".equals(version)) {
+            version = "";
+        }
+        
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtil.getJedis();
+            String serviceLBkey =
+                    MicroServiceUtil.getPrefixedKey("",serviceName, version,
+                            MicroServiceUtil.ROUTE_PATH_LOADBALANCE,ip+"-"+port);
+            jedis.del(serviceLBkey);
+        } catch (Exception e) {
+            LOGGER.error("call redis throw exception", e);
+            throw new Exception("call redis throw exception:"+e.getMessage());
+        } finally {
+            JedisUtil.returnJedisInstance(jedis);
+        }
+
+    }
+
+
+    /**
+     * Determine whether the service needs to send a notification 
+     * TODO: filter according to the agreement,
+     * the only notice of agreement for REST \ UI interface MSB - REST     
+     * @param protocol
+     * @return
+     */
+    private boolean isNeedNotifyByProtocol(String protocol) {
+        return "UI".equalsIgnoreCase(protocol) ||("REST".equalsIgnoreCase(protocol));
+    }
+    
+    /**
+     * Determine whether the service needs to send a notification 
+     * TODO: according to the visual range filter conditions   
+     * @param visualRange
+     * @return
+     */
+    private boolean isNeedNotifyByVisualRange(String visualRange) {
+        String[] rangeArray=StringUtils.split(visualRange, "|");
+        return RouteUtil.contain(RouteUtil.visualRangeMatches, rangeArray);
+    }
+
+    /**
+     * According to the MicroServiceInfo entity information to judge whether need to send a notification
+     * @param microServiceInfo
+     * @return
+     */
+    private boolean isNeedNotify(Service microServiceInfo) {
+        if (null != microServiceInfo) {
+            return isNeedNotifyByProtocol(microServiceInfo.getProtocol()) &&
+                   isNeedNotifyByVisualRange(microServiceInfo.getVisualRange());
+        } else {
+            return false;
+        }
+    }
+    
+    
+    
+}
index f92c5fe..044ce9c 100644 (file)
@@ -1,96 +1,95 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-import java.util.regex.Pattern;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-\r
-\r
-public class MicroServiceUtil {\r
-    public static final String PREFIX_PATH = "discover:microservices";\r
-    \r
-    public static final String PREFIX_PATH_PORT = "discover:";\r
-\r
-    public static final String SUFFIX_PATH_INFO = "info";\r
-\r
-    public static final String REDIS_KEY_PATTERN =\r
-            "discover:microservices:(?<servicename>[^:]+)(:(?<version>[^:]*))?:info";\r
-\r
-    public static final String REQUEST_SUCCESS = "SUCCESS";\r
-\r
-    public static final String REQUEST_FAIL = "FAIL";\r
-\r
-    public static final String ROUTE_PATH_LOADBALANCE = "lb"; // 负载均衡路径名\r
-\r
-   \r
-    public static String getPrefixedKey(String... paths) {\r
-        StringBuffer sb = new StringBuffer();\r
-        \r
-        if(paths[0].trim().equals("") || paths[0].equals(String.valueOf(JedisUtil.serverPort))){\r
-            sb.append(PREFIX_PATH);\r
-        }\r
-        else{\r
-           sb.append(PREFIX_PATH_PORT).append(paths[0]); \r
-        }\r
-        \r
-        for (int i = 1; i < paths.length; i++) {\r
-            sb.append(":");\r
-            sb.append(paths[i]);\r
-        }\r
-        return sb.toString();\r
-    }\r
-\r
-    \r
-    public static String getServiceInfoKey(String serverPort,String serviceName, String version) {\r
-        return getPrefixedKey(serverPort,serviceName, version, SUFFIX_PATH_INFO);\r
-    }\r
-\r
\r
-    \r
-    \r
-    \r
-    public static Pattern getRedisKeyPattern() {\r
-        return Pattern.compile(REDIS_KEY_PATTERN);\r
-    }\r
-\r
-    public static String getRealIp(HttpServletRequest request) {\r
-        String ip = request.getHeader("X-Forwarded-For");\r
-        if (StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)) {\r
-            // After the reverse proxy can have multiple IP value for many times, the first IP is the real IP\r
-            int index = ip.indexOf(",");\r
-            if (index != -1) {\r
-                return ip.substring(0, index);\r
-            } else {\r
-                return ip;\r
-            }\r
-        }\r
-        ip = request.getHeader("X-Real-IP");\r
-\r
-        if (StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)) {\r
-            return ip;\r
-        }\r
-        \r
-\r
-        return request.getRemoteAddr();\r
-\r
-    }\r
-\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+
+
+public class MicroServiceUtil {
+    public static final String PREFIX_PATH = "discover:microservices";
+    
+    public static final String PREFIX_PATH_PORT = "discover:";
+
+    public static final String SUFFIX_PATH_INFO = "info";
+
+    public static final String REDIS_KEY_PATTERN =
+            "discover:microservices:(?<servicename>[^:]+)(:(?<version>[^:]*))?:info";
+
+    public static final String REQUEST_SUCCESS = "SUCCESS";
+
+    public static final String REQUEST_FAIL = "FAIL";
+
+    public static final String ROUTE_PATH_LOADBALANCE = "lb"; // 负载均衡路径名
+
+   
+    public static String getPrefixedKey(String... paths) {
+        StringBuffer sb = new StringBuffer();
+        
+        if(paths[0].trim().equals("") || paths[0].equals(String.valueOf(JedisUtil.serverPort))){
+            sb.append(PREFIX_PATH);
+        }
+        else{
+           sb.append(PREFIX_PATH_PORT).append(paths[0]); 
+        }
+        
+        for (int i = 1; i < paths.length; i++) {
+            sb.append(":");
+            sb.append(paths[i]);
+        }
+        return sb.toString();
+    }
+
+    
+    public static String getServiceInfoKey(String serverPort,String serviceName, String version) {
+        return getPrefixedKey(serverPort,serviceName, version, SUFFIX_PATH_INFO);
+    }
+
+    
+    
+    
+    public static Pattern getRedisKeyPattern() {
+        return Pattern.compile(REDIS_KEY_PATTERN);
+    }
+
+    public static String getRealIp(HttpServletRequest request) {
+        String ip = request.getHeader("X-Forwarded-For");
+        if (StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)) {
+            // After the reverse proxy can have multiple IP value for many times, the first IP is the real IP
+            int index = ip.indexOf(",");
+            if (index != -1) {
+                return ip.substring(0, index);
+            } else {
+                return ip;
+            }
+        }
+        ip = request.getHeader("X-Real-IP");
+
+        if (StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)) {
+            return ip;
+        }
+        
+
+        return request.getRemoteAddr();
+
+    }
+
+
+}
index 5a162b2..d7a8116 100644 (file)
@@ -1,88 +1,88 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper.util;\r
-\r
-import java.util.regex.Pattern;\r
-\r
-public class RegExpTestUtil {\r
-  \r
\r
-    \r
-  public static boolean  hostRegExpTest(String host){\r
-      \r
-      String hostReg = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\."  \r
-              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  \r
-              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  \r
-              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)"\r
-              +":(\\d{1,5})$";   \r
-      return Pattern.matches(hostReg, host); \r
-      \r
-  }\r
-  \r
-  public static boolean  ipRegExpTest(String ip){\r
-      \r
-      String hostReg = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\."  \r
-              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  \r
-              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  \r
-              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$";  \r
-      return Pattern.matches(hostReg, ip); \r
-      \r
-  }\r
-  \r
- public static boolean  portRegExpTest(String port){\r
-      \r
-      String hostReg = "^\\d{1,5}$";  \r
-      return Pattern.matches(hostReg, port); \r
-      \r
-  }\r
-  \r
-public static boolean versionRegExpTest(String version){\r
-      \r
-      String versionReg = "^v\\d+(\\.\\d+)?$";  \r
-      return Pattern.matches(versionReg, version); \r
-      \r
-  }\r
-\r
-public static boolean urlRegExpTest(String url){\r
-    if(url.equals("/")) return true;\r
-    \r
-    String urlReg = "^\\/.*((?!\\/).)$";  \r
-    return Pattern.matches(urlReg, url); \r
-    \r
-}\r
-\r
-public static boolean apiRouteUrlRegExpTest(String url){\r
-    \r
-    String urlReg = "^\\/"+RouteUtil.API_ROOT_PATH+"\\/.*$";  \r
-    return Pattern.matches(urlReg, url); \r
-    \r
-}\r
-\r
-public static boolean iuiRouteUrlRegExpTest(String url){\r
-    \r
-    String urlReg = "^\\/"+RouteUtil.IUI_ROOT_PATH+"\\/.*$";  \r
-    return Pattern.matches(urlReg, url); \r
-    \r
-}\r
-\r
-\r
-  \r
-  \r
-  public static void main(String[] args) {\r
-      System.out.println(urlRegExpTest("/api "));\r
-//      System.out.println("api".startsWith("/"));\r
-  }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import java.util.regex.Pattern;
+
+public class RegExpTestUtil {
+  
+    
+  public static boolean  hostRegExpTest(String host){
+      
+      String hostReg = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\."  
+              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  
+              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  
+              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)"
+              +":(\\d{1,5})$";   
+      return Pattern.matches(hostReg, host); 
+      
+  }
+  
+  public static boolean  ipRegExpTest(String ip){
+      
+      String hostReg = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\."  
+              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  
+              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\."  
+              +"(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$";  
+      return Pattern.matches(hostReg, ip); 
+      
+  }
+  
+ public static boolean  portRegExpTest(String port){
+      
+      String hostReg = "^\\d{1,5}$";  
+      return Pattern.matches(hostReg, port); 
+      
+  }
+  
+public static boolean versionRegExpTest(String version){
+      
+      String versionReg = "^v\\d+(\\.\\d+)?$";  
+      return Pattern.matches(versionReg, version); 
+      
+  }
+
+public static boolean urlRegExpTest(String url){
+    if(url.equals("/")) return true;
+    
+    String urlReg = "^\\/.*((?!\\/).)$";  
+    return Pattern.matches(urlReg, url); 
+    
+}
+
+public static boolean apiRouteUrlRegExpTest(String url){
+    
+    String urlReg = "^\\/"+RouteUtil.API_ROOT_PATH+"\\/.*$";  
+    return Pattern.matches(urlReg, url); 
+    
+}
+
+public static boolean iuiRouteUrlRegExpTest(String url){
+    
+    String urlReg = "^\\/"+RouteUtil.IUI_ROOT_PATH+"\\/.*$";  
+    return Pattern.matches(urlReg, url); 
+    
+}
+
+
+  
+  
+  public static void main(String[] args) {
+      System.out.println(urlRegExpTest("/api "));
+//      System.out.println("api".startsWith("/"));
+  }
+}
index 3b2b2b3..f14908a 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openo.msb.wrapper.util;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.openo.msb.api.DiscoverInfo;\r
-\r
-\r
-public class RouteUtil {\r
-\r
-    public static String IUI_ROOT_PATH="iui";  \r
-    \r
-    public static  String API_ROOT_PATH="api"; \r
-    \r
-       public static final String ROUTE_PATH="msb:routing";   \r
-       \r
-       public static final String APIROUTE="api";  \r
-       \r
-       public static final String IUIROUTE="iui";  \r
-       \r
-       public static final String CUSTOMROUTE="custom";  \r
-       \r
-       public static final String P2PROUTE="p2p";  \r
-       \r
-       \r
-       public static final String ROUTE_PATH_INFO="info";  \r
-       \r
-       public static final String ROUTE_PATH_LOADBALANCE="lb"; \r
-       \r
-       public static final String APIROUTE_PATH_LIFE="life";  \r
-       \r
-\r
-       public static final String REQUEST_SUCCESS = "SUCCESS";\r
-       \r
-       public static final String REQUEST_FAIL = "FAIL";\r
-       \r
-    public static String PROTOCOL_LIST="REST,UI,MQ,FTP,SNMP,TCP,UDP"; \r
-    \r
-    public static DiscoverInfo discoverInfo=new DiscoverInfo();\r
-    \r
-    \r
-    public static String[] visualRangeRange={"0","1"};\r
-    \r
-    public static String[] controlRangeMatches={"0","1","2"};\r
-    \r
-    public static String[] statusRangeMatches={"0","1"};\r
-    \r
-    public static String[] useOwnUpstreamRangeMatches={"0","1"};\r
-    \r
-    public static String[] visualRangeMatches={"1"};\r
-       \r
-       /** \r
-       * @Title: getPrefixedKey  \r
-       * @Description: TODO(Add base path prefix radis assembly path) \r
-       * @param: @param serviceName\r
-       * @param: @param version\r
-       * @param: @param type\r
-       * @param: @return      \r
-       * @return: String    \r
-       */\r
-       \r
-       public static String getPrefixedKey(String...paths){\r
-               StringBuffer sb= new StringBuffer();\r
-               \r
-                   if(paths[0].trim().equals("") || paths[0].equals(String.valueOf(JedisUtil.serverPort))){\r
-                   sb.append(ROUTE_PATH);\r
-               }\r
-               else{\r
-                  sb.append(paths[0]); \r
-               }\r
-       \r
-               for (int i = 1; i < paths.length; i++) {\r
-                       sb.append(":");\r
-                       sb.append(paths[i]);\r
-               }\r
-               return sb.toString();\r
-       }\r
-       \r
-       \r
-       public static Object[] concat(Object[] a, Object[] b) {\r
-           Object[] c= new Object[a.length+b.length];\r
-        System.arraycopy(a, 0, c, 0, a.length);\r
-        System.arraycopy(b, 0, c, a.length, b.length);\r
-        return c;\r
-     }\r
-       \r
-       public static boolean contain(String[] array,String str){\r
-           for(int i=0;i<array.length;i++){\r
-                 if(array[i].equals(str)){\r
-                    return true;  \r
-                 }\r
-           }\r
-           return false;\r
-\r
-         }\r
-       \r
-       public static boolean contain(String[] array,String value[]){\r
-        for(int i=0;i<array.length;i++){\r
-            for(int n=0;n<value.length;n++){\r
-              if(array[i].equals(value[n])){\r
-                 return true;  \r
-              }\r
-            }\r
-        }\r
-        return false;\r
-\r
-      }\r
-       \r
-       public static String show(String[] array){\r
-           \r
-        return StringUtils.join(array, "|");\r
-\r
-      }\r
-       \r
-       public static void main(String[] args) {\r
-           String array[]={"1","2"};\r
-           System.out.println(StringUtils.join(array, "|"));\r
-    }\r
-       \r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openo.msb.api.DiscoverInfo;
+
+
+public class RouteUtil {
+
+    public static String IUI_ROOT_PATH="iui";  
+    
+    public static  String API_ROOT_PATH="api"; 
+    
+       public static final String ROUTE_PATH="msb:routing";   
+       
+       public static final String APIROUTE="api";  
+       
+       public static final String IUIROUTE="iui";  
+       
+       public static final String CUSTOMROUTE="custom";  
+       
+       public static final String P2PROUTE="p2p";  
+       
+       
+       public static final String ROUTE_PATH_INFO="info";  
+       
+       public static final String ROUTE_PATH_LOADBALANCE="lb"; 
+       
+       public static final String APIROUTE_PATH_LIFE="life";  
+       
+
+       public static final String REQUEST_SUCCESS = "SUCCESS";
+       
+       public static final String REQUEST_FAIL = "FAIL";
+       
+    public static String PROTOCOL_LIST="REST,UI,MQ,FTP,SNMP,TCP,UDP"; 
+    
+    public static DiscoverInfo discoverInfo=new DiscoverInfo();
+    
+    
+    public static String[] visualRangeRange={"0","1"};
+    
+    public static String[] controlRangeMatches={"0","1","2"};
+    
+    public static String[] statusRangeMatches={"0","1"};
+    
+    public static String[] useOwnUpstreamRangeMatches={"0","1"};
+    
+    public static String[] visualRangeMatches={"1"};
+       
+       /** 
+       * @Title: getPrefixedKey  
+       * @Description: TODO(Add base path prefix radis assembly path) 
+       * @param: @param serviceName
+       * @param: @param version
+       * @param: @param type
+       * @param: @return      
+       * @return: String    
+       */
+       
+       public static String getPrefixedKey(String...paths){
+               StringBuffer sb= new StringBuffer();
+               
+                   if(paths[0].trim().equals("") || paths[0].equals(String.valueOf(JedisUtil.serverPort))){
+                   sb.append(ROUTE_PATH);
+               }
+               else{
+                  sb.append(paths[0]); 
+               }
+       
+               for (int i = 1; i < paths.length; i++) {
+                       sb.append(":");
+                       sb.append(paths[i]);
+               }
+               return sb.toString();
+       }
+       
+       
+       public static Object[] concat(Object[] a, Object[] b) {
+           Object[] c= new Object[a.length+b.length];
+        System.arraycopy(a, 0, c, 0, a.length);
+        System.arraycopy(b, 0, c, a.length, b.length);
+        return c;
+     }
+       
+       public static boolean contain(String[] array,String str){
+           for(int i=0;i<array.length;i++){
+                 if(array[i].equals(str)){
+                    return true;  
+                 }
+           }
+           return false;
+
+         }
+       
+       public static boolean contain(String[] array,String value[]){
+        for(int i=0;i<array.length;i++){
+            for(int n=0;n<value.length;n++){
+              if(array[i].equals(value[n])){
+                 return true;  
+              }
+            }
+        }
+        return false;
+
+      }
+       
+       public static String show(String[] array){
+           
+        return StringUtils.join(array, "|");
+
+      }
+       
+       public static void main(String[] args) {
+           String array[]={"1","2"};
+           System.out.println(StringUtils.join(array, "|"));
+    }
+       
+
+}
index 7d51568..38811b2 100644 (file)
@@ -1,19 +1,23 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
-  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.
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 -->
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
index b2b0789..6c9e9e6 100644 (file)
@@ -1,3 +1,21 @@
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
 html,
 body,
 /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
 html,
 body,
index 32b199b..92881b7 100644 (file)
@@ -1,3 +1,21 @@
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
 .swagger-section pre code {
   display: block;
 /* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
 .swagger-section pre code {
   display: block;
index 27c3751..877304f 100644 (file)
@@ -1,3 +1,21 @@
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /* droid-sans-regular - latin */
 @font-face {
   font-family: 'Droid Sans';
 /* droid-sans-regular - latin */
 @font-face {
   font-family: 'Droid Sans';
index 1ebb459..ee78118 100644 (file)
-<!--\r
-\r
-Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-Licensed under the Apache License, Version 2.0 (the "License");\r
-you may not use this file except in compliance with the License.\r
-You may obtain a copy of the License at\r
-\r
-    http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-Unless required by applicable law or agreed to in writing, software\r
-distributed under the License is distributed on an "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-See the License for the specific language governing permissions and\r
-limitations under the License.\r
-\r
--->\r
-<!DOCTYPE html>\r
-<html>\r
-<head>\r
-  <title>Swagger UI</title>\r
-  <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>\r
-  <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>\r
-  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>\r
-  <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>\r
-  <link href='css/screen.css' media='print' rel='stylesheet' type='text/css'/>\r
-  <script type="text/javascript" src="lib/shred.bundle.js"></script>\r
-  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>\r
-  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>\r
-  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>\r
-  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>\r
-  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>\r
-  <script src='lib/underscore-min.js' type='text/javascript'></script>\r
-  <script src='lib/backbone-min.js' type='text/javascript'></script>\r
-  <script src='lib/swagger-client.js' type='text/javascript'></script>\r
-  <script src='swagger-ui.js' type='text/javascript'></script>\r
-  <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>\r
-  <script src='lib/marked.js' type='text/javascript'></script>\r
-  \r
-\r
-  <!-- enabling this will enable oauth2 implicit scope support -->\r
-  <script src='lib/swagger-oauth.js' type='text/javascript'></script>\r
-  <script type="text/javascript">\r
-    $(function () {\r
-      var url = window.location.search.match(/url=([^&]+)/);\r
-      if (url && url.length > 1) {\r
-        url = decodeURIComponent(url[1]);\r
-      } else {\r
-        url = "/api/microservices/v1/swagger.json";\r
-      }\r
-      window.swaggerUi = new SwaggerUi({\r
-        url: url,\r
-        dom_id: "swagger-ui-container",\r
-        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],\r
-        onComplete: function(swaggerApi, swaggerUi){\r
-        \r
-          if(typeof initOAuth == "function") {\r
-            /*\r
-            initOAuth({\r
-              clientId: "your-client-id",\r
-              realm: "your-realms",\r
-              appName: "your-app-name"\r
-            });\r
-            */\r
-          }\r
-          $('pre code').each(function(i, e) {\r
-            hljs.highlightBlock(e)\r
-          });\r
-        },\r
-        onFailure: function(data) {\r
-          log("Unable to Load SwaggerUI");\r
-        },\r
-        docExpansion: "none",\r
-        sorter : "alpha"\r
-      });\r
-\r
-      function addApiKeyAuthorization() {\r
-        var key = $('#input_apiKey')[0].value;\r
-        log("key: " + key);\r
-        if(key && key.trim() != "") {\r
-            log("added key " + key);\r
-            window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));\r
-        }\r
-      }\r
-\r
-      $('#input_apiKey').change(function() {\r
-        addApiKeyAuthorization();\r
-      });\r
-\r
-      // if you have an apiKey you would like to pre-populate on the page for demonstration purposes...\r
-      /*\r
-        var apiKey = "myApiKeyXXXX123456789";\r
-        $('#input_apiKey').val(apiKey);\r
-        addApiKeyAuthorization();\r
-      */\r
-\r
-      window.swaggerUi.load();\r
-  });\r
-  </script>\r
-</head>\r
-\r
-<body class="swagger-section">\r
-<div id='header' style="display:none">\r
-  <div class="swagger-ui-wrap" >\r
-    <a id="logo" >zte conductor</a>\r
-    <form id='api_selector'>\r
-      <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>\r
-      <div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>\r
-      <div class='input'><a id="explore" href="#">Explore</a></div>\r
-    </form>\r
-  </div>\r
-</div>\r
-\r
-<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>\r
-<div id="swagger-ui-container" class="swagger-ui-wrap"></div>\r
-</body>\r
-  <script type="text/javascript" src="js/iframeResizer/iframeResizer.contentWindow.min.js"></script>\r
-</html>\r
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Swagger UI</title>
+  <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
+  <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
+  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
+  <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
+  <link href='css/screen.css' media='print' rel='stylesheet' type='text/css'/>
+  <script type="text/javascript" src="lib/shred.bundle.js"></script>
+  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
+  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
+  <script src='lib/underscore-min.js' type='text/javascript'></script>
+  <script src='lib/backbone-min.js' type='text/javascript'></script>
+  <script src='lib/swagger-client.js' type='text/javascript'></script>
+  <script src='swagger-ui.js' type='text/javascript'></script>
+  <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
+  <script src='lib/marked.js' type='text/javascript'></script>
+  
+
+  <!-- enabling this will enable oauth2 implicit scope support -->
+  <script src='lib/swagger-oauth.js' type='text/javascript'></script>
+  <script type="text/javascript">
+    $(function () {
+      var url = window.location.search.match(/url=([^&]+)/);
+      if (url && url.length > 1) {
+        url = decodeURIComponent(url[1]);
+      } else {
+        url = "/api/microservices/v1/swagger.json";
+      }
+      window.swaggerUi = new SwaggerUi({
+        url: url,
+        dom_id: "swagger-ui-container",
+        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
+        onComplete: function(swaggerApi, swaggerUi){
+        
+          if(typeof initOAuth == "function") {
+            /*
+            initOAuth({
+              clientId: "your-client-id",
+              realm: "your-realms",
+              appName: "your-app-name"
+            });
+            */
+          }
+          $('pre code').each(function(i, e) {
+            hljs.highlightBlock(e)
+          });
+        },
+        onFailure: function(data) {
+          log("Unable to Load SwaggerUI");
+        },
+        docExpansion: "none",
+        sorter : "alpha"
+      });
+
+      function addApiKeyAuthorization() {
+        var key = $('#input_apiKey')[0].value;
+        log("key: " + key);
+        if(key && key.trim() != "") {
+            log("added key " + key);
+            window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
+        }
+      }
+
+      $('#input_apiKey').change(function() {
+        addApiKeyAuthorization();
+      });
+
+      // if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
+      /*
+        var apiKey = "myApiKeyXXXX123456789";
+        $('#input_apiKey').val(apiKey);
+        addApiKeyAuthorization();
+      */
+
+      window.swaggerUi.load();
+  });
+  </script>
+</head>
+
+<body class="swagger-section">
+<div id='header' style="display:none">
+  <div class="swagger-ui-wrap" >
+    <a id="logo" >zte conductor</a>
+    <form id='api_selector'>
+      <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
+      <div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
+      <div class='input'><a id="explore" href="#">Explore</a></div>
+    </form>
+  </div>
+</div>
+
+<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
+<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
+</body>
+  <script type="text/javascript" src="js/iframeResizer/iframeResizer.contentWindow.min.js"></script>
+</html>
index 9330e0f..5b66af2 100644 (file)
@@ -1,10 +1,2 @@
-/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v3.5.3 - 2016-02-23
- *  Desc: Include this file in any page being loaded into an iframe
- *        to force the iframe to resize to the content size.
- *  Requires: iframeResizer.min.js on host page.
- *  Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
- *  License: MIT
- */
-
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Fa(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Fa();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(b){la&&"object"==typeof a.console&&console.log(f(b))}function h(b){"object"==typeof a.console&&console.warn(f(b))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function a(a){return"true"===a?!0:!1}var b=ha.substr(na).split(":");oa=b[0],X=void 0!==b[1]?Number(b[1]):X,_=void 0!==b[2]?a(b[2]):_,la=void 0!==b[3]?a(b[3]):la,ja=void 0!==b[4]?Number(b[4]):ja,U=void 0!==b[6]?a(b[6]):U,Y=b[7],fa=void 0!==b[8]?b[8]:fa,W=b[9],$=b[10],ua=void 0!==b[11]?Number(b[11]):ua,ia.enable=void 0!==b[12]?a(b[12]):!1,qa=void 0!==b[13]?b[13]:qa,Aa=void 0!==b[14]?b[14]:Aa}function k(){function b(){var b=a.iFrameResizer;g("Reading data from page: "+JSON.stringify(b)),Ca="messageCallback"in b?b.messageCallback:Ca,Da="readyCallback"in b?b.readyCallback:Da,ta="targetOrigin"in b?b.targetOrigin:ta,fa="heightCalculationMethod"in b?b.heightCalculationMethod:fa,Aa="widthCalculationMethod"in b?b.widthCalculationMethod:Aa}"iFrameResizer"in a&&Object===a.iFrameResizer.constructor&&b(),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,g("Body "+a+' set to "'+b+'"'))}function n(){void 0===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g('HTML & body height set to "auto"')}function p(e){function f(){N(e.eventName,e.eventType)}var h={add:function(c){b(a,c,f)},remove:function(b){c(a,b,f)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(h[e.method])):h[e.method](e.eventName),g(d(e.method)+" event listener: "+e.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+' calculation method set to "'+a+'"')),a}function s(){fa=r(fa,ea,Ga,"height")}function t(){Aa=r(Aa,za,Ha,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(a,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(a){function b(a){var b=d(a);g("Moving to in page link (#"+c+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var c=a.split("#")[1]||a,e=decodeURIComponent(c),f=document.getElementById(e)||document.getElementsByName(e)[0];void 0!==f?b(f):(g("In page link (#"+c+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+c))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),a)}function j(){b(a,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(a,b,c){d(a.target),N(b,c+": "+a.target.src,void 0,void 0)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=a.MutationObserver||a.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var b=0>ja;a.MutationObserver||a.WebKitMutationObserver?b?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Fa(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Fa()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),da}var d=document.querySelectorAll("["+b+"]");return 0===d.length?c():I(a,d)}function L(){return document.querySelectorAll("body *")}function M(a,b,c,d){function e(){da=l,ya=m,R(da,ya,a)}function f(){function a(a,b){var c=Math.abs(a-b)<=ua;return!c}return l=void 0!==c?c:Ga[fa](),m=void 0!==d?d:Ha[Aa](),a(da,l)||_&&a(ya,m)}function h(){return!(a in{init:1,interval:1,size:1})}function i(){return fa in pa||_&&Aa in pa}function j(){g("No change in size detected")}function k(){h()&&i()?Q(b):a in{interval:1}||j()}var l,m;f()||"init"===a?(O(),e()):k()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ia(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ga[fa](),ya=Ha[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(a,b,c,d,e){function f(){void 0===e?e=ta:g("Message targetOrigin: "+e)}function h(){var f=a+":"+b,h=oa+":"+f+":"+c+(void 0!==d?":"+d:"");g("Sending message to host page ("+h+")"),sa.postMessage(ma+h,e)}!0===ra&&(f(),h())}function S(b){function c(){return ma===(""+b.data).substr(0,na)}function d(){ha=b.data,sa=b.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}function e(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))}function f(){N("resizeParent","Parent window requested size check")}function j(){var a=l();ia.findTarget(a)}function k(){return b.data.split("]")[1].split(":")[0]}function l(){return b.data.substr(b.data.indexOf(":")+1)}function m(){return"iFrameResize"in a}function n(){var a=l();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}function o(){var a=l();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")}function p(){return b.data.split(":")[2]in{"true":1,"false":1}}function q(){switch(k()){case"reset":e();break;case"resize":f();break;case"moveToAnchor":j();break;case"message":n();break;case"pageInfo":o();break;default:m()||p()||h("Unexpected message ("+b.data+")")}}function r(){!1===ca?q():p()?d():g('Ignored message of type "'+k()+'". Received before initialization.')}c()&&r()}function T(){"loading"!==document.readyState&&a.parent.postMessage("[iFrameResizerChild]Ready","*")}var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=a.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=a,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa=Date.now||function(){return(new Date).getTime()},Ga={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ga.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ga))},min:function(){return Math.min.apply(null,J(Ga))},grow:function(){return Ga.max()},lowestElement:function(){return Math.max(Ga.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ha={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ha.bodyScroll(),Ha.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ha))},min:function(){return Math.min.apply(null,J(Ha))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ia=e(M);b(a,"message",S),T()}(window||{});
 //# sourceMappingURL=iframeResizer.contentWindow.map
\ No newline at end of file
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Fa(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Fa();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(b){la&&"object"==typeof a.console&&console.log(f(b))}function h(b){"object"==typeof a.console&&console.warn(f(b))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function a(a){return"true"===a?!0:!1}var b=ha.substr(na).split(":");oa=b[0],X=void 0!==b[1]?Number(b[1]):X,_=void 0!==b[2]?a(b[2]):_,la=void 0!==b[3]?a(b[3]):la,ja=void 0!==b[4]?Number(b[4]):ja,U=void 0!==b[6]?a(b[6]):U,Y=b[7],fa=void 0!==b[8]?b[8]:fa,W=b[9],$=b[10],ua=void 0!==b[11]?Number(b[11]):ua,ia.enable=void 0!==b[12]?a(b[12]):!1,qa=void 0!==b[13]?b[13]:qa,Aa=void 0!==b[14]?b[14]:Aa}function k(){function b(){var b=a.iFrameResizer;g("Reading data from page: "+JSON.stringify(b)),Ca="messageCallback"in b?b.messageCallback:Ca,Da="readyCallback"in b?b.readyCallback:Da,ta="targetOrigin"in b?b.targetOrigin:ta,fa="heightCalculationMethod"in b?b.heightCalculationMethod:fa,Aa="widthCalculationMethod"in b?b.widthCalculationMethod:Aa}"iFrameResizer"in a&&Object===a.iFrameResizer.constructor&&b(),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,g("Body "+a+' set to "'+b+'"'))}function n(){void 0===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g('HTML & body height set to "auto"')}function p(e){function f(){N(e.eventName,e.eventType)}var h={add:function(c){b(a,c,f)},remove:function(b){c(a,b,f)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(h[e.method])):h[e.method](e.eventName),g(d(e.method)+" event listener: "+e.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+' calculation method set to "'+a+'"')),a}function s(){fa=r(fa,ea,Ga,"height")}function t(){Aa=r(Aa,za,Ha,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(a,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(a){function b(a){var b=d(a);g("Moving to in page link (#"+c+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var c=a.split("#")[1]||a,e=decodeURIComponent(c),f=document.getElementById(e)||document.getElementsByName(e)[0];void 0!==f?b(f):(g("In page link (#"+c+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+c))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),a)}function j(){b(a,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(a,b,c){d(a.target),N(b,c+": "+a.target.src,void 0,void 0)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=a.MutationObserver||a.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var b=0>ja;a.MutationObserver||a.WebKitMutationObserver?b?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Fa(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Fa()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),da}var d=document.querySelectorAll("["+b+"]");return 0===d.length?c():I(a,d)}function L(){return document.querySelectorAll("body *")}function M(a,b,c,d){function e(){da=l,ya=m,R(da,ya,a)}function f(){function a(a,b){var c=Math.abs(a-b)<=ua;return!c}return l=void 0!==c?c:Ga[fa](),m=void 0!==d?d:Ha[Aa](),a(da,l)||_&&a(ya,m)}function h(){return!(a in{init:1,interval:1,size:1})}function i(){return fa in pa||_&&Aa in pa}function j(){g("No change in size detected")}function k(){h()&&i()?Q(b):a in{interval:1}||j()}var l,m;f()||"init"===a?(O(),e()):k()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ia(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ga[fa](),ya=Ha[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(a,b,c,d,e){function f(){void 0===e?e=ta:g("Message targetOrigin: "+e)}function h(){var f=a+":"+b,h=oa+":"+f+":"+c+(void 0!==d?":"+d:"");g("Sending message to host page ("+h+")"),sa.postMessage(ma+h,e)}!0===ra&&(f(),h())}function S(b){function c(){return ma===(""+b.data).substr(0,na)}function d(){ha=b.data,sa=b.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}function e(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))}function f(){N("resizeParent","Parent window requested size check")}function j(){var a=l();ia.findTarget(a)}function k(){return b.data.split("]")[1].split(":")[0]}function l(){return b.data.substr(b.data.indexOf(":")+1)}function m(){return"iFrameResize"in a}function n(){var a=l();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}function o(){var a=l();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")}function p(){return b.data.split(":")[2]in{"true":1,"false":1}}function q(){switch(k()){case"reset":e();break;case"resize":f();break;case"moveToAnchor":j();break;case"message":n();break;case"pageInfo":o();break;default:m()||p()||h("Unexpected message ("+b.data+")")}}function r(){!1===ca?q():p()?d():g('Ignored message of type "'+k()+'". Received before initialization.')}c()&&r()}function T(){"loading"!==document.readyState&&a.parent.postMessage("[iFrameResizerChild]Ready","*")}var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=a.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=a,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa=Date.now||function(){return(new Date).getTime()},Ga={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ga.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ga))},min:function(){return Math.min.apply(null,J(Ga))},grow:function(){return Ga.max()},lowestElement:function(){return Math.max(Ga.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ha={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ha.bodyScroll(),Ha.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ha))},min:function(){return Math.min.apply(null,J(Ha))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ia=e(M);b(a,"message",S),T()}(window||{});
 //# sourceMappingURL=iframeResizer.contentWindow.map
\ No newline at end of file
index e8f4bcb..f5c4c4e 100644 (file)
@@ -1,9 +1,2 @@
-/*! iFrame Resizer (iframeSizer.min.js ) - v3.5.3 - 2016-02-23
- *  Desc: Force cross domain iframes to size to content.
- *  Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
- *  Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
- *  License: MIT
- */
-
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(){var b,c=["moz","webkit","o","ms"];for(b=0;b<c.length&&!N;b+=1)N=a[c[b]+"RequestAnimationFrame"];N||h("setup","RequestAnimationFrame not supported")}function e(b){var c="Host page: "+b;return a.top!==a.self&&(c=a.parentIFrame&&a.parentIFrame.getId?a.parentIFrame.getId()+": "+b:"Nested host page: "+b),c}function f(a){return K+"["+e(a)+"]"}function g(a){return P[a]?P[a].log:G}function h(a,b){k("log",a,b,g(a))}function i(a,b){k("info",a,b,g(a))}function j(a,b){k("warn",a,b,!0)}function k(b,c,d,e){!0===e&&"object"==typeof a.console&&console[b](f(c),d)}function l(d){function e(){function a(){s(V),p(W)}g("Height"),g("Width"),t(a,V,"init")}function f(){var a=U.substr(L).split(":");return{iframe:P[a[0]].iframe,id:a[0],height:a[1],width:a[2],type:a[3]}}function g(a){var b=Number(P[W]["max"+a]),c=Number(P[W]["min"+a]),d=a.toLowerCase(),e=Number(V[d]);h(W,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,h(W,"Set "+d+" to min value")),e>b&&(e=b,h(W,"Set "+d+" to max value")),V[d]=""+e}function k(){function a(){function a(){var a=0,d=!1;for(h(W,"Checking connection is from allowed list of origins: "+c);a<c.length;a++)if(c[a]===b){d=!0;break}return d}function d(){var a=P[W].remoteHost;return h(W,"Checking connection is from: "+a),b===a}return c.constructor===Array?a():d()}var b=d.origin,c=P[W].checkOrigin;if(c&&""+b!="null"&&!a())throw new Error("Unexpected message received from: "+b+" for "+V.iframe.id+". Message was: "+d.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function l(){return K===(""+U).substr(0,L)&&U.substr(L).split(":")[0]in P}function w(){var a=V.type in{"true":1,"false":1,undefined:1};return a&&h(W,"Ignoring init message from meta parent page"),a}function y(a){return U.substr(U.indexOf(":")+J+a)}function z(a){h(W,"MessageCallback passed: {iframe: "+V.iframe.id+", message: "+a+"}"),N("messageCallback",{iframe:V.iframe,message:JSON.parse(a)}),h(W,"--")}function A(){var b=document.body.getBoundingClientRect(),c=V.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:c.height,iframeWidth:c.width,clientHeight:Math.max(document.documentElement.clientHeight,a.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,a.innerWidth||0),offsetTop:parseInt(c.top-b.top,10),offsetLeft:parseInt(c.left-b.left,10),scrollTop:a.pageYOffset,scrollLeft:a.pageXOffset})}function B(a,b){function c(){u("Send Page Info","pageInfo:"+A(),a,b)}x(c,32)}function C(){function d(b,c){function d(){P[g]?B(P[g].iframe,g):e()}["scroll","resize"].forEach(function(e){h(g,b+e+" listener for sendPageInfo"),c(a,e,d)})}function e(){d("Remove ",c)}function f(){d("Add ",b)}var g=W;f(),P[g].stopPageInfo=e}function D(){P[W]&&P[W].stopPageInfo&&(P[W].stopPageInfo(),delete P[W].stopPageInfo)}function E(){var a=!0;return null===V.iframe&&(j(W,"IFrame ("+V.id+") not found"),a=!1),a}function F(a){var b=a.getBoundingClientRect();return o(W),{x:Math.floor(Number(b.left)+Number(M.x)),y:Math.floor(Number(b.top)+Number(M.y))}}function G(b){function c(){M=g,H(),h(W,"--")}function d(){return{x:Number(V.width)+f.x,y:Number(V.height)+f.y}}function e(){a.parentIFrame?a.parentIFrame["scrollTo"+(b?"Offset":"")](g.x,g.y):j(W,"Unable to scroll to requested position, window.parentIFrame not found")}var f=b?F(V.iframe):{x:0,y:0},g=d();h(W,"Reposition requested from iFrame (offset x:"+f.x+" y:"+f.y+")"),a.top!==a.self?e():c()}function H(){!1!==N("scrollCallback",M)?p(W):q()}function I(b){function c(){var a=F(g);h(W,"Moving to in page link (#"+e+") at x: "+a.x+" y: "+a.y),M={x:a.x,y:a.y},H(),h(W,"--")}function d(){a.parentIFrame?a.parentIFrame.moveToAnchor(e):h(W,"In page link #"+e+" not found and window.parentIFrame not found")}var e=b.split("#")[1]||"",f=decodeURIComponent(e),g=document.getElementById(f)||document.getElementsByName(f)[0];g?c():a.top!==a.self?d():h(W,"In page link #"+e+" not found")}function N(a,b){return m(W,a,b)}function O(){switch(P[W].firstRun&&T(),V.type){case"close":n(V.iframe);break;case"message":z(y(6));break;case"scrollTo":G(!1);break;case"scrollToOffset":G(!0);break;case"pageInfo":B(P[W].iframe,W),C();break;case"pageInfoStop":D();break;case"inPageLink":I(y(9));break;case"reset":r(V);break;case"init":e(),N("initCallback",V.iframe),N("resizedCallback",V);break;default:e(),N("resizedCallback",V)}}function Q(a){var b=!0;return P[a]||(b=!1,j(V.type+" No settings for "+a+". Message was: "+U)),b}function S(){for(var a in P)u("iFrame requested init",v(a),document.getElementById(a),a)}function T(){P[W].firstRun=!1}var U=d.data,V={},W=null;"[iFrameResizerChild]Ready"===U?S():l()?(V=f(),W=R=V.id,!w()&&Q(W)&&(h(W,"Received: "+U),E()&&k()&&O())):i(W,"Ignored: "+U)}function m(a,b,c){var d=null,e=null;if(P[a]){if(d=P[a][b],"function"!=typeof d)throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function n(a){var b=a.id;h(b,"Removing iFrame: "+b),a.parentNode.removeChild(a),m(b,"closedCallback",b),h(b,"--"),delete P[b]}function o(b){null===M&&(M={x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop},h(b,"Get page position: "+M.x+","+M.y))}function p(b){null!==M&&(a.scrollTo(M.x,M.y),h(b,"Set page position: "+M.x+","+M.y),q())}function q(){M=null}function r(a){function b(){s(a),u("reset","reset",a.iframe,a.id)}h(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(b,a,"reset")}function s(a){function b(b){a.iframe.style[b]=a[b]+"px",h(a.id,"IFrame ("+e+") "+b+" set to "+a[b]+"px")}function c(b){H||"0"!==a[b]||(H=!0,h(e,"Hidden iFrame detected, creating visibility listener"),y())}function d(a){b(a),c(a)}var e=a.iframe.id;P[e]&&(P[e].sizeHeight&&d("height"),P[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&N?(h(b.id,"Requesting animation frame"),N(a)):a()}function u(a,b,c,d){function e(){var e=P[d].targetOrigin;h(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+e),c.contentWindow.postMessage(K+b,e)}function f(){i(d,"["+a+"] IFrame("+d+") not found"),P[d]&&delete P[d]}function g(){c&&"contentWindow"in c&&null!==c.contentWindow?e():f()}d=d||c.id,P[d]&&g()}function v(a){return a+":"+P[a].bodyMarginV1+":"+P[a].sizeWidth+":"+P[a].log+":"+P[a].interval+":"+P[a].enablePublicMethods+":"+P[a].autoResize+":"+P[a].bodyMargin+":"+P[a].heightCalculationMethod+":"+P[a].bodyBackground+":"+P[a].bodyPadding+":"+P[a].tolerance+":"+P[a].inPageLinks+":"+P[a].resizeFrom+":"+P[a].widthCalculationMethod}function w(a,c){function d(){function b(b){1/0!==P[w][b]&&0!==P[w][b]&&(a.style[b]=P[w][b]+"px",h(w,"Set "+b+" = "+P[w][b]+"px"))}function c(a){if(P[w]["min"+a]>P[w]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}c("Height"),c("Width"),b("maxHeight"),b("minHeight"),b("maxWidth"),b("minWidth")}function e(){var a=c&&c.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function f(b){return R=b,""===b&&(a.id=b=e(),G=(c||{}).log,R=b,h(b,"Added missing iframe ID: "+b+" ("+a.src+")")),b}function g(){h(w,"IFrame scrolling "+(P[w].scrolling?"enabled":"disabled")+" for "+w),a.style.overflow=!1===P[w].scrolling?"hidden":"auto",a.scrolling=!1===P[w].scrolling?"no":"yes"}function i(){("number"==typeof P[w].bodyMargin||"0"===P[w].bodyMargin)&&(P[w].bodyMarginV1=P[w].bodyMargin,P[w].bodyMargin=""+P[w].bodyMargin+"px")}function k(){var b=P[w].firstRun,c=P[w].heightCalculationMethod in O;!b&&c&&r({iframe:a,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(P[w].iframe.iFrameResizer={close:n.bind(null,P[w].iframe),resize:u.bind(null,"Window resize","resize",P[w].iframe),moveToAnchor:function(a){u("Move to anchor","inPageLink:"+a,P[w].iframe,w)},sendMessage:function(a){a=JSON.stringify(a),u("Send Message","message:"+a,P[w].iframe,w)}})}function m(c){function d(){u("iFrame.onload",c,a),k()}b(a,"load",d),u("init",c,a)}function o(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function p(a){for(var b in S)S.hasOwnProperty(b)&&(P[w][b]=a.hasOwnProperty(b)?a[b]:S[b])}function q(a){return""===a||"file://"===a?"*":a}function s(b){b=b||{},P[w]={firstRun:!0,iframe:a,remoteHost:a.src.split("/").slice(0,3).join("/")},o(b),p(b),P[w].targetOrigin=!0===P[w].checkOrigin?q(P[w].remoteHost):"*"}function t(){return w in P&&"iFrameResizer"in a}var w=f(a.id);t()?j(w,"Ignored iFrame, already setup."):(s(c),g(),d(),i(),m(v(w)),l())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function b(){function a(a){function b(b){return"0px"===P[a].iframe.style[b]}function c(a){return null!==a.offsetParent}c(P[a].iframe)&&(b("height")||b("width"))&&u("Visibility change","resize",P[a].iframe,a)}for(var b in P)a(b)}function c(a){h("window","Mutation observed: "+a[0].target+" "+a[0].type),x(b,16)}function d(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},d=new e(c);d.observe(a,b)}var e=a.MutationObserver||a.WebKitMutationObserver;e&&d()}function z(a){function b(){B("Window "+a,"resize")}h("window","Trigger event: "+a),x(b,16)}function A(){function a(){B("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),x(a,16))}function B(a,b){function c(a){return"parent"===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(a,"message",l),b(a,"resize",function(){z("resize")}),b(document,"visibilitychange",A),b(document,"-webkit-visibilitychange",A),b(a,"focusin",function(){z("focus")}),b(a,"focus",function(){z("focus")})}function D(){function a(a,c){function d(){if(!c.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==c.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+c.tagName+">")}c&&(d(),w(c,a),b.push(c))}var b;return d(),C(),function(c,d){switch(b=[],typeof d){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(d||"iframe"),a.bind(void 0,c));break;case"object":a(c,d);break;default:throw new TypeError("Unexpected data type ("+typeof d+")")}return b}}function E(a){a.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}}var F=0,G=!1,H=!1,I="message",J=I.length,K="[iFrameSizer]",L=K.length,M=null,N=a.requestAnimationFrame,O={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},P={},Q=null,R="Host Page",S={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){j("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};a.jQuery&&E(jQuery),"function"==typeof define&&define.amd?define([],D):"object"==typeof module&&"object"==typeof module.exports?module.exports=D():a.iFrameResize=a.iFrameResize||D()}(window||{});
 //# sourceMappingURL=iframeResizer.map
\ No newline at end of file
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(){var b,c=["moz","webkit","o","ms"];for(b=0;b<c.length&&!N;b+=1)N=a[c[b]+"RequestAnimationFrame"];N||h("setup","RequestAnimationFrame not supported")}function e(b){var c="Host page: "+b;return a.top!==a.self&&(c=a.parentIFrame&&a.parentIFrame.getId?a.parentIFrame.getId()+": "+b:"Nested host page: "+b),c}function f(a){return K+"["+e(a)+"]"}function g(a){return P[a]?P[a].log:G}function h(a,b){k("log",a,b,g(a))}function i(a,b){k("info",a,b,g(a))}function j(a,b){k("warn",a,b,!0)}function k(b,c,d,e){!0===e&&"object"==typeof a.console&&console[b](f(c),d)}function l(d){function e(){function a(){s(V),p(W)}g("Height"),g("Width"),t(a,V,"init")}function f(){var a=U.substr(L).split(":");return{iframe:P[a[0]].iframe,id:a[0],height:a[1],width:a[2],type:a[3]}}function g(a){var b=Number(P[W]["max"+a]),c=Number(P[W]["min"+a]),d=a.toLowerCase(),e=Number(V[d]);h(W,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,h(W,"Set "+d+" to min value")),e>b&&(e=b,h(W,"Set "+d+" to max value")),V[d]=""+e}function k(){function a(){function a(){var a=0,d=!1;for(h(W,"Checking connection is from allowed list of origins: "+c);a<c.length;a++)if(c[a]===b){d=!0;break}return d}function d(){var a=P[W].remoteHost;return h(W,"Checking connection is from: "+a),b===a}return c.constructor===Array?a():d()}var b=d.origin,c=P[W].checkOrigin;if(c&&""+b!="null"&&!a())throw new Error("Unexpected message received from: "+b+" for "+V.iframe.id+". Message was: "+d.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function l(){return K===(""+U).substr(0,L)&&U.substr(L).split(":")[0]in P}function w(){var a=V.type in{"true":1,"false":1,undefined:1};return a&&h(W,"Ignoring init message from meta parent page"),a}function y(a){return U.substr(U.indexOf(":")+J+a)}function z(a){h(W,"MessageCallback passed: {iframe: "+V.iframe.id+", message: "+a+"}"),N("messageCallback",{iframe:V.iframe,message:JSON.parse(a)}),h(W,"--")}function A(){var b=document.body.getBoundingClientRect(),c=V.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:c.height,iframeWidth:c.width,clientHeight:Math.max(document.documentElement.clientHeight,a.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,a.innerWidth||0),offsetTop:parseInt(c.top-b.top,10),offsetLeft:parseInt(c.left-b.left,10),scrollTop:a.pageYOffset,scrollLeft:a.pageXOffset})}function B(a,b){function c(){u("Send Page Info","pageInfo:"+A(),a,b)}x(c,32)}function C(){function d(b,c){function d(){P[g]?B(P[g].iframe,g):e()}["scroll","resize"].forEach(function(e){h(g,b+e+" listener for sendPageInfo"),c(a,e,d)})}function e(){d("Remove ",c)}function f(){d("Add ",b)}var g=W;f(),P[g].stopPageInfo=e}function D(){P[W]&&P[W].stopPageInfo&&(P[W].stopPageInfo(),delete P[W].stopPageInfo)}function E(){var a=!0;return null===V.iframe&&(j(W,"IFrame ("+V.id+") not found"),a=!1),a}function F(a){var b=a.getBoundingClientRect();return o(W),{x:Math.floor(Number(b.left)+Number(M.x)),y:Math.floor(Number(b.top)+Number(M.y))}}function G(b){function c(){M=g,H(),h(W,"--")}function d(){return{x:Number(V.width)+f.x,y:Number(V.height)+f.y}}function e(){a.parentIFrame?a.parentIFrame["scrollTo"+(b?"Offset":"")](g.x,g.y):j(W,"Unable to scroll to requested position, window.parentIFrame not found")}var f=b?F(V.iframe):{x:0,y:0},g=d();h(W,"Reposition requested from iFrame (offset x:"+f.x+" y:"+f.y+")"),a.top!==a.self?e():c()}function H(){!1!==N("scrollCallback",M)?p(W):q()}function I(b){function c(){var a=F(g);h(W,"Moving to in page link (#"+e+") at x: "+a.x+" y: "+a.y),M={x:a.x,y:a.y},H(),h(W,"--")}function d(){a.parentIFrame?a.parentIFrame.moveToAnchor(e):h(W,"In page link #"+e+" not found and window.parentIFrame not found")}var e=b.split("#")[1]||"",f=decodeURIComponent(e),g=document.getElementById(f)||document.getElementsByName(f)[0];g?c():a.top!==a.self?d():h(W,"In page link #"+e+" not found")}function N(a,b){return m(W,a,b)}function O(){switch(P[W].firstRun&&T(),V.type){case"close":n(V.iframe);break;case"message":z(y(6));break;case"scrollTo":G(!1);break;case"scrollToOffset":G(!0);break;case"pageInfo":B(P[W].iframe,W),C();break;case"pageInfoStop":D();break;case"inPageLink":I(y(9));break;case"reset":r(V);break;case"init":e(),N("initCallback",V.iframe),N("resizedCallback",V);break;default:e(),N("resizedCallback",V)}}function Q(a){var b=!0;return P[a]||(b=!1,j(V.type+" No settings for "+a+". Message was: "+U)),b}function S(){for(var a in P)u("iFrame requested init",v(a),document.getElementById(a),a)}function T(){P[W].firstRun=!1}var U=d.data,V={},W=null;"[iFrameResizerChild]Ready"===U?S():l()?(V=f(),W=R=V.id,!w()&&Q(W)&&(h(W,"Received: "+U),E()&&k()&&O())):i(W,"Ignored: "+U)}function m(a,b,c){var d=null,e=null;if(P[a]){if(d=P[a][b],"function"!=typeof d)throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function n(a){var b=a.id;h(b,"Removing iFrame: "+b),a.parentNode.removeChild(a),m(b,"closedCallback",b),h(b,"--"),delete P[b]}function o(b){null===M&&(M={x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop},h(b,"Get page position: "+M.x+","+M.y))}function p(b){null!==M&&(a.scrollTo(M.x,M.y),h(b,"Set page position: "+M.x+","+M.y),q())}function q(){M=null}function r(a){function b(){s(a),u("reset","reset",a.iframe,a.id)}h(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(b,a,"reset")}function s(a){function b(b){a.iframe.style[b]=a[b]+"px",h(a.id,"IFrame ("+e+") "+b+" set to "+a[b]+"px")}function c(b){H||"0"!==a[b]||(H=!0,h(e,"Hidden iFrame detected, creating visibility listener"),y())}function d(a){b(a),c(a)}var e=a.iframe.id;P[e]&&(P[e].sizeHeight&&d("height"),P[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&N?(h(b.id,"Requesting animation frame"),N(a)):a()}function u(a,b,c,d){function e(){var e=P[d].targetOrigin;h(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+e),c.contentWindow.postMessage(K+b,e)}function f(){i(d,"["+a+"] IFrame("+d+") not found"),P[d]&&delete P[d]}function g(){c&&"contentWindow"in c&&null!==c.contentWindow?e():f()}d=d||c.id,P[d]&&g()}function v(a){return a+":"+P[a].bodyMarginV1+":"+P[a].sizeWidth+":"+P[a].log+":"+P[a].interval+":"+P[a].enablePublicMethods+":"+P[a].autoResize+":"+P[a].bodyMargin+":"+P[a].heightCalculationMethod+":"+P[a].bodyBackground+":"+P[a].bodyPadding+":"+P[a].tolerance+":"+P[a].inPageLinks+":"+P[a].resizeFrom+":"+P[a].widthCalculationMethod}function w(a,c){function d(){function b(b){1/0!==P[w][b]&&0!==P[w][b]&&(a.style[b]=P[w][b]+"px",h(w,"Set "+b+" = "+P[w][b]+"px"))}function c(a){if(P[w]["min"+a]>P[w]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}c("Height"),c("Width"),b("maxHeight"),b("minHeight"),b("maxWidth"),b("minWidth")}function e(){var a=c&&c.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function f(b){return R=b,""===b&&(a.id=b=e(),G=(c||{}).log,R=b,h(b,"Added missing iframe ID: "+b+" ("+a.src+")")),b}function g(){h(w,"IFrame scrolling "+(P[w].scrolling?"enabled":"disabled")+" for "+w),a.style.overflow=!1===P[w].scrolling?"hidden":"auto",a.scrolling=!1===P[w].scrolling?"no":"yes"}function i(){("number"==typeof P[w].bodyMargin||"0"===P[w].bodyMargin)&&(P[w].bodyMarginV1=P[w].bodyMargin,P[w].bodyMargin=""+P[w].bodyMargin+"px")}function k(){var b=P[w].firstRun,c=P[w].heightCalculationMethod in O;!b&&c&&r({iframe:a,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(P[w].iframe.iFrameResizer={close:n.bind(null,P[w].iframe),resize:u.bind(null,"Window resize","resize",P[w].iframe),moveToAnchor:function(a){u("Move to anchor","inPageLink:"+a,P[w].iframe,w)},sendMessage:function(a){a=JSON.stringify(a),u("Send Message","message:"+a,P[w].iframe,w)}})}function m(c){function d(){u("iFrame.onload",c,a),k()}b(a,"load",d),u("init",c,a)}function o(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function p(a){for(var b in S)S.hasOwnProperty(b)&&(P[w][b]=a.hasOwnProperty(b)?a[b]:S[b])}function q(a){return""===a||"file://"===a?"*":a}function s(b){b=b||{},P[w]={firstRun:!0,iframe:a,remoteHost:a.src.split("/").slice(0,3).join("/")},o(b),p(b),P[w].targetOrigin=!0===P[w].checkOrigin?q(P[w].remoteHost):"*"}function t(){return w in P&&"iFrameResizer"in a}var w=f(a.id);t()?j(w,"Ignored iFrame, already setup."):(s(c),g(),d(),i(),m(v(w)),l())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function b(){function a(a){function b(b){return"0px"===P[a].iframe.style[b]}function c(a){return null!==a.offsetParent}c(P[a].iframe)&&(b("height")||b("width"))&&u("Visibility change","resize",P[a].iframe,a)}for(var b in P)a(b)}function c(a){h("window","Mutation observed: "+a[0].target+" "+a[0].type),x(b,16)}function d(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},d=new e(c);d.observe(a,b)}var e=a.MutationObserver||a.WebKitMutationObserver;e&&d()}function z(a){function b(){B("Window "+a,"resize")}h("window","Trigger event: "+a),x(b,16)}function A(){function a(){B("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),x(a,16))}function B(a,b){function c(a){return"parent"===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(a,"message",l),b(a,"resize",function(){z("resize")}),b(document,"visibilitychange",A),b(document,"-webkit-visibilitychange",A),b(a,"focusin",function(){z("focus")}),b(a,"focus",function(){z("focus")})}function D(){function a(a,c){function d(){if(!c.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==c.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+c.tagName+">")}c&&(d(),w(c,a),b.push(c))}var b;return d(),C(),function(c,d){switch(b=[],typeof d){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(d||"iframe"),a.bind(void 0,c));break;case"object":a(c,d);break;default:throw new TypeError("Unexpected data type ("+typeof d+")")}return b}}function E(a){a.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}}var F=0,G=!1,H=!1,I="message",J=I.length,K="[iFrameSizer]",L=K.length,M=null,N=a.requestAnimationFrame,O={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},P={},Q=null,R="Host Page",S={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){j("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};a.jQuery&&E(jQuery),"function"==typeof define&&define.amd?define([],D):"object"==typeof module&&"object"==typeof module.exports?module.exports=D():a.iFrameResize=a.iFrameResize||D()}(window||{});
 //# sourceMappingURL=iframeResizer.map
\ No newline at end of file
index a3f544b..28acba2 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 // Backbone.js 1.1.2
 
 (function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r(e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().replace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}};return e});
 // Backbone.js 1.1.2
 
 (function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r(e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().replace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}};return e});
index 53cf921..7e14652 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /*!
 
  handlebars v2.0.0
 /*!
 
  handlebars v2.0.0
index 9a95a75..c100e20 100644 (file)
@@ -1 +1,19 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
\ No newline at end of file
 var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
\ No newline at end of file
index bcbf248..ddb13f7 100644 (file)
@@ -1,11 +1,3 @@
-/*
- * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
- * http://benalman.com/projects/jquery-bbq-plugin/
- * 
- * Copyright (c) 2010 "Cowboy" Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
 (function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
 /*
  * jQuery hashchange event - v1.2 - 2/11/2010
 (function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
 /*
  * jQuery hashchange event - v1.2 - 2/11/2010
index c2a678d..f20ffc8 100644 (file)
@@ -1,9 +1,21 @@
-/**
- * marked - a markdown parser
- * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
- * https://github.com/chjj/marked
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
  */
-
 ;(function() {
 
 /**
 ;(function() {
 
 /**
index 22ea396..0b23e89 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 var require = function (file, cwd) {
     var resolved = require.resolve(file, cwd || '/');
     var mod = require.modules[resolved];
 var require = function (file, cwd) {
     var resolved = require.resolve(file, cwd || '/');
     var mod = require.modules[resolved];
index b8051fe..9d21e03 100644 (file)
@@ -1,4 +1,21 @@
-
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 // The purpose of the `Content` object is to abstract away the data conversions
 // to and from raw content entities as strings. For example, you want to be able
 // to pass in a Javascript object and have it be automatically converted into a
 // The purpose of the `Content` object is to abstract away the data conversions
 // to and from raw content entities as strings. For example, you want to be able
 // to pass in a Javascript object and have it be automatically converted into a
index 5ab57c1..a95c6bb 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /**
  * swagger-client - swagger.js is a javascript client for use with swaggering APIs.
  * @version v2.1.9-M1
 /**
  * swagger-client - swagger.js is a javascript client for use with swaggering APIs.
  * @version v2.1.9-M1
index c4e144f..3cc09cb 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 var appName;
 var popupMask;
 var popupDialog;
 var appName;
 var popupMask;
 var popupDialog;
index 11f1d96..732b164 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 //     Underscore.js 1.7.0
 //     http://underscorejs.org
 //     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 //     Underscore.js 1.7.0
 //     http://underscorejs.org
 //     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
index 88e8bf1..a8fb552 100644 (file)
@@ -1,3 +1,23 @@
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
 <script>
 var qp = null;
 if(window.location.hash) {
 <script>
 var qp = null;
 if(window.location.hash) {
index 89a4050..2095b71 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /**
  * swagger-ui - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
  * @version v2.1.8-M1
 /**
  * swagger-ui - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
  * @version v2.1.8-M1
index ef1f9e2..58ed4f8 100644 (file)
@@ -1,3 +1,22 @@
+====
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+====
+
   __  __   _                                                     _                   ____                
  |  \/  | (_)   ___   _ __    ___    ___    ___   _ __  __   __ (_)   ___    ___    | __ )   _   _   ___ 
  | |\/| | | |  / __| | '__|  / _ \  / __|  / _ \ | '__| \ \ / / | |  / __|  / _ \   |  _ \  | | | | / __|
   __  __   _                                                     _                   ____                
  |  \/  | (_)   ___   _ __    ___    ___    ___   _ __  __   __ (_)   ___    ___    | __ )   _   _   ___ 
  | |\/| | | |  / __| | '__|  / _ \  / __|  / _ \ | '__| \ \ / / | |  / __|  / _ \   |  _ \  | | | | / __|
index 58169bb..4a2636a 100644 (file)
@@ -1,17 +1,20 @@
-/*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed 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
  *
  *
  * Licensed 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
+ *     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.
  *
  * 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 body {
   color: #333;
  */
 body {
   color: #333;
index 47eea0b..fc1d3da 100644 (file)
@@ -1,17 +1,20 @@
 /*
 /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed 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
  *
  *
  * Licensed 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
+ *     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.
  *
  * 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){
     jQuery.i18n.properties({
  */
 function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){
     jQuery.i18n.properties({
index 4521677..94c7f59 100644 (file)
@@ -1,11 +1,11 @@
 #
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,6 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
 
 
 org_openo_msb_metrics_btn_refresh=Refresh
 
 
 org_openo_msb_metrics_btn_refresh=Refresh
index 2080e4e..f0f05bc 100644 (file)
@@ -1,11 +1,11 @@
 #
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,6 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
 
 
 org_openo_msb_metrics_btn_refresh=刷新
 
 
 org_openo_msb_metrics_btn_refresh=刷新
index 579d6d7..8467d31 100644 (file)
-<!--\r
-\r
-Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-Licensed under the Apache License, Version 2.0 (the "License");\r
-you may not use this file except in compliance with the License.\r
-You may obtain a copy of the License at\r
-\r
-    http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-Unless required by applicable law or agreed to in writing, software\r
-distributed under the License is distributed on an "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-See the License for the specific language governing permissions and\r
-limitations under the License.\r
-\r
--->\r
-<!DOCTYPE html>\r
-<html>\r
-<head lang="en">\r
-<meta charset="UTF-8">\r
-<title></title>\r
-<link\r
-       href="js/fontAwesome/css/font-awesome.min.css"\r
-       rel="stylesheet" />\r
-<link\r
-       href="js/bootstrap/css/bootstrap.min.css"\r
-       rel="stylesheet" />\r
-\r
-\r
-\r
-<link href="css/metrics.css" rel="stylesheet" type="text/css" />\r
-<link href="css/animate.min.css" rel="stylesheet" type="text/css" />\r
-<link href="js/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />\r
-\r
-<style>\r
-.ms-controller {\r
-       visibility: hidden\r
-}\r
-</style>\r
-\r
-</head>\r
-<body>\r
-<div class="ms-controller" ms-controller="metricsController">\r
-<div class="navbar" id="metricsHead">\r
-        <div class="navbar-inner container-fluid" id="top-bar">\r
-            <header class="row-fluid">\r
-                <h3 class="span12" id="title">\r
-                <img class="logo" src="img/netnumenLogo.png" alt="Logo"/>\r
-                    <small> —— Metrics</small>\r
-                 <button class="btn btn-default pull-right"  ms-click="initMetrics()" >\r
-                  <i class=" fa fa-refresh"></i> <span id="org_openo_msb_metrics_btn_refresh" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-               </button>   \r
-                </h3>\r
-                  \r
-          \r
-\r
-            </header>\r
-\r
-        </div>\r
-</div>\r
-\r
-<div ms-visible="vm.isErr" style="     margin-top: 20px;text-align: center;" id="org_openo_msb_metrics_iserr" name_i18n="org_openo_msb_metrics_ui_i18n"></div>\r
-\r
-<div ms-visible="!vm.isErr">\r
-<span class="response_throbber" ms-visible="vm.routeLoading"></span>\r
-\r
-\r
- <div class="container-fluid">\r
-\r
-\r
-\r
-  <div class="row" style=" margin-top: 15px;">\r
-         <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6">\r
-           <i class="fa fa-cubes fa-lg"></i> \r
-           <span class=" titlefont" id="org_openo_msb_metrics_jvm_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-         </div>  \r
-         <div class="pull-right">  \r
-          <i class="fa fa-clock-o"></i> <span id="org_openo_msb_metrics_jvm_time" name_i18n="org_openo_msb_metrics_ui_i18n"></span> {{vm.jvmTime}}\r
-         </div>      \r
-   </div>\r
-   <div class="separator-line"></div>\r
-\r
-    <div class="row row-fluid">\r
-\r
-        <div class="col-xs-12 col-sm-12 col-md-8 col-lg-7 " >\r
-              <div class="panel panel-default">\r
-                  <div class="panel-heading">\r
-                      <i class="fa fa-stack-overflow fa-fw"></i> <span id="org_openo_msb_metrics_memory" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-                    </div>\r
-                  <!-- /.panel-heading -->\r
-                  <div class="panel-body">\r
-                  <div  id="memoryBarChartDiv" style="width:100%;height:250px"></div>\r
-                  <div  id="memoryPieChartDiv" style="width:100%;height:200px"></div>\r
-                  \r
-                  </div>   \r
-                </div>\r
-        </div>\r
-\r
-         <div class="col-xs-12 col-sm-12 col-md-4 col-lg-5 ">\r
-              <div class="panel panel-default">\r
-                  <div class="panel-heading">\r
-                      <i class="fa fa-tasks fa-fw"></i> <span id="org_openo_msb_metrics_thread" name_i18n="org_openo_msb_metrics_ui_i18n"></span> \r
-                       <div class="pull-right">  \r
-                        <span id="org_openo_msb_metrics_thread_num" name_i18n="org_openo_msb_metrics_ui_i18n"></span>{{vm.threadNum}} \r
-                       </div>\r
-                    </div>\r
-                  <!-- /.panel-heading -->\r
-                  <div class="panel-body metricsChart" id="threadsChartDiv" style="height:480px">\r
-                  \r
-                  </div>   \r
-                </div>\r
-        </div>\r
-\r
\r
-    </div>\r
-\r
-  </div>\r
-\r
-\r
-\r
-   <div class="container-fluid">\r
-\r
-       <div class="row">\r
-         <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 ">\r
-           <i class="fa fa-internet-explorer fa-lg"></i> \r
-           <span class=" titlefont" id="org_openo_msb_metrics_http_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-\r
-         </div>\r
-        \r
-       </div>\r
-     <div class="separator-line"></div>\r
-\r
-\r
-      <div class="row row-fluid">\r
-\r
-        <div class="col-xs-12 col-md-6 col-sm-6 col-lg-6 " >\r
-              <div class="panel panel-default">\r
-                  <div class="panel-heading">\r
-                      <i class="fa fa-link fa-fw"></i> <span  id="org_openo_msb_metrics_rest_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-                    </div>\r
-                  <!-- /.panel-heading -->\r
-                  <div class="panel-body metricsChart" id="restChartDiv" >\r
-                  \r
-                  </div>   \r
-                </div>\r
-        </div>\r
-\r
-         <div class="col-xs-12 col-md-6 col-sm-6 col-lg-6 ">\r
-              <div class="panel panel-default">\r
-                  <div class="panel-heading">\r
-                      <i class="fa fa-bar-chart fa-fw"></i> <span  id="org_openo_msb_metrics_requests_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-                    </div>\r
-                  <!-- /.panel-heading -->\r
-                  <div class="panel-body metricsChart"  id="requestsChartDiv" >\r
-                  \r
-                  </div>   \r
-                </div>\r
-        </div>\r
-\r
\r
-    </div>\r
-         \r
-\r
-   <div class="row-fluid">  \r
-\r
-     <div class="panel panel-default">\r
-          <div class="panel-heading">\r
-              <i class="fa fa-file-text-o fa-fw"></i> <span  id="org_openo_msb_metrics_http_table_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>\r
-            </div>\r
-          <!-- /.panel-heading -->\r
-          <div class="panel-body" >\r
-            \r
-            <div class="table-responsive">\r
-               <table class="table table-striped table-bordered  table-hover" id="restTable">\r
-                                    <thead>\r
-                                        <tr>\r
-                                            <th id="org_openo_msb_metrics_http_table_sn" name_i18n="org_openo_msb_metrics_ui_i18n"></th> \r
-                                            <th id="org_openo_msb_metrics_http_table_restname" name_i18n="org_openo_msb_metrics_ui_i18n"></th>                                         \r
-                                            <th id="org_openo_msb_metrics_http_table_count" name_i18n="org_openo_msb_metrics_ui_i18n"></th>                                 \r
-                                            <th id="org_openo_msb_metrics_http_table_max" name_i18n="org_openo_msb_metrics_ui_i18n"></th>\r
-                                            <th id="org_openo_msb_metrics_http_table_min" name_i18n="org_openo_msb_metrics_ui_i18n"></th>\r
-                                            <th id="org_openo_msb_metrics_http_table_mean" name_i18n="org_openo_msb_metrics_ui_i18n"></th>\r
-                                            <th id="org_openo_msb_metrics_http_table_m1" name_i18n="org_openo_msb_metrics_ui_i18n"></th>  \r
-                                            <th id="org_openo_msb_metrics_http_table_m5" name_i18n="org_openo_msb_metrics_ui_i18n"></th>                                            \r
-                                        </tr>\r
-                                    </thead>\r
-                                    <tbody ms-each-rest="restArray">\r
-                                        <tr>\r
-                                            <td ms-text="$index+1"></td>\r
-                                            <td ms-text="metricsUtil.methodShortName(rest.name)" ms-attr-title="rest.name"></td>\r
-                                            <td ms-text="rest.count"></td>\r
-                                            <td ms-text="rest.max.toFixed(2)"></td>\r
-                                            <td ms-text="rest.min.toFixed(2)"></td>\r
-                                            <td ms-text="rest.mean.toFixed(2)"></td>\r
-                                            <td ms-text="rest.m1_rate"></td>\r
-                                            <td ms-text="rest.m5_rate"></td>\r
-                                                                                    \r
-                                        </tr> \r
-                                                                            \r
-                                    </tbody>\r
-                                </table>\r
-                           \r
-                      </div>\r
-              </div>   \r
-          </div>\r
-\r
-        </div>\r
-\r
-  </div>\r
-\r
-</div>\r
-</div>\r
-\r
-\r
-\r
-       <script type="text/javascript"  src="js/jquery/jquery-1.10.2.min.js"></script>\r
-   <script type="text/javascript" src="js/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>\r
-<script src="i18n/loadi18nApp_iui-metrics_view.js"></script>\r
-   <script type="text/javascript">\r
-\r
-      var url = window.location.search.match(/url=([^&]+)/);\r
-      if (url && url.length > 1) {\r
-        url = decodeURIComponent(url[1]);\r
-        $("#metricsHead").hide();\r
-      } else {\r
-        url = "/admin/microservices/v1/metrics";\r
-      }\r
-\r
-      loadPropertiesSideMenu('', 'msb-iui-metrics-i18n', 'i18n/'); \r
-\r
-</script>\r
-\r
-\r
-       <script type="text/javascript"  src="js/bootstrap/js/bootstrap.min.js"></script>\r
-\r
-    <script type="text/javascript"  src="js/dataTables/jquery.dataTables.min.js"></script>\r
-  <script type="text/javascript"  src="js/dataTables/dataTables.bootstrap.min.js"></script>\r
-\r
-       <script type="text/javascript"  src="js/avalon.js"></script>\r
-\r
-  \r
-  <script src="js/metricsUtil.js"></script>\r
-\r
-\r
-   <script src="js/echarts/echarts-all.js"></script>\r
-  \r
-   <script src="js/metricsChart.js"></script>\r
-\r
-  <script type="text/javascript"   src="js/metricsController.js"></script>\r
-\r
-  <script type="text/javascript" src="js/iframeResizer/iframeResizer.contentWindow.min.js"></script>\r
-\r
-       \r
-</body>\r
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<!DOCTYPE html>
+<html>
+<head lang="en">
+<meta charset="UTF-8">
+<title></title>
+<link
+       href="js/fontAwesome/css/font-awesome.min.css"
+       rel="stylesheet" />
+<link
+       href="js/bootstrap/css/bootstrap.min.css"
+       rel="stylesheet" />
+
+
+
+<link href="css/metrics.css" rel="stylesheet" type="text/css" />
+<link href="css/animate.min.css" rel="stylesheet" type="text/css" />
+<link href="js/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
+
+<style>
+.ms-controller {
+       visibility: hidden
+}
+</style>
+
+</head>
+<body>
+<div class="ms-controller" ms-controller="metricsController">
+<div class="navbar" id="metricsHead">
+        <div class="navbar-inner container-fluid" id="top-bar">
+            <header class="row-fluid">
+                <h3 class="span12" id="title">
+                <img class="logo" src="img/netnumenLogo.png" alt="Logo"/>
+                    <small> —— Metrics</small>
+                 <button class="btn btn-default pull-right"  ms-click="initMetrics()" >
+                  <i class=" fa fa-refresh"></i> <span id="org_openo_msb_metrics_btn_refresh" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+               </button>   
+                </h3>
+                  
+          
+
+            </header>
+
+        </div>
+</div>
+
+<div ms-visible="vm.isErr" style="     margin-top: 20px;text-align: center;" id="org_openo_msb_metrics_iserr" name_i18n="org_openo_msb_metrics_ui_i18n"></div>
+
+<div ms-visible="!vm.isErr">
+<span class="response_throbber" ms-visible="vm.routeLoading"></span>
+
+
+ <div class="container-fluid">
+
+
+
+  <div class="row" style=" margin-top: 15px;">
+         <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6">
+           <i class="fa fa-cubes fa-lg"></i> 
+           <span class=" titlefont" id="org_openo_msb_metrics_jvm_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+         </div>  
+         <div class="pull-right">  
+          <i class="fa fa-clock-o"></i> <span id="org_openo_msb_metrics_jvm_time" name_i18n="org_openo_msb_metrics_ui_i18n"></span> {{vm.jvmTime}}
+         </div>      
+   </div>
+   <div class="separator-line"></div>
+
+    <div class="row row-fluid">
+
+        <div class="col-xs-12 col-sm-12 col-md-8 col-lg-7 " >
+              <div class="panel panel-default">
+                  <div class="panel-heading">
+                      <i class="fa fa-stack-overflow fa-fw"></i> <span id="org_openo_msb_metrics_memory" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+                    </div>
+                  <!-- /.panel-heading -->
+                  <div class="panel-body">
+                  <div  id="memoryBarChartDiv" style="width:100%;height:250px"></div>
+                  <div  id="memoryPieChartDiv" style="width:100%;height:200px"></div>
+                  
+                  </div>   
+                </div>
+        </div>
+
+         <div class="col-xs-12 col-sm-12 col-md-4 col-lg-5 ">
+              <div class="panel panel-default">
+                  <div class="panel-heading">
+                      <i class="fa fa-tasks fa-fw"></i> <span id="org_openo_msb_metrics_thread" name_i18n="org_openo_msb_metrics_ui_i18n"></span> 
+                       <div class="pull-right">  
+                        <span id="org_openo_msb_metrics_thread_num" name_i18n="org_openo_msb_metrics_ui_i18n"></span>{{vm.threadNum}} 
+                       </div>
+                    </div>
+                  <!-- /.panel-heading -->
+                  <div class="panel-body metricsChart" id="threadsChartDiv" style="height:480px">
+                  
+                  </div>   
+                </div>
+        </div>
+
+    </div>
+
+  </div>
+
+
+
+   <div class="container-fluid">
+
+       <div class="row">
+         <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 ">
+           <i class="fa fa-internet-explorer fa-lg"></i> 
+           <span class=" titlefont" id="org_openo_msb_metrics_http_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+
+         </div>
+        
+       </div>
+     <div class="separator-line"></div>
+
+
+      <div class="row row-fluid">
+
+        <div class="col-xs-12 col-md-6 col-sm-6 col-lg-6 " >
+              <div class="panel panel-default">
+                  <div class="panel-heading">
+                      <i class="fa fa-link fa-fw"></i> <span  id="org_openo_msb_metrics_rest_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+                    </div>
+                  <!-- /.panel-heading -->
+                  <div class="panel-body metricsChart" id="restChartDiv" >
+                  
+                  </div>   
+                </div>
+        </div>
+
+         <div class="col-xs-12 col-md-6 col-sm-6 col-lg-6 ">
+              <div class="panel panel-default">
+                  <div class="panel-heading">
+                      <i class="fa fa-bar-chart fa-fw"></i> <span  id="org_openo_msb_metrics_requests_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+                    </div>
+                  <!-- /.panel-heading -->
+                  <div class="panel-body metricsChart"  id="requestsChartDiv" >
+                  
+                  </div>   
+                </div>
+        </div>
+
+    </div>
+         
+
+   <div class="row-fluid">  
+
+     <div class="panel panel-default">
+          <div class="panel-heading">
+              <i class="fa fa-file-text-o fa-fw"></i> <span  id="org_openo_msb_metrics_http_table_title" name_i18n="org_openo_msb_metrics_ui_i18n"></span>
+            </div>
+          <!-- /.panel-heading -->
+          <div class="panel-body" >
+            
+            <div class="table-responsive">
+               <table class="table table-striped table-bordered  table-hover" id="restTable">
+                                    <thead>
+                                        <tr>
+                                            <th id="org_openo_msb_metrics_http_table_sn" name_i18n="org_openo_msb_metrics_ui_i18n"></th> 
+                                            <th id="org_openo_msb_metrics_http_table_restname" name_i18n="org_openo_msb_metrics_ui_i18n"></th>                                         
+                                            <th id="org_openo_msb_metrics_http_table_count" name_i18n="org_openo_msb_metrics_ui_i18n"></th>                                 
+                                            <th id="org_openo_msb_metrics_http_table_max" name_i18n="org_openo_msb_metrics_ui_i18n"></th>
+                                            <th id="org_openo_msb_metrics_http_table_min" name_i18n="org_openo_msb_metrics_ui_i18n"></th>
+                                            <th id="org_openo_msb_metrics_http_table_mean" name_i18n="org_openo_msb_metrics_ui_i18n"></th>
+                                            <th id="org_openo_msb_metrics_http_table_m1" name_i18n="org_openo_msb_metrics_ui_i18n"></th>  
+                                            <th id="org_openo_msb_metrics_http_table_m5" name_i18n="org_openo_msb_metrics_ui_i18n"></th>                                            
+                                        </tr>
+                                    </thead>
+                                    <tbody ms-each-rest="restArray">
+                                        <tr>
+                                            <td ms-text="$index+1"></td>
+                                            <td ms-text="metricsUtil.methodShortName(rest.name)" ms-attr-title="rest.name"></td>
+                                            <td ms-text="rest.count"></td>
+                                            <td ms-text="rest.max.toFixed(2)"></td>
+                                            <td ms-text="rest.min.toFixed(2)"></td>
+                                            <td ms-text="rest.mean.toFixed(2)"></td>
+                                            <td ms-text="rest.m1_rate"></td>
+                                            <td ms-text="rest.m5_rate"></td>
+                                                                                    
+                                        </tr> 
+                                                                            
+                                    </tbody>
+                                </table>
+                           
+                      </div>
+              </div>   
+          </div>
+
+        </div>
+
+  </div>
+
+</div>
+</div>
+
+
+
+       <script type="text/javascript"  src="js/jquery/jquery-1.10.2.min.js"></script>
+   <script type="text/javascript" src="js/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+<script src="i18n/loadi18nApp_iui-metrics_view.js"></script>
+   <script type="text/javascript">
+
+      var url = window.location.search.match(/url=([^&]+)/);
+      if (url && url.length > 1) {
+        url = decodeURIComponent(url[1]);
+        $("#metricsHead").hide();
+      } else {
+        url = "/admin/microservices/v1/metrics";
+      }
+
+      loadPropertiesSideMenu('', 'msb-iui-metrics-i18n', 'i18n/'); 
+
+</script>
+
+
+       <script type="text/javascript"  src="js/bootstrap/js/bootstrap.min.js"></script>
+
+    <script type="text/javascript"  src="js/dataTables/jquery.dataTables.min.js"></script>
+  <script type="text/javascript"  src="js/dataTables/dataTables.bootstrap.min.js"></script>
+
+       <script type="text/javascript"  src="js/avalon.js"></script>
+
+  
+  <script src="js/metricsUtil.js"></script>
+
+
+   <script src="js/echarts/echarts-all.js"></script>
+  
+   <script src="js/metricsChart.js"></script>
+
+  <script type="text/javascript"   src="js/metricsController.js"></script>
+
+  <script type="text/javascript" src="js/iframeResizer/iframeResizer.contentWindow.min.js"></script>
+
+       
+</body>
 </html>
\ No newline at end of file
 </html>
\ No newline at end of file
index a22bb7d..73698dc 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /*==================================================
  Copyright (c) 2013-2015 司徒正美 and other contributors
  http://www.cnblogs.com/rubylouvre/
 /*==================================================
  Copyright (c) 2013-2015 司徒正美 and other contributors
  http://www.cnblogs.com/rubylouvre/
index 2828337..8ec95e1 100644 (file)
@@ -1,9 +1,3 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */
 html {
   font-family: sans-serif;
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */
 html {
   font-family: sans-serif;
index 679272d..9611bd2 100644 (file)
@@ -1,7 +1 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
index 8ae571b..a5271e0 100644 (file)
@@ -1,9 +1,3 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
 if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
 
 /* ========================================================================
 if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
 
 /* ========================================================================
index b04a0e8..b4f2fa3 100644 (file)
@@ -1,6 +1 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
 if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
 if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
index 1d11b34..3e66cd6 100644 (file)
@@ -1,21 +1,2 @@
-/* =============================================================
- * bootstrap-typeahead.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed 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.
- * ============================================================ */
-
 
 !function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,s),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var s=this;return e=t.grep(e,function(t){return s.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,s=[],i=[],n=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):n.push(e):s.push(e);return s.concat(i,n)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var s=this;return e=t(e).map(function(e,i){return e=t(s.options.item).attr("data-value",i),e.find("a").html(s.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),s=e.next();s.length||(s=t(this.$menu.find("li")[0])),s.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var s=t.fn.typeahead;t.fn.typeahead=function(s){return this.each(function(){var i=t(this),n=i.data("typeahead"),h="object"==typeof s&&s;n||i.data("typeahead",n=new e(this,h)),"string"==typeof s&&n[s]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=s,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery);
\ No newline at end of file
 
 !function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,s),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var s=this;return e=t.grep(e,function(t){return s.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,s=[],i=[],n=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):n.push(e):s.push(e);return s.concat(i,n)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var s=this;return e=t(e).map(function(e,i){return e=t(s.options.item).attr("data-value",i),e.find("a").html(s.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),s=e.next();s.length||(s=t(this.$menu.find("li")[0])),s.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var s=t.fn.typeahead;t.fn.typeahead=function(s){return this.each(function(){var i=t(this),n=i.data("typeahead"),h="object"==typeof s&&s;n||i.data("typeahead",n=new e(this,h)),"string"==typeof s&&n[s]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=s,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery);
\ No newline at end of file
index c80d1bf..4ec986a 100644 (file)
@@ -1,3 +1,21 @@
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 div.dataTables_length label {
        font-weight: normal;
        text-align: left;
 div.dataTables_length label {
        font-weight: normal;
        text-align: left;
index f30ec17..86e7d7d 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 !function(e){var t,i;!function(){function e(e,t){if(!t)return e;if(0===e.indexOf(".")){var i=t.split("/"),n=e.split("/"),a=i.length-1,o=n.length,r=0,s=0;e:for(var l=0;o>l;l++)switch(n[l]){case"..":if(!(a>r))break e;r++,s++;break;case".":s++;break;default:break e}return i.length=a-r,n=n.slice(s),i.concat(n).join("/")}return e}function n(t){function i(i,r){if("string"==typeof i){var s=n[i];return s||(s=o(e(i,t)),n[i]=s),s}i instanceof Array&&(r=r||function(){},r.apply(this,a(i,r,t)))}var n={};return i}function a(i,n,a){for(var s=[],l=r[a],h=0,m=Math.min(i.length,n.length);m>h;h++){var V,U=e(i[h],a);switch(U){case"require":V=l&&l.require||t;break;case"exports":V=l.exports;break;case"module":V=l;break;default:V=o(U)}s.push(V)}return s}function o(e){var t=r[e];if(!t)throw new Error("No "+e);if(!t.defined){var i=t.factory,n=i.apply(this,a(t.deps||[],i,e));"undefined"!=typeof n&&(t.exports=n),t.defined=1}return t.exports}var r={};i=function(e,t,i){r[e]={id:e,deps:t,factory:i,defined:0,exports:{},require:n(e)}},t=n("")}(),i("echarts",["echarts/echarts"],function(e){return e}),i("echarts/echarts",["require","./config","zrender/tool/util","zrender/tool/event","zrender/tool/env","zrender","zrender/config","./chart/island","./component/toolbox","./component","./component/title","./component/tooltip","./component/legend","./util/ecData","./chart","zrender/tool/color","./component/timeline","zrender/shape/Image","zrender/loadingEffect/Bar","zrender/loadingEffect/Bubble","zrender/loadingEffect/DynamicLine","zrender/loadingEffect/Ring","zrender/loadingEffect/Spin","zrender/loadingEffect/Whirling","./theme/macarons","./theme/infographic"],function(e){function t(){r.Dispatcher.call(this)}function i(e){e.innerHTML="",this._themeConfig={},this.dom=e,this._connected=!1,this._status={dragIn:!1,dragOut:!1,needRefresh:!1},this._curEventType=!1,this._chartList=[],this._messageCenter=new t,this._messageCenterOutSide=new t,this.resize=this.resize(),this._init()}function n(e,t,i,n,a){for(var o=e._chartList,r=o.length;r--;){var s=o[r];"function"==typeof s[t]&&s[t](i,n,a)}}var a=e("./config"),o=e("zrender/tool/util"),r=e("zrender/tool/event"),s={},l=e("zrender/tool/env").canvasSupported,h=new Date-0,m={},V="_echarts_instance_";s.version="2.2.7",s.dependencies={zrender:"2.1.1"},s.init=function(t,n){var a=e("zrender");a.version.replace(".","")-0<s.dependencies.zrender.replace(".","")-0&&console.error("ZRender "+a.version+" is too old for ECharts "+s.version+". Current version need ZRender "+s.dependencies.zrender+"+"),t=t instanceof Array?t[0]:t;var o=t.getAttribute(V);return o||(o=h++,t.setAttribute(V,o)),m[o]&&m[o].dispose(),m[o]=new i(t),m[o].id=o,m[o].canvasSupported=l,m[o].setTheme(n),m[o]},s.getInstanceById=function(e){return m[e]},o.merge(t.prototype,r.Dispatcher.prototype,!0);var U=e("zrender/config").EVENT,d=["CLICK","DBLCLICK","MOUSEOVER","MOUSEOUT","DRAGSTART","DRAGEND","DRAGENTER","DRAGOVER","DRAGLEAVE","DROP"];return i.prototype={_init:function(){var t=this,i=e("zrender").init(this.dom);this._zr=i,this._messageCenter.dispatch=function(e,i,n,a){n=n||{},n.type=e,n.event=i,t._messageCenter.dispatchWithContext(e,n,a),t._messageCenterOutSide.dispatchWithContext(e,n,a)},this._onevent=function(e){return t.__onevent(e)};for(var n in a.EVENT)"CLICK"!=n&&"DBLCLICK"!=n&&"HOVER"!=n&&"MOUSEOUT"!=n&&"MAP_ROAM"!=n&&this._messageCenter.bind(a.EVENT[n],this._onevent,this);var o={};this._onzrevent=function(e){return t[o[e.type]](e)};for(var r=0,s=d.length;s>r;r++){var l=d[r],h=U[l];o[h]="_on"+l.toLowerCase(),i.on(h,this._onzrevent)}this.chart={},this.component={};var m=e("./chart/island");this._island=new m(this._themeConfig,this._messageCenter,i,{},this),this.chart.island=this._island;var V=e("./component/toolbox");this._toolbox=new V(this._themeConfig,this._messageCenter,i,{},this),this.component.toolbox=this._toolbox;var p=e("./component");p.define("title",e("./component/title")),p.define("tooltip",e("./component/tooltip")),p.define("legend",e("./component/legend")),(0===i.getWidth()||0===i.getHeight())&&console.error("Dom’s width & height should be ready before init.")},__onevent:function(e){e.__echartsId=e.__echartsId||this.id;var t=e.__echartsId===this.id;switch(this._curEventType||(this._curEventType=e.type),e.type){case a.EVENT.LEGEND_SELECTED:this._onlegendSelected(e);break;case a.EVENT.DATA_ZOOM:if(!t){var i=this.component.dataZoom;i&&(i.silence(!0),i.absoluteZoom(e.zoom),i.silence(!1))}this._ondataZoom(e);break;case a.EVENT.DATA_RANGE:t&&this._ondataRange(e);break;case a.EVENT.MAGIC_TYPE_CHANGED:if(!t){var n=this.component.toolbox;n&&(n.silence(!0),n.setMagicType(e.magicType),n.silence(!1))}this._onmagicTypeChanged(e);break;case a.EVENT.DATA_VIEW_CHANGED:t&&this._ondataViewChanged(e);break;case a.EVENT.TOOLTIP_HOVER:t&&this._tooltipHover(e);break;case a.EVENT.RESTORE:this._onrestore();break;case a.EVENT.REFRESH:t&&this._onrefresh(e);break;case a.EVENT.TOOLTIP_IN_GRID:case a.EVENT.TOOLTIP_OUT_GRID:if(t){if(this._connected){var o=this.component.grid;o&&(e.x=(e.event.zrenderX-o.getX())/o.getWidth(),e.y=(e.event.zrenderY-o.getY())/o.getHeight())}}else{var o=this.component.grid;o&&this._zr.trigger("mousemove",{connectTrigger:!0,zrenderX:o.getX()+e.x*o.getWidth(),zrenderY:o.getY()+e.y*o.getHeight()})}}if(this._connected&&t&&this._curEventType===e.type){for(var r in this._connected)this._connected[r].connectedEventHandler(e);this._curEventType=null}(!t||!this._connected&&t)&&(this._curEventType=null)},_onclick:function(e){if(n(this,"onclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.CLICK,e.event,t,this)}},_ondblclick:function(e){if(n(this,"ondblclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.DBLCLICK,e.event,t,this)}},_onmouseover:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.HOVER,e.event,t,this)}},_onmouseout:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.MOUSEOUT,e.event,t,this)}},_ondragstart:function(e){this._status={dragIn:!1,dragOut:!1,needRefresh:!1},n(this,"ondragstart",e)},_ondragenter:function(e){n(this,"ondragenter",e)},_ondragover:function(e){n(this,"ondragover",e)},_ondragleave:function(e){n(this,"ondragleave",e)},_ondrop:function(e){n(this,"ondrop",e,this._status),this._island.ondrop(e,this._status)},_ondragend:function(e){if(n(this,"ondragend",e,this._status),this._timeline&&this._timeline.ondragend(e,this._status),this._island.ondragend(e,this._status),this._status.needRefresh){this._syncBackupData(this._option);var t=this._messageCenter;t.dispatch(a.EVENT.DATA_CHANGED,e.event,this._eventPackage(e.target),this),t.dispatch(a.EVENT.REFRESH,null,null,this)}},_onlegendSelected:function(e){this._status.needRefresh=!1,n(this,"onlegendSelected",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataZoom:function(e){this._status.needRefresh=!1,n(this,"ondataZoom",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataRange:function(e){this._clearEffect(),this._status.needRefresh=!1,n(this,"ondataRange",e,this._status),this._status.needRefresh&&this._zr.refreshNextFrame()},_onmagicTypeChanged:function(){this._clearEffect(),this._render(this._toolbox.getMagicOption())},_ondataViewChanged:function(e){this._syncBackupData(e.option),this._messageCenter.dispatch(a.EVENT.DATA_CHANGED,null,e,this),this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_tooltipHover:function(e){var t=[];n(this,"ontooltipHover",e,t)},_onrestore:function(){this.restore()},_onrefresh:function(e){this._refreshInside=!0,this.refresh(e),this._refreshInside=!1},_syncBackupData:function(e){this.component.dataZoom&&this.component.dataZoom.syncBackupData(e)},_eventPackage:function(t){if(t){var i=e("./util/ecData"),n=i.get(t,"seriesIndex"),a=i.get(t,"dataIndex");return a=-1!=n&&this.component.dataZoom?this.component.dataZoom.getRealDataIndex(n,a):a,{seriesIndex:n,seriesName:(i.get(t,"series")||{}).name,dataIndex:a,data:i.get(t,"data"),name:i.get(t,"name"),value:i.get(t,"value"),special:i.get(t,"special")}}},_noDataCheck:function(e){for(var t=e.series,i=0,n=t.length;n>i;i++)if(t[i].type==a.CHART_TYPE_MAP||t[i].data&&t[i].data.length>0||t[i].markPoint&&t[i].markPoint.data&&t[i].markPoint.data.length>0||t[i].markLine&&t[i].markLine.data&&t[i].markLine.data.length>0||t[i].nodes&&t[i].nodes.length>0||t[i].links&&t[i].links.length>0||t[i].matrix&&t[i].matrix.length>0||t[i].eventList&&t[i].eventList.length>0)return!1;var o=this._option&&this._option.noDataLoadingOption||this._themeConfig.noDataLoadingOption||a.noDataLoadingOption||{text:this._option&&this._option.noDataText||this._themeConfig.noDataText||a.noDataText,effect:this._option&&this._option.noDataEffect||this._themeConfig.noDataEffect||a.noDataEffect};return this.clear(),this.showLoading(o),!0},_render:function(t){if(this._mergeGlobalConifg(t),!this._noDataCheck(t)){var i=t.backgroundColor;if(i)if(l||-1==i.indexOf("rgba"))this.dom.style.backgroundColor=i;else{var n=i.split(",");this.dom.style.filter="alpha(opacity="+100*n[3].substring(0,n[3].lastIndexOf(")"))+")",n.length=3,n[0]=n[0].replace("a",""),this.dom.style.backgroundColor=n.join(",")+")"}this._zr.clearAnimation(),this._chartList=[];var o=e("./chart"),r=e("./component");(t.xAxis||t.yAxis)&&(t.grid=t.grid||{},t.dataZoom=t.dataZoom||{});for(var s,h,m,V=["title","legend","tooltip","dataRange","roamController","grid","dataZoom","xAxis","yAxis","polar"],U=0,d=V.length;d>U;U++)h=V[U],m=this.component[h],t[h]?(m?m.refresh&&m.refresh(t):(s=r.get(/^[xy]Axis$/.test(h)?"axis":h),m=new s(this._themeConfig,this._messageCenter,this._zr,t,this,h),this.component[h]=m),this._chartList.push(m)):m&&(m.dispose(),this.component[h]=null,delete this.component[h]);for(var p,c,u,y={},U=0,d=t.series.length;d>U;U++)c=t.series[U].type,c?y[c]||(y[c]=!0,p=o.get(c),p?(this.chart[c]?(u=this.chart[c],u.refresh(t)):u=new p(this._themeConfig,this._messageCenter,this._zr,t,this),this._chartList.push(u),this.chart[c]=u):console.error(c+" has not been required.")):console.error("series["+U+"] chart type has not been defined.");for(c in this.chart)c==a.CHART_TYPE_ISLAND||y[c]||(this.chart[c].dispose(),this.chart[c]=null,delete this.chart[c]);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._island.refresh(t),this._toolbox.refresh(t),t.animation&&!t.renderAsImage?this._zr.refresh():this._zr.render();var g="IMG"+this.id,b=document.getElementById(g);t.renderAsImage&&l?(b?b.src=this.getDataURL(t.renderAsImage):(b=this.getImage(t.renderAsImage),b.id=g,b.style.position="absolute",b.style.left=0,b.style.top=0,this.dom.firstChild.appendChild(b)),this.un(),this._zr.un(),this._disposeChartList(),this._zr.clear()):b&&b.parentNode.removeChild(b),b=null,this._option=t}},restore:function(){this._clearEffect(),this._option=o.clone(this._optionRestore),this._disposeChartList(),this._island.clear(),this._toolbox.reset(this._option,!0),this._render(this._option)},refresh:function(e){this._clearEffect(),e=e||{};var t=e.option;!this._refreshInside&&t&&(t=this.getOption(),o.merge(t,e.option,!0),o.merge(this._optionRestore,e.option,!0),this._toolbox.reset(t)),this._island.refresh(t),this._toolbox.refresh(t),this._zr.clearAnimation();for(var i=0,n=this._chartList.length;n>i;i++)this._chartList[i].refresh&&this._chartList[i].refresh(t);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._zr.refresh()},_disposeChartList:function(){this._clearEffect(),this._zr.clearAnimation();for(var e=this._chartList.length;e--;){var t=this._chartList[e];if(t){var i=t.type;this.chart[i]&&delete this.chart[i],this.component[i]&&delete this.component[i],t.dispose&&t.dispose()}}this._chartList=[]},_mergeGlobalConifg:function(t){for(var i=["backgroundColor","calculable","calculableColor","calculableHolderColor","nameConnector","valueConnector","animation","animationThreshold","animationDuration","animationDurationUpdate","animationEasing","addDataAnimation","symbolList","DRAG_ENABLE_TIME"],n=i.length;n--;){var o=i[n];null==t[o]&&(t[o]=null!=this._themeConfig[o]?this._themeConfig[o]:a[o])}var r=t.color;r&&r.length||(r=this._themeConfig.color||a.color),this._zr.getColor=function(t){var i=e("zrender/tool/color");return i.getColor(t,r)},l||(t.animation=!1,t.addDataAnimation=!1)},setOption:function(e,t){return e.timeline?this._setTimelineOption(e):this._setOption(e,t)},_setOption:function(e,t,i){return!t&&this._option?this._option=o.merge(this.getOption(),o.clone(e),!0):(this._option=o.clone(e),!i&&this._timeline&&this._timeline.dispose()),this._optionRestore=o.clone(this._option),this._option.series&&0!==this._option.series.length?(this.component.dataZoom&&(this._option.dataZoom||this._option.toolbox&&this._option.toolbox.feature&&this._option.toolbox.feature.dataZoom&&this._option.toolbox.feature.dataZoom.show)&&this.component.dataZoom.syncOption(this._option),this._toolbox.reset(this._option),this._render(this._option),this):void this._zr.clear()},getOption:function(){function e(e){var n=i._optionRestore[e];if(n)if(n instanceof Array)for(var a=n.length;a--;)t[e][a].data=o.clone(n[a].data);else t[e].data=o.clone(n.data)}var t=o.clone(this._option),i=this;return e("xAxis"),e("yAxis"),e("series"),t},setSeries:function(e,t){return t?(this._option.series=e,this.setOption(this._option,t)):this.setOption({series:e}),this},getSeries:function(){return this.getOption().series},_setTimelineOption:function(t){this._timeline&&this._timeline.dispose();var i=e("./component/timeline"),n=new i(this._themeConfig,this._messageCenter,this._zr,t,this);return this._timeline=n,this.component.timeline=this._timeline,this},addData:function(e,t,i,n,r){function s(){if(V._zr){V._zr.clearAnimation();for(var e=0,t=X.length;t>e;e++)X[e].motionlessOnce=h.addDataAnimation&&X[e].addDataAnimation;V._messageCenter.dispatch(a.EVENT.REFRESH,null,{option:h},V)}}for(var l=e instanceof Array?e:[[e,t,i,n,r]],h=this.getOption(),m=this._optionRestore,V=this,U=0,d=l.length;d>U;U++){e=l[U][0],t=l[U][1],i=l[U][2],n=l[U][3],r=l[U][4];var p=m.series[e],c=i?"unshift":"push",u=i?"pop":"shift";if(p){var y=p.data,g=h.series[e].data;if(y[c](t),g[c](t),n||(y[u](),t=g[u]()),null!=r){var b,f;if(p.type===a.CHART_TYPE_PIE&&(b=m.legend)&&(f=b.data)){var k=h.legend.data;if(f[c](r),k[c](r),!n){var x=o.indexOf(f,t.name);-1!=x&&f.splice(x,1),x=o.indexOf(k,t.name),-1!=x&&k.splice(x,1)}}else if(null!=m.xAxis&&null!=m.yAxis){var _,L,W=p.xAxisIndex||0;(null==m.xAxis[W].type||"category"===m.xAxis[W].type)&&(_=m.xAxis[W].data,L=h.xAxis[W].data,_[c](r),L[c](r),n||(_[u](),L[u]())),W=p.yAxisIndex||0,"category"===m.yAxis[W].type&&(_=m.yAxis[W].data,L=h.yAxis[W].data,_[c](r),L[c](r),n||(_[u](),L[u]()))}}this._option.series[e].data=h.series[e].data}}this._zr.clearAnimation();for(var X=this._chartList,v=0,w=function(){v--,0===v&&s()},U=0,d=X.length;d>U;U++)h.addDataAnimation&&X[U].addDataAnimation&&(v++,X[U].addDataAnimation(l,w));return this.component.dataZoom&&this.component.dataZoom.syncOption(h),this._option=h,h.addDataAnimation||setTimeout(s,0),this},addMarkPoint:function(e,t){return this._addMark(e,t,"markPoint")},addMarkLine:function(e,t){return this._addMark(e,t,"markLine")},_addMark:function(e,t,i){var n,a=this._option.series;if(a&&(n=a[e])){var r=this._optionRestore.series,s=r[e],l=n[i],h=s[i];l=n[i]=l||{data:[]},h=s[i]=h||{data:[]};for(var m in t)"data"===m?(l.data=l.data.concat(t.data),h.data=h.data.concat(t.data)):"object"!=typeof t[m]||null==l[m]?l[m]=h[m]=t[m]:(o.merge(l[m],t[m],!0),o.merge(h[m],t[m],!0));var V=this.chart[n.type];V&&V.addMark(e,t,i)}return this},delMarkPoint:function(e,t){return this._delMark(e,t,"markPoint")},delMarkLine:function(e,t){return this._delMark(e,t,"markLine")},_delMark:function(e,t,i){var n,a,o,r=this._option.series;if(!(r&&(n=r[e])&&(a=n[i])&&(o=a.data)))return this;t=t.split(" > ");for(var s=-1,l=0,h=o.length;h>l;l++){var m=o[l];if(m instanceof Array){if(m[0].name===t[0]&&m[1].name===t[1]){s=l;break}}else if(m.name===t[0]){s=l;break}}if(s>-1){o.splice(s,1),this._optionRestore.series[e][i].data.splice(s,1);var V=this.chart[n.type];V&&V.delMark(e,t.join(" > "),i)}return this},getDom:function(){return this.dom},getZrender:function(){return this._zr},getDataURL:function(e){if(!l)return"";if(0===this._chartList.length){var t="IMG"+this.id,i=document.getElementById(t);if(i)return i.src}var n=this.component.tooltip;switch(n&&n.hideTip(),e){case"jpeg":break;default:e="png"}var a=this._option.backgroundColor;return a&&"rgba(0,0,0,0)"===a.replace(" ","")&&(a="#fff"),this._zr.toDataURL("image/"+e,a)},getImage:function(e){var t=this._optionRestore.title,i=document.createElement("img");return i.src=this.getDataURL(e),i.title=t&&t.text||"ECharts",i},getConnectedDataURL:function(t){if(!this.isConnected())return this.getDataURL(t);var i=this.dom,n={self:{img:this.getDataURL(t),left:i.offsetLeft,top:i.offsetTop,right:i.offsetLeft+i.offsetWidth,bottom:i.offsetTop+i.offsetHeight}},a=n.self.left,o=n.self.top,r=n.self.right,s=n.self.bottom;for(var l in this._connected)i=this._connected[l].getDom(),n[l]={img:this._connected[l].getDataURL(t),left:i.offsetLeft,top:i.offsetTop,right:i.offsetLeft+i.offsetWidth,bottom:i.offsetTop+i.offsetHeight},a=Math.min(a,n[l].left),o=Math.min(o,n[l].top),r=Math.max(r,n[l].right),s=Math.max(s,n[l].bottom);var h=document.createElement("div");h.style.position="absolute",h.style.left="-4000px",h.style.width=r-a+"px",h.style.height=s-o+"px",document.body.appendChild(h);var m=e("zrender").init(h),V=e("zrender/shape/Image");for(var l in n)m.addShape(new V({style:{x:n[l].left-a,y:n[l].top-o,image:n[l].img}}));m.render();var U=this._option.backgroundColor;U&&"rgba(0,0,0,0)"===U.replace(/ /g,"")&&(U="#fff");var d=m.toDataURL("image/png",U);return setTimeout(function(){m.dispose(),h.parentNode.removeChild(h),h=null},100),d},getConnectedImage:function(e){var t=this._optionRestore.title,i=document.createElement("img");return i.src=this.getConnectedDataURL(e),i.title=t&&t.text||"ECharts",i},on:function(e,t){return this._messageCenterOutSide.bind(e,t,this),this},un:function(e,t){return this._messageCenterOutSide.unbind(e,t),this},connect:function(e){if(!e)return this;if(this._connected||(this._connected={}),e instanceof Array)for(var t=0,i=e.length;i>t;t++)this._connected[e[t].id]=e[t];else this._connected[e.id]=e;return this},disConnect:function(e){if(!e||!this._connected)return this;if(e instanceof Array)for(var t=0,i=e.length;i>t;t++)delete this._connected[e[t].id];else delete this._connected[e.id];for(var n in this._connected)return this;return this._connected=!1,this},connectedEventHandler:function(e){e.__echartsId!=this.id&&this._onevent(e)},isConnected:function(){return!!this._connected},showLoading:function(t){var i={bar:e("zrender/loadingEffect/Bar"),bubble:e("zrender/loadingEffect/Bubble"),dynamicLine:e("zrender/loadingEffect/DynamicLine"),ring:e("zrender/loadingEffect/Ring"),spin:e("zrender/loadingEffect/Spin"),whirling:e("zrender/loadingEffect/Whirling")};this._toolbox.hideDataView(),t=t||{};var n=t.textStyle||{};t.textStyle=n;var r=o.merge(o.merge(o.clone(n),this._themeConfig.textStyle),a.textStyle);n.textFont=r.fontStyle+" "+r.fontWeight+" "+r.fontSize+"px "+r.fontFamily,n.text=t.text||this._option&&this._option.loadingText||this._themeConfig.loadingText||a.loadingText,null!=t.x&&(n.x=t.x),null!=t.y&&(n.y=t.y),t.effectOption=t.effectOption||{},t.effectOption.textStyle=n;var s=t.effect;return("string"==typeof s||null==s)&&(s=i[t.effect||this._option&&this._option.loadingEffect||this._themeConfig.loadingEffect||a.loadingEffect]||i.spin),this._zr.showLoading(new s(t.effectOption)),this},hideLoading:function(){return this._zr.hideLoading(),this},setTheme:function(t){if(t){if("string"==typeof t)switch(t){case"macarons":t=e("./theme/macarons");break;case"infographic":t=e("./theme/infographic");break;default:t={}}else t=t||{};this._themeConfig=t}if(!l){var i=this._themeConfig.textStyle;i&&i.fontFamily&&i.fontFamily2&&(i.fontFamily=i.fontFamily2),i=a.textStyle,i.fontFamily=i.fontFamily2}this._timeline&&this._timeline.setTheme(!0),this._optionRestore&&this.restore()},resize:function(){var e=this;return function(){if(e._clearEffect(),e._zr.resize(),e._option&&e._option.renderAsImage&&l)return e._render(e._option),e;e._zr.clearAnimation(),e._island.resize(),e._toolbox.resize(),e._timeline&&e._timeline.resize();for(var t=0,i=e._chartList.length;i>t;t++)e._chartList[t].resize&&e._chartList[t].resize();return e.component.grid&&e.component.grid.refixAxisShape(e.component),e._zr.refresh(),e._messageCenter.dispatch(a.EVENT.RESIZE,null,null,e),e}},_clearEffect:function(){this._zr.modLayer(a.EFFECT_ZLEVEL,{motionBlur:!1}),this._zr.painter.clearLayer(a.EFFECT_ZLEVEL)},clear:function(){return this._disposeChartList(),this._zr.clear(),this._option={},this._optionRestore={},this.dom.style.backgroundColor=null,this},dispose:function(){var e=this.dom.getAttribute(V);e&&delete m[e],this._island.dispose(),this._toolbox.dispose(),this._timeline&&this._timeline.dispose(),this._messageCenter.unbind(),this.clear(),this._zr.dispose(),this._zr=null}},s}),i("echarts/config",[],function(){var e={CHART_TYPE_LINE:"line",CHART_TYPE_BAR:"bar",CHART_TYPE_SCATTER:"scatter",CHART_TYPE_PIE:"pie",CHART_TYPE_RADAR:"radar",CHART_TYPE_VENN:"venn",CHART_TYPE_TREEMAP:"treemap",CHART_TYPE_TREE:"tree",CHART_TYPE_MAP:"map",CHART_TYPE_K:"k",CHART_TYPE_ISLAND:"island",CHART_TYPE_FORCE:"force",CHART_TYPE_CHORD:"chord",CHART_TYPE_GAUGE:"gauge",CHART_TYPE_FUNNEL:"funnel",CHART_TYPE_EVENTRIVER:"eventRiver",CHART_TYPE_WORDCLOUD:"wordCloud",CHART_TYPE_HEATMAP:"heatmap",COMPONENT_TYPE_TITLE:"title",COMPONENT_TYPE_LEGEND:"legend",COMPONENT_TYPE_DATARANGE:"dataRange",COMPONENT_TYPE_DATAVIEW:"dataView",COMPONENT_TYPE_DATAZOOM:"dataZoom",COMPONENT_TYPE_TOOLBOX:"toolbox",COMPONENT_TYPE_TOOLTIP:"tooltip",COMPONENT_TYPE_GRID:"grid",COMPONENT_TYPE_AXIS:"axis",COMPONENT_TYPE_POLAR:"polar",COMPONENT_TYPE_X_AXIS:"xAxis",COMPONENT_TYPE_Y_AXIS:"yAxis",COMPONENT_TYPE_AXIS_CATEGORY:"categoryAxis",COMPONENT_TYPE_AXIS_VALUE:"valueAxis",COMPONENT_TYPE_TIMELINE:"timeline",COMPONENT_TYPE_ROAMCONTROLLER:"roamController",backgroundColor:"rgba(0,0,0,0)",color:["#ff7f50","#87cefa","#da70d6","#32cd32","#6495ed","#ff69b4","#ba55d3","#cd5c5c","#ffa500","#40e0d0","#1e90ff","#ff6347","#7b68ee","#00fa9a","#ffd700","#6699FF","#ff6666","#3cb371","#b8860b","#30e0e0"],markPoint:{clickable:!0,symbol:"pin",symbolSize:10,large:!1,effect:{show:!1,loop:!0,period:15,type:"scale",scaleSize:2,bounceDistance:10},itemStyle:{normal:{borderWidth:2,label:{show:!0,position:"inside"}},emphasis:{label:{show:!0}}}},markLine:{clickable:!0,symbol:["circle","arrow"],symbolSize:[2,4],smoothness:.2,precision:2,effect:{show:!1,loop:!0,period:15,scaleSize:2},bundling:{enable:!1,maxTurningAngle:45},itemStyle:{normal:{borderWidth:1.5,label:{show:!0,position:"end"},lineStyle:{type:"dashed"}},emphasis:{label:{show:!1},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontFamily2:"微软雅黑",fontSize:12,fontStyle:"normal",fontWeight:"normal"},EVENT:{REFRESH:"refresh",RESTORE:"restore",RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",HOVER:"hover",MOUSEOUT:"mouseout",DATA_CHANGED:"dataChanged",DATA_ZOOM:"dataZoom",DATA_RANGE:"dataRange",DATA_RANGE_SELECTED:"dataRangeSelected",DATA_RANGE_HOVERLINK:"dataRangeHoverLink",LEGEND_SELECTED:"legendSelected",LEGEND_HOVERLINK:"legendHoverLink",MAP_SELECTED:"mapSelected",PIE_SELECTED:"pieSelected",MAGIC_TYPE_CHANGED:"magicTypeChanged",DATA_VIEW_CHANGED:"dataViewChanged",TIMELINE_CHANGED:"timelineChanged",MAP_ROAM:"mapRoam",FORCE_LAYOUT_END:"forceLayoutEnd",TOOLTIP_HOVER:"tooltipHover",TOOLTIP_IN_GRID:"tooltipInGrid",TOOLTIP_OUT_GRID:"tooltipOutGrid",ROAMCONTROLLER:"roamController"},DRAG_ENABLE_TIME:120,EFFECT_ZLEVEL:10,effectBlendAlpha:.95,symbolList:["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],loadingEffect:"spin",loadingText:"数据读取中...",noDataEffect:"bubble",noDataText:"暂无数据",calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:": ",animation:!0,addDataAnimation:!0,animationThreshold:2e3,animationDuration:2e3,animationDurationUpdate:500,animationEasing:"ExponentialOut"};return e}),i("zrender/tool/util",["require","../dep/excanvas"],function(e){function t(e){return e&&1===e.nodeType&&"string"==typeof e.nodeName}function i(e){if("object"==typeof e&&null!==e){var n=e;if(e instanceof Array){n=[];for(var a=0,o=e.length;o>a;a++)n[a]=i(e[a])}else if(!y[g.call(e)]&&!t(e)){n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=i(e[r]))}return n}return e}function n(e,i,n,o){if(i.hasOwnProperty(n)){var r=e[n];"object"!=typeof r||y[g.call(r)]||t(r)?!o&&n in e||(e[n]=i[n]):a(e[n],i[n],o)}}function a(e,t,i){for(var a in t)n(e,t,a,i);return e}function o(){if(!U)if(e("../dep/excanvas"),window.G_vmlCanvasManager){var t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",document.body.appendChild(t),U=G_vmlCanvasManager.initElement(t).getContext("2d")}else U=document.createElement("canvas").getContext("2d");return U}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1}function s(e,t){function i(){}var n=e.prototype;i.prototype=t.prototype,e.prototype=new i;for(var a in n)e.prototype[a]=n[a];e.constructor=e}function l(e,t,i){if(e&&t)if(e.forEach&&e.forEach===p)e.forEach(t,i);else if(e.length===+e.length)for(var n=0,a=e.length;a>n;n++)t.call(i,e[n],n,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e)}function h(e,t,i){if(e&&t){if(e.map&&e.map===c)return e.map(t,i);for(var n=[],a=0,o=e.length;o>a;a++)n.push(t.call(i,e[a],a,e));return n}}function m(e,t,i){if(e&&t){if(e.filter&&e.filter===u)return e.filter(t,i);for(var n=[],a=0,o=e.length;o>a;a++)t.call(i,e[a],a,e)&&n.push(e[a]);return n}}function V(e,t){return function(){e.apply(t,arguments)}}var U,d=Array.prototype,p=d.forEach,c=d.map,u=d.filter,y={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},g=Object.prototype.toString;return{inherits:s,clone:i,merge:a,getContext:o,indexOf:r,each:l,map:h,filter:m,bind:V}}),i("zrender/tool/event",["require","../mixin/Eventful"],function(e){"use strict";function t(e){return"undefined"!=typeof e.zrenderX&&e.zrenderX||"undefined"!=typeof e.offsetX&&e.offsetX||"undefined"!=typeof e.layerX&&e.layerX||"undefined"!=typeof e.clientX&&e.clientX}function i(e){return"undefined"!=typeof e.zrenderY&&e.zrenderY||"undefined"!=typeof e.offsetY&&e.offsetY||"undefined"!=typeof e.layerY&&e.layerY||"undefined"!=typeof e.clientY&&e.clientY}function n(e){return"undefined"!=typeof e.zrenderDelta&&e.zrenderDelta||"undefined"!=typeof e.wheelDelta&&e.wheelDelta||"undefined"!=typeof e.detail&&-e.detail}var a=e("../mixin/Eventful"),o="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};return{getX:t,getY:i,getDelta:n,stop:o,Dispatcher:a}}),i("zrender/tool/env",[],function(){function e(e){var t=this.os={},i=this.browser={},n=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),a=e.match(/(Android);?[\s\/]+([\d.]+)?/),o=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),s=!o&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),m=e.match(/Kindle\/([\d.]+)/),V=e.match(/Silk\/([\d._]+)/),U=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),p=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),c=e.match(/PlayBook/),u=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),y=e.match(/Firefox\/([\d.]+)/),g=e.match(/MSIE ([\d.]+)/),b=n&&e.match(/Mobile\//)&&!u,f=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!u,g=e.match(/MSIE\s([\d.]+)/);return(i.webkit=!!n)&&(i.version=n[1]),a&&(t.android=!0,t.version=a[2]),s&&!r&&(t.ios=t.iphone=!0,t.version=s[2].replace(/_/g,".")),o&&(t.ios=t.ipad=!0,t.version=o[2].replace(/_/g,".")),r&&(t.ios=t.ipod=!0,t.version=r[3]?r[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),U&&(t.blackberry=!0,t.version=U[2]),d&&(t.bb10=!0,t.version=d[2]),p&&(t.rimtabletos=!0,t.version=p[2]),c&&(i.playbook=!0),m&&(t.kindle=!0,t.version=m[1]),V&&(i.silk=!0,i.version=V[1]),!V&&t.android&&e.match(/Kindle Fire/)&&(i.silk=!0),u&&(i.chrome=!0,i.version=u[1]),y&&(i.firefox=!0,i.version=y[1]),g&&(i.ie=!0,i.version=g[1]),b&&(e.match(/Safari/)||t.ios)&&(i.safari=!0),f&&(i.webview=!0),g&&(i.ie=!0,i.version=g[1]),t.tablet=!!(o||c||a&&!e.match(/Mobile/)||y&&e.match(/Tablet/)||g&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(a||s||l||U||d||u&&e.match(/Android/)||u&&e.match(/CriOS\/([\d.]+)/)||y&&e.match(/Mobile/)||g&&e.match(/Touch/))),{browser:i,os:t,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return e(navigator.userAgent)}),i("zrender",["zrender/zrender"],function(e){return e}),i("zrender/zrender",["require","./dep/excanvas","./tool/util","./tool/log","./tool/guid","./Handler","./Painter","./Storage","./animation/Animation","./tool/env"],function(e){function t(e){return function(){e._needsRefreshNextFrame&&e.refresh()}}e("./dep/excanvas");var i=e("./tool/util"),n=e("./tool/log"),a=e("./tool/guid"),o=e("./Handler"),r=e("./Painter"),s=e("./Storage"),l=e("./animation/Animation"),h={},m={};m.version="2.1.1",m.init=function(e){var t=new V(a(),e);return h[t.id]=t,t},m.dispose=function(e){if(e)e.dispose();else{for(var t in h)h[t].dispose();h={}}return m},m.getInstance=function(e){return h[e]},m.delInstance=function(e){return delete h[e],m};var V=function(i,n){this.id=i,this.env=e("./tool/env"),this.storage=new s,this.painter=new r(n,this.storage),this.handler=new o(n,this.storage,this.painter),this.animation=new l({stage:{update:t(this)}}),this.animation.start();var a=this;this.painter.refreshNextFrame=function(){a.refreshNextFrame()},this._needsRefreshNextFrame=!1;var a=this,h=this.storage,m=h.delFromMap;h.delFromMap=function(e){var t=h.get(e);a.stopAnimation(t),m.call(h,e)}};return V.prototype.getId=function(){return this.id},V.prototype.addShape=function(e){return this.addElement(e),this},V.prototype.addGroup=function(e){return this.addElement(e),this},V.prototype.delShape=function(e){return this.delElement(e),this},V.prototype.delGroup=function(e){return this.delElement(e),this},V.prototype.modShape=function(e,t){return this.modElement(e,t),this},V.prototype.modGroup=function(e,t){return this.modElement(e,t),this},V.prototype.addElement=function(e){return this.storage.addRoot(e),this._needsRefreshNextFrame=!0,this},V.prototype.delElement=function(e){return this.storage.delRoot(e),this._needsRefreshNextFrame=!0,this},V.prototype.modElement=function(e,t){return this.storage.mod(e,t),this._needsRefreshNextFrame=!0,this},V.prototype.modLayer=function(e,t){return this.painter.modLayer(e,t),this._needsRefreshNextFrame=!0,this},V.prototype.addHoverShape=function(e){return this.storage.addHover(e),this},V.prototype.render=function(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this},V.prototype.refresh=function(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this},V.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},V.prototype.refreshHover=function(e){return this.painter.refreshHover(e),this},V.prototype.refreshShapes=function(e,t){return this.painter.refreshShapes(e,t),this},V.prototype.resize=function(){return this.painter.resize(),this},V.prototype.animate=function(e,t,a){var o=this;if("string"==typeof e&&(e=this.storage.get(e)),e){var r;if(t){for(var s=t.split("."),l=e,h=0,m=s.length;m>h;h++)l&&(l=l[s[h]]);l&&(r=l)}else r=e;if(!r)return void n('Property "'+t+'" is not existed in element '+e.id);
 
 null==e.__animators&&(e.__animators=[]);var V=e.__animators,U=this.animation.animate(r,{loop:a}).during(function(){o.modShape(e)}).done(function(){var t=i.indexOf(e.__animators,U);t>=0&&V.splice(t,1)});return V.push(U),U}n("Element not existed")},V.prototype.stopAnimation=function(e){if(e.__animators){for(var t=e.__animators,i=t.length,n=0;i>n;n++)t[n].stop();t.length=0}return this},V.prototype.clearAnimation=function(){return this.animation.clear(),this},V.prototype.showLoading=function(e){return this.painter.showLoading(e),this},V.prototype.hideLoading=function(){return this.painter.hideLoading(),this},V.prototype.getWidth=function(){return this.painter.getWidth()},V.prototype.getHeight=function(){return this.painter.getHeight()},V.prototype.toDataURL=function(e,t,i){return this.painter.toDataURL(e,t,i)},V.prototype.shapeToImage=function(e,t,i){var n=a();return this.painter.shapeToImage(n,e,t,i)},V.prototype.on=function(e,t,i){return this.handler.on(e,t,i),this},V.prototype.un=function(e,t){return this.handler.un(e,t),this},V.prototype.trigger=function(e,t){return this.handler.trigger(e,t),this},V.prototype.clear=function(){return this.storage.delRoot(),this.painter.clear(),this},V.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,m.delInstance(this.id)},m}),i("zrender/config",[],function(){var e={EVENT:{RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},elementClassName:"zr-element",catchBrushException:!1,debugMode:0,devicePixelRatio:Math.max(window.devicePixelRatio||1,1)};return e}),i("echarts/chart/island",["require","./base","zrender/shape/Circle","../config","../util/ecData","zrender/tool/util","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(e){function t(e,t,n,a,r){i.call(this,e,t,n,a,r),this._nameConnector,this._valueConnector,this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth();var l=this;l.shapeHandler.onmousewheel=function(e){var t=e.target,i=e.event,n=s.getDelta(i);n=n>0?-1:1,t.style.r-=n,t.style.r=t.style.r<5?5:t.style.r;var a=o.get(t,"value"),r=a*l.option.island.calculateStep;a=r>1?Math.round(a-r*n):+(a-r*n).toFixed(2);var h=o.get(t,"name");t.style.text=h+":"+a,o.set(t,"value",a),o.set(t,"name",h),l.zr.modShape(t.id),l.zr.refreshNextFrame(),s.stop(i)}}var i=e("./base"),n=e("zrender/shape/Circle"),a=e("../config");a.island={zlevel:0,z:5,r:15,calculateStep:.1};var o=e("../util/ecData"),r=e("zrender/tool/util"),s=e("zrender/tool/event");return t.prototype={type:a.CHART_TYPE_ISLAND,_combine:function(t,i){var n=e("zrender/tool/color"),a=e("../util/accMath"),r=a.accAdd(o.get(t,"value"),o.get(i,"value")),s=o.get(t,"name")+this._nameConnector+o.get(i,"name");t.style.text=s+this._valueConnector+r,o.set(t,"value",r),o.set(t,"name",s),t.style.r=this.option.island.r,t.style.color=n.mix(t.style.color,i.style.color)},refresh:function(e){e&&(e.island=this.reformOption(e.island),this.option=e,this._nameConnector=this.option.nameConnector,this._valueConnector=this.option.valueConnector)},getOption:function(){return this.option},resize:function(){var e=this.zr.getWidth(),t=this.zr.getHeight(),i=e/(this._zrWidth||e),n=t/(this._zrHeight||t);if(1!==i||1!==n){this._zrWidth=e,this._zrHeight=t;for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.modShape(this.shapeList[a].id,{style:{x:Math.round(this.shapeList[a].style.x*i),y:Math.round(this.shapeList[a].style.y*n)}})}},add:function(e){var t=o.get(e,"name"),i=o.get(e,"value"),a=null!=o.get(e,"series")?o.get(e,"series").name:"",r=this.getFont(this.option.island.textStyle),s=this.option.island,l={zlevel:s.zlevel,z:s.z,style:{x:e.style.x,y:e.style.y,r:this.option.island.r,color:e.style.color||e.style.strokeColor,text:t+this._valueConnector+i,textFont:r},draggable:!0,hoverable:!0,onmousewheel:this.shapeHandler.onmousewheel,_type:"island"};"#fff"===l.style.color&&(l.style.color=e.style.strokeColor),this.setCalculable(l),l.dragEnableTime=0,o.pack(l,{name:a},-1,i,-1,t),l=new n(l),this.shapeList.push(l),this.zr.addShape(l)},del:function(e){this.zr.delShape(e.id);for(var t=[],i=0,n=this.shapeList.length;n>i;i++)this.shapeList[i].id!=e.id&&t.push(this.shapeList[i]);this.shapeList=t},ondrop:function(e,t){if(this.isDrop&&e.target){var i=e.target,n=e.dragged;this._combine(i,n),this.zr.modShape(i.id),t.dragIn=!0,this.isDrop=!1}},ondragend:function(e,t){var i=e.target;this.isDragend?t.dragIn&&(this.del(i),t.needRefresh=!0):t.dragIn||(i.style.x=s.getX(e.event),i.style.y=s.getY(e.event),this.add(i),t.needRefresh=!0),this.isDragend=!1}},r.inherits(t,i),e("../chart").define("island",t),t}),i("echarts/component/toolbox",["require","./base","zrender/shape/Line","zrender/shape/Image","zrender/shape/Rectangle","../util/shape/Icon","../config","zrender/tool/util","zrender/config","zrender/tool/event","./dataView","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.dom=o.dom,this._magicType={},this._magicMap={},this._isSilence=!1,this._iconList,this._iconShapeMap={},this._featureTitle={},this._featureIcon={},this._featureColor={},this._featureOption={},this._enableColor="red",this._disableColor="#ccc",this._markShapeList=[];var r=this;r._onMark=function(e){r.__onMark(e)},r._onMarkUndo=function(e){r.__onMarkUndo(e)},r._onMarkClear=function(e){r.__onMarkClear(e)},r._onDataZoom=function(e){r.__onDataZoom(e)},r._onDataZoomReset=function(e){r.__onDataZoomReset(e)},r._onDataView=function(e){r.__onDataView(e)},r._onRestore=function(e){r.__onRestore(e)},r._onSaveAsImage=function(e){r.__onSaveAsImage(e)},r._onMagicType=function(e){r.__onMagicType(e)},r._onCustomHandler=function(e){r.__onCustomHandler(e)},r._onmousemove=function(e){return r.__onmousemove(e)},r._onmousedown=function(e){return r.__onmousedown(e)},r._onmouseup=function(e){return r.__onmouseup(e)},r._onclick=function(e){return r.__onclick(e)}}var i=e("./base"),n=e("zrender/shape/Line"),a=e("zrender/shape/Image"),o=e("zrender/shape/Rectangle"),r=e("../util/shape/Icon"),s=e("../config");s.toolbox={zlevel:0,z:6,show:!1,orient:"horizontal",x:"right",y:"top",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],disableColor:"#ddd",effectiveColor:"red",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemSize:16,showTitle:!0,feature:{mark:{show:!1,title:{mark:"辅助线开关",markUndo:"删除辅助线",markClear:"清空辅助线"},lineStyle:{width:1,color:"#1e90ff",type:"dashed"}},dataZoom:{show:!1,title:{dataZoom:"区域缩放",dataZoomReset:"区域缩放后退"}},dataView:{show:!1,title:"数据视图",readOnly:!1,lang:["数据视图","关闭","刷新"]},magicType:{show:!1,title:{line:"折线图切换",bar:"柱形图切换",stack:"堆积",tiled:"平铺",force:"力导向布局图切换",chord:"和弦图切换",pie:"饼图切换",funnel:"漏斗图切换"},type:[]},restore:{show:!1,title:"还原"},saveAsImage:{show:!1,title:"保存为图片",type:"png",lang:["点击保存"]}}};var l=e("zrender/tool/util"),h=e("zrender/config"),m=e("zrender/tool/event"),V="stack",U="tiled";return t.prototype={type:s.COMPONENT_TYPE_TOOLBOX,_buildShape:function(){this._iconList=[];var e=this.option.toolbox;this._enableColor=e.effectiveColor,this._disableColor=e.disableColor;var t=e.feature,i=[];for(var n in t)if(t[n].show)switch(n){case"mark":i.push({key:n,name:"mark"}),i.push({key:n,name:"markUndo"}),i.push({key:n,name:"markClear"});break;case"magicType":for(var a=0,o=t[n].type.length;o>a;a++)t[n].title[t[n].type[a]+"Chart"]=t[n].title[t[n].type[a]],t[n].option&&(t[n].option[t[n].type[a]+"Chart"]=t[n].option[t[n].type[a]]),i.push({key:n,name:t[n].type[a]+"Chart"});break;case"dataZoom":i.push({key:n,name:"dataZoom"}),i.push({key:n,name:"dataZoomReset"});break;case"saveAsImage":this.canvasSupported&&i.push({key:n,name:"saveAsImage"});break;default:i.push({key:n,name:n})}if(i.length>0){for(var r,n,a=0,o=i.length;o>a;a++)r=i[a].name,n=i[a].key,this._iconList.push(r),this._featureTitle[r]=t[n].title[r]||t[n].title,t[n].icon&&(this._featureIcon[r]=t[n].icon[r]||t[n].icon),t[n].color&&(this._featureColor[r]=t[n].color[r]||t[n].color),t[n].option&&(this._featureOption[r]=t[n].option[r]||t[n].option);this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.addShape(this.shapeList[a]);this._iconShapeMap.mark&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear)),this._iconShapeMap.dataZoomReset&&0===this._zoomQueue.length&&this._iconDisable(this._iconShapeMap.dataZoomReset)}},_buildItem:function(){var t,i,n,o,s=this.option.toolbox,l=this._iconList.length,h=this._itemGroupLocation.x,m=this._itemGroupLocation.y,V=s.itemSize,U=s.itemGap,d=s.color instanceof Array?s.color:[s.color],p=this.getFont(s.textStyle);"horizontal"===s.orient?(i=this._itemGroupLocation.y/this.zr.getHeight()<.5?"bottom":"top",n=this._itemGroupLocation.x/this.zr.getWidth()<.5?"left":"right",o=this._itemGroupLocation.y/this.zr.getHeight()<.5?"top":"bottom"):i=this._itemGroupLocation.x/this.zr.getWidth()<.5?"right":"left",this._iconShapeMap={};for(var c=this,u=0;l>u;u++){switch(t={type:"icon",zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:h,y:m,width:V,height:V,iconType:this._iconList[u],lineWidth:1,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length],brushType:"stroke"},highlightStyle:{lineWidth:1,text:s.showTitle?this._featureTitle[this._iconList[u]]:void 0,textFont:p,textPosition:i,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length]},hoverable:!0,clickable:!0},this._featureIcon[this._iconList[u]]&&(t.style.image=this._featureIcon[this._iconList[u]].replace(new RegExp("^image:\\/\\/"),""),t.style.opacity=.8,t.highlightStyle.opacity=1,t.type="image"),"horizontal"===s.orient&&(0===u&&"left"===n&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=n,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h,t.highlightStyle.textY="top"===o?m+V+10:m-10),u===l-1&&"right"===n&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=n,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h+V,t.highlightStyle.textY="top"===o?m+V+10:m-10)),this._iconList[u]){case"mark":t.onclick=c._onMark;break;case"markUndo":t.onclick=c._onMarkUndo;break;case"markClear":t.onclick=c._onMarkClear;break;case"dataZoom":t.onclick=c._onDataZoom;break;case"dataZoomReset":t.onclick=c._onDataZoomReset;break;case"dataView":if(!this._dataView){var y=e("./dataView");this._dataView=new y(this.ecTheme,this.messageCenter,this.zr,this.option,this.myChart)}t.onclick=c._onDataView;break;case"restore":t.onclick=c._onRestore;break;case"saveAsImage":t.onclick=c._onSaveAsImage;break;default:this._iconList[u].match("Chart")?(t._name=this._iconList[u].replace("Chart",""),t.onclick=c._onMagicType):t.onclick=c._onCustomHandler}"icon"===t.type?t=new r(t):"image"===t.type&&(t=new a(t)),this.shapeList.push(t),this._iconShapeMap[this._iconList[u]]=t,"horizontal"===s.orient?h+=V+U:m+=V+U}},_buildBackground:function(){var e=this.option.toolbox,t=this.reformCssArray(this.option.toolbox.padding);this.shapeList.push(new o({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-t[3],y:this._itemGroupLocation.y-t[0],width:this._itemGroupLocation.width+t[3]+t[1],height:this._itemGroupLocation.height+t[0]+t[2],brushType:0===e.borderWidth?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}}))},_getItemGroupLocation:function(){var e=this.option.toolbox,t=this.reformCssArray(this.option.toolbox.padding),i=this._iconList.length,n=e.itemGap,a=e.itemSize,o=0,r=0;"horizontal"===e.orient?(o=(a+n)*i-n,r=a):(r=(a+n)*i-n,o=a);var s,l=this.zr.getWidth();switch(e.x){case"center":s=Math.floor((l-o)/2);break;case"left":s=t[3]+e.borderWidth;break;case"right":s=l-o-t[1]-e.borderWidth;break;default:s=e.x-0,s=isNaN(s)?0:s}var h,m=this.zr.getHeight();switch(e.y){case"top":h=t[0]+e.borderWidth;break;case"bottom":h=m-r-t[2]-e.borderWidth;break;case"center":h=Math.floor((m-r)/2);break;default:h=e.y-0,h=isNaN(h)?0:h}return{x:s,y:h,width:o,height:r}},__onmousemove:function(e){this._marking&&(this._markShape.style.xEnd=m.getX(e.event),this._markShape.style.yEnd=m.getY(e.event),this.zr.addHoverShape(this._markShape)),this._zooming&&(this._zoomShape.style.width=m.getX(e.event)-this._zoomShape.style.x,this._zoomShape.style.height=m.getY(e.event)-this._zoomShape.style.y,this.zr.addHoverShape(this._zoomShape),this.dom.style.cursor="crosshair",m.stop(e.event)),this._zoomStart&&"pointer"!=this.dom.style.cursor&&"move"!=this.dom.style.cursor&&(this.dom.style.cursor="crosshair")},__onmousedown:function(e){if(!e.target){this._zooming=!0;var t=m.getX(e.event),i=m.getY(e.event),n=this.option.dataZoom||{};return this._zoomShape=new o({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:t,y:i,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:n.fillerColor||s.dataZoom.fillerColor,strokeColor:n.handleColor||s.dataZoom.handleColor,brushType:"both"}}),this.zr.addHoverShape(this._zoomShape),!0}},__onmouseup:function(){if(!this._zoomShape||Math.abs(this._zoomShape.style.width)<10||Math.abs(this._zoomShape.style.height)<10)return this._zooming=!1,!0;if(this._zooming&&this.component.dataZoom){this._zooming=!1;var e=this.component.dataZoom.rectZoom(this._zoomShape.style);e&&(this._zoomQueue.push({start:e.start,end:e.end,start2:e.start2,end2:e.end2}),this._iconEnable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame())}return!0},__onclick:function(e){if(!e.target)if(this._marking)this._marking=!1,this._markShapeList.push(this._markShape),this._iconEnable(this._iconShapeMap.markUndo),this._iconEnable(this._iconShapeMap.markClear),this.zr.addShape(this._markShape),this.zr.refreshNextFrame();else if(this._markStart){this._marking=!0;var t=m.getX(e.event),i=m.getY(e.event);this._markShape=new n({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:t,yStart:i,xEnd:t,yEnd:i,lineWidth:this.query(this.option,"toolbox.feature.mark.lineStyle.width"),strokeColor:this.query(this.option,"toolbox.feature.mark.lineStyle.color"),lineType:this.query(this.option,"toolbox.feature.mark.lineStyle.type")}}),this.zr.addHoverShape(this._markShape)}},__onMark:function(e){var t=e.target;if(this._marking||this._markStart)this._resetMark(),this.zr.refreshNextFrame();else{this._resetZoom(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._markStart=!0;var i=this;setTimeout(function(){i.zr&&i.zr.on(h.EVENT.CLICK,i._onclick)&&i.zr.on(h.EVENT.MOUSEMOVE,i._onmousemove)},10)}return!0},__onMarkUndo:function(){if(this._marking)this._marking=!1;else{var e=this._markShapeList.length;if(e>=1){var t=this._markShapeList[e-1];this.zr.delShape(t.id),this.zr.refreshNextFrame(),this._markShapeList.pop(),1===e&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear))}}return!0},__onMarkClear:function(){this._marking&&(this._marking=!1);var e=this._markShapeList.length;if(e>0){for(;e--;)this.zr.delShape(this._markShapeList.pop().id);this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear),this.zr.refreshNextFrame()}return!0},__onDataZoom:function(e){var t=e.target;if(this._zooming||this._zoomStart)this._resetZoom(),this.zr.refreshNextFrame(),this.dom.style.cursor="default";else{this._resetMark(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._zoomStart=!0;var i=this;setTimeout(function(){i.zr&&i.zr.on(h.EVENT.MOUSEDOWN,i._onmousedown)&&i.zr.on(h.EVENT.MOUSEUP,i._onmouseup)&&i.zr.on(h.EVENT.MOUSEMOVE,i._onmousemove)},10),this.dom.style.cursor="crosshair"}return!0},__onDataZoomReset:function(){return this._zooming&&(this._zooming=!1),this._zoomQueue.pop(),this._zoomQueue.length>0?this.component.dataZoom.absoluteZoom(this._zoomQueue[this._zoomQueue.length-1]):(this.component.dataZoom.rectZoom(),this._iconDisable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame()),!0},_resetMark:function(){this._marking=!1,this._markStart&&(this._markStart=!1,this._iconShapeMap.mark&&this.zr.modShape(this._iconShapeMap.mark.id,{style:{strokeColor:this._iconShapeMap.mark.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.CLICK,this._onclick),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_resetZoom:function(){this._zooming=!1,this._zoomStart&&(this._zoomStart=!1,this._iconShapeMap.dataZoom&&this.zr.modShape(this._iconShapeMap.dataZoom.id,{style:{strokeColor:this._iconShapeMap.dataZoom.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.MOUSEDOWN,this._onmousedown),this.zr.un(h.EVENT.MOUSEUP,this._onmouseup),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_iconDisable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:this._disableColor}}):this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{opacity:.3}})},_iconEnable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}}):this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{opacity:.8}})},__onDataView:function(){return this._dataView.show(this.option),!0},__onRestore:function(){return this._resetMark(),this._resetZoom(),this.messageCenter.dispatch(s.EVENT.RESTORE,null,null,this.myChart),!0},__onSaveAsImage:function(){var e=this.option.toolbox.feature.saveAsImage,t=e.type||"png";"png"!=t&&"jpeg"!=t&&(t="png");var i;i=this.myChart.isConnected()?this.myChart.getConnectedDataURL(t):this.zr.toDataURL("image/"+t,this.option.backgroundColor&&"rgba(0,0,0,0)"===this.option.backgroundColor.replace(" ","")?"#fff":this.option.backgroundColor);var n=document.createElement("div");n.id="__echarts_download_wrap__",n.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var a=document.createElement("a");a.href=i,a.setAttribute("download",(e.name?e.name:this.option.title&&(this.option.title.text||this.option.title.subtext)?this.option.title.text||this.option.title.subtext:"ECharts")+"."+t),a.innerHTML='<img style="vertical-align:middle" src="'+i+'" title="'+(window.ActiveXObject||"ActiveXObject"in window?"右键->图片另存为":e.lang?e.lang[0]:"点击保存")+'"/>',n.appendChild(a),document.body.appendChild(n),a=null,n=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500)},__onMagicType:function(e){this._resetMark();var t=e.target._name;return this._magicType[t]||(this._magicType[t]=!0,t===s.CHART_TYPE_LINE?this._magicType[s.CHART_TYPE_BAR]=!1:t===s.CHART_TYPE_BAR&&(this._magicType[s.CHART_TYPE_LINE]=!1),t===s.CHART_TYPE_PIE?this._magicType[s.CHART_TYPE_FUNNEL]=!1:t===s.CHART_TYPE_FUNNEL&&(this._magicType[s.CHART_TYPE_PIE]=!1),t===s.CHART_TYPE_FORCE?this._magicType[s.CHART_TYPE_CHORD]=!1:t===s.CHART_TYPE_CHORD&&(this._magicType[s.CHART_TYPE_FORCE]=!1),t===V?this._magicType[U]=!1:t===U&&(this._magicType[V]=!1),this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:this._magicType},this.myChart)),!0},setMagicType:function(e){this._resetMark(),this._magicType=e,!this._isSilence&&this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,null,{magicType:this._magicType},this.myChart)},__onCustomHandler:function(e){var t=e.target.style.iconType,i=this.option.toolbox.feature[t].onclick;"function"==typeof i&&i.call(this,this.option)},reset:function(e,t){if(t&&this.clear(),this.query(e,"toolbox.show")&&this.query(e,"toolbox.feature.magicType.show")){var i=e.toolbox.feature.magicType.type,n=i.length;for(this._magicMap={};n--;)this._magicMap[i[n]]=!0;n=e.series.length;for(var a,o;n--;)a=e.series[n].type,this._magicMap[a]&&(o=e.xAxis instanceof Array?e.xAxis[e.series[n].xAxisIndex||0]:e.xAxis,o&&"category"===(o.type||"category")&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),o=e.yAxis instanceof Array?e.yAxis[e.series[n].yAxisIndex||0]:e.yAxis,o&&"category"===o.type&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),e.series[n].__type=a,e.series[n].__itemStyle=l.clone(e.series[n].itemStyle||{})),(this._magicMap[V]||this._magicMap[U])&&(e.series[n].__stack=e.series[n].stack)}this._magicType=t?{}:this._magicType||{};for(var r in this._magicType)if(this._magicType[r]){this.option=e,this.getMagicOption();break}var s=e.dataZoom;if(s&&s.show){var h=null!=s.start&&s.start>=0&&s.start<=100?s.start:0,m=null!=s.end&&s.end>=0&&s.end<=100?s.end:100;h>m&&(h+=m,m=h-m,h-=m),this._zoomQueue=[{start:h,end:m,start2:0,end2:100}]}else this._zoomQueue=[]},getMagicOption:function(){var e,t;if(this._magicType[s.CHART_TYPE_LINE]||this._magicType[s.CHART_TYPE_BAR]){for(var i=this._magicType[s.CHART_TYPE_LINE]?!1:!0,n=0,a=this.option.series.length;a>n;n++)t=this.option.series[n].type,(t==s.CHART_TYPE_LINE||t==s.CHART_TYPE_BAR)&&(e=this.option.xAxis instanceof Array?this.option.xAxis[this.option.series[n].xAxisIndex||0]:this.option.xAxis,e&&"category"===(e.type||"category")&&(e.boundaryGap=i?!0:e.__boundaryGap),e=this.option.yAxis instanceof Array?this.option.yAxis[this.option.series[n].yAxisIndex||0]:this.option.yAxis,e&&"category"===e.type&&(e.boundaryGap=i?!0:e.__boundaryGap));this._defaultMagic(s.CHART_TYPE_LINE,s.CHART_TYPE_BAR)}if(this._defaultMagic(s.CHART_TYPE_CHORD,s.CHART_TYPE_FORCE),this._defaultMagic(s.CHART_TYPE_PIE,s.CHART_TYPE_FUNNEL),this._magicType[V]||this._magicType[U])for(var n=0,a=this.option.series.length;a>n;n++)this._magicType[V]?(this.option.series[n].stack="_ECHARTS_STACK_KENER_2014_",t=V):this._magicType[U]&&(this.option.series[n].stack=null,t=U),this._featureOption[t+"Chart"]&&l.merge(this.option.series[n],this._featureOption[t+"Chart"]||{},!0);return this.option},_defaultMagic:function(e,t){if(this._magicType[e]||this._magicType[t])for(var i=0,n=this.option.series.length;n>i;i++){var a=this.option.series[i].type;(a==e||a==t)&&(this.option.series[i].type=this._magicType[e]?e:t,this.option.series[i].itemStyle=l.clone(this.option.series[i].__itemStyle),a=this.option.series[i].type,this._featureOption[a+"Chart"]&&l.merge(this.option.series[i],this._featureOption[a+"Chart"]||{},!0))}},silence:function(e){this._isSilence=e},resize:function(){this._resetMark(),this.clear(),this.option&&this.option.toolbox&&this.option.toolbox.show&&this._buildShape(),this._dataView&&this._dataView.resize()},hideDataView:function(){this._dataView&&this._dataView.hide()},clear:function(e){this.zr&&(this.zr.delShape(this.shapeList),this.shapeList=[],e||(this.zr.delShape(this._markShapeList),this._markShapeList=[]))},onbeforDispose:function(){this._dataView&&(this._dataView.dispose(),this._dataView=null),this._markShapeList=null},refresh:function(e){e&&(this._resetMark(),this._resetZoom(),e.toolbox=this.reformOption(e.toolbox),this.option=e,this.clear(!0),e.toolbox.show&&this._buildShape(),this.hideDataView())}},l.inherits(t,i),e("../component").define("toolbox",t),t}),i("echarts/component",[],function(){var e={},t={};return e.define=function(i,n){return t[i]=n,e},e.get=function(e){return t[e]},e}),i("echarts/component/title",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","zrender/tool/color","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("../config");o.title={zlevel:0,z:6,show:!0,text:"",subtext:"",x:"left",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:5,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}};var r=e("zrender/tool/util"),s=e("zrender/tool/area"),l=e("zrender/tool/color");return t.prototype={type:o.COMPONENT_TYPE_TITLE,_buildShape:function(){if(this.titleOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){var e=this.titleOption.text,t=this.titleOption.link,i=this.titleOption.target,a=this.titleOption.subtext,o=this.titleOption.sublink,r=this.titleOption.subtarget,s=this.getFont(this.titleOption.textStyle),h=this.getFont(this.titleOption.subtextStyle),m=this._itemGroupLocation.x,V=this._itemGroupLocation.y,U=this._itemGroupLocation.width,d=this._itemGroupLocation.height,p={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:V,color:this.titleOption.textStyle.color,text:e,textFont:s,textBaseline:"top"},highlightStyle:{color:l.lift(this.titleOption.textStyle.color,1),brushType:"fill"},hoverable:!1};t&&(p.hoverable=!0,p.clickable=!0,p.onclick=function(){i&&"self"==i?window.location=t:window.open(t)});var c={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:V+d,color:this.titleOption.subtextStyle.color,text:a,textFont:h,textBaseline:"bottom"},highlightStyle:{color:l.lift(this.titleOption.subtextStyle.color,1),brushType:"fill"},hoverable:!1};switch(o&&(c.hoverable=!0,c.clickable=!0,c.onclick=function(){r&&"self"==r?window.location=o:window.open(o)}),this.titleOption.x){case"center":p.style.x=c.style.x=m+U/2,p.style.textAlign=c.style.textAlign="center";break;case"left":p.style.x=c.style.x=m,p.style.textAlign=c.style.textAlign="left";break;case"right":p.style.x=c.style.x=m+U,p.style.textAlign=c.style.textAlign="right";break;default:m=this.titleOption.x-0,m=isNaN(m)?0:m,p.style.x=c.style.x=m}this.titleOption.textAlign&&(p.style.textAlign=c.style.textAlign=this.titleOption.textAlign),this.shapeList.push(new n(p)),""!==a&&this.shapeList.push(new n(c))},_buildBackground:function(){var e=this.reformCssArray(this.titleOption.padding);this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.titleOption.borderWidth?"fill":"both",color:this.titleOption.backgroundColor,strokeColor:this.titleOption.borderColor,lineWidth:this.titleOption.borderWidth}}))},_getItemGroupLocation:function(){var e,t=this.reformCssArray(this.titleOption.padding),i=this.titleOption.text,n=this.titleOption.subtext,a=this.getFont(this.titleOption.textStyle),o=this.getFont(this.titleOption.subtextStyle),r=Math.max(s.getTextWidth(i,a),s.getTextWidth(n,o)),l=s.getTextHeight(i,a)+(""===n?0:this.titleOption.itemGap+s.getTextHeight(n,o)),h=this.zr.getWidth();switch(this.titleOption.x){case"center":e=Math.floor((h-r)/2);break;case"left":e=t[3]+this.titleOption.borderWidth;break;case"right":e=h-r-t[1]-this.titleOption.borderWidth;break;default:e=this.titleOption.x-0,e=isNaN(e)?0:e}var m,V=this.zr.getHeight();switch(this.titleOption.y){case"top":m=t[0]+this.titleOption.borderWidth;break;case"bottom":m=V-l-t[2]-this.titleOption.borderWidth;break;case"center":m=Math.floor((V-l)/2);break;default:m=this.titleOption.y-0,m=isNaN(m)?0:m}return{x:e,y:m,width:r,height:l}},refresh:function(e){e&&(this.option=e,this.option.title=this.reformOption(this.option.title),this.titleOption=this.option.title,this.titleOption.textStyle=this.getTextStyle(this.titleOption.textStyle),this.titleOption.subtextStyle=this.getTextStyle(this.titleOption.subtextStyle)),this.clear(),this._buildShape()}},r.inherits(t,i),e("../component").define("title",t),t}),i("echarts/component/tooltip",["require","./base","../util/shape/Cross","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/area","zrender/tool/color","zrender/tool/util","zrender/shape/Base","../component"],function(e){function t(e,t,o,r,s){i.call(this,e,t,o,r,s),this.dom=s.dom;var l=this;l._onmousemove=function(e){return l.__onmousemove(e)},l._onglobalout=function(e){return l.__onglobalout(e)},this.zr.on(h.EVENT.MOUSEMOVE,l._onmousemove),this.zr.on(h.EVENT.GLOBALOUT,l._onglobalout),l._hide=function(e){return l.__hide(e)},l._tryShow=function(e){return l.__tryShow(e)},l._refixed=function(e){return l.__refixed(e)},l._setContent=function(e,t){return l.__setContent(e,t)},this._tDom=this._tDom||document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.onmouseover=function(){l._mousein=!0},this._tDom.onmouseout=function(){l._mousein=!1},this._tDom.className="echarts-tooltip",this._tDom.style.position="absolute",this.hasAppend=!1,this._axisLineShape&&this.zr.delShape(this._axisLineShape.id),this._axisLineShape=new a({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisLineShape),this.zr.addShape(this._axisLineShape),this._axisShadowShape&&this.zr.delShape(this._axisShadowShape.id),this._axisShadowShape=new a({zlevel:this.getZlevelBase(),z:1,invisible:!0,hoverable:!1}),this.shapeList.push(this._axisShadowShape),this.zr.addShape(this._axisShadowShape),this._axisCrossShape&&this.zr.delShape(this._axisCrossShape.id),this._axisCrossShape=new n({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisCrossShape),this.zr.addShape(this._axisCrossShape),this.showing=!1,this.refresh(r)}var i=e("./base"),n=e("../util/shape/Cross"),a=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),r=new o({}),s=e("../config");s.tooltip={zlevel:1,z:8,show:!0,showContent:!0,trigger:"item",islandFormatter:"{a} <br/>{b} : {c}",showDelay:20,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(0,0,0,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,axisPointer:{type:"line",lineStyle:{color:"#48b",width:2,type:"solid"},crossStyle:{color:"#1e90ff",width:1,type:"dashed"},shadowStyle:{color:"rgba(150,150,150,0.3)",width:"auto",type:"default"}},textStyle:{color:"#fff"}};var l=e("../util/ecData"),h=e("zrender/config"),m=e("zrender/tool/event"),V=e("zrender/tool/area"),U=e("zrender/tool/color"),d=e("zrender/tool/util"),p=e("zrender/shape/Base");return t.prototype={type:s.COMPONENT_TYPE_TOOLTIP,_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;",_style:function(e){if(!e)return"";var t=[];if(e.transitionDuration){var i="left "+e.transitionDuration+"s,top "+e.transitionDuration+"s";t.push("transition:"+i),t.push("-moz-transition:"+i),t.push("-webkit-transition:"+i),t.push("-o-transition:"+i)}e.backgroundColor&&(t.push("background-Color:"+U.toHex(e.backgroundColor)),t.push("filter:alpha(opacity=70)"),t.push("background-Color:"+e.backgroundColor)),null!=e.borderWidth&&t.push("border-width:"+e.borderWidth+"px"),null!=e.borderColor&&t.push("border-color:"+e.borderColor),null!=e.borderRadius&&(t.push("border-radius:"+e.borderRadius+"px"),t.push("-moz-border-radius:"+e.borderRadius+"px"),t.push("-webkit-border-radius:"+e.borderRadius+"px"),t.push("-o-border-radius:"+e.borderRadius+"px"));var n=e.textStyle;n&&(n.color&&t.push("color:"+n.color),n.decoration&&t.push("text-decoration:"+n.decoration),n.align&&t.push("text-align:"+n.align),n.fontFamily&&t.push("font-family:"+n.fontFamily),n.fontSize&&t.push("font-size:"+n.fontSize+"px"),n.fontSize&&t.push("line-height:"+Math.round(3*n.fontSize/2)+"px"),n.fontStyle&&t.push("font-style:"+n.fontStyle),n.fontWeight&&t.push("font-weight:"+n.fontWeight));var a=e.padding;return null!=a&&(a=this.reformCssArray(a),t.push("padding:"+a[0]+"px "+a[1]+"px "+a[2]+"px "+a[3]+"px")),t=t.join(";")+";"},__hide:function(){this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId=-1,this._tDom&&(this._tDom.style.display="none");var e=!1;this._axisLineShape.invisible||(this._axisLineShape.invisible=!0,
 !function(e){var t,i;!function(){function e(e,t){if(!t)return e;if(0===e.indexOf(".")){var i=t.split("/"),n=e.split("/"),a=i.length-1,o=n.length,r=0,s=0;e:for(var l=0;o>l;l++)switch(n[l]){case"..":if(!(a>r))break e;r++,s++;break;case".":s++;break;default:break e}return i.length=a-r,n=n.slice(s),i.concat(n).join("/")}return e}function n(t){function i(i,r){if("string"==typeof i){var s=n[i];return s||(s=o(e(i,t)),n[i]=s),s}i instanceof Array&&(r=r||function(){},r.apply(this,a(i,r,t)))}var n={};return i}function a(i,n,a){for(var s=[],l=r[a],h=0,m=Math.min(i.length,n.length);m>h;h++){var V,U=e(i[h],a);switch(U){case"require":V=l&&l.require||t;break;case"exports":V=l.exports;break;case"module":V=l;break;default:V=o(U)}s.push(V)}return s}function o(e){var t=r[e];if(!t)throw new Error("No "+e);if(!t.defined){var i=t.factory,n=i.apply(this,a(t.deps||[],i,e));"undefined"!=typeof n&&(t.exports=n),t.defined=1}return t.exports}var r={};i=function(e,t,i){r[e]={id:e,deps:t,factory:i,defined:0,exports:{},require:n(e)}},t=n("")}(),i("echarts",["echarts/echarts"],function(e){return e}),i("echarts/echarts",["require","./config","zrender/tool/util","zrender/tool/event","zrender/tool/env","zrender","zrender/config","./chart/island","./component/toolbox","./component","./component/title","./component/tooltip","./component/legend","./util/ecData","./chart","zrender/tool/color","./component/timeline","zrender/shape/Image","zrender/loadingEffect/Bar","zrender/loadingEffect/Bubble","zrender/loadingEffect/DynamicLine","zrender/loadingEffect/Ring","zrender/loadingEffect/Spin","zrender/loadingEffect/Whirling","./theme/macarons","./theme/infographic"],function(e){function t(){r.Dispatcher.call(this)}function i(e){e.innerHTML="",this._themeConfig={},this.dom=e,this._connected=!1,this._status={dragIn:!1,dragOut:!1,needRefresh:!1},this._curEventType=!1,this._chartList=[],this._messageCenter=new t,this._messageCenterOutSide=new t,this.resize=this.resize(),this._init()}function n(e,t,i,n,a){for(var o=e._chartList,r=o.length;r--;){var s=o[r];"function"==typeof s[t]&&s[t](i,n,a)}}var a=e("./config"),o=e("zrender/tool/util"),r=e("zrender/tool/event"),s={},l=e("zrender/tool/env").canvasSupported,h=new Date-0,m={},V="_echarts_instance_";s.version="2.2.7",s.dependencies={zrender:"2.1.1"},s.init=function(t,n){var a=e("zrender");a.version.replace(".","")-0<s.dependencies.zrender.replace(".","")-0&&console.error("ZRender "+a.version+" is too old for ECharts "+s.version+". Current version need ZRender "+s.dependencies.zrender+"+"),t=t instanceof Array?t[0]:t;var o=t.getAttribute(V);return o||(o=h++,t.setAttribute(V,o)),m[o]&&m[o].dispose(),m[o]=new i(t),m[o].id=o,m[o].canvasSupported=l,m[o].setTheme(n),m[o]},s.getInstanceById=function(e){return m[e]},o.merge(t.prototype,r.Dispatcher.prototype,!0);var U=e("zrender/config").EVENT,d=["CLICK","DBLCLICK","MOUSEOVER","MOUSEOUT","DRAGSTART","DRAGEND","DRAGENTER","DRAGOVER","DRAGLEAVE","DROP"];return i.prototype={_init:function(){var t=this,i=e("zrender").init(this.dom);this._zr=i,this._messageCenter.dispatch=function(e,i,n,a){n=n||{},n.type=e,n.event=i,t._messageCenter.dispatchWithContext(e,n,a),t._messageCenterOutSide.dispatchWithContext(e,n,a)},this._onevent=function(e){return t.__onevent(e)};for(var n in a.EVENT)"CLICK"!=n&&"DBLCLICK"!=n&&"HOVER"!=n&&"MOUSEOUT"!=n&&"MAP_ROAM"!=n&&this._messageCenter.bind(a.EVENT[n],this._onevent,this);var o={};this._onzrevent=function(e){return t[o[e.type]](e)};for(var r=0,s=d.length;s>r;r++){var l=d[r],h=U[l];o[h]="_on"+l.toLowerCase(),i.on(h,this._onzrevent)}this.chart={},this.component={};var m=e("./chart/island");this._island=new m(this._themeConfig,this._messageCenter,i,{},this),this.chart.island=this._island;var V=e("./component/toolbox");this._toolbox=new V(this._themeConfig,this._messageCenter,i,{},this),this.component.toolbox=this._toolbox;var p=e("./component");p.define("title",e("./component/title")),p.define("tooltip",e("./component/tooltip")),p.define("legend",e("./component/legend")),(0===i.getWidth()||0===i.getHeight())&&console.error("Dom’s width & height should be ready before init.")},__onevent:function(e){e.__echartsId=e.__echartsId||this.id;var t=e.__echartsId===this.id;switch(this._curEventType||(this._curEventType=e.type),e.type){case a.EVENT.LEGEND_SELECTED:this._onlegendSelected(e);break;case a.EVENT.DATA_ZOOM:if(!t){var i=this.component.dataZoom;i&&(i.silence(!0),i.absoluteZoom(e.zoom),i.silence(!1))}this._ondataZoom(e);break;case a.EVENT.DATA_RANGE:t&&this._ondataRange(e);break;case a.EVENT.MAGIC_TYPE_CHANGED:if(!t){var n=this.component.toolbox;n&&(n.silence(!0),n.setMagicType(e.magicType),n.silence(!1))}this._onmagicTypeChanged(e);break;case a.EVENT.DATA_VIEW_CHANGED:t&&this._ondataViewChanged(e);break;case a.EVENT.TOOLTIP_HOVER:t&&this._tooltipHover(e);break;case a.EVENT.RESTORE:this._onrestore();break;case a.EVENT.REFRESH:t&&this._onrefresh(e);break;case a.EVENT.TOOLTIP_IN_GRID:case a.EVENT.TOOLTIP_OUT_GRID:if(t){if(this._connected){var o=this.component.grid;o&&(e.x=(e.event.zrenderX-o.getX())/o.getWidth(),e.y=(e.event.zrenderY-o.getY())/o.getHeight())}}else{var o=this.component.grid;o&&this._zr.trigger("mousemove",{connectTrigger:!0,zrenderX:o.getX()+e.x*o.getWidth(),zrenderY:o.getY()+e.y*o.getHeight()})}}if(this._connected&&t&&this._curEventType===e.type){for(var r in this._connected)this._connected[r].connectedEventHandler(e);this._curEventType=null}(!t||!this._connected&&t)&&(this._curEventType=null)},_onclick:function(e){if(n(this,"onclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.CLICK,e.event,t,this)}},_ondblclick:function(e){if(n(this,"ondblclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.DBLCLICK,e.event,t,this)}},_onmouseover:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.HOVER,e.event,t,this)}},_onmouseout:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.MOUSEOUT,e.event,t,this)}},_ondragstart:function(e){this._status={dragIn:!1,dragOut:!1,needRefresh:!1},n(this,"ondragstart",e)},_ondragenter:function(e){n(this,"ondragenter",e)},_ondragover:function(e){n(this,"ondragover",e)},_ondragleave:function(e){n(this,"ondragleave",e)},_ondrop:function(e){n(this,"ondrop",e,this._status),this._island.ondrop(e,this._status)},_ondragend:function(e){if(n(this,"ondragend",e,this._status),this._timeline&&this._timeline.ondragend(e,this._status),this._island.ondragend(e,this._status),this._status.needRefresh){this._syncBackupData(this._option);var t=this._messageCenter;t.dispatch(a.EVENT.DATA_CHANGED,e.event,this._eventPackage(e.target),this),t.dispatch(a.EVENT.REFRESH,null,null,this)}},_onlegendSelected:function(e){this._status.needRefresh=!1,n(this,"onlegendSelected",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataZoom:function(e){this._status.needRefresh=!1,n(this,"ondataZoom",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataRange:function(e){this._clearEffect(),this._status.needRefresh=!1,n(this,"ondataRange",e,this._status),this._status.needRefresh&&this._zr.refreshNextFrame()},_onmagicTypeChanged:function(){this._clearEffect(),this._render(this._toolbox.getMagicOption())},_ondataViewChanged:function(e){this._syncBackupData(e.option),this._messageCenter.dispatch(a.EVENT.DATA_CHANGED,null,e,this),this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_tooltipHover:function(e){var t=[];n(this,"ontooltipHover",e,t)},_onrestore:function(){this.restore()},_onrefresh:function(e){this._refreshInside=!0,this.refresh(e),this._refreshInside=!1},_syncBackupData:function(e){this.component.dataZoom&&this.component.dataZoom.syncBackupData(e)},_eventPackage:function(t){if(t){var i=e("./util/ecData"),n=i.get(t,"seriesIndex"),a=i.get(t,"dataIndex");return a=-1!=n&&this.component.dataZoom?this.component.dataZoom.getRealDataIndex(n,a):a,{seriesIndex:n,seriesName:(i.get(t,"series")||{}).name,dataIndex:a,data:i.get(t,"data"),name:i.get(t,"name"),value:i.get(t,"value"),special:i.get(t,"special")}}},_noDataCheck:function(e){for(var t=e.series,i=0,n=t.length;n>i;i++)if(t[i].type==a.CHART_TYPE_MAP||t[i].data&&t[i].data.length>0||t[i].markPoint&&t[i].markPoint.data&&t[i].markPoint.data.length>0||t[i].markLine&&t[i].markLine.data&&t[i].markLine.data.length>0||t[i].nodes&&t[i].nodes.length>0||t[i].links&&t[i].links.length>0||t[i].matrix&&t[i].matrix.length>0||t[i].eventList&&t[i].eventList.length>0)return!1;var o=this._option&&this._option.noDataLoadingOption||this._themeConfig.noDataLoadingOption||a.noDataLoadingOption||{text:this._option&&this._option.noDataText||this._themeConfig.noDataText||a.noDataText,effect:this._option&&this._option.noDataEffect||this._themeConfig.noDataEffect||a.noDataEffect};return this.clear(),this.showLoading(o),!0},_render:function(t){if(this._mergeGlobalConifg(t),!this._noDataCheck(t)){var i=t.backgroundColor;if(i)if(l||-1==i.indexOf("rgba"))this.dom.style.backgroundColor=i;else{var n=i.split(",");this.dom.style.filter="alpha(opacity="+100*n[3].substring(0,n[3].lastIndexOf(")"))+")",n.length=3,n[0]=n[0].replace("a",""),this.dom.style.backgroundColor=n.join(",")+")"}this._zr.clearAnimation(),this._chartList=[];var o=e("./chart"),r=e("./component");(t.xAxis||t.yAxis)&&(t.grid=t.grid||{},t.dataZoom=t.dataZoom||{});for(var s,h,m,V=["title","legend","tooltip","dataRange","roamController","grid","dataZoom","xAxis","yAxis","polar"],U=0,d=V.length;d>U;U++)h=V[U],m=this.component[h],t[h]?(m?m.refresh&&m.refresh(t):(s=r.get(/^[xy]Axis$/.test(h)?"axis":h),m=new s(this._themeConfig,this._messageCenter,this._zr,t,this,h),this.component[h]=m),this._chartList.push(m)):m&&(m.dispose(),this.component[h]=null,delete this.component[h]);for(var p,c,u,y={},U=0,d=t.series.length;d>U;U++)c=t.series[U].type,c?y[c]||(y[c]=!0,p=o.get(c),p?(this.chart[c]?(u=this.chart[c],u.refresh(t)):u=new p(this._themeConfig,this._messageCenter,this._zr,t,this),this._chartList.push(u),this.chart[c]=u):console.error(c+" has not been required.")):console.error("series["+U+"] chart type has not been defined.");for(c in this.chart)c==a.CHART_TYPE_ISLAND||y[c]||(this.chart[c].dispose(),this.chart[c]=null,delete this.chart[c]);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._island.refresh(t),this._toolbox.refresh(t),t.animation&&!t.renderAsImage?this._zr.refresh():this._zr.render();var g="IMG"+this.id,b=document.getElementById(g);t.renderAsImage&&l?(b?b.src=this.getDataURL(t.renderAsImage):(b=this.getImage(t.renderAsImage),b.id=g,b.style.position="absolute",b.style.left=0,b.style.top=0,this.dom.firstChild.appendChild(b)),this.un(),this._zr.un(),this._disposeChartList(),this._zr.clear()):b&&b.parentNode.removeChild(b),b=null,this._option=t}},restore:function(){this._clearEffect(),this._option=o.clone(this._optionRestore),this._disposeChartList(),this._island.clear(),this._toolbox.reset(this._option,!0),this._render(this._option)},refresh:function(e){this._clearEffect(),e=e||{};var t=e.option;!this._refreshInside&&t&&(t=this.getOption(),o.merge(t,e.option,!0),o.merge(this._optionRestore,e.option,!0),this._toolbox.reset(t)),this._island.refresh(t),this._toolbox.refresh(t),this._zr.clearAnimation();for(var i=0,n=this._chartList.length;n>i;i++)this._chartList[i].refresh&&this._chartList[i].refresh(t);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._zr.refresh()},_disposeChartList:function(){this._clearEffect(),this._zr.clearAnimation();for(var e=this._chartList.length;e--;){var t=this._chartList[e];if(t){var i=t.type;this.chart[i]&&delete this.chart[i],this.component[i]&&delete this.component[i],t.dispose&&t.dispose()}}this._chartList=[]},_mergeGlobalConifg:function(t){for(var i=["backgroundColor","calculable","calculableColor","calculableHolderColor","nameConnector","valueConnector","animation","animationThreshold","animationDuration","animationDurationUpdate","animationEasing","addDataAnimation","symbolList","DRAG_ENABLE_TIME"],n=i.length;n--;){var o=i[n];null==t[o]&&(t[o]=null!=this._themeConfig[o]?this._themeConfig[o]:a[o])}var r=t.color;r&&r.length||(r=this._themeConfig.color||a.color),this._zr.getColor=function(t){var i=e("zrender/tool/color");return i.getColor(t,r)},l||(t.animation=!1,t.addDataAnimation=!1)},setOption:function(e,t){return e.timeline?this._setTimelineOption(e):this._setOption(e,t)},_setOption:function(e,t,i){return!t&&this._option?this._option=o.merge(this.getOption(),o.clone(e),!0):(this._option=o.clone(e),!i&&this._timeline&&this._timeline.dispose()),this._optionRestore=o.clone(this._option),this._option.series&&0!==this._option.series.length?(this.component.dataZoom&&(this._option.dataZoom||this._option.toolbox&&this._option.toolbox.feature&&this._option.toolbox.feature.dataZoom&&this._option.toolbox.feature.dataZoom.show)&&this.component.dataZoom.syncOption(this._option),this._toolbox.reset(this._option),this._render(this._option),this):void this._zr.clear()},getOption:function(){function e(e){var n=i._optionRestore[e];if(n)if(n instanceof Array)for(var a=n.length;a--;)t[e][a].data=o.clone(n[a].data);else t[e].data=o.clone(n.data)}var t=o.clone(this._option),i=this;return e("xAxis"),e("yAxis"),e("series"),t},setSeries:function(e,t){return t?(this._option.series=e,this.setOption(this._option,t)):this.setOption({series:e}),this},getSeries:function(){return this.getOption().series},_setTimelineOption:function(t){this._timeline&&this._timeline.dispose();var i=e("./component/timeline"),n=new i(this._themeConfig,this._messageCenter,this._zr,t,this);return this._timeline=n,this.component.timeline=this._timeline,this},addData:function(e,t,i,n,r){function s(){if(V._zr){V._zr.clearAnimation();for(var e=0,t=X.length;t>e;e++)X[e].motionlessOnce=h.addDataAnimation&&X[e].addDataAnimation;V._messageCenter.dispatch(a.EVENT.REFRESH,null,{option:h},V)}}for(var l=e instanceof Array?e:[[e,t,i,n,r]],h=this.getOption(),m=this._optionRestore,V=this,U=0,d=l.length;d>U;U++){e=l[U][0],t=l[U][1],i=l[U][2],n=l[U][3],r=l[U][4];var p=m.series[e],c=i?"unshift":"push",u=i?"pop":"shift";if(p){var y=p.data,g=h.series[e].data;if(y[c](t),g[c](t),n||(y[u](),t=g[u]()),null!=r){var b,f;if(p.type===a.CHART_TYPE_PIE&&(b=m.legend)&&(f=b.data)){var k=h.legend.data;if(f[c](r),k[c](r),!n){var x=o.indexOf(f,t.name);-1!=x&&f.splice(x,1),x=o.indexOf(k,t.name),-1!=x&&k.splice(x,1)}}else if(null!=m.xAxis&&null!=m.yAxis){var _,L,W=p.xAxisIndex||0;(null==m.xAxis[W].type||"category"===m.xAxis[W].type)&&(_=m.xAxis[W].data,L=h.xAxis[W].data,_[c](r),L[c](r),n||(_[u](),L[u]())),W=p.yAxisIndex||0,"category"===m.yAxis[W].type&&(_=m.yAxis[W].data,L=h.yAxis[W].data,_[c](r),L[c](r),n||(_[u](),L[u]()))}}this._option.series[e].data=h.series[e].data}}this._zr.clearAnimation();for(var X=this._chartList,v=0,w=function(){v--,0===v&&s()},U=0,d=X.length;d>U;U++)h.addDataAnimation&&X[U].addDataAnimation&&(v++,X[U].addDataAnimation(l,w));return this.component.dataZoom&&this.component.dataZoom.syncOption(h),this._option=h,h.addDataAnimation||setTimeout(s,0),this},addMarkPoint:function(e,t){return this._addMark(e,t,"markPoint")},addMarkLine:function(e,t){return this._addMark(e,t,"markLine")},_addMark:function(e,t,i){var n,a=this._option.series;if(a&&(n=a[e])){var r=this._optionRestore.series,s=r[e],l=n[i],h=s[i];l=n[i]=l||{data:[]},h=s[i]=h||{data:[]};for(var m in t)"data"===m?(l.data=l.data.concat(t.data),h.data=h.data.concat(t.data)):"object"!=typeof t[m]||null==l[m]?l[m]=h[m]=t[m]:(o.merge(l[m],t[m],!0),o.merge(h[m],t[m],!0));var V=this.chart[n.type];V&&V.addMark(e,t,i)}return this},delMarkPoint:function(e,t){return this._delMark(e,t,"markPoint")},delMarkLine:function(e,t){return this._delMark(e,t,"markLine")},_delMark:function(e,t,i){var n,a,o,r=this._option.series;if(!(r&&(n=r[e])&&(a=n[i])&&(o=a.data)))return this;t=t.split(" > ");for(var s=-1,l=0,h=o.length;h>l;l++){var m=o[l];if(m instanceof Array){if(m[0].name===t[0]&&m[1].name===t[1]){s=l;break}}else if(m.name===t[0]){s=l;break}}if(s>-1){o.splice(s,1),this._optionRestore.series[e][i].data.splice(s,1);var V=this.chart[n.type];V&&V.delMark(e,t.join(" > "),i)}return this},getDom:function(){return this.dom},getZrender:function(){return this._zr},getDataURL:function(e){if(!l)return"";if(0===this._chartList.length){var t="IMG"+this.id,i=document.getElementById(t);if(i)return i.src}var n=this.component.tooltip;switch(n&&n.hideTip(),e){case"jpeg":break;default:e="png"}var a=this._option.backgroundColor;return a&&"rgba(0,0,0,0)"===a.replace(" ","")&&(a="#fff"),this._zr.toDataURL("image/"+e,a)},getImage:function(e){var t=this._optionRestore.title,i=document.createElement("img");return i.src=this.getDataURL(e),i.title=t&&t.text||"ECharts",i},getConnectedDataURL:function(t){if(!this.isConnected())return this.getDataURL(t);var i=this.dom,n={self:{img:this.getDataURL(t),left:i.offsetLeft,top:i.offsetTop,right:i.offsetLeft+i.offsetWidth,bottom:i.offsetTop+i.offsetHeight}},a=n.self.left,o=n.self.top,r=n.self.right,s=n.self.bottom;for(var l in this._connected)i=this._connected[l].getDom(),n[l]={img:this._connected[l].getDataURL(t),left:i.offsetLeft,top:i.offsetTop,right:i.offsetLeft+i.offsetWidth,bottom:i.offsetTop+i.offsetHeight},a=Math.min(a,n[l].left),o=Math.min(o,n[l].top),r=Math.max(r,n[l].right),s=Math.max(s,n[l].bottom);var h=document.createElement("div");h.style.position="absolute",h.style.left="-4000px",h.style.width=r-a+"px",h.style.height=s-o+"px",document.body.appendChild(h);var m=e("zrender").init(h),V=e("zrender/shape/Image");for(var l in n)m.addShape(new V({style:{x:n[l].left-a,y:n[l].top-o,image:n[l].img}}));m.render();var U=this._option.backgroundColor;U&&"rgba(0,0,0,0)"===U.replace(/ /g,"")&&(U="#fff");var d=m.toDataURL("image/png",U);return setTimeout(function(){m.dispose(),h.parentNode.removeChild(h),h=null},100),d},getConnectedImage:function(e){var t=this._optionRestore.title,i=document.createElement("img");return i.src=this.getConnectedDataURL(e),i.title=t&&t.text||"ECharts",i},on:function(e,t){return this._messageCenterOutSide.bind(e,t,this),this},un:function(e,t){return this._messageCenterOutSide.unbind(e,t),this},connect:function(e){if(!e)return this;if(this._connected||(this._connected={}),e instanceof Array)for(var t=0,i=e.length;i>t;t++)this._connected[e[t].id]=e[t];else this._connected[e.id]=e;return this},disConnect:function(e){if(!e||!this._connected)return this;if(e instanceof Array)for(var t=0,i=e.length;i>t;t++)delete this._connected[e[t].id];else delete this._connected[e.id];for(var n in this._connected)return this;return this._connected=!1,this},connectedEventHandler:function(e){e.__echartsId!=this.id&&this._onevent(e)},isConnected:function(){return!!this._connected},showLoading:function(t){var i={bar:e("zrender/loadingEffect/Bar"),bubble:e("zrender/loadingEffect/Bubble"),dynamicLine:e("zrender/loadingEffect/DynamicLine"),ring:e("zrender/loadingEffect/Ring"),spin:e("zrender/loadingEffect/Spin"),whirling:e("zrender/loadingEffect/Whirling")};this._toolbox.hideDataView(),t=t||{};var n=t.textStyle||{};t.textStyle=n;var r=o.merge(o.merge(o.clone(n),this._themeConfig.textStyle),a.textStyle);n.textFont=r.fontStyle+" "+r.fontWeight+" "+r.fontSize+"px "+r.fontFamily,n.text=t.text||this._option&&this._option.loadingText||this._themeConfig.loadingText||a.loadingText,null!=t.x&&(n.x=t.x),null!=t.y&&(n.y=t.y),t.effectOption=t.effectOption||{},t.effectOption.textStyle=n;var s=t.effect;return("string"==typeof s||null==s)&&(s=i[t.effect||this._option&&this._option.loadingEffect||this._themeConfig.loadingEffect||a.loadingEffect]||i.spin),this._zr.showLoading(new s(t.effectOption)),this},hideLoading:function(){return this._zr.hideLoading(),this},setTheme:function(t){if(t){if("string"==typeof t)switch(t){case"macarons":t=e("./theme/macarons");break;case"infographic":t=e("./theme/infographic");break;default:t={}}else t=t||{};this._themeConfig=t}if(!l){var i=this._themeConfig.textStyle;i&&i.fontFamily&&i.fontFamily2&&(i.fontFamily=i.fontFamily2),i=a.textStyle,i.fontFamily=i.fontFamily2}this._timeline&&this._timeline.setTheme(!0),this._optionRestore&&this.restore()},resize:function(){var e=this;return function(){if(e._clearEffect(),e._zr.resize(),e._option&&e._option.renderAsImage&&l)return e._render(e._option),e;e._zr.clearAnimation(),e._island.resize(),e._toolbox.resize(),e._timeline&&e._timeline.resize();for(var t=0,i=e._chartList.length;i>t;t++)e._chartList[t].resize&&e._chartList[t].resize();return e.component.grid&&e.component.grid.refixAxisShape(e.component),e._zr.refresh(),e._messageCenter.dispatch(a.EVENT.RESIZE,null,null,e),e}},_clearEffect:function(){this._zr.modLayer(a.EFFECT_ZLEVEL,{motionBlur:!1}),this._zr.painter.clearLayer(a.EFFECT_ZLEVEL)},clear:function(){return this._disposeChartList(),this._zr.clear(),this._option={},this._optionRestore={},this.dom.style.backgroundColor=null,this},dispose:function(){var e=this.dom.getAttribute(V);e&&delete m[e],this._island.dispose(),this._toolbox.dispose(),this._timeline&&this._timeline.dispose(),this._messageCenter.unbind(),this.clear(),this._zr.dispose(),this._zr=null}},s}),i("echarts/config",[],function(){var e={CHART_TYPE_LINE:"line",CHART_TYPE_BAR:"bar",CHART_TYPE_SCATTER:"scatter",CHART_TYPE_PIE:"pie",CHART_TYPE_RADAR:"radar",CHART_TYPE_VENN:"venn",CHART_TYPE_TREEMAP:"treemap",CHART_TYPE_TREE:"tree",CHART_TYPE_MAP:"map",CHART_TYPE_K:"k",CHART_TYPE_ISLAND:"island",CHART_TYPE_FORCE:"force",CHART_TYPE_CHORD:"chord",CHART_TYPE_GAUGE:"gauge",CHART_TYPE_FUNNEL:"funnel",CHART_TYPE_EVENTRIVER:"eventRiver",CHART_TYPE_WORDCLOUD:"wordCloud",CHART_TYPE_HEATMAP:"heatmap",COMPONENT_TYPE_TITLE:"title",COMPONENT_TYPE_LEGEND:"legend",COMPONENT_TYPE_DATARANGE:"dataRange",COMPONENT_TYPE_DATAVIEW:"dataView",COMPONENT_TYPE_DATAZOOM:"dataZoom",COMPONENT_TYPE_TOOLBOX:"toolbox",COMPONENT_TYPE_TOOLTIP:"tooltip",COMPONENT_TYPE_GRID:"grid",COMPONENT_TYPE_AXIS:"axis",COMPONENT_TYPE_POLAR:"polar",COMPONENT_TYPE_X_AXIS:"xAxis",COMPONENT_TYPE_Y_AXIS:"yAxis",COMPONENT_TYPE_AXIS_CATEGORY:"categoryAxis",COMPONENT_TYPE_AXIS_VALUE:"valueAxis",COMPONENT_TYPE_TIMELINE:"timeline",COMPONENT_TYPE_ROAMCONTROLLER:"roamController",backgroundColor:"rgba(0,0,0,0)",color:["#ff7f50","#87cefa","#da70d6","#32cd32","#6495ed","#ff69b4","#ba55d3","#cd5c5c","#ffa500","#40e0d0","#1e90ff","#ff6347","#7b68ee","#00fa9a","#ffd700","#6699FF","#ff6666","#3cb371","#b8860b","#30e0e0"],markPoint:{clickable:!0,symbol:"pin",symbolSize:10,large:!1,effect:{show:!1,loop:!0,period:15,type:"scale",scaleSize:2,bounceDistance:10},itemStyle:{normal:{borderWidth:2,label:{show:!0,position:"inside"}},emphasis:{label:{show:!0}}}},markLine:{clickable:!0,symbol:["circle","arrow"],symbolSize:[2,4],smoothness:.2,precision:2,effect:{show:!1,loop:!0,period:15,scaleSize:2},bundling:{enable:!1,maxTurningAngle:45},itemStyle:{normal:{borderWidth:1.5,label:{show:!0,position:"end"},lineStyle:{type:"dashed"}},emphasis:{label:{show:!1},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontFamily2:"微软雅黑",fontSize:12,fontStyle:"normal",fontWeight:"normal"},EVENT:{REFRESH:"refresh",RESTORE:"restore",RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",HOVER:"hover",MOUSEOUT:"mouseout",DATA_CHANGED:"dataChanged",DATA_ZOOM:"dataZoom",DATA_RANGE:"dataRange",DATA_RANGE_SELECTED:"dataRangeSelected",DATA_RANGE_HOVERLINK:"dataRangeHoverLink",LEGEND_SELECTED:"legendSelected",LEGEND_HOVERLINK:"legendHoverLink",MAP_SELECTED:"mapSelected",PIE_SELECTED:"pieSelected",MAGIC_TYPE_CHANGED:"magicTypeChanged",DATA_VIEW_CHANGED:"dataViewChanged",TIMELINE_CHANGED:"timelineChanged",MAP_ROAM:"mapRoam",FORCE_LAYOUT_END:"forceLayoutEnd",TOOLTIP_HOVER:"tooltipHover",TOOLTIP_IN_GRID:"tooltipInGrid",TOOLTIP_OUT_GRID:"tooltipOutGrid",ROAMCONTROLLER:"roamController"},DRAG_ENABLE_TIME:120,EFFECT_ZLEVEL:10,effectBlendAlpha:.95,symbolList:["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],loadingEffect:"spin",loadingText:"数据读取中...",noDataEffect:"bubble",noDataText:"暂无数据",calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:": ",animation:!0,addDataAnimation:!0,animationThreshold:2e3,animationDuration:2e3,animationDurationUpdate:500,animationEasing:"ExponentialOut"};return e}),i("zrender/tool/util",["require","../dep/excanvas"],function(e){function t(e){return e&&1===e.nodeType&&"string"==typeof e.nodeName}function i(e){if("object"==typeof e&&null!==e){var n=e;if(e instanceof Array){n=[];for(var a=0,o=e.length;o>a;a++)n[a]=i(e[a])}else if(!y[g.call(e)]&&!t(e)){n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=i(e[r]))}return n}return e}function n(e,i,n,o){if(i.hasOwnProperty(n)){var r=e[n];"object"!=typeof r||y[g.call(r)]||t(r)?!o&&n in e||(e[n]=i[n]):a(e[n],i[n],o)}}function a(e,t,i){for(var a in t)n(e,t,a,i);return e}function o(){if(!U)if(e("../dep/excanvas"),window.G_vmlCanvasManager){var t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",document.body.appendChild(t),U=G_vmlCanvasManager.initElement(t).getContext("2d")}else U=document.createElement("canvas").getContext("2d");return U}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1}function s(e,t){function i(){}var n=e.prototype;i.prototype=t.prototype,e.prototype=new i;for(var a in n)e.prototype[a]=n[a];e.constructor=e}function l(e,t,i){if(e&&t)if(e.forEach&&e.forEach===p)e.forEach(t,i);else if(e.length===+e.length)for(var n=0,a=e.length;a>n;n++)t.call(i,e[n],n,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e)}function h(e,t,i){if(e&&t){if(e.map&&e.map===c)return e.map(t,i);for(var n=[],a=0,o=e.length;o>a;a++)n.push(t.call(i,e[a],a,e));return n}}function m(e,t,i){if(e&&t){if(e.filter&&e.filter===u)return e.filter(t,i);for(var n=[],a=0,o=e.length;o>a;a++)t.call(i,e[a],a,e)&&n.push(e[a]);return n}}function V(e,t){return function(){e.apply(t,arguments)}}var U,d=Array.prototype,p=d.forEach,c=d.map,u=d.filter,y={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},g=Object.prototype.toString;return{inherits:s,clone:i,merge:a,getContext:o,indexOf:r,each:l,map:h,filter:m,bind:V}}),i("zrender/tool/event",["require","../mixin/Eventful"],function(e){"use strict";function t(e){return"undefined"!=typeof e.zrenderX&&e.zrenderX||"undefined"!=typeof e.offsetX&&e.offsetX||"undefined"!=typeof e.layerX&&e.layerX||"undefined"!=typeof e.clientX&&e.clientX}function i(e){return"undefined"!=typeof e.zrenderY&&e.zrenderY||"undefined"!=typeof e.offsetY&&e.offsetY||"undefined"!=typeof e.layerY&&e.layerY||"undefined"!=typeof e.clientY&&e.clientY}function n(e){return"undefined"!=typeof e.zrenderDelta&&e.zrenderDelta||"undefined"!=typeof e.wheelDelta&&e.wheelDelta||"undefined"!=typeof e.detail&&-e.detail}var a=e("../mixin/Eventful"),o="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};return{getX:t,getY:i,getDelta:n,stop:o,Dispatcher:a}}),i("zrender/tool/env",[],function(){function e(e){var t=this.os={},i=this.browser={},n=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),a=e.match(/(Android);?[\s\/]+([\d.]+)?/),o=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),s=!o&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),m=e.match(/Kindle\/([\d.]+)/),V=e.match(/Silk\/([\d._]+)/),U=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),p=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),c=e.match(/PlayBook/),u=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),y=e.match(/Firefox\/([\d.]+)/),g=e.match(/MSIE ([\d.]+)/),b=n&&e.match(/Mobile\//)&&!u,f=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!u,g=e.match(/MSIE\s([\d.]+)/);return(i.webkit=!!n)&&(i.version=n[1]),a&&(t.android=!0,t.version=a[2]),s&&!r&&(t.ios=t.iphone=!0,t.version=s[2].replace(/_/g,".")),o&&(t.ios=t.ipad=!0,t.version=o[2].replace(/_/g,".")),r&&(t.ios=t.ipod=!0,t.version=r[3]?r[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),U&&(t.blackberry=!0,t.version=U[2]),d&&(t.bb10=!0,t.version=d[2]),p&&(t.rimtabletos=!0,t.version=p[2]),c&&(i.playbook=!0),m&&(t.kindle=!0,t.version=m[1]),V&&(i.silk=!0,i.version=V[1]),!V&&t.android&&e.match(/Kindle Fire/)&&(i.silk=!0),u&&(i.chrome=!0,i.version=u[1]),y&&(i.firefox=!0,i.version=y[1]),g&&(i.ie=!0,i.version=g[1]),b&&(e.match(/Safari/)||t.ios)&&(i.safari=!0),f&&(i.webview=!0),g&&(i.ie=!0,i.version=g[1]),t.tablet=!!(o||c||a&&!e.match(/Mobile/)||y&&e.match(/Tablet/)||g&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(a||s||l||U||d||u&&e.match(/Android/)||u&&e.match(/CriOS\/([\d.]+)/)||y&&e.match(/Mobile/)||g&&e.match(/Touch/))),{browser:i,os:t,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return e(navigator.userAgent)}),i("zrender",["zrender/zrender"],function(e){return e}),i("zrender/zrender",["require","./dep/excanvas","./tool/util","./tool/log","./tool/guid","./Handler","./Painter","./Storage","./animation/Animation","./tool/env"],function(e){function t(e){return function(){e._needsRefreshNextFrame&&e.refresh()}}e("./dep/excanvas");var i=e("./tool/util"),n=e("./tool/log"),a=e("./tool/guid"),o=e("./Handler"),r=e("./Painter"),s=e("./Storage"),l=e("./animation/Animation"),h={},m={};m.version="2.1.1",m.init=function(e){var t=new V(a(),e);return h[t.id]=t,t},m.dispose=function(e){if(e)e.dispose();else{for(var t in h)h[t].dispose();h={}}return m},m.getInstance=function(e){return h[e]},m.delInstance=function(e){return delete h[e],m};var V=function(i,n){this.id=i,this.env=e("./tool/env"),this.storage=new s,this.painter=new r(n,this.storage),this.handler=new o(n,this.storage,this.painter),this.animation=new l({stage:{update:t(this)}}),this.animation.start();var a=this;this.painter.refreshNextFrame=function(){a.refreshNextFrame()},this._needsRefreshNextFrame=!1;var a=this,h=this.storage,m=h.delFromMap;h.delFromMap=function(e){var t=h.get(e);a.stopAnimation(t),m.call(h,e)}};return V.prototype.getId=function(){return this.id},V.prototype.addShape=function(e){return this.addElement(e),this},V.prototype.addGroup=function(e){return this.addElement(e),this},V.prototype.delShape=function(e){return this.delElement(e),this},V.prototype.delGroup=function(e){return this.delElement(e),this},V.prototype.modShape=function(e,t){return this.modElement(e,t),this},V.prototype.modGroup=function(e,t){return this.modElement(e,t),this},V.prototype.addElement=function(e){return this.storage.addRoot(e),this._needsRefreshNextFrame=!0,this},V.prototype.delElement=function(e){return this.storage.delRoot(e),this._needsRefreshNextFrame=!0,this},V.prototype.modElement=function(e,t){return this.storage.mod(e,t),this._needsRefreshNextFrame=!0,this},V.prototype.modLayer=function(e,t){return this.painter.modLayer(e,t),this._needsRefreshNextFrame=!0,this},V.prototype.addHoverShape=function(e){return this.storage.addHover(e),this},V.prototype.render=function(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this},V.prototype.refresh=function(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this},V.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},V.prototype.refreshHover=function(e){return this.painter.refreshHover(e),this},V.prototype.refreshShapes=function(e,t){return this.painter.refreshShapes(e,t),this},V.prototype.resize=function(){return this.painter.resize(),this},V.prototype.animate=function(e,t,a){var o=this;if("string"==typeof e&&(e=this.storage.get(e)),e){var r;if(t){for(var s=t.split("."),l=e,h=0,m=s.length;m>h;h++)l&&(l=l[s[h]]);l&&(r=l)}else r=e;if(!r)return void n('Property "'+t+'" is not existed in element '+e.id);
 
 null==e.__animators&&(e.__animators=[]);var V=e.__animators,U=this.animation.animate(r,{loop:a}).during(function(){o.modShape(e)}).done(function(){var t=i.indexOf(e.__animators,U);t>=0&&V.splice(t,1)});return V.push(U),U}n("Element not existed")},V.prototype.stopAnimation=function(e){if(e.__animators){for(var t=e.__animators,i=t.length,n=0;i>n;n++)t[n].stop();t.length=0}return this},V.prototype.clearAnimation=function(){return this.animation.clear(),this},V.prototype.showLoading=function(e){return this.painter.showLoading(e),this},V.prototype.hideLoading=function(){return this.painter.hideLoading(),this},V.prototype.getWidth=function(){return this.painter.getWidth()},V.prototype.getHeight=function(){return this.painter.getHeight()},V.prototype.toDataURL=function(e,t,i){return this.painter.toDataURL(e,t,i)},V.prototype.shapeToImage=function(e,t,i){var n=a();return this.painter.shapeToImage(n,e,t,i)},V.prototype.on=function(e,t,i){return this.handler.on(e,t,i),this},V.prototype.un=function(e,t){return this.handler.un(e,t),this},V.prototype.trigger=function(e,t){return this.handler.trigger(e,t),this},V.prototype.clear=function(){return this.storage.delRoot(),this.painter.clear(),this},V.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,m.delInstance(this.id)},m}),i("zrender/config",[],function(){var e={EVENT:{RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},elementClassName:"zr-element",catchBrushException:!1,debugMode:0,devicePixelRatio:Math.max(window.devicePixelRatio||1,1)};return e}),i("echarts/chart/island",["require","./base","zrender/shape/Circle","../config","../util/ecData","zrender/tool/util","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(e){function t(e,t,n,a,r){i.call(this,e,t,n,a,r),this._nameConnector,this._valueConnector,this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth();var l=this;l.shapeHandler.onmousewheel=function(e){var t=e.target,i=e.event,n=s.getDelta(i);n=n>0?-1:1,t.style.r-=n,t.style.r=t.style.r<5?5:t.style.r;var a=o.get(t,"value"),r=a*l.option.island.calculateStep;a=r>1?Math.round(a-r*n):+(a-r*n).toFixed(2);var h=o.get(t,"name");t.style.text=h+":"+a,o.set(t,"value",a),o.set(t,"name",h),l.zr.modShape(t.id),l.zr.refreshNextFrame(),s.stop(i)}}var i=e("./base"),n=e("zrender/shape/Circle"),a=e("../config");a.island={zlevel:0,z:5,r:15,calculateStep:.1};var o=e("../util/ecData"),r=e("zrender/tool/util"),s=e("zrender/tool/event");return t.prototype={type:a.CHART_TYPE_ISLAND,_combine:function(t,i){var n=e("zrender/tool/color"),a=e("../util/accMath"),r=a.accAdd(o.get(t,"value"),o.get(i,"value")),s=o.get(t,"name")+this._nameConnector+o.get(i,"name");t.style.text=s+this._valueConnector+r,o.set(t,"value",r),o.set(t,"name",s),t.style.r=this.option.island.r,t.style.color=n.mix(t.style.color,i.style.color)},refresh:function(e){e&&(e.island=this.reformOption(e.island),this.option=e,this._nameConnector=this.option.nameConnector,this._valueConnector=this.option.valueConnector)},getOption:function(){return this.option},resize:function(){var e=this.zr.getWidth(),t=this.zr.getHeight(),i=e/(this._zrWidth||e),n=t/(this._zrHeight||t);if(1!==i||1!==n){this._zrWidth=e,this._zrHeight=t;for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.modShape(this.shapeList[a].id,{style:{x:Math.round(this.shapeList[a].style.x*i),y:Math.round(this.shapeList[a].style.y*n)}})}},add:function(e){var t=o.get(e,"name"),i=o.get(e,"value"),a=null!=o.get(e,"series")?o.get(e,"series").name:"",r=this.getFont(this.option.island.textStyle),s=this.option.island,l={zlevel:s.zlevel,z:s.z,style:{x:e.style.x,y:e.style.y,r:this.option.island.r,color:e.style.color||e.style.strokeColor,text:t+this._valueConnector+i,textFont:r},draggable:!0,hoverable:!0,onmousewheel:this.shapeHandler.onmousewheel,_type:"island"};"#fff"===l.style.color&&(l.style.color=e.style.strokeColor),this.setCalculable(l),l.dragEnableTime=0,o.pack(l,{name:a},-1,i,-1,t),l=new n(l),this.shapeList.push(l),this.zr.addShape(l)},del:function(e){this.zr.delShape(e.id);for(var t=[],i=0,n=this.shapeList.length;n>i;i++)this.shapeList[i].id!=e.id&&t.push(this.shapeList[i]);this.shapeList=t},ondrop:function(e,t){if(this.isDrop&&e.target){var i=e.target,n=e.dragged;this._combine(i,n),this.zr.modShape(i.id),t.dragIn=!0,this.isDrop=!1}},ondragend:function(e,t){var i=e.target;this.isDragend?t.dragIn&&(this.del(i),t.needRefresh=!0):t.dragIn||(i.style.x=s.getX(e.event),i.style.y=s.getY(e.event),this.add(i),t.needRefresh=!0),this.isDragend=!1}},r.inherits(t,i),e("../chart").define("island",t),t}),i("echarts/component/toolbox",["require","./base","zrender/shape/Line","zrender/shape/Image","zrender/shape/Rectangle","../util/shape/Icon","../config","zrender/tool/util","zrender/config","zrender/tool/event","./dataView","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.dom=o.dom,this._magicType={},this._magicMap={},this._isSilence=!1,this._iconList,this._iconShapeMap={},this._featureTitle={},this._featureIcon={},this._featureColor={},this._featureOption={},this._enableColor="red",this._disableColor="#ccc",this._markShapeList=[];var r=this;r._onMark=function(e){r.__onMark(e)},r._onMarkUndo=function(e){r.__onMarkUndo(e)},r._onMarkClear=function(e){r.__onMarkClear(e)},r._onDataZoom=function(e){r.__onDataZoom(e)},r._onDataZoomReset=function(e){r.__onDataZoomReset(e)},r._onDataView=function(e){r.__onDataView(e)},r._onRestore=function(e){r.__onRestore(e)},r._onSaveAsImage=function(e){r.__onSaveAsImage(e)},r._onMagicType=function(e){r.__onMagicType(e)},r._onCustomHandler=function(e){r.__onCustomHandler(e)},r._onmousemove=function(e){return r.__onmousemove(e)},r._onmousedown=function(e){return r.__onmousedown(e)},r._onmouseup=function(e){return r.__onmouseup(e)},r._onclick=function(e){return r.__onclick(e)}}var i=e("./base"),n=e("zrender/shape/Line"),a=e("zrender/shape/Image"),o=e("zrender/shape/Rectangle"),r=e("../util/shape/Icon"),s=e("../config");s.toolbox={zlevel:0,z:6,show:!1,orient:"horizontal",x:"right",y:"top",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],disableColor:"#ddd",effectiveColor:"red",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemSize:16,showTitle:!0,feature:{mark:{show:!1,title:{mark:"辅助线开关",markUndo:"删除辅助线",markClear:"清空辅助线"},lineStyle:{width:1,color:"#1e90ff",type:"dashed"}},dataZoom:{show:!1,title:{dataZoom:"区域缩放",dataZoomReset:"区域缩放后退"}},dataView:{show:!1,title:"数据视图",readOnly:!1,lang:["数据视图","关闭","刷新"]},magicType:{show:!1,title:{line:"折线图切换",bar:"柱形图切换",stack:"堆积",tiled:"平铺",force:"力导向布局图切换",chord:"和弦图切换",pie:"饼图切换",funnel:"漏斗图切换"},type:[]},restore:{show:!1,title:"还原"},saveAsImage:{show:!1,title:"保存为图片",type:"png",lang:["点击保存"]}}};var l=e("zrender/tool/util"),h=e("zrender/config"),m=e("zrender/tool/event"),V="stack",U="tiled";return t.prototype={type:s.COMPONENT_TYPE_TOOLBOX,_buildShape:function(){this._iconList=[];var e=this.option.toolbox;this._enableColor=e.effectiveColor,this._disableColor=e.disableColor;var t=e.feature,i=[];for(var n in t)if(t[n].show)switch(n){case"mark":i.push({key:n,name:"mark"}),i.push({key:n,name:"markUndo"}),i.push({key:n,name:"markClear"});break;case"magicType":for(var a=0,o=t[n].type.length;o>a;a++)t[n].title[t[n].type[a]+"Chart"]=t[n].title[t[n].type[a]],t[n].option&&(t[n].option[t[n].type[a]+"Chart"]=t[n].option[t[n].type[a]]),i.push({key:n,name:t[n].type[a]+"Chart"});break;case"dataZoom":i.push({key:n,name:"dataZoom"}),i.push({key:n,name:"dataZoomReset"});break;case"saveAsImage":this.canvasSupported&&i.push({key:n,name:"saveAsImage"});break;default:i.push({key:n,name:n})}if(i.length>0){for(var r,n,a=0,o=i.length;o>a;a++)r=i[a].name,n=i[a].key,this._iconList.push(r),this._featureTitle[r]=t[n].title[r]||t[n].title,t[n].icon&&(this._featureIcon[r]=t[n].icon[r]||t[n].icon),t[n].color&&(this._featureColor[r]=t[n].color[r]||t[n].color),t[n].option&&(this._featureOption[r]=t[n].option[r]||t[n].option);this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.addShape(this.shapeList[a]);this._iconShapeMap.mark&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear)),this._iconShapeMap.dataZoomReset&&0===this._zoomQueue.length&&this._iconDisable(this._iconShapeMap.dataZoomReset)}},_buildItem:function(){var t,i,n,o,s=this.option.toolbox,l=this._iconList.length,h=this._itemGroupLocation.x,m=this._itemGroupLocation.y,V=s.itemSize,U=s.itemGap,d=s.color instanceof Array?s.color:[s.color],p=this.getFont(s.textStyle);"horizontal"===s.orient?(i=this._itemGroupLocation.y/this.zr.getHeight()<.5?"bottom":"top",n=this._itemGroupLocation.x/this.zr.getWidth()<.5?"left":"right",o=this._itemGroupLocation.y/this.zr.getHeight()<.5?"top":"bottom"):i=this._itemGroupLocation.x/this.zr.getWidth()<.5?"right":"left",this._iconShapeMap={};for(var c=this,u=0;l>u;u++){switch(t={type:"icon",zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:h,y:m,width:V,height:V,iconType:this._iconList[u],lineWidth:1,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length],brushType:"stroke"},highlightStyle:{lineWidth:1,text:s.showTitle?this._featureTitle[this._iconList[u]]:void 0,textFont:p,textPosition:i,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length]},hoverable:!0,clickable:!0},this._featureIcon[this._iconList[u]]&&(t.style.image=this._featureIcon[this._iconList[u]].replace(new RegExp("^image:\\/\\/"),""),t.style.opacity=.8,t.highlightStyle.opacity=1,t.type="image"),"horizontal"===s.orient&&(0===u&&"left"===n&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=n,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h,t.highlightStyle.textY="top"===o?m+V+10:m-10),u===l-1&&"right"===n&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=n,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h+V,t.highlightStyle.textY="top"===o?m+V+10:m-10)),this._iconList[u]){case"mark":t.onclick=c._onMark;break;case"markUndo":t.onclick=c._onMarkUndo;break;case"markClear":t.onclick=c._onMarkClear;break;case"dataZoom":t.onclick=c._onDataZoom;break;case"dataZoomReset":t.onclick=c._onDataZoomReset;break;case"dataView":if(!this._dataView){var y=e("./dataView");this._dataView=new y(this.ecTheme,this.messageCenter,this.zr,this.option,this.myChart)}t.onclick=c._onDataView;break;case"restore":t.onclick=c._onRestore;break;case"saveAsImage":t.onclick=c._onSaveAsImage;break;default:this._iconList[u].match("Chart")?(t._name=this._iconList[u].replace("Chart",""),t.onclick=c._onMagicType):t.onclick=c._onCustomHandler}"icon"===t.type?t=new r(t):"image"===t.type&&(t=new a(t)),this.shapeList.push(t),this._iconShapeMap[this._iconList[u]]=t,"horizontal"===s.orient?h+=V+U:m+=V+U}},_buildBackground:function(){var e=this.option.toolbox,t=this.reformCssArray(this.option.toolbox.padding);this.shapeList.push(new o({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-t[3],y:this._itemGroupLocation.y-t[0],width:this._itemGroupLocation.width+t[3]+t[1],height:this._itemGroupLocation.height+t[0]+t[2],brushType:0===e.borderWidth?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}}))},_getItemGroupLocation:function(){var e=this.option.toolbox,t=this.reformCssArray(this.option.toolbox.padding),i=this._iconList.length,n=e.itemGap,a=e.itemSize,o=0,r=0;"horizontal"===e.orient?(o=(a+n)*i-n,r=a):(r=(a+n)*i-n,o=a);var s,l=this.zr.getWidth();switch(e.x){case"center":s=Math.floor((l-o)/2);break;case"left":s=t[3]+e.borderWidth;break;case"right":s=l-o-t[1]-e.borderWidth;break;default:s=e.x-0,s=isNaN(s)?0:s}var h,m=this.zr.getHeight();switch(e.y){case"top":h=t[0]+e.borderWidth;break;case"bottom":h=m-r-t[2]-e.borderWidth;break;case"center":h=Math.floor((m-r)/2);break;default:h=e.y-0,h=isNaN(h)?0:h}return{x:s,y:h,width:o,height:r}},__onmousemove:function(e){this._marking&&(this._markShape.style.xEnd=m.getX(e.event),this._markShape.style.yEnd=m.getY(e.event),this.zr.addHoverShape(this._markShape)),this._zooming&&(this._zoomShape.style.width=m.getX(e.event)-this._zoomShape.style.x,this._zoomShape.style.height=m.getY(e.event)-this._zoomShape.style.y,this.zr.addHoverShape(this._zoomShape),this.dom.style.cursor="crosshair",m.stop(e.event)),this._zoomStart&&"pointer"!=this.dom.style.cursor&&"move"!=this.dom.style.cursor&&(this.dom.style.cursor="crosshair")},__onmousedown:function(e){if(!e.target){this._zooming=!0;var t=m.getX(e.event),i=m.getY(e.event),n=this.option.dataZoom||{};return this._zoomShape=new o({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:t,y:i,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:n.fillerColor||s.dataZoom.fillerColor,strokeColor:n.handleColor||s.dataZoom.handleColor,brushType:"both"}}),this.zr.addHoverShape(this._zoomShape),!0}},__onmouseup:function(){if(!this._zoomShape||Math.abs(this._zoomShape.style.width)<10||Math.abs(this._zoomShape.style.height)<10)return this._zooming=!1,!0;if(this._zooming&&this.component.dataZoom){this._zooming=!1;var e=this.component.dataZoom.rectZoom(this._zoomShape.style);e&&(this._zoomQueue.push({start:e.start,end:e.end,start2:e.start2,end2:e.end2}),this._iconEnable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame())}return!0},__onclick:function(e){if(!e.target)if(this._marking)this._marking=!1,this._markShapeList.push(this._markShape),this._iconEnable(this._iconShapeMap.markUndo),this._iconEnable(this._iconShapeMap.markClear),this.zr.addShape(this._markShape),this.zr.refreshNextFrame();else if(this._markStart){this._marking=!0;var t=m.getX(e.event),i=m.getY(e.event);this._markShape=new n({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:t,yStart:i,xEnd:t,yEnd:i,lineWidth:this.query(this.option,"toolbox.feature.mark.lineStyle.width"),strokeColor:this.query(this.option,"toolbox.feature.mark.lineStyle.color"),lineType:this.query(this.option,"toolbox.feature.mark.lineStyle.type")}}),this.zr.addHoverShape(this._markShape)}},__onMark:function(e){var t=e.target;if(this._marking||this._markStart)this._resetMark(),this.zr.refreshNextFrame();else{this._resetZoom(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._markStart=!0;var i=this;setTimeout(function(){i.zr&&i.zr.on(h.EVENT.CLICK,i._onclick)&&i.zr.on(h.EVENT.MOUSEMOVE,i._onmousemove)},10)}return!0},__onMarkUndo:function(){if(this._marking)this._marking=!1;else{var e=this._markShapeList.length;if(e>=1){var t=this._markShapeList[e-1];this.zr.delShape(t.id),this.zr.refreshNextFrame(),this._markShapeList.pop(),1===e&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear))}}return!0},__onMarkClear:function(){this._marking&&(this._marking=!1);var e=this._markShapeList.length;if(e>0){for(;e--;)this.zr.delShape(this._markShapeList.pop().id);this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear),this.zr.refreshNextFrame()}return!0},__onDataZoom:function(e){var t=e.target;if(this._zooming||this._zoomStart)this._resetZoom(),this.zr.refreshNextFrame(),this.dom.style.cursor="default";else{this._resetMark(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._zoomStart=!0;var i=this;setTimeout(function(){i.zr&&i.zr.on(h.EVENT.MOUSEDOWN,i._onmousedown)&&i.zr.on(h.EVENT.MOUSEUP,i._onmouseup)&&i.zr.on(h.EVENT.MOUSEMOVE,i._onmousemove)},10),this.dom.style.cursor="crosshair"}return!0},__onDataZoomReset:function(){return this._zooming&&(this._zooming=!1),this._zoomQueue.pop(),this._zoomQueue.length>0?this.component.dataZoom.absoluteZoom(this._zoomQueue[this._zoomQueue.length-1]):(this.component.dataZoom.rectZoom(),this._iconDisable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame()),!0},_resetMark:function(){this._marking=!1,this._markStart&&(this._markStart=!1,this._iconShapeMap.mark&&this.zr.modShape(this._iconShapeMap.mark.id,{style:{strokeColor:this._iconShapeMap.mark.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.CLICK,this._onclick),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_resetZoom:function(){this._zooming=!1,this._zoomStart&&(this._zoomStart=!1,this._iconShapeMap.dataZoom&&this.zr.modShape(this._iconShapeMap.dataZoom.id,{style:{strokeColor:this._iconShapeMap.dataZoom.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.MOUSEDOWN,this._onmousedown),this.zr.un(h.EVENT.MOUSEUP,this._onmouseup),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_iconDisable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:this._disableColor}}):this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{opacity:.3}})},_iconEnable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}}):this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{opacity:.8}})},__onDataView:function(){return this._dataView.show(this.option),!0},__onRestore:function(){return this._resetMark(),this._resetZoom(),this.messageCenter.dispatch(s.EVENT.RESTORE,null,null,this.myChart),!0},__onSaveAsImage:function(){var e=this.option.toolbox.feature.saveAsImage,t=e.type||"png";"png"!=t&&"jpeg"!=t&&(t="png");var i;i=this.myChart.isConnected()?this.myChart.getConnectedDataURL(t):this.zr.toDataURL("image/"+t,this.option.backgroundColor&&"rgba(0,0,0,0)"===this.option.backgroundColor.replace(" ","")?"#fff":this.option.backgroundColor);var n=document.createElement("div");n.id="__echarts_download_wrap__",n.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var a=document.createElement("a");a.href=i,a.setAttribute("download",(e.name?e.name:this.option.title&&(this.option.title.text||this.option.title.subtext)?this.option.title.text||this.option.title.subtext:"ECharts")+"."+t),a.innerHTML='<img style="vertical-align:middle" src="'+i+'" title="'+(window.ActiveXObject||"ActiveXObject"in window?"右键->图片另存为":e.lang?e.lang[0]:"点击保存")+'"/>',n.appendChild(a),document.body.appendChild(n),a=null,n=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500)},__onMagicType:function(e){this._resetMark();var t=e.target._name;return this._magicType[t]||(this._magicType[t]=!0,t===s.CHART_TYPE_LINE?this._magicType[s.CHART_TYPE_BAR]=!1:t===s.CHART_TYPE_BAR&&(this._magicType[s.CHART_TYPE_LINE]=!1),t===s.CHART_TYPE_PIE?this._magicType[s.CHART_TYPE_FUNNEL]=!1:t===s.CHART_TYPE_FUNNEL&&(this._magicType[s.CHART_TYPE_PIE]=!1),t===s.CHART_TYPE_FORCE?this._magicType[s.CHART_TYPE_CHORD]=!1:t===s.CHART_TYPE_CHORD&&(this._magicType[s.CHART_TYPE_FORCE]=!1),t===V?this._magicType[U]=!1:t===U&&(this._magicType[V]=!1),this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:this._magicType},this.myChart)),!0},setMagicType:function(e){this._resetMark(),this._magicType=e,!this._isSilence&&this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,null,{magicType:this._magicType},this.myChart)},__onCustomHandler:function(e){var t=e.target.style.iconType,i=this.option.toolbox.feature[t].onclick;"function"==typeof i&&i.call(this,this.option)},reset:function(e,t){if(t&&this.clear(),this.query(e,"toolbox.show")&&this.query(e,"toolbox.feature.magicType.show")){var i=e.toolbox.feature.magicType.type,n=i.length;for(this._magicMap={};n--;)this._magicMap[i[n]]=!0;n=e.series.length;for(var a,o;n--;)a=e.series[n].type,this._magicMap[a]&&(o=e.xAxis instanceof Array?e.xAxis[e.series[n].xAxisIndex||0]:e.xAxis,o&&"category"===(o.type||"category")&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),o=e.yAxis instanceof Array?e.yAxis[e.series[n].yAxisIndex||0]:e.yAxis,o&&"category"===o.type&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),e.series[n].__type=a,e.series[n].__itemStyle=l.clone(e.series[n].itemStyle||{})),(this._magicMap[V]||this._magicMap[U])&&(e.series[n].__stack=e.series[n].stack)}this._magicType=t?{}:this._magicType||{};for(var r in this._magicType)if(this._magicType[r]){this.option=e,this.getMagicOption();break}var s=e.dataZoom;if(s&&s.show){var h=null!=s.start&&s.start>=0&&s.start<=100?s.start:0,m=null!=s.end&&s.end>=0&&s.end<=100?s.end:100;h>m&&(h+=m,m=h-m,h-=m),this._zoomQueue=[{start:h,end:m,start2:0,end2:100}]}else this._zoomQueue=[]},getMagicOption:function(){var e,t;if(this._magicType[s.CHART_TYPE_LINE]||this._magicType[s.CHART_TYPE_BAR]){for(var i=this._magicType[s.CHART_TYPE_LINE]?!1:!0,n=0,a=this.option.series.length;a>n;n++)t=this.option.series[n].type,(t==s.CHART_TYPE_LINE||t==s.CHART_TYPE_BAR)&&(e=this.option.xAxis instanceof Array?this.option.xAxis[this.option.series[n].xAxisIndex||0]:this.option.xAxis,e&&"category"===(e.type||"category")&&(e.boundaryGap=i?!0:e.__boundaryGap),e=this.option.yAxis instanceof Array?this.option.yAxis[this.option.series[n].yAxisIndex||0]:this.option.yAxis,e&&"category"===e.type&&(e.boundaryGap=i?!0:e.__boundaryGap));this._defaultMagic(s.CHART_TYPE_LINE,s.CHART_TYPE_BAR)}if(this._defaultMagic(s.CHART_TYPE_CHORD,s.CHART_TYPE_FORCE),this._defaultMagic(s.CHART_TYPE_PIE,s.CHART_TYPE_FUNNEL),this._magicType[V]||this._magicType[U])for(var n=0,a=this.option.series.length;a>n;n++)this._magicType[V]?(this.option.series[n].stack="_ECHARTS_STACK_KENER_2014_",t=V):this._magicType[U]&&(this.option.series[n].stack=null,t=U),this._featureOption[t+"Chart"]&&l.merge(this.option.series[n],this._featureOption[t+"Chart"]||{},!0);return this.option},_defaultMagic:function(e,t){if(this._magicType[e]||this._magicType[t])for(var i=0,n=this.option.series.length;n>i;i++){var a=this.option.series[i].type;(a==e||a==t)&&(this.option.series[i].type=this._magicType[e]?e:t,this.option.series[i].itemStyle=l.clone(this.option.series[i].__itemStyle),a=this.option.series[i].type,this._featureOption[a+"Chart"]&&l.merge(this.option.series[i],this._featureOption[a+"Chart"]||{},!0))}},silence:function(e){this._isSilence=e},resize:function(){this._resetMark(),this.clear(),this.option&&this.option.toolbox&&this.option.toolbox.show&&this._buildShape(),this._dataView&&this._dataView.resize()},hideDataView:function(){this._dataView&&this._dataView.hide()},clear:function(e){this.zr&&(this.zr.delShape(this.shapeList),this.shapeList=[],e||(this.zr.delShape(this._markShapeList),this._markShapeList=[]))},onbeforDispose:function(){this._dataView&&(this._dataView.dispose(),this._dataView=null),this._markShapeList=null},refresh:function(e){e&&(this._resetMark(),this._resetZoom(),e.toolbox=this.reformOption(e.toolbox),this.option=e,this.clear(!0),e.toolbox.show&&this._buildShape(),this.hideDataView())}},l.inherits(t,i),e("../component").define("toolbox",t),t}),i("echarts/component",[],function(){var e={},t={};return e.define=function(i,n){return t[i]=n,e},e.get=function(e){return t[e]},e}),i("echarts/component/title",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","zrender/tool/color","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("../config");o.title={zlevel:0,z:6,show:!0,text:"",subtext:"",x:"left",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:5,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}};var r=e("zrender/tool/util"),s=e("zrender/tool/area"),l=e("zrender/tool/color");return t.prototype={type:o.COMPONENT_TYPE_TITLE,_buildShape:function(){if(this.titleOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){var e=this.titleOption.text,t=this.titleOption.link,i=this.titleOption.target,a=this.titleOption.subtext,o=this.titleOption.sublink,r=this.titleOption.subtarget,s=this.getFont(this.titleOption.textStyle),h=this.getFont(this.titleOption.subtextStyle),m=this._itemGroupLocation.x,V=this._itemGroupLocation.y,U=this._itemGroupLocation.width,d=this._itemGroupLocation.height,p={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:V,color:this.titleOption.textStyle.color,text:e,textFont:s,textBaseline:"top"},highlightStyle:{color:l.lift(this.titleOption.textStyle.color,1),brushType:"fill"},hoverable:!1};t&&(p.hoverable=!0,p.clickable=!0,p.onclick=function(){i&&"self"==i?window.location=t:window.open(t)});var c={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:V+d,color:this.titleOption.subtextStyle.color,text:a,textFont:h,textBaseline:"bottom"},highlightStyle:{color:l.lift(this.titleOption.subtextStyle.color,1),brushType:"fill"},hoverable:!1};switch(o&&(c.hoverable=!0,c.clickable=!0,c.onclick=function(){r&&"self"==r?window.location=o:window.open(o)}),this.titleOption.x){case"center":p.style.x=c.style.x=m+U/2,p.style.textAlign=c.style.textAlign="center";break;case"left":p.style.x=c.style.x=m,p.style.textAlign=c.style.textAlign="left";break;case"right":p.style.x=c.style.x=m+U,p.style.textAlign=c.style.textAlign="right";break;default:m=this.titleOption.x-0,m=isNaN(m)?0:m,p.style.x=c.style.x=m}this.titleOption.textAlign&&(p.style.textAlign=c.style.textAlign=this.titleOption.textAlign),this.shapeList.push(new n(p)),""!==a&&this.shapeList.push(new n(c))},_buildBackground:function(){var e=this.reformCssArray(this.titleOption.padding);this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.titleOption.borderWidth?"fill":"both",color:this.titleOption.backgroundColor,strokeColor:this.titleOption.borderColor,lineWidth:this.titleOption.borderWidth}}))},_getItemGroupLocation:function(){var e,t=this.reformCssArray(this.titleOption.padding),i=this.titleOption.text,n=this.titleOption.subtext,a=this.getFont(this.titleOption.textStyle),o=this.getFont(this.titleOption.subtextStyle),r=Math.max(s.getTextWidth(i,a),s.getTextWidth(n,o)),l=s.getTextHeight(i,a)+(""===n?0:this.titleOption.itemGap+s.getTextHeight(n,o)),h=this.zr.getWidth();switch(this.titleOption.x){case"center":e=Math.floor((h-r)/2);break;case"left":e=t[3]+this.titleOption.borderWidth;break;case"right":e=h-r-t[1]-this.titleOption.borderWidth;break;default:e=this.titleOption.x-0,e=isNaN(e)?0:e}var m,V=this.zr.getHeight();switch(this.titleOption.y){case"top":m=t[0]+this.titleOption.borderWidth;break;case"bottom":m=V-l-t[2]-this.titleOption.borderWidth;break;case"center":m=Math.floor((V-l)/2);break;default:m=this.titleOption.y-0,m=isNaN(m)?0:m}return{x:e,y:m,width:r,height:l}},refresh:function(e){e&&(this.option=e,this.option.title=this.reformOption(this.option.title),this.titleOption=this.option.title,this.titleOption.textStyle=this.getTextStyle(this.titleOption.textStyle),this.titleOption.subtextStyle=this.getTextStyle(this.titleOption.subtextStyle)),this.clear(),this._buildShape()}},r.inherits(t,i),e("../component").define("title",t),t}),i("echarts/component/tooltip",["require","./base","../util/shape/Cross","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/area","zrender/tool/color","zrender/tool/util","zrender/shape/Base","../component"],function(e){function t(e,t,o,r,s){i.call(this,e,t,o,r,s),this.dom=s.dom;var l=this;l._onmousemove=function(e){return l.__onmousemove(e)},l._onglobalout=function(e){return l.__onglobalout(e)},this.zr.on(h.EVENT.MOUSEMOVE,l._onmousemove),this.zr.on(h.EVENT.GLOBALOUT,l._onglobalout),l._hide=function(e){return l.__hide(e)},l._tryShow=function(e){return l.__tryShow(e)},l._refixed=function(e){return l.__refixed(e)},l._setContent=function(e,t){return l.__setContent(e,t)},this._tDom=this._tDom||document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.onmouseover=function(){l._mousein=!0},this._tDom.onmouseout=function(){l._mousein=!1},this._tDom.className="echarts-tooltip",this._tDom.style.position="absolute",this.hasAppend=!1,this._axisLineShape&&this.zr.delShape(this._axisLineShape.id),this._axisLineShape=new a({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisLineShape),this.zr.addShape(this._axisLineShape),this._axisShadowShape&&this.zr.delShape(this._axisShadowShape.id),this._axisShadowShape=new a({zlevel:this.getZlevelBase(),z:1,invisible:!0,hoverable:!1}),this.shapeList.push(this._axisShadowShape),this.zr.addShape(this._axisShadowShape),this._axisCrossShape&&this.zr.delShape(this._axisCrossShape.id),this._axisCrossShape=new n({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisCrossShape),this.zr.addShape(this._axisCrossShape),this.showing=!1,this.refresh(r)}var i=e("./base"),n=e("../util/shape/Cross"),a=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),r=new o({}),s=e("../config");s.tooltip={zlevel:1,z:8,show:!0,showContent:!0,trigger:"item",islandFormatter:"{a} <br/>{b} : {c}",showDelay:20,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(0,0,0,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,axisPointer:{type:"line",lineStyle:{color:"#48b",width:2,type:"solid"},crossStyle:{color:"#1e90ff",width:1,type:"dashed"},shadowStyle:{color:"rgba(150,150,150,0.3)",width:"auto",type:"default"}},textStyle:{color:"#fff"}};var l=e("../util/ecData"),h=e("zrender/config"),m=e("zrender/tool/event"),V=e("zrender/tool/area"),U=e("zrender/tool/color"),d=e("zrender/tool/util"),p=e("zrender/shape/Base");return t.prototype={type:s.COMPONENT_TYPE_TOOLTIP,_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;",_style:function(e){if(!e)return"";var t=[];if(e.transitionDuration){var i="left "+e.transitionDuration+"s,top "+e.transitionDuration+"s";t.push("transition:"+i),t.push("-moz-transition:"+i),t.push("-webkit-transition:"+i),t.push("-o-transition:"+i)}e.backgroundColor&&(t.push("background-Color:"+U.toHex(e.backgroundColor)),t.push("filter:alpha(opacity=70)"),t.push("background-Color:"+e.backgroundColor)),null!=e.borderWidth&&t.push("border-width:"+e.borderWidth+"px"),null!=e.borderColor&&t.push("border-color:"+e.borderColor),null!=e.borderRadius&&(t.push("border-radius:"+e.borderRadius+"px"),t.push("-moz-border-radius:"+e.borderRadius+"px"),t.push("-webkit-border-radius:"+e.borderRadius+"px"),t.push("-o-border-radius:"+e.borderRadius+"px"));var n=e.textStyle;n&&(n.color&&t.push("color:"+n.color),n.decoration&&t.push("text-decoration:"+n.decoration),n.align&&t.push("text-align:"+n.align),n.fontFamily&&t.push("font-family:"+n.fontFamily),n.fontSize&&t.push("font-size:"+n.fontSize+"px"),n.fontSize&&t.push("line-height:"+Math.round(3*n.fontSize/2)+"px"),n.fontStyle&&t.push("font-style:"+n.fontStyle),n.fontWeight&&t.push("font-weight:"+n.fontWeight));var a=e.padding;return null!=a&&(a=this.reformCssArray(a),t.push("padding:"+a[0]+"px "+a[1]+"px "+a[2]+"px "+a[3]+"px")),t=t.join(";")+";"},__hide:function(){this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId=-1,this._tDom&&(this._tDom.style.display="none");var e=!1;this._axisLineShape.invisible||(this._axisLineShape.invisible=!0,
index ee4e978..28431ad 100644 (file)
@@ -1,4 +1 @@
-/*!
- *  Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome
- *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
  */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}
  */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}
index 9330e0f..5b66af2 100644 (file)
@@ -1,10 +1,2 @@
-/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v3.5.3 - 2016-02-23
- *  Desc: Include this file in any page being loaded into an iframe
- *        to force the iframe to resize to the content size.
- *  Requires: iframeResizer.min.js on host page.
- *  Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
- *  License: MIT
- */
-
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Fa(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Fa();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(b){la&&"object"==typeof a.console&&console.log(f(b))}function h(b){"object"==typeof a.console&&console.warn(f(b))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function a(a){return"true"===a?!0:!1}var b=ha.substr(na).split(":");oa=b[0],X=void 0!==b[1]?Number(b[1]):X,_=void 0!==b[2]?a(b[2]):_,la=void 0!==b[3]?a(b[3]):la,ja=void 0!==b[4]?Number(b[4]):ja,U=void 0!==b[6]?a(b[6]):U,Y=b[7],fa=void 0!==b[8]?b[8]:fa,W=b[9],$=b[10],ua=void 0!==b[11]?Number(b[11]):ua,ia.enable=void 0!==b[12]?a(b[12]):!1,qa=void 0!==b[13]?b[13]:qa,Aa=void 0!==b[14]?b[14]:Aa}function k(){function b(){var b=a.iFrameResizer;g("Reading data from page: "+JSON.stringify(b)),Ca="messageCallback"in b?b.messageCallback:Ca,Da="readyCallback"in b?b.readyCallback:Da,ta="targetOrigin"in b?b.targetOrigin:ta,fa="heightCalculationMethod"in b?b.heightCalculationMethod:fa,Aa="widthCalculationMethod"in b?b.widthCalculationMethod:Aa}"iFrameResizer"in a&&Object===a.iFrameResizer.constructor&&b(),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,g("Body "+a+' set to "'+b+'"'))}function n(){void 0===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g('HTML & body height set to "auto"')}function p(e){function f(){N(e.eventName,e.eventType)}var h={add:function(c){b(a,c,f)},remove:function(b){c(a,b,f)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(h[e.method])):h[e.method](e.eventName),g(d(e.method)+" event listener: "+e.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+' calculation method set to "'+a+'"')),a}function s(){fa=r(fa,ea,Ga,"height")}function t(){Aa=r(Aa,za,Ha,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(a,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(a){function b(a){var b=d(a);g("Moving to in page link (#"+c+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var c=a.split("#")[1]||a,e=decodeURIComponent(c),f=document.getElementById(e)||document.getElementsByName(e)[0];void 0!==f?b(f):(g("In page link (#"+c+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+c))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),a)}function j(){b(a,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(a,b,c){d(a.target),N(b,c+": "+a.target.src,void 0,void 0)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=a.MutationObserver||a.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var b=0>ja;a.MutationObserver||a.WebKitMutationObserver?b?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Fa(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Fa()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),da}var d=document.querySelectorAll("["+b+"]");return 0===d.length?c():I(a,d)}function L(){return document.querySelectorAll("body *")}function M(a,b,c,d){function e(){da=l,ya=m,R(da,ya,a)}function f(){function a(a,b){var c=Math.abs(a-b)<=ua;return!c}return l=void 0!==c?c:Ga[fa](),m=void 0!==d?d:Ha[Aa](),a(da,l)||_&&a(ya,m)}function h(){return!(a in{init:1,interval:1,size:1})}function i(){return fa in pa||_&&Aa in pa}function j(){g("No change in size detected")}function k(){h()&&i()?Q(b):a in{interval:1}||j()}var l,m;f()||"init"===a?(O(),e()):k()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ia(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ga[fa](),ya=Ha[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(a,b,c,d,e){function f(){void 0===e?e=ta:g("Message targetOrigin: "+e)}function h(){var f=a+":"+b,h=oa+":"+f+":"+c+(void 0!==d?":"+d:"");g("Sending message to host page ("+h+")"),sa.postMessage(ma+h,e)}!0===ra&&(f(),h())}function S(b){function c(){return ma===(""+b.data).substr(0,na)}function d(){ha=b.data,sa=b.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}function e(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))}function f(){N("resizeParent","Parent window requested size check")}function j(){var a=l();ia.findTarget(a)}function k(){return b.data.split("]")[1].split(":")[0]}function l(){return b.data.substr(b.data.indexOf(":")+1)}function m(){return"iFrameResize"in a}function n(){var a=l();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}function o(){var a=l();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")}function p(){return b.data.split(":")[2]in{"true":1,"false":1}}function q(){switch(k()){case"reset":e();break;case"resize":f();break;case"moveToAnchor":j();break;case"message":n();break;case"pageInfo":o();break;default:m()||p()||h("Unexpected message ("+b.data+")")}}function r(){!1===ca?q():p()?d():g('Ignored message of type "'+k()+'". Received before initialization.')}c()&&r()}function T(){"loading"!==document.readyState&&a.parent.postMessage("[iFrameResizerChild]Ready","*")}var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=a.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=a,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa=Date.now||function(){return(new Date).getTime()},Ga={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ga.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ga))},min:function(){return Math.min.apply(null,J(Ga))},grow:function(){return Ga.max()},lowestElement:function(){return Math.max(Ga.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ha={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ha.bodyScroll(),Ha.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ha))},min:function(){return Math.min.apply(null,J(Ha))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ia=e(M);b(a,"message",S),T()}(window||{});
 //# sourceMappingURL=iframeResizer.contentWindow.map
\ No newline at end of file
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Fa(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Fa();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(b){la&&"object"==typeof a.console&&console.log(f(b))}function h(b){"object"==typeof a.console&&console.warn(f(b))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function a(a){return"true"===a?!0:!1}var b=ha.substr(na).split(":");oa=b[0],X=void 0!==b[1]?Number(b[1]):X,_=void 0!==b[2]?a(b[2]):_,la=void 0!==b[3]?a(b[3]):la,ja=void 0!==b[4]?Number(b[4]):ja,U=void 0!==b[6]?a(b[6]):U,Y=b[7],fa=void 0!==b[8]?b[8]:fa,W=b[9],$=b[10],ua=void 0!==b[11]?Number(b[11]):ua,ia.enable=void 0!==b[12]?a(b[12]):!1,qa=void 0!==b[13]?b[13]:qa,Aa=void 0!==b[14]?b[14]:Aa}function k(){function b(){var b=a.iFrameResizer;g("Reading data from page: "+JSON.stringify(b)),Ca="messageCallback"in b?b.messageCallback:Ca,Da="readyCallback"in b?b.readyCallback:Da,ta="targetOrigin"in b?b.targetOrigin:ta,fa="heightCalculationMethod"in b?b.heightCalculationMethod:fa,Aa="widthCalculationMethod"in b?b.widthCalculationMethod:Aa}"iFrameResizer"in a&&Object===a.iFrameResizer.constructor&&b(),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,g("Body "+a+' set to "'+b+'"'))}function n(){void 0===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g('HTML & body height set to "auto"')}function p(e){function f(){N(e.eventName,e.eventType)}var h={add:function(c){b(a,c,f)},remove:function(b){c(a,b,f)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(h[e.method])):h[e.method](e.eventName),g(d(e.method)+" event listener: "+e.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+' calculation method set to "'+a+'"')),a}function s(){fa=r(fa,ea,Ga,"height")}function t(){Aa=r(Aa,za,Ha,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(a,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(a){function b(a){var b=d(a);g("Moving to in page link (#"+c+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var c=a.split("#")[1]||a,e=decodeURIComponent(c),f=document.getElementById(e)||document.getElementsByName(e)[0];void 0!==f?b(f):(g("In page link (#"+c+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+c))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),a)}function j(){b(a,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(a,b,c){d(a.target),N(b,c+": "+a.target.src,void 0,void 0)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=a.MutationObserver||a.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var b=0>ja;a.MutationObserver||a.WebKitMutationObserver?b?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Fa(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Fa()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),da}var d=document.querySelectorAll("["+b+"]");return 0===d.length?c():I(a,d)}function L(){return document.querySelectorAll("body *")}function M(a,b,c,d){function e(){da=l,ya=m,R(da,ya,a)}function f(){function a(a,b){var c=Math.abs(a-b)<=ua;return!c}return l=void 0!==c?c:Ga[fa](),m=void 0!==d?d:Ha[Aa](),a(da,l)||_&&a(ya,m)}function h(){return!(a in{init:1,interval:1,size:1})}function i(){return fa in pa||_&&Aa in pa}function j(){g("No change in size detected")}function k(){h()&&i()?Q(b):a in{interval:1}||j()}var l,m;f()||"init"===a?(O(),e()):k()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ia(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ga[fa](),ya=Ha[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(a,b,c,d,e){function f(){void 0===e?e=ta:g("Message targetOrigin: "+e)}function h(){var f=a+":"+b,h=oa+":"+f+":"+c+(void 0!==d?":"+d:"");g("Sending message to host page ("+h+")"),sa.postMessage(ma+h,e)}!0===ra&&(f(),h())}function S(b){function c(){return ma===(""+b.data).substr(0,na)}function d(){ha=b.data,sa=b.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}function e(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))}function f(){N("resizeParent","Parent window requested size check")}function j(){var a=l();ia.findTarget(a)}function k(){return b.data.split("]")[1].split(":")[0]}function l(){return b.data.substr(b.data.indexOf(":")+1)}function m(){return"iFrameResize"in a}function n(){var a=l();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}function o(){var a=l();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")}function p(){return b.data.split(":")[2]in{"true":1,"false":1}}function q(){switch(k()){case"reset":e();break;case"resize":f();break;case"moveToAnchor":j();break;case"message":n();break;case"pageInfo":o();break;default:m()||p()||h("Unexpected message ("+b.data+")")}}function r(){!1===ca?q():p()?d():g('Ignored message of type "'+k()+'". Received before initialization.')}c()&&r()}function T(){"loading"!==document.readyState&&a.parent.postMessage("[iFrameResizerChild]Ready","*")}var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=a.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=a,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa=Date.now||function(){return(new Date).getTime()},Ga={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ga.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ga))},min:function(){return Math.min.apply(null,J(Ga))},grow:function(){return Ga.max()},lowestElement:function(){return Math.max(Ga.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ha={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ha.bodyScroll(),Ha.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ha))},min:function(){return Math.min.apply(null,J(Ha))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ia=e(M);b(a,"message",S),T()}(window||{});
 //# sourceMappingURL=iframeResizer.contentWindow.map
\ No newline at end of file
index e8f4bcb..f5c4c4e 100644 (file)
@@ -1,9 +1,2 @@
-/*! iFrame Resizer (iframeSizer.min.js ) - v3.5.3 - 2016-02-23
- *  Desc: Force cross domain iframes to size to content.
- *  Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
- *  Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
- *  License: MIT
- */
-
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(){var b,c=["moz","webkit","o","ms"];for(b=0;b<c.length&&!N;b+=1)N=a[c[b]+"RequestAnimationFrame"];N||h("setup","RequestAnimationFrame not supported")}function e(b){var c="Host page: "+b;return a.top!==a.self&&(c=a.parentIFrame&&a.parentIFrame.getId?a.parentIFrame.getId()+": "+b:"Nested host page: "+b),c}function f(a){return K+"["+e(a)+"]"}function g(a){return P[a]?P[a].log:G}function h(a,b){k("log",a,b,g(a))}function i(a,b){k("info",a,b,g(a))}function j(a,b){k("warn",a,b,!0)}function k(b,c,d,e){!0===e&&"object"==typeof a.console&&console[b](f(c),d)}function l(d){function e(){function a(){s(V),p(W)}g("Height"),g("Width"),t(a,V,"init")}function f(){var a=U.substr(L).split(":");return{iframe:P[a[0]].iframe,id:a[0],height:a[1],width:a[2],type:a[3]}}function g(a){var b=Number(P[W]["max"+a]),c=Number(P[W]["min"+a]),d=a.toLowerCase(),e=Number(V[d]);h(W,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,h(W,"Set "+d+" to min value")),e>b&&(e=b,h(W,"Set "+d+" to max value")),V[d]=""+e}function k(){function a(){function a(){var a=0,d=!1;for(h(W,"Checking connection is from allowed list of origins: "+c);a<c.length;a++)if(c[a]===b){d=!0;break}return d}function d(){var a=P[W].remoteHost;return h(W,"Checking connection is from: "+a),b===a}return c.constructor===Array?a():d()}var b=d.origin,c=P[W].checkOrigin;if(c&&""+b!="null"&&!a())throw new Error("Unexpected message received from: "+b+" for "+V.iframe.id+". Message was: "+d.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function l(){return K===(""+U).substr(0,L)&&U.substr(L).split(":")[0]in P}function w(){var a=V.type in{"true":1,"false":1,undefined:1};return a&&h(W,"Ignoring init message from meta parent page"),a}function y(a){return U.substr(U.indexOf(":")+J+a)}function z(a){h(W,"MessageCallback passed: {iframe: "+V.iframe.id+", message: "+a+"}"),N("messageCallback",{iframe:V.iframe,message:JSON.parse(a)}),h(W,"--")}function A(){var b=document.body.getBoundingClientRect(),c=V.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:c.height,iframeWidth:c.width,clientHeight:Math.max(document.documentElement.clientHeight,a.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,a.innerWidth||0),offsetTop:parseInt(c.top-b.top,10),offsetLeft:parseInt(c.left-b.left,10),scrollTop:a.pageYOffset,scrollLeft:a.pageXOffset})}function B(a,b){function c(){u("Send Page Info","pageInfo:"+A(),a,b)}x(c,32)}function C(){function d(b,c){function d(){P[g]?B(P[g].iframe,g):e()}["scroll","resize"].forEach(function(e){h(g,b+e+" listener for sendPageInfo"),c(a,e,d)})}function e(){d("Remove ",c)}function f(){d("Add ",b)}var g=W;f(),P[g].stopPageInfo=e}function D(){P[W]&&P[W].stopPageInfo&&(P[W].stopPageInfo(),delete P[W].stopPageInfo)}function E(){var a=!0;return null===V.iframe&&(j(W,"IFrame ("+V.id+") not found"),a=!1),a}function F(a){var b=a.getBoundingClientRect();return o(W),{x:Math.floor(Number(b.left)+Number(M.x)),y:Math.floor(Number(b.top)+Number(M.y))}}function G(b){function c(){M=g,H(),h(W,"--")}function d(){return{x:Number(V.width)+f.x,y:Number(V.height)+f.y}}function e(){a.parentIFrame?a.parentIFrame["scrollTo"+(b?"Offset":"")](g.x,g.y):j(W,"Unable to scroll to requested position, window.parentIFrame not found")}var f=b?F(V.iframe):{x:0,y:0},g=d();h(W,"Reposition requested from iFrame (offset x:"+f.x+" y:"+f.y+")"),a.top!==a.self?e():c()}function H(){!1!==N("scrollCallback",M)?p(W):q()}function I(b){function c(){var a=F(g);h(W,"Moving to in page link (#"+e+") at x: "+a.x+" y: "+a.y),M={x:a.x,y:a.y},H(),h(W,"--")}function d(){a.parentIFrame?a.parentIFrame.moveToAnchor(e):h(W,"In page link #"+e+" not found and window.parentIFrame not found")}var e=b.split("#")[1]||"",f=decodeURIComponent(e),g=document.getElementById(f)||document.getElementsByName(f)[0];g?c():a.top!==a.self?d():h(W,"In page link #"+e+" not found")}function N(a,b){return m(W,a,b)}function O(){switch(P[W].firstRun&&T(),V.type){case"close":n(V.iframe);break;case"message":z(y(6));break;case"scrollTo":G(!1);break;case"scrollToOffset":G(!0);break;case"pageInfo":B(P[W].iframe,W),C();break;case"pageInfoStop":D();break;case"inPageLink":I(y(9));break;case"reset":r(V);break;case"init":e(),N("initCallback",V.iframe),N("resizedCallback",V);break;default:e(),N("resizedCallback",V)}}function Q(a){var b=!0;return P[a]||(b=!1,j(V.type+" No settings for "+a+". Message was: "+U)),b}function S(){for(var a in P)u("iFrame requested init",v(a),document.getElementById(a),a)}function T(){P[W].firstRun=!1}var U=d.data,V={},W=null;"[iFrameResizerChild]Ready"===U?S():l()?(V=f(),W=R=V.id,!w()&&Q(W)&&(h(W,"Received: "+U),E()&&k()&&O())):i(W,"Ignored: "+U)}function m(a,b,c){var d=null,e=null;if(P[a]){if(d=P[a][b],"function"!=typeof d)throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function n(a){var b=a.id;h(b,"Removing iFrame: "+b),a.parentNode.removeChild(a),m(b,"closedCallback",b),h(b,"--"),delete P[b]}function o(b){null===M&&(M={x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop},h(b,"Get page position: "+M.x+","+M.y))}function p(b){null!==M&&(a.scrollTo(M.x,M.y),h(b,"Set page position: "+M.x+","+M.y),q())}function q(){M=null}function r(a){function b(){s(a),u("reset","reset",a.iframe,a.id)}h(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(b,a,"reset")}function s(a){function b(b){a.iframe.style[b]=a[b]+"px",h(a.id,"IFrame ("+e+") "+b+" set to "+a[b]+"px")}function c(b){H||"0"!==a[b]||(H=!0,h(e,"Hidden iFrame detected, creating visibility listener"),y())}function d(a){b(a),c(a)}var e=a.iframe.id;P[e]&&(P[e].sizeHeight&&d("height"),P[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&N?(h(b.id,"Requesting animation frame"),N(a)):a()}function u(a,b,c,d){function e(){var e=P[d].targetOrigin;h(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+e),c.contentWindow.postMessage(K+b,e)}function f(){i(d,"["+a+"] IFrame("+d+") not found"),P[d]&&delete P[d]}function g(){c&&"contentWindow"in c&&null!==c.contentWindow?e():f()}d=d||c.id,P[d]&&g()}function v(a){return a+":"+P[a].bodyMarginV1+":"+P[a].sizeWidth+":"+P[a].log+":"+P[a].interval+":"+P[a].enablePublicMethods+":"+P[a].autoResize+":"+P[a].bodyMargin+":"+P[a].heightCalculationMethod+":"+P[a].bodyBackground+":"+P[a].bodyPadding+":"+P[a].tolerance+":"+P[a].inPageLinks+":"+P[a].resizeFrom+":"+P[a].widthCalculationMethod}function w(a,c){function d(){function b(b){1/0!==P[w][b]&&0!==P[w][b]&&(a.style[b]=P[w][b]+"px",h(w,"Set "+b+" = "+P[w][b]+"px"))}function c(a){if(P[w]["min"+a]>P[w]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}c("Height"),c("Width"),b("maxHeight"),b("minHeight"),b("maxWidth"),b("minWidth")}function e(){var a=c&&c.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function f(b){return R=b,""===b&&(a.id=b=e(),G=(c||{}).log,R=b,h(b,"Added missing iframe ID: "+b+" ("+a.src+")")),b}function g(){h(w,"IFrame scrolling "+(P[w].scrolling?"enabled":"disabled")+" for "+w),a.style.overflow=!1===P[w].scrolling?"hidden":"auto",a.scrolling=!1===P[w].scrolling?"no":"yes"}function i(){("number"==typeof P[w].bodyMargin||"0"===P[w].bodyMargin)&&(P[w].bodyMarginV1=P[w].bodyMargin,P[w].bodyMargin=""+P[w].bodyMargin+"px")}function k(){var b=P[w].firstRun,c=P[w].heightCalculationMethod in O;!b&&c&&r({iframe:a,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(P[w].iframe.iFrameResizer={close:n.bind(null,P[w].iframe),resize:u.bind(null,"Window resize","resize",P[w].iframe),moveToAnchor:function(a){u("Move to anchor","inPageLink:"+a,P[w].iframe,w)},sendMessage:function(a){a=JSON.stringify(a),u("Send Message","message:"+a,P[w].iframe,w)}})}function m(c){function d(){u("iFrame.onload",c,a),k()}b(a,"load",d),u("init",c,a)}function o(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function p(a){for(var b in S)S.hasOwnProperty(b)&&(P[w][b]=a.hasOwnProperty(b)?a[b]:S[b])}function q(a){return""===a||"file://"===a?"*":a}function s(b){b=b||{},P[w]={firstRun:!0,iframe:a,remoteHost:a.src.split("/").slice(0,3).join("/")},o(b),p(b),P[w].targetOrigin=!0===P[w].checkOrigin?q(P[w].remoteHost):"*"}function t(){return w in P&&"iFrameResizer"in a}var w=f(a.id);t()?j(w,"Ignored iFrame, already setup."):(s(c),g(),d(),i(),m(v(w)),l())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function b(){function a(a){function b(b){return"0px"===P[a].iframe.style[b]}function c(a){return null!==a.offsetParent}c(P[a].iframe)&&(b("height")||b("width"))&&u("Visibility change","resize",P[a].iframe,a)}for(var b in P)a(b)}function c(a){h("window","Mutation observed: "+a[0].target+" "+a[0].type),x(b,16)}function d(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},d=new e(c);d.observe(a,b)}var e=a.MutationObserver||a.WebKitMutationObserver;e&&d()}function z(a){function b(){B("Window "+a,"resize")}h("window","Trigger event: "+a),x(b,16)}function A(){function a(){B("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),x(a,16))}function B(a,b){function c(a){return"parent"===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(a,"message",l),b(a,"resize",function(){z("resize")}),b(document,"visibilitychange",A),b(document,"-webkit-visibilitychange",A),b(a,"focusin",function(){z("focus")}),b(a,"focus",function(){z("focus")})}function D(){function a(a,c){function d(){if(!c.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==c.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+c.tagName+">")}c&&(d(),w(c,a),b.push(c))}var b;return d(),C(),function(c,d){switch(b=[],typeof d){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(d||"iframe"),a.bind(void 0,c));break;case"object":a(c,d);break;default:throw new TypeError("Unexpected data type ("+typeof d+")")}return b}}function E(a){a.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}}var F=0,G=!1,H=!1,I="message",J=I.length,K="[iFrameSizer]",L=K.length,M=null,N=a.requestAnimationFrame,O={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},P={},Q=null,R="Host Page",S={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){j("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};a.jQuery&&E(jQuery),"function"==typeof define&&define.amd?define([],D):"object"==typeof module&&"object"==typeof module.exports?module.exports=D():a.iFrameResize=a.iFrameResize||D()}(window||{});
 //# sourceMappingURL=iframeResizer.map
\ No newline at end of file
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(){var b,c=["moz","webkit","o","ms"];for(b=0;b<c.length&&!N;b+=1)N=a[c[b]+"RequestAnimationFrame"];N||h("setup","RequestAnimationFrame not supported")}function e(b){var c="Host page: "+b;return a.top!==a.self&&(c=a.parentIFrame&&a.parentIFrame.getId?a.parentIFrame.getId()+": "+b:"Nested host page: "+b),c}function f(a){return K+"["+e(a)+"]"}function g(a){return P[a]?P[a].log:G}function h(a,b){k("log",a,b,g(a))}function i(a,b){k("info",a,b,g(a))}function j(a,b){k("warn",a,b,!0)}function k(b,c,d,e){!0===e&&"object"==typeof a.console&&console[b](f(c),d)}function l(d){function e(){function a(){s(V),p(W)}g("Height"),g("Width"),t(a,V,"init")}function f(){var a=U.substr(L).split(":");return{iframe:P[a[0]].iframe,id:a[0],height:a[1],width:a[2],type:a[3]}}function g(a){var b=Number(P[W]["max"+a]),c=Number(P[W]["min"+a]),d=a.toLowerCase(),e=Number(V[d]);h(W,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,h(W,"Set "+d+" to min value")),e>b&&(e=b,h(W,"Set "+d+" to max value")),V[d]=""+e}function k(){function a(){function a(){var a=0,d=!1;for(h(W,"Checking connection is from allowed list of origins: "+c);a<c.length;a++)if(c[a]===b){d=!0;break}return d}function d(){var a=P[W].remoteHost;return h(W,"Checking connection is from: "+a),b===a}return c.constructor===Array?a():d()}var b=d.origin,c=P[W].checkOrigin;if(c&&""+b!="null"&&!a())throw new Error("Unexpected message received from: "+b+" for "+V.iframe.id+". Message was: "+d.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function l(){return K===(""+U).substr(0,L)&&U.substr(L).split(":")[0]in P}function w(){var a=V.type in{"true":1,"false":1,undefined:1};return a&&h(W,"Ignoring init message from meta parent page"),a}function y(a){return U.substr(U.indexOf(":")+J+a)}function z(a){h(W,"MessageCallback passed: {iframe: "+V.iframe.id+", message: "+a+"}"),N("messageCallback",{iframe:V.iframe,message:JSON.parse(a)}),h(W,"--")}function A(){var b=document.body.getBoundingClientRect(),c=V.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:c.height,iframeWidth:c.width,clientHeight:Math.max(document.documentElement.clientHeight,a.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,a.innerWidth||0),offsetTop:parseInt(c.top-b.top,10),offsetLeft:parseInt(c.left-b.left,10),scrollTop:a.pageYOffset,scrollLeft:a.pageXOffset})}function B(a,b){function c(){u("Send Page Info","pageInfo:"+A(),a,b)}x(c,32)}function C(){function d(b,c){function d(){P[g]?B(P[g].iframe,g):e()}["scroll","resize"].forEach(function(e){h(g,b+e+" listener for sendPageInfo"),c(a,e,d)})}function e(){d("Remove ",c)}function f(){d("Add ",b)}var g=W;f(),P[g].stopPageInfo=e}function D(){P[W]&&P[W].stopPageInfo&&(P[W].stopPageInfo(),delete P[W].stopPageInfo)}function E(){var a=!0;return null===V.iframe&&(j(W,"IFrame ("+V.id+") not found"),a=!1),a}function F(a){var b=a.getBoundingClientRect();return o(W),{x:Math.floor(Number(b.left)+Number(M.x)),y:Math.floor(Number(b.top)+Number(M.y))}}function G(b){function c(){M=g,H(),h(W,"--")}function d(){return{x:Number(V.width)+f.x,y:Number(V.height)+f.y}}function e(){a.parentIFrame?a.parentIFrame["scrollTo"+(b?"Offset":"")](g.x,g.y):j(W,"Unable to scroll to requested position, window.parentIFrame not found")}var f=b?F(V.iframe):{x:0,y:0},g=d();h(W,"Reposition requested from iFrame (offset x:"+f.x+" y:"+f.y+")"),a.top!==a.self?e():c()}function H(){!1!==N("scrollCallback",M)?p(W):q()}function I(b){function c(){var a=F(g);h(W,"Moving to in page link (#"+e+") at x: "+a.x+" y: "+a.y),M={x:a.x,y:a.y},H(),h(W,"--")}function d(){a.parentIFrame?a.parentIFrame.moveToAnchor(e):h(W,"In page link #"+e+" not found and window.parentIFrame not found")}var e=b.split("#")[1]||"",f=decodeURIComponent(e),g=document.getElementById(f)||document.getElementsByName(f)[0];g?c():a.top!==a.self?d():h(W,"In page link #"+e+" not found")}function N(a,b){return m(W,a,b)}function O(){switch(P[W].firstRun&&T(),V.type){case"close":n(V.iframe);break;case"message":z(y(6));break;case"scrollTo":G(!1);break;case"scrollToOffset":G(!0);break;case"pageInfo":B(P[W].iframe,W),C();break;case"pageInfoStop":D();break;case"inPageLink":I(y(9));break;case"reset":r(V);break;case"init":e(),N("initCallback",V.iframe),N("resizedCallback",V);break;default:e(),N("resizedCallback",V)}}function Q(a){var b=!0;return P[a]||(b=!1,j(V.type+" No settings for "+a+". Message was: "+U)),b}function S(){for(var a in P)u("iFrame requested init",v(a),document.getElementById(a),a)}function T(){P[W].firstRun=!1}var U=d.data,V={},W=null;"[iFrameResizerChild]Ready"===U?S():l()?(V=f(),W=R=V.id,!w()&&Q(W)&&(h(W,"Received: "+U),E()&&k()&&O())):i(W,"Ignored: "+U)}function m(a,b,c){var d=null,e=null;if(P[a]){if(d=P[a][b],"function"!=typeof d)throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function n(a){var b=a.id;h(b,"Removing iFrame: "+b),a.parentNode.removeChild(a),m(b,"closedCallback",b),h(b,"--"),delete P[b]}function o(b){null===M&&(M={x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop},h(b,"Get page position: "+M.x+","+M.y))}function p(b){null!==M&&(a.scrollTo(M.x,M.y),h(b,"Set page position: "+M.x+","+M.y),q())}function q(){M=null}function r(a){function b(){s(a),u("reset","reset",a.iframe,a.id)}h(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(b,a,"reset")}function s(a){function b(b){a.iframe.style[b]=a[b]+"px",h(a.id,"IFrame ("+e+") "+b+" set to "+a[b]+"px")}function c(b){H||"0"!==a[b]||(H=!0,h(e,"Hidden iFrame detected, creating visibility listener"),y())}function d(a){b(a),c(a)}var e=a.iframe.id;P[e]&&(P[e].sizeHeight&&d("height"),P[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&N?(h(b.id,"Requesting animation frame"),N(a)):a()}function u(a,b,c,d){function e(){var e=P[d].targetOrigin;h(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+e),c.contentWindow.postMessage(K+b,e)}function f(){i(d,"["+a+"] IFrame("+d+") not found"),P[d]&&delete P[d]}function g(){c&&"contentWindow"in c&&null!==c.contentWindow?e():f()}d=d||c.id,P[d]&&g()}function v(a){return a+":"+P[a].bodyMarginV1+":"+P[a].sizeWidth+":"+P[a].log+":"+P[a].interval+":"+P[a].enablePublicMethods+":"+P[a].autoResize+":"+P[a].bodyMargin+":"+P[a].heightCalculationMethod+":"+P[a].bodyBackground+":"+P[a].bodyPadding+":"+P[a].tolerance+":"+P[a].inPageLinks+":"+P[a].resizeFrom+":"+P[a].widthCalculationMethod}function w(a,c){function d(){function b(b){1/0!==P[w][b]&&0!==P[w][b]&&(a.style[b]=P[w][b]+"px",h(w,"Set "+b+" = "+P[w][b]+"px"))}function c(a){if(P[w]["min"+a]>P[w]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}c("Height"),c("Width"),b("maxHeight"),b("minHeight"),b("maxWidth"),b("minWidth")}function e(){var a=c&&c.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function f(b){return R=b,""===b&&(a.id=b=e(),G=(c||{}).log,R=b,h(b,"Added missing iframe ID: "+b+" ("+a.src+")")),b}function g(){h(w,"IFrame scrolling "+(P[w].scrolling?"enabled":"disabled")+" for "+w),a.style.overflow=!1===P[w].scrolling?"hidden":"auto",a.scrolling=!1===P[w].scrolling?"no":"yes"}function i(){("number"==typeof P[w].bodyMargin||"0"===P[w].bodyMargin)&&(P[w].bodyMarginV1=P[w].bodyMargin,P[w].bodyMargin=""+P[w].bodyMargin+"px")}function k(){var b=P[w].firstRun,c=P[w].heightCalculationMethod in O;!b&&c&&r({iframe:a,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(P[w].iframe.iFrameResizer={close:n.bind(null,P[w].iframe),resize:u.bind(null,"Window resize","resize",P[w].iframe),moveToAnchor:function(a){u("Move to anchor","inPageLink:"+a,P[w].iframe,w)},sendMessage:function(a){a=JSON.stringify(a),u("Send Message","message:"+a,P[w].iframe,w)}})}function m(c){function d(){u("iFrame.onload",c,a),k()}b(a,"load",d),u("init",c,a)}function o(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function p(a){for(var b in S)S.hasOwnProperty(b)&&(P[w][b]=a.hasOwnProperty(b)?a[b]:S[b])}function q(a){return""===a||"file://"===a?"*":a}function s(b){b=b||{},P[w]={firstRun:!0,iframe:a,remoteHost:a.src.split("/").slice(0,3).join("/")},o(b),p(b),P[w].targetOrigin=!0===P[w].checkOrigin?q(P[w].remoteHost):"*"}function t(){return w in P&&"iFrameResizer"in a}var w=f(a.id);t()?j(w,"Ignored iFrame, already setup."):(s(c),g(),d(),i(),m(v(w)),l())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function b(){function a(a){function b(b){return"0px"===P[a].iframe.style[b]}function c(a){return null!==a.offsetParent}c(P[a].iframe)&&(b("height")||b("width"))&&u("Visibility change","resize",P[a].iframe,a)}for(var b in P)a(b)}function c(a){h("window","Mutation observed: "+a[0].target+" "+a[0].type),x(b,16)}function d(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},d=new e(c);d.observe(a,b)}var e=a.MutationObserver||a.WebKitMutationObserver;e&&d()}function z(a){function b(){B("Window "+a,"resize")}h("window","Trigger event: "+a),x(b,16)}function A(){function a(){B("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),x(a,16))}function B(a,b){function c(a){return"parent"===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(a,"message",l),b(a,"resize",function(){z("resize")}),b(document,"visibilitychange",A),b(document,"-webkit-visibilitychange",A),b(a,"focusin",function(){z("focus")}),b(a,"focus",function(){z("focus")})}function D(){function a(a,c){function d(){if(!c.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==c.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+c.tagName+">")}c&&(d(),w(c,a),b.push(c))}var b;return d(),C(),function(c,d){switch(b=[],typeof d){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(d||"iframe"),a.bind(void 0,c));break;case"object":a(c,d);break;default:throw new TypeError("Unexpected data type ("+typeof d+")")}return b}}function E(a){a.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}}var F=0,G=!1,H=!1,I="message",J=I.length,K="[iFrameSizer]",L=K.length,M=null,N=a.requestAnimationFrame,O={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},P={},Q=null,R="Host Page",S={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){j("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};a.jQuery&&E(jQuery),"function"==typeof define&&define.amd?define([],D):"object"==typeof module&&"object"==typeof module.exports?module.exports=D():a.iFrameResize=a.iFrameResize||D()}(window||{});
 //# sourceMappingURL=iframeResizer.map
\ No newline at end of file
index 5f9b195..5d31628 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /******************************************************************************
  * jquery.i18n.properties
  * 
 /******************************************************************************
  * jquery.i18n.properties
  * 
index 568e5ed..7c97387 100644 (file)
@@ -1,17 +1,20 @@
 /*
 /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed 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
  *
  *
  * Licensed 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
+ *     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.
  *
  * 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 var metricsChart = {};
 
  */
 var metricsChart = {};
 
index e002585..6197f2d 100644 (file)
-/*\r
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-var vm = avalon\r
-               .define({\r
-                       $id : "metricsController",\r
-                       routeTargetTitle:$.i18n.prop("org_openo_msb_route_content_title"),              \r
-                       $metricsUrl : '/admin/metrics',         \r
-                       metricsLoading:false,           \r
-                       metricsArray :  [],     \r
-                       threadNum:"",\r
-                       isErr:false,\r
-                       jvmTime:"",\r
-                       restArray:[],\r
-                                       \r
-                $dataTableLanguage: {\r
-                "sProcessing": "<img src='../img/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loadding...</span>",   \r
-                "sLengthMenu": $.i18n.prop("org_openo_msb_route-table-sLengthMenu"),\r
-                "sZeroRecords": $.i18n.prop("org_openo_msb_route-table-sZeroRecords"),\r
-                "sInfo": "<span class='seperator'>  </span>" + $.i18n.prop("org_openo_msb_route-table-sInfo"),\r
-                "sInfoEmpty": $.i18n.prop("org_openo_msb_route-table-sInfoEmpty"),\r
-                "sGroupActions": $.i18n.prop("org_openo_msb_route-table-sGroupActions"),\r
-                "sAjaxRequestGeneralError": $.i18n.prop("org_openo_msb_route-table-sAjaxRequestGeneralError"),\r
-                "sEmptyTable": $.i18n.prop("org_openo_msb_route-table-sEmptyTable"),\r
-                "oPaginate": {\r
-                    "sPrevious": $.i18n.prop("org_openo_msb_route-table-sPrevious"),\r
-                    "sNext": $.i18n.prop("org_openo_msb_route-table-sNext"),\r
-                    "sPage": $.i18n.prop("org_openo_msb_route-table-sPage"),\r
-                    "sPageOf": $.i18n.prop("org_openo_msb_route-table-sPageOf")\r
-                },\r
-                "sSearch": $.i18n.prop("org_openo_msb_route-table-search"),\r
-                "sInfoFiltered": $.i18n.prop("org_openo_msb_route-table-infofilter") \r
-            },         \r
-                       initMetrics : function() {\r
-                       \r
-                           \r
-                $.ajax({\r
-            "type": 'get',\r
-            "url": url,\r
-            "dataType": "json",\r
-            success: function (resp) { \r
-                vm.isErr=false; \r
-               var restJson = resp;  \r
-               // var restJson = metricsUtil.restJson;                         \r
-                     \r
-                  var testRestJson=restJson.timers;\r
-                  var gaugesJson=restJson.gauges;\r
-\r
-                  //jvm Time\r
-                  var jvmTime=gaugesJson["jvm.attribute.uptime"].value;\r
-\r
-                  vm.jvmTime=metricsUtil.formatSeconds(jvmTime);\r
-\r
-\r
-                  //Initialize the JVM memory usage\r
-                  var Eden_Space_usage;\r
-                       if(gaugesJson["jvm.memory.pools.Eden-Space.usage"]==null){\r
-                               if(gaugesJson["jvm.memory.pools.PS-Eden-Space.usage"]==null)\r
-                               {\r
-                                       Eden_Space_usage=0;\r
-                               }\r
-                               else{\r
-                                       Eden_Space_usage=gaugesJson["jvm.memory.pools.PS-Eden-Space.usage"].value;\r
-                               }\r
-                       }\r
-                       else{\r
-                               Eden_Space_usage=gaugesJson["jvm.memory.pools.Eden-Space.usage"].value;\r
-                       }\r
-\r
-\r
-\r
-\r
-                       var Perm_Gen_usage;\r
-                       if(gaugesJson["jvm.memory.pools.Perm-Gen.usage"]==null){\r
-                               if(gaugesJson["jvm.memory.pools.PS-Perm-Gen.usage"]==null)\r
-                               {\r
-                                       Perm_Gen_usage=0;\r
-                               }\r
-                               else{\r
-                                       Perm_Gen_usage=gaugesJson["jvm.memory.pools.PS-Perm-Gen.usage"].value;\r
-                               }\r
-                       }\r
-                       else{\r
-                               Perm_Gen_usage=gaugesJson["jvm.memory.pools.Perm-Gen.usage"].value;\r
-                       }\r
-\r
-\r
-                       var Survivor_Space_usage;\r
-                       if(gaugesJson["jvm.memory.pools.Survivor-Space.usage"]==null){\r
-                               if(gaugesJson["jvm.memory.pools.PS-Survivor-Space.usage"]==null)\r
-                               {\r
-                                       Survivor_Space_usage=0;\r
-                               }\r
-                               else{\r
-                                       Survivor_Space_usage=gaugesJson["jvm.memory.pools.PS-Survivor-Space.usage"].value;\r
-                               }\r
-                       }\r
-                       else{\r
-                               Survivor_Space_usage=gaugesJson["jvm.memory.pools.Survivor-Space.usage"].value;\r
-                       }\r
-\r
-\r
-                       var Tenured_Gen_usage;\r
-                       if(gaugesJson["jvm.memory.pools.Tenured-Gen.usage"]==null){\r
-                               if(gaugesJson["jvm.memory.pools.PS-Old-Gen.usage"]==null)\r
-                               {\r
-                                       Tenured_Gen_usage=0;\r
-                               }\r
-                               else{\r
-                                       Tenured_Gen_usage=gaugesJson["jvm.memory.pools.PS-Old-Gen.usage"].value;\r
-                               }\r
-                       }\r
-                       else{\r
-                               Tenured_Gen_usage=gaugesJson["jvm.memory.pools.Tenured-Gen.usage"].value;\r
-                       }       \r
-\r
-\r
-                  var memoryPieMetrics_data={\r
-                       CodeCache:(gaugesJson["jvm.memory.pools.Code-Cache.usage"].value*100).toFixed(1),\r
-                       EdenSpace:(Eden_Space_usage*100).toFixed(1),\r
-                       PermGen:(Perm_Gen_usage*100).toFixed(1),\r
-                       SurvivorSpace:(Survivor_Space_usage*100).toFixed(1),\r
-                       TenuredGen:(Tenured_Gen_usage*100).toFixed(1)\r
-                       };\r
-                  metricsChart.memoryPieMetrics(memoryPieMetrics_data);\r
-\r
-                  // initialize the JVM memory map\r
-                  var heap_init=Math.round(gaugesJson["jvm.memory.heap.init"].value/1000000);\r
-                  var non_heap_init=Math.round(gaugesJson["jvm.memory.non-heap.init"].value/1000000);\r
-\r
-                  var heap_used=Math.round(gaugesJson["jvm.memory.heap.used"].value/1000000);\r
-                  var non_heap_used=Math.round(gaugesJson["jvm.memory.non-heap.used"].value/1000000);\r
-\r
-                  var heap_max=Math.round(gaugesJson["jvm.memory.heap.max"].value/1000000);\r
-                  var non_heap_max=Math.round(gaugesJson["jvm.memory.non-heap.max"].value/1000000);\r
-\r
-                  var memoryBarMetrics_data={\r
-                       init:[\r
-                               heap_init,\r
-                               non_heap_init,\r
-                               non_heap_init+heap_init\r
-                               ],\r
-                       used:[\r
-                               heap_used,\r
-                               non_heap_used,\r
-                               non_heap_used+heap_used\r
-                               ],\r
-                       max:[\r
-                               heap_max,\r
-                               non_heap_max,\r
-                               non_heap_max+heap_max\r
-                               ]\r
-                  };\r
-                  metricsChart.memoryBarMetrics(memoryBarMetrics_data);\r
-\r
-                  //Initializes the thread profile\r
-                  var threadsMetrics_data= [{value:gaugesJson["jvm.threads.runnable.count"].value, name:'Runnable'},\r
-                {value:gaugesJson["jvm.threads.timed_waiting.count"].value, name:'Timed waiting'},\r
-                {value:gaugesJson["jvm.threads.waiting.count"].value, name:'Waiting'},\r
-                {value:gaugesJson["jvm.threads.blocked.count"].value, name:'Blocked'}];\r
-                vm.threadNum=gaugesJson["jvm.threads.count"].value;\r
-                               metricsChart.threadsMetrics(threadsMetrics_data);\r
-\r
-                               //Initialize the Rest interface traffic map\r
-                               var restMetrics_data={restName:[],restCount:[]};        \r
-                                 $.each(testRestJson,function(name,value) {\r
-                                       if(name=="io.dropwizard.jetty.MutableServletContextHandler.connect-requests") return false;\r
-                               var nameArray=name.split(".");\r
-\r
-                                       restMetrics_data.restName.push(nameArray[nameArray.length-1]);\r
-                                       restMetrics_data.restCount.push(value.count);\r
-\r
-                               });\r
-                               \r
-\r
-                  metricsChart.restMetrics(restMetrics_data); \r
-\r
-\r
-                  //Initialize the HTTP traffic\r
-                  var requestsMetrics_data={get:"",post:"",put:"",delete:"",other:""};\r
-                  requestsMetrics_data.get=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.get-requests"].count;\r
-                  requestsMetrics_data.post=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.post-requests"].count;\r
-                  requestsMetrics_data.put=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.put-requests"].count;\r
-                  requestsMetrics_data.delete=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.delete-requests"].count;\r
-                  requestsMetrics_data.other=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.other-requests"].count;\r
-                  metricsChart.requestsMetrics(requestsMetrics_data);\r
-\r
-                  //Initialize the HTTP access list in detail\r
-                 $.each(testRestJson,function(name,value) {\r
-                       if(name.indexOf("org.eclipse.jetty.server.HttpConnectionFactory") == 0) return true;\r
-                       var obj=value;\r
-                       obj.name=name;\r
-                               vm.restArray.push(obj);\r
-                               });\r
-\r
-                       $('#restTable').DataTable({\r
-                             responsive: true,\r
-                                 destroy: true,\r
-                                 "oLanguage": vm.$dataTableLanguage\r
-                               });\r
-                  \r
-                                },\r
-                    error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                 \r
-                           vm.isErr=true;\r
-                         }\r
-                      });\r
-\r
-                       }                       \r
-                       \r
-\r
-       });\r
-avalon.scan();\r
-vm.initMetrics();\r
-\r
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
+var vm = avalon
+               .define({
+                       $id : "metricsController",
+                       routeTargetTitle:$.i18n.prop("org_openo_msb_route_content_title"),              
+                       $metricsUrl : '/admin/metrics',         
+                       metricsLoading:false,           
+                       metricsArray :  [],     
+                       threadNum:"",
+                       isErr:false,
+                       jvmTime:"",
+                       restArray:[],
+                                       
+                $dataTableLanguage: {
+                "sProcessing": "<img src='../img/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loadding...</span>",   
+                "sLengthMenu": $.i18n.prop("org_openo_msb_route-table-sLengthMenu"),
+                "sZeroRecords": $.i18n.prop("org_openo_msb_route-table-sZeroRecords"),
+                "sInfo": "<span class='seperator'>  </span>" + $.i18n.prop("org_openo_msb_route-table-sInfo"),
+                "sInfoEmpty": $.i18n.prop("org_openo_msb_route-table-sInfoEmpty"),
+                "sGroupActions": $.i18n.prop("org_openo_msb_route-table-sGroupActions"),
+                "sAjaxRequestGeneralError": $.i18n.prop("org_openo_msb_route-table-sAjaxRequestGeneralError"),
+                "sEmptyTable": $.i18n.prop("org_openo_msb_route-table-sEmptyTable"),
+                "oPaginate": {
+                    "sPrevious": $.i18n.prop("org_openo_msb_route-table-sPrevious"),
+                    "sNext": $.i18n.prop("org_openo_msb_route-table-sNext"),
+                    "sPage": $.i18n.prop("org_openo_msb_route-table-sPage"),
+                    "sPageOf": $.i18n.prop("org_openo_msb_route-table-sPageOf")
+                },
+                "sSearch": $.i18n.prop("org_openo_msb_route-table-search"),
+                "sInfoFiltered": $.i18n.prop("org_openo_msb_route-table-infofilter") 
+            },         
+                       initMetrics : function() {
+                       
+                           
+                $.ajax({
+            "type": 'get',
+            "url": url,
+            "dataType": "json",
+            success: function (resp) { 
+                vm.isErr=false; 
+               var restJson = resp;  
+               // var restJson = metricsUtil.restJson;                         
+                     
+                  var testRestJson=restJson.timers;
+                  var gaugesJson=restJson.gauges;
+
+                  //jvm Time
+                  var jvmTime=gaugesJson["jvm.attribute.uptime"].value;
+
+                  vm.jvmTime=metricsUtil.formatSeconds(jvmTime);
+
+
+                  //Initialize the JVM memory usage
+                  var Eden_Space_usage;
+                       if(gaugesJson["jvm.memory.pools.Eden-Space.usage"]==null){
+                               if(gaugesJson["jvm.memory.pools.PS-Eden-Space.usage"]==null)
+                               {
+                                       Eden_Space_usage=0;
+                               }
+                               else{
+                                       Eden_Space_usage=gaugesJson["jvm.memory.pools.PS-Eden-Space.usage"].value;
+                               }
+                       }
+                       else{
+                               Eden_Space_usage=gaugesJson["jvm.memory.pools.Eden-Space.usage"].value;
+                       }
+
+
+
+
+                       var Perm_Gen_usage;
+                       if(gaugesJson["jvm.memory.pools.Perm-Gen.usage"]==null){
+                               if(gaugesJson["jvm.memory.pools.PS-Perm-Gen.usage"]==null)
+                               {
+                                       Perm_Gen_usage=0;
+                               }
+                               else{
+                                       Perm_Gen_usage=gaugesJson["jvm.memory.pools.PS-Perm-Gen.usage"].value;
+                               }
+                       }
+                       else{
+                               Perm_Gen_usage=gaugesJson["jvm.memory.pools.Perm-Gen.usage"].value;
+                       }
+
+
+                       var Survivor_Space_usage;
+                       if(gaugesJson["jvm.memory.pools.Survivor-Space.usage"]==null){
+                               if(gaugesJson["jvm.memory.pools.PS-Survivor-Space.usage"]==null)
+                               {
+                                       Survivor_Space_usage=0;
+                               }
+                               else{
+                                       Survivor_Space_usage=gaugesJson["jvm.memory.pools.PS-Survivor-Space.usage"].value;
+                               }
+                       }
+                       else{
+                               Survivor_Space_usage=gaugesJson["jvm.memory.pools.Survivor-Space.usage"].value;
+                       }
+
+
+                       var Tenured_Gen_usage;
+                       if(gaugesJson["jvm.memory.pools.Tenured-Gen.usage"]==null){
+                               if(gaugesJson["jvm.memory.pools.PS-Old-Gen.usage"]==null)
+                               {
+                                       Tenured_Gen_usage=0;
+                               }
+                               else{
+                                       Tenured_Gen_usage=gaugesJson["jvm.memory.pools.PS-Old-Gen.usage"].value;
+                               }
+                       }
+                       else{
+                               Tenured_Gen_usage=gaugesJson["jvm.memory.pools.Tenured-Gen.usage"].value;
+                       }       
+
+
+                  var memoryPieMetrics_data={
+                       CodeCache:(gaugesJson["jvm.memory.pools.Code-Cache.usage"].value*100).toFixed(1),
+                       EdenSpace:(Eden_Space_usage*100).toFixed(1),
+                       PermGen:(Perm_Gen_usage*100).toFixed(1),
+                       SurvivorSpace:(Survivor_Space_usage*100).toFixed(1),
+                       TenuredGen:(Tenured_Gen_usage*100).toFixed(1)
+                       };
+                  metricsChart.memoryPieMetrics(memoryPieMetrics_data);
+
+                  // initialize the JVM memory map
+                  var heap_init=Math.round(gaugesJson["jvm.memory.heap.init"].value/1000000);
+                  var non_heap_init=Math.round(gaugesJson["jvm.memory.non-heap.init"].value/1000000);
+
+                  var heap_used=Math.round(gaugesJson["jvm.memory.heap.used"].value/1000000);
+                  var non_heap_used=Math.round(gaugesJson["jvm.memory.non-heap.used"].value/1000000);
+
+                  var heap_max=Math.round(gaugesJson["jvm.memory.heap.max"].value/1000000);
+                  var non_heap_max=Math.round(gaugesJson["jvm.memory.non-heap.max"].value/1000000);
+
+                  var memoryBarMetrics_data={
+                       init:[
+                               heap_init,
+                               non_heap_init,
+                               non_heap_init+heap_init
+                               ],
+                       used:[
+                               heap_used,
+                               non_heap_used,
+                               non_heap_used+heap_used
+                               ],
+                       max:[
+                               heap_max,
+                               non_heap_max,
+                               non_heap_max+heap_max
+                               ]
+                  };
+                  metricsChart.memoryBarMetrics(memoryBarMetrics_data);
+
+                  //Initializes the thread profile
+                  var threadsMetrics_data= [{value:gaugesJson["jvm.threads.runnable.count"].value, name:'Runnable'},
+                {value:gaugesJson["jvm.threads.timed_waiting.count"].value, name:'Timed waiting'},
+                {value:gaugesJson["jvm.threads.waiting.count"].value, name:'Waiting'},
+                {value:gaugesJson["jvm.threads.blocked.count"].value, name:'Blocked'}];
+                vm.threadNum=gaugesJson["jvm.threads.count"].value;
+                               metricsChart.threadsMetrics(threadsMetrics_data);
+
+                               //Initialize the Rest interface traffic map
+                               var restMetrics_data={restName:[],restCount:[]};        
+                                 $.each(testRestJson,function(name,value) {
+                                       if(name=="io.dropwizard.jetty.MutableServletContextHandler.connect-requests") return false;
+                               var nameArray=name.split(".");
+
+                                       restMetrics_data.restName.push(nameArray[nameArray.length-1]);
+                                       restMetrics_data.restCount.push(value.count);
+
+                               });
+                               
+
+                  metricsChart.restMetrics(restMetrics_data); 
+
+
+                  //Initialize the HTTP traffic
+                  var requestsMetrics_data={get:"",post:"",put:"",delete:"",other:""};
+                  requestsMetrics_data.get=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.get-requests"].count;
+                  requestsMetrics_data.post=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.post-requests"].count;
+                  requestsMetrics_data.put=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.put-requests"].count;
+                  requestsMetrics_data.delete=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.delete-requests"].count;
+                  requestsMetrics_data.other=testRestJson["io.dropwizard.jetty.MutableServletContextHandler.other-requests"].count;
+                  metricsChart.requestsMetrics(requestsMetrics_data);
+
+                  //Initialize the HTTP access list in detail
+                 $.each(testRestJson,function(name,value) {
+                       if(name.indexOf("org.eclipse.jetty.server.HttpConnectionFactory") == 0) return true;
+                       var obj=value;
+                       obj.name=name;
+                               vm.restArray.push(obj);
+                               });
+
+                       $('#restTable').DataTable({
+                             responsive: true,
+                                 destroy: true,
+                                 "oLanguage": vm.$dataTableLanguage
+                               });
+                  
+                                },
+                    error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                 
+                           vm.isErr=true;
+                         }
+                      });
+
+                       }                       
+                       
+
+       });
+avalon.scan();
+vm.initMetrics();
+
index e6b7da6..29bc7be 100644 (file)
@@ -1,19 +1,21 @@
 /*
 /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed 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
  *
  *
  * Licensed 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
+ *     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.
  *
  * 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
  */
-
 var metricsUtil = {};
 
 
 var metricsUtil = {};
 
 
index a0fd922..8593b46 100644 (file)
-/*\r
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-body {\r
-    background-color: #4d5b69!important;\r
-    font-family: "microsoft yahei";\r
-}\r
-\r
-.header.navbar {\r
-    width: 100%;\r
-    padding: 0 20px 0 20px;\r
-    margin: 0;\r
-    border: 0px;\r
-    padding: 0px;\r
-    box-shadow: none;\r
-    height: 42px;\r
-    min-height: 42px;\r
-}\r
-\r
-.header {\r
-    filter: none !important;\r
-    background-image: none !important;\r
-    background-color: #fff !important;\r
-}\r
-\r
-.header.navbar .navbar-brand {\r
-    display: inline-block;\r
-    margin-right: 0;\r
-    padding: 0;\r
-     width: 135px !important;\r
-    height: 42px !important;\r
-     background-color: #238dfa !important;\r
-    margin-top: 0 !important;\r
-}\r
-\r
-.page-sidebar-closed .header.navbar .navbar-brand {\r
-    width: 35px !important;\r
-}\r
-\r
-.header.navbar .navbar-brand img {\r
-    margin-left: 10px !important;\r
-    width: 80%;\r
-    margin-top: 7px;\r
-}\r
-\r
-.page-sidebar-closed .header.navbar .navbar-brand img {\r
-    display: none !important;\r
-}\r
-\r
-.page-sidebar{\r
-       float:left;\r
-       width: 135px ;\r
-       background-color: #4d5b69;\r
-}\r
-\r
-.page-sidebar-closed  .page-sidebar{\r
\r
-       width: 35px  !important;\r
-\r
-}\r
-\r
-.page-container {\r
-    margin: 0px;\r
-    padding: 0px;\r
-    position: relative;\r
-}\r
-\r
-.sideBar {\r
-    width: 132px;\r
-    background-color: #4D5B69;\r
-}\r
-\r
-.page-sidebar-closed  .sideBar{\r
-width: 35px  !important;\r
-background-color: #4d5b69!important;\r
-\r
-}\r
-\r
-.sideBar .menu {\r
-    width: 100%;\r
-    height: 128px;\r
-    color: #aaa;\r
-    font-size: 16px;\r
-    text-align: center;\r
-    /* border-bottom: 2px solid #536372; */\r
-    border-top: 1px solid #536372;\r
-    /* border-bottom-style: groove; */\r
-}\r
-.page-sidebar-closed  .sideBar .menu {\r
-height: 35px  !important;\r
-border-bottom:0px;\r
-}\r
-\r
-.sideBar .menu i.icon.fa{\r
-    font-size: 32px;\r
-    margin-bottom: 7px\r
-}\r
-\r
-\r
-\r
-.page-sidebar-closed  .sideBar .menu i.icon.fa{\r
-    font-size: 18px;\r
\r
-}\r
-\r
-\r
-\r
-\r
-\r
-.sideBar .menu i.icon {\r
-    width: 36px;\r
-    height: 36px;\r
-}\r
-\r
-.page-sidebar-closed .sideBar .menu i.icon {\r
-    width: 18px;\r
-    height: 18px;\r
-} \r
-.sideBar .menu i {\r
-    margin-top: 25%;\r
-}\r
-\r
-.sideBar a.router-link-active .menu {\r
-    color: #fff;\r
-    background-color: #424e57;\r
-    width: 132px;\r
-}\r
-\r
-.page-sidebar-closed .sideBar a.router-link-active .menu{\r
-width: 35px  !important;\r
-height: 35px;\r
-}\r
-\r
-.page-sidebar-closed  .sideBar a label{\r
-  display:none\r
\r
-}\r
-\r
-.sideBar a{\r
-text-decoration: none;\r
-cursor:pointer ;\r
-}\r
-\r
-.sideBar a:hover .menu {\r
-    color: #fff;\r
-    background-color: #424e57;\r
-    width: 132px;\r
-\r
-}\r
-\r
-.page-sidebar-closed  .sideBar a:hover .menu{\r
-width: 35px  !important;\r
-}\r
-\r
-.sideBar a.router-link-active .menu .menu-left {\r
-    width: 2px;\r
-    height: 126px;\r
-    float: left;\r
-    background-color: #238ff9;\r
-}\r
-\r
-.page-sidebar-closed .sideBar a.router-link-active .menu .menu-left {\r
-\r
-    height: 33px;\r
-\r
-}\r
-\r
-\r
-.sidebar-toggler {\r
-    background-image: url(../img/sidebar-toggler-grey.jpg);\r
-    background-color: #0f5179;\r
-     margin-top: 15px;\r
-         margin-left: 95px;\r
-      margin-bottom: 5px;\r
-      cursor: pointer;\r
-    opacity: 0.5;\r
-    filter: alpha(opacity=50);\r
-    width: 29px;\r
-    height: 29px;\r
-    background-repeat: no-repeat;\r
-}\r
-\r
-.page-sidebar-closed .sidebar-toggler{\r
- margin-left: 3px;\r
-}\r
-\r
-.sideBar  a  .selected{\r
-display:none;\r
-       }\r
-\r
-.sideBar  a.router-link-active  .selected{\r
-           display: block;\r
-    float: right;\r
-    margin-top: -25px;\r
-    background: none;\r
-    width: 0;\r
-    height: 0;\r
-    border-style: solid;\r
-    border-top: 12px double transparent;\r
-    border-bottom: 12px double transparent;\r
-    border-left: 0;\r
-    border-right: 8px solid #F1F3FA;  \r
-\r
-}\r
-\r
-.chineseTitle{\r
-    margin: 0;\r
-    float: left;\r
-    margin-left: 20px;\r
-    font-weight: bold;\r
-    padding-top: 8px;\r
-    letter-spacing: 2px;\r
-    font-size: 20px;\r
-    font-family: 'Microsoft Yahei', sans-serif;\r
-    /* text-shadow: -1px 1px rgba(221, 221, 221, 1); */\r
-}\r
-\r
-.englishTitle{\r
-           margin: 0;\r
-           float: left;\r
-           margin-left: 10px;\r
-           font-family: Arial;\r
-           font-size: 14px;\r
-           padding-top: 15px;\r
-}\r
-\r
-.page-content {\r
-       margin-top: 0px;\r
-       padding: 0px;\r
-       background-color: #9C5A5A !important;\r
-       margin-left: 135px;\r
-}\r
-\r
-.page-sidebar-closed .page-content{\r
-\r
-  margin-left: 35px;\r
-}\r
-\r
-.page-content-body {\r
-    padding-left: 10px;\r
-    padding-right: 10px;\r
-    padding-top: 8px;\r
-    float:left;\r
-    width: 100%;\r
-    background-color: #f1f3fa;\r
-}\r
-\r
-.page-sidebar-closed  .page-content-body {\r
-    padding-left: 0px;\r
-    padding-right: 5px;\r
-    padding-top: 5px;\r
-\r
-}\r
-\r
-label {\r
-\r
-    font-weight: normal; \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
+body {
+    background-color: #4d5b69!important;
+    font-family: "microsoft yahei";
+}
+
+.header.navbar {
+    width: 100%;
+    padding: 0 20px 0 20px;
+    margin: 0;
+    border: 0px;
+    padding: 0px;
+    box-shadow: none;
+    height: 42px;
+    min-height: 42px;
+}
+
+.header {
+    filter: none !important;
+    background-image: none !important;
+    background-color: #fff !important;
+}
+
+.header.navbar .navbar-brand {
+    display: inline-block;
+    margin-right: 0;
+    padding: 0;
+     width: 135px !important;
+    height: 42px !important;
+     background-color: #238dfa !important;
+    margin-top: 0 !important;
+}
+
+.page-sidebar-closed .header.navbar .navbar-brand {
+    width: 35px !important;
+}
+
+.header.navbar .navbar-brand img {
+    margin-left: 10px !important;
+    width: 80%;
+    margin-top: 7px;
+}
+
+.page-sidebar-closed .header.navbar .navbar-brand img {
+    display: none !important;
+}
+
+.page-sidebar{
+       float:left;
+       width: 135px ;
+       background-color: #4d5b69;
+}
+
+.page-sidebar-closed  .page-sidebar{
+       width: 35px  !important;
+
+}
+
+.page-container {
+    margin: 0px;
+    padding: 0px;
+    position: relative;
+}
+
+.sideBar {
+    width: 132px;
+    background-color: #4D5B69;
+}
+
+.page-sidebar-closed  .sideBar{
+width: 35px  !important;
+background-color: #4d5b69!important;
+
+}
+
+.sideBar .menu {
+    width: 100%;
+    height: 128px;
+    color: #aaa;
+    font-size: 16px;
+    text-align: center;
+    /* border-bottom: 2px solid #536372; */
+    border-top: 1px solid #536372;
+    /* border-bottom-style: groove; */
+}
+.page-sidebar-closed  .sideBar .menu {
+height: 35px  !important;
+border-bottom:0px;
+}
+
+.sideBar .menu i.icon.fa{
+    font-size: 32px;
+    margin-bottom: 7px
+}
+
+
+
+.page-sidebar-closed  .sideBar .menu i.icon.fa{
+    font-size: 18px;
+}
+
+
+
+
+
+.sideBar .menu i.icon {
+    width: 36px;
+    height: 36px;
+}
+
+.page-sidebar-closed .sideBar .menu i.icon {
+    width: 18px;
+    height: 18px;
+} 
+.sideBar .menu i {
+    margin-top: 25%;
+}
+
+.sideBar a.router-link-active .menu {
+    color: #fff;
+    background-color: #424e57;
+    width: 132px;
+}
+
+.page-sidebar-closed .sideBar a.router-link-active .menu{
+width: 35px  !important;
+height: 35px;
+}
+
+.page-sidebar-closed  .sideBar a label{
+  display:none
+}
+
+.sideBar a{
+text-decoration: none;
+cursor:pointer ;
+}
+
+.sideBar a:hover .menu {
+    color: #fff;
+    background-color: #424e57;
+    width: 132px;
+
+}
+
+.page-sidebar-closed  .sideBar a:hover .menu{
+width: 35px  !important;
+}
+
+.sideBar a.router-link-active .menu .menu-left {
+    width: 2px;
+    height: 126px;
+    float: left;
+    background-color: #238ff9;
+}
+
+.page-sidebar-closed .sideBar a.router-link-active .menu .menu-left {
+
+    height: 33px;
+
+}
+
+
+.sidebar-toggler {
+    background-image: url(../img/sidebar-toggler-grey.jpg);
+    background-color: #0f5179;
+     margin-top: 15px;
+         margin-left: 95px;
+      margin-bottom: 5px;
+      cursor: pointer;
+    opacity: 0.5;
+    filter: alpha(opacity=50);
+    width: 29px;
+    height: 29px;
+    background-repeat: no-repeat;
+}
+
+.page-sidebar-closed .sidebar-toggler{
+ margin-left: 3px;
+}
+
+.sideBar  a  .selected{
+display:none;
+       }
+
+.sideBar  a.router-link-active  .selected{
+           display: block;
+    float: right;
+    margin-top: -25px;
+    background: none;
+    width: 0;
+    height: 0;
+    border-style: solid;
+    border-top: 12px double transparent;
+    border-bottom: 12px double transparent;
+    border-left: 0;
+    border-right: 8px solid #F1F3FA;  
+
+}
+
+.chineseTitle{
+    margin: 0;
+    float: left;
+    margin-left: 20px;
+    font-weight: bold;
+    padding-top: 8px;
+    letter-spacing: 2px;
+    font-size: 20px;
+    font-family: 'Microsoft Yahei', sans-serif;
+    /* text-shadow: -1px 1px rgba(221, 221, 221, 1); */
+}
+
+.englishTitle{
+           margin: 0;
+           float: left;
+           margin-left: 10px;
+           font-family: Arial;
+           font-size: 14px;
+           padding-top: 15px;
+}
+
+.page-content {
+       margin-top: 0px;
+       padding: 0px;
+       background-color: #9C5A5A !important;
+       margin-left: 135px;
+}
+
+.page-sidebar-closed .page-content{
+
+  margin-left: 35px;
+}
+
+.page-content-body {
+    padding-left: 10px;
+    padding-right: 10px;
+    padding-top: 8px;
+    float:left;
+    width: 100%;
+    background-color: #f1f3fa;
+}
+
+.page-sidebar-closed  .page-content-body {
+    padding-left: 0px;
+    padding-right: 5px;
+    padding-top: 5px;
+
+}
+
+label {
+
+    font-weight: normal; 
+}
index 99a2966..9ddbaf6 100644 (file)
-/*\r
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-body {\r
-  color: #333;\r
-  font-family: "Microsoft yahei", Verdana, Arial, Helvetica, sans-serif !important;\r
-  padding: 0px !important;\r
-  margin: 0px !important;\r
-  direction: ltr;\r
-  background-color: #ffffff !important; \r
-}\r
-\r
-/*.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {\r
-    cursor: auto;\r
-\r
-    }*/\r
-.modal-footer {\r
-    margin-top:0px; \r
-  }\r
-.form-group {\r
-    margin-bottom: 5px;\r
-}\r
-\r
-.modal-body {\r
-    padding: 10px;\r
-}\r
-\r
-.row{\r
-     margin-left: 0px; \r
-  margin-right: 0px; \r
-}\r
-\r
-select {\r
-  border-width: 1px;\r
-  padding: 4px 1px;\r
-  border-radius: 4px;\r
-}\r
-\r
-.navbar {\r
-  overflow: visible;\r
-  margin-bottom: 0px;\r
-\r
-}\r
-\r
-#top-bar, #top-bar small, #top-bar a {\r
-  text-shadow: 0px -1px 0px #182127;\r
-  color: #ffffff;\r
-}\r
-\r
-.span12{\r
-  margin-top:5px;\r
-}\r
-\r
-#title {\r
-  color: #ffffff;\r
-  font-weight: bolder;\r
-}\r
-\r
-#top-bar {\r
-  background-color: #363F45;\r
-  background-image: -moz-linear-gradient(top, #545d63, #182127);\r
-  background-image: -ms-linear-gradient(top, #545d63, #182127);\r
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545d63), to(#182127));\r
-  background-image: -webkit-linear-gradient(top, #545d63, #182127);\r
-  background-image: -o-linear-gradient(top, #545d63, #182127);\r
-  background-image: linear-gradient(top, #545d63, #182127);\r
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#545d63', endColorstr = '#182127', GradientType = 0);\r
-  -webkit-border-radius: 0;\r
-  -moz-border-radius: 0;\r
-  border-radius: 0;\r
-  height: 55px;\r
-}\r
-\r
-.navbar-inner {\r
-  padding-left: 20px;\r
-  padding-right: 20px;\r
-  background-color: #2c2c2c;\r
-  background-image: -moz-linear-gradient(top, #333333, #222222);\r
-  background-image: -ms-linear-gradient(top, #333333, #222222);\r
-  background-image: -o-linear-gradient(top, #333333, #222222);\r
-  background-image: linear-gradient(top, #333333, #222222);\r
-  background-repeat: repeat-x;\r
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);\r
-  -webkit-border-radius: 4px;\r
-  -moz-border-radius: 4px;\r
-  border-radius: 4px;\r
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);\r
-  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);\r
-}\r
-\r
-\r
-\r
-.container-fluid {\r
-  background-color: #fff;\r
-}\r
-\r
-div[data-name="route_zone"]  {\r
-  background-color: #fff;\r
-  margin-bottom: 15px;\r
-}\r
-\r
-\r
-\r
-p[tooltip], div[tooltip], td[tooltip], span[tooltip]{\r
-  overflow: hidden;\r
-  text-overflow: ellipsis;\r
-  white-space:nowrap; \r
-}\r
-\r
-.add-route-btn{\r
-  background: #fff;\r
-  color: #ccc;\r
-  height: 115px;\r
-  margin: 10px;\r
-  padding-top: 22px;\r
-  text-align: center;\r
-  text-decoration: none;\r
-  width: 130px;\r
-  border:1px dashed #aaa;\r
-  float:left;\r
-\r
-}\r
-\r
-.add-route-btn:hover{\r
-  color:#3276b1;\r
-  cursor: pointer;\r
-}\r
-\r
-\r
-.add-route-btn span {\r
-  display: block;\r
-  margin-left:5px;\r
-  margin-right:5px;\r
-  margin-top:5px;\r
-  color: #444;\r
-}\r
-\r
-\r
-.quick-btn {\r
-  background: #eee;\r
-  box-shadow: 0 0 0 1px #f8f8f8 inset,0 0 0 1px #ccc;\r
-  color: #444;\r
- height: 110px;\r
-  margin: 10px;\r
-  padding-top: 1pc;\r
-  text-align: center;\r
-  text-decoration: none;\r
-  width: 120px;\r
-  float:left;\r
-\r
-}\r
-div[data-name="route_zone"]  .active{\r
-       color:#fff;\r
-       background-color:#444;\r
-       cursor: pointer;\r
-}\r
-\r
-div[data-name="route_zone"] .sparkline .route-valid {\r
-    color: #62AAF5;\r
-  }\r
-\r
-  div[data-name="route_zone"] .sparkline .route-invalid {\r
-    color:rgba(128, 128, 128, 0.73);\r
-  }\r
-\r
-div[data-name="route_zone"]  .active .sparkline i{\r
-    color:#C3DDF4;\r
-  }\r
-\r
-\r
-\r
-.quick-btn:hover{\r
-\r
-  box-shadow: 0 0 0 1px #f8f8f8 inset,0 0 0 1px #636363;\r
-  cursor: pointer;\r
-}\r
-\r
-.quick-btn span {\r
-  display: block;\r
-  margin-left:5px;\r
-  margin-right:5px;\r
-  margin-top:10px;\r
-\r
-}\r
-\r
-.route-ip{\r
-         font-size: 12px;\r
-}\r
-\r
-\r
-.progressList{\r
-       margin-top: 15px;\r
-       margin-left:15px;\r
-       width:90%\r
-}\r
-\r
-.processContent{\r
-  display: inline-block;margin-right:5px\r
-}\r
-\r
-.nav.nav-pills.nav-stacked > li.active > a, .nav.nav-pills.nav-stacked > li.active > a:hover,.nav.nav-pills.nav-stacked > li > a:hover {\r
-  background-color: #f6f6f6;\r
-  border-left-color: #3c8dbc;\r
-  color: #444;\r
-}\r
-\r
-\r
-.nav.nav-pills.nav-stacked > li > a {\r
-  border-top: 0;\r
-  border-left: 3px solid transparent;\r
-  -webkit-border-radius: 0;\r
-  -moz-border-radius: 0;\r
-  border-radius: 0;\r
-  color: #444;\r
-  height:46px;\r
-}\r
-.nav.nav-pills > li.active > a {\r
-  font-weight: 600;\r
-}\r
-\r
-.btn-xs {\r
-  color: #333;\r
-  font-size: 14px;\r
-}\r
-.grey {\r
-  background-color: #e5e5e5;\r
-  color: #333;\r
-}\r
-.btn-xs, .btn-group-xs>.btn {\r
-  padding: 1px 5px;\r
-  font-size: 12px;\r
-  line-height: 1.5;\r
-  border-radius: 3px;\r
-}\r
-\r
-.control-label .required {\r
-  color: #e02222;\r
-  font-size: 12px;\r
-  padding-left: 2px;\r
-}\r
-\r
-.nav>li>a{\r
-  /*padding:10px 5px;*/\r
-}\r
-\r
-.process-btn button{\r
-  padding:3px 8px\r
-}\r
-\r
-pre.prettyprint {\r
-   color:#000;\r
-   height: 450px;\r
-}\r
-\r
-pre {\r
-  font: 14px/22px 'courier new';\r
-  word-break: break-all;\r
-  word-wrap: break-word;\r
-  border: 0px;\r
-  background-color:#fff;\r
-  padding: 5px 5px;\r
-}\r
-\r
-.atv {\r
-  color: #114B7E;\r
-}\r
-\r
-\r
-\r
-.stats_box {\r
-  display: inline-block;\r
-  list-style: none outside none;\r
-  margin-left: 0;\r
-  margin-top: 10px;\r
-  padding: 0;\r
-    /*float: left;*/\r
-}\r
-\r
-.stats_box .routeDiv{\r
-  background: #F1F3FA;\r
-  /* box-shadow: 0 0 0 1px #f8f8f8 inset,0 0 0 1px #ccc; */\r
-  display: inline-block;\r
-  line-height: 18px;\r
-  margin: 0 10px 10px;\r
-  padding: 0 8px;\r
-  float: left;\r
-  height: 125px;\r
-  border: 1px solid #E0E0E0;\r
-  /* border-radius: 10px; */\r
-}\r
-\r
-.routeDiv:hover{\r
-\r
- border:1px solid #cfcfcf;\r
-  cursor: pointer;\r
-  box-shadow:-webkit-box-shadow:0 5px 20px rgba(0,0,0,0.1);\r
-    box-shadow:0 5px 20px rgba(0,0,0,0.1);   \r
-}\r
-\r
-\r
-.sparkline {\r
- width: 60px;\r
- border-right: 1px solid #dcdcdc;\r
-  box-shadow: 1px 0 0 0 #fff;\r
-  float: left;\r
-  margin-right: 9pt;\r
-  padding: 25px 10px 0 4px;\r
-  line-height: 70px\r
-}\r
-\r
-.table-bordered > thead > tr > th{\r
-    border-bottom-width: 0;\r
-}\r
-\r
-\r
-\r
-.stats_box .stat_text {\r
-  float: left;\r
-  font-size: 9pt;\r
-  padding: 10px 0px 10px 0;\r
-  text-align: left;\r
-  width: 120px;\r
-  position: relative;\r
-}\r
-\r
-.stats_box .stat_text .percent {\r
-  color: #444;\r
-  float: right;\r
-  font-size: 20px;\r
-  font-weight: 700;\r
-  position: absolute;\r
-  right: 0;\r
-  top: 17px;\r
-}\r
-\r
-.stats_box .stat_text strong {\r
-  display: block;\r
-  font-size: 16px\r
-;  margin-bottom: 10px;\r
-  margin-top: 5px;\r
-\r
-}\r
-\r
-.stat_text b{\r
-  font-weight: 100;\r
-}\r
-\r
-.stat_text  span,.stats_box span{\r
-  display: block;\r
-  margin-bottom:5px;\r
-}\r
-\r
-\r
-\r
-.stats_box span a{ \r
-padding: 0px 6px;\r
-margin-right:3px;\r
-  }\r
-\r
-\r
-  \r
-  span.response_throbber {\r
-  background-image: url('../img/throbber.gif');\r
-  width: 128px;\r
-  height: 16px;\r
-  display: block;\r
-  clear: none;\r
-  float: left;\r
-  margin-top: 50px;\r
-}\r
-\r
-div.separator div {\r
-  text-align: center;\r
-  line-height: 0;\r
-}\r
-\r
-.titlefont {\r
-  font-size: 16px;\r
-}\r
-\r
-.separator-line {\r
-  height: 1px;\r
-  width: 100%;\r
-  background: #ddd;\r
-  overflow: hidden;\r
-  margin-bottom: 15px;\r
-  margin-top: 6px;\r
-  opacity: 0.6;\r
-}\r
-\r
-\r
-\r
-.serverInput{\r
-  display: inline;\r
-  margin-right: 5px;\r
-}\r
-\r
-.apiRouteInput{\r
-  float:left;\r
-    margin-right: 10px\r
-}\r
-  \r
-  \r
-.input-group {\r
-  position: relative;\r
-  display: table;\r
-  border-collapse: separate;\r
-}\r
-\r
- .input-group-btn-vertical {\r
-  position: relative;\r
-  white-space: nowrap;\r
-  width: 10px;\r
-  vertical-align: middle;\r
-  display: table-cell;\r
-}\r
-\r
-.input-group-btn-vertical .bootstrap-touchspin-up {\r
-  border-radius: 0;\r
-  border-top-right-radius: 4px;\r
-}\r
-\r
-.input-group-btn-vertical>.btn {\r
-  display: block;\r
-  float: none;\r
-  width: 100%;\r
-  max-width: 100%;\r
-  padding: 8px 10px;\r
-  margin-left: -1px;\r
-  position: relative;\r
-}\r
-\r
-.input-group-btn-vertical i {\r
-  position: absolute;\r
-  top: 3px;\r
-  left: 5px;\r
-  font-size: 9px;\r
-  font-weight: 400;\r
-}\r
-\r
-.input-group-btn-vertical .bootstrap-touchspin-down {\r
-  margin-top: -2px;\r
-  border-radius: 0;\r
-  border-bottom-right-radius: 4px;\r
-}\r
-\r
-\r
-\r
-.small_btn {\r
-  padding: 0px 6px;\r
-  margin-right: 3px;\r
-}\r
-\r
-.item-tip {\r
-  position: absolute;\r
-  color: #999999;\r
-  top: 10px;\r
-  left: 20px;\r
-  transition: all linear .2s;\r
-  background-color: #fff;\r
-  padding: 0px 3px;\r
-  font-size: 12px;\r
-}\r
-.item-tip-focus {top: -8px;font-size: 12px;color: #428bca;}\r
-\r
-.form-input-focus {border-color: #428bca;outline: 0;}\r
-\r
-.tip_color {\r
-    color: #f0ad4e;\r
-    cursor: help;\r
-}\r
-\r
-.item-tip-none{display: none}\r
-\r
-.tipArea{\r
-  border-bottom: 1px solid #d4d4d4;\r
-    width: 85%;\r
-    text-align: center;\r
-    margin-bottom: 20px;\r
-    margin-left: 30px;\r
-    font-weight: bold;\r
-        position: relative;\r
-\r
-}\r
-\r
-.tipArea:after, .tipArea:before {\r
-    border: 10px solid transparent;\r
-    border-top: 10px solid #fff;\r
-    width: 0;\r
-    height: 0;\r
-    right: 241px;\r
-    top: 20px;\r
-    content: ' ';\r
-    position: absolute;\r
-}\r
-\r
-.tipArea:before {\r
-    border-top-color: #d4d4d4;\r
-    left: 230px;\r
-    top: 21px;\r
-}\r
-\r
-\r
-.help-block {\r
-    margin-top: 5px;\r
-    margin-bottom: 5px;\r
-  }\r
-\r
-.form-title {\r
-    padding-left: 8px;\r
-    padding-right: 8px;\r
-    padding-top: 5px;\r
-    padding-bottom: 5px;\r
-    margin-bottom: 10px;\r
-    margin-left:10px;\r
-    border-left: 2px solid #5b9bd1;\r
-    color: #1A78CA;\r
-    font-size: 16px;\r
-}\r
-\r
-.form-title a{\r
-      cursor: pointer;\r
-}\r
-\r
-.panel-tools {\r
-    display: inline-block;\r
-    float: right;\r
-    margin-top: 0;\r
-    padding: 0;\r
-    position: relative;\r
-}\r
-\r
-.panel-tools a {\r
-    margin-left: 5px;\r
-    color: #9d9fa2;\r
-    cursor: pointer;\r
-}\r
-\r
-.panel-tools  a:hover{\r
-  color: #34495e;\r
-  text-decoration: none;\r
-}\r
-\r
-.table-responsive{\r
-      margin-top: 15px;\r
-}\r
-\r
-.btn-s  {\r
-    padding: 0px 6px;\r
-    margin-right: 3px;\r
-}\r
-\r
-\r
-table.dataTable thead .sorting,\r
-table.dataTable thead .sorting_asc,\r
-table.dataTable thead .sorting_desc,\r
-table.dataTable thead .sorting_asc_disabled,\r
-table.dataTable thead .sorting_desc_disabled {\r
-    background: 0 0;\r
-}\r
-\r
-table.dataTable thead .sorting_asc:after {\r
-    content: "\f0de";\r
-    float: right;\r
-    font-family: fontawesome;\r
-    color:#357ebd;\r
-}\r
-\r
-table.dataTable thead .sorting_desc:after {\r
-    content: "\f0dd";\r
-    float: right;\r
-    font-family: fontawesome;\r
-    color:#357ebd;\r
-}\r
-\r
-table.dataTable thead .sorting:after {\r
-    content: "\f0dc";\r
-    float: right;\r
-    font-family: fontawesome;\r
-    color: rgba(50,50,50,.5);\r
-}\r
-\r
-\r
-.hostTableDiv{\r
-    height: 100px;\r
-    overflow: auto;\r
-  \r
-  }\r
-\r
-.hostTable{\r
- font-size: 12px;\r
- margin-bottom: 0px;\r
-}\r
-\r
-.hostTable>thead>tr>th, .hostTable>tbody>tr>th, .hostTable>tfoot>tr>th, .hostTable>thead>tr>td, .hostTable>tbody>tr>td, .hostTable>tfoot>tr>td {\r
-    padding: 6px;\r
-   \r
-}\r
-\r
-\r
-td.details-control {\r
-    background: url('../img/details_open.png') no-repeat center center;\r
-    cursor: pointer;\r
-}\r
-tr.shown td.details-control {\r
-    background: url('../img/details_close.png') no-repeat center center;\r
-}\r
-\r
-\r
-input[type="checkbox"] {\r
-    -webkit-appearance: none;\r
-    background: #fff url(../img/checkbox-init.png);\r
-    height: 18px;\r
-    vertical-align: middle;\r
-    width: 18px;\r
-  margin-bottom:5px;\r
-  margin-right:5px;\r
-}\r
-\r
-input[type="checkbox"]:checked {\r
-    -webkit-appearance: none;\r
-    background: #fff url(../img/checkbox-checked.png);\r
-    height: 18px;\r
-    vertical-align: middle;\r
-    width: 18px;\r
-}\r
-\r
-input[type="checkbox"]:focus,\r
-input[type="checkbox"]:hover {\r
-    outline: none;\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
+body {
+  color: #333;
+  font-family: "Microsoft yahei", Verdana, Arial, Helvetica, sans-serif !important;
+  padding: 0px !important;
+  margin: 0px !important;
+  direction: ltr;
+  background-color: #ffffff !important; 
+}
+
+/*.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
+    cursor: auto;
+
+    }*/
+.modal-footer {
+    margin-top:0px; 
+  }
+.form-group {
+    margin-bottom: 5px;
+}
+
+.modal-body {
+    padding: 10px;
+}
+
+.row{
+     margin-left: 0px; 
+  margin-right: 0px; 
+}
+
+select {
+  border-width: 1px;
+  padding: 4px 1px;
+  border-radius: 4px;
+}
+
+.navbar {
+  overflow: visible;
+  margin-bottom: 0px;
+
+}
+
+#top-bar, #top-bar small, #top-bar a {
+  text-shadow: 0px -1px 0px #182127;
+  color: #ffffff;
+}
+
+.span12{
+  margin-top:5px;
+}
+
+#title {
+  color: #ffffff;
+  font-weight: bolder;
+}
+
+#top-bar {
+  background-color: #363F45;
+  background-image: -moz-linear-gradient(top, #545d63, #182127);
+  background-image: -ms-linear-gradient(top, #545d63, #182127);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545d63), to(#182127));
+  background-image: -webkit-linear-gradient(top, #545d63, #182127);
+  background-image: -o-linear-gradient(top, #545d63, #182127);
+  background-image: linear-gradient(top, #545d63, #182127);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#545d63', endColorstr = '#182127', GradientType = 0);
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  height: 55px;
+}
+
+.navbar-inner {
+  padding-left: 20px;
+  padding-right: 20px;
+  background-color: #2c2c2c;
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+
+
+
+.container-fluid {
+  background-color: #fff;
+}
+
+div[data-name="route_zone"]  {
+  background-color: #fff;
+  margin-bottom: 15px;
+}
+
+
+
+p[tooltip], div[tooltip], td[tooltip], span[tooltip]{
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space:nowrap; 
+}
+
+.add-route-btn{
+  background: #fff;
+  color: #ccc;
+  height: 115px;
+  margin: 10px;
+  padding-top: 22px;
+  text-align: center;
+  text-decoration: none;
+  width: 130px;
+  border:1px dashed #aaa;
+  float:left;
+
+}
+
+.add-route-btn:hover{
+  color:#3276b1;
+  cursor: pointer;
+}
+
+
+.add-route-btn span {
+  display: block;
+  margin-left:5px;
+  margin-right:5px;
+  margin-top:5px;
+  color: #444;
+}
+
+
+.quick-btn {
+  background: #eee;
+  box-shadow: 0 0 0 1px #f8f8f8 inset,0 0 0 1px #ccc;
+  color: #444;
+ height: 110px;
+  margin: 10px;
+  padding-top: 1pc;
+  text-align: center;
+  text-decoration: none;
+  width: 120px;
+  float:left;
+
+}
+div[data-name="route_zone"]  .active{
+       color:#fff;
+       background-color:#444;
+       cursor: pointer;
+}
+
+div[data-name="route_zone"] .sparkline .route-valid {
+    color: #62AAF5;
+  }
+
+  div[data-name="route_zone"] .sparkline .route-invalid {
+    color:rgba(128, 128, 128, 0.73);
+  }
+
+div[data-name="route_zone"]  .active .sparkline i{
+    color:#C3DDF4;
+  }
+
+
+
+.quick-btn:hover{
+
+  box-shadow: 0 0 0 1px #f8f8f8 inset,0 0 0 1px #636363;
+  cursor: pointer;
+}
+
+.quick-btn span {
+  display: block;
+  margin-left:5px;
+  margin-right:5px;
+  margin-top:10px;
+
+}
+
+.route-ip{
+         font-size: 12px;
+}
+
+
+.progressList{
+       margin-top: 15px;
+       margin-left:15px;
+       width:90%
+}
+
+.processContent{
+  display: inline-block;margin-right:5px
+}
+
+.nav.nav-pills.nav-stacked > li.active > a, .nav.nav-pills.nav-stacked > li.active > a:hover,.nav.nav-pills.nav-stacked > li > a:hover {
+  background-color: #f6f6f6;
+  border-left-color: #3c8dbc;
+  color: #444;
+}
+
+
+.nav.nav-pills.nav-stacked > li > a {
+  border-top: 0;
+  border-left: 3px solid transparent;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  color: #444;
+  height:46px;
+}
+.nav.nav-pills > li.active > a {
+  font-weight: 600;
+}
+
+.btn-xs {
+  color: #333;
+  font-size: 14px;
+}
+.grey {
+  background-color: #e5e5e5;
+  color: #333;
+}
+.btn-xs, .btn-group-xs>.btn {
+  padding: 1px 5px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+
+.control-label .required {
+  color: #e02222;
+  font-size: 12px;
+  padding-left: 2px;
+}
+
+.nav>li>a{
+  /*padding:10px 5px;*/
+}
+
+.process-btn button{
+  padding:3px 8px
+}
+
+pre.prettyprint {
+   color:#000;
+   height: 450px;
+}
+
+pre {
+  font: 14px/22px 'courier new';
+  word-break: break-all;
+  word-wrap: break-word;
+  border: 0px;
+  background-color:#fff;
+  padding: 5px 5px;
+}
+
+.atv {
+  color: #114B7E;
+}
+
+
+
+.stats_box {
+  display: inline-block;
+  list-style: none outside none;
+  margin-left: 0;
+  margin-top: 10px;
+  padding: 0;
+    /*float: left;*/
+}
+
+.stats_box .routeDiv{
+  background: #F1F3FA;
+  /* box-shadow: 0 0 0 1px #f8f8f8 inset,0 0 0 1px #ccc; */
+  display: inline-block;
+  line-height: 18px;
+  margin: 0 10px 10px;
+  padding: 0 8px;
+  float: left;
+  height: 125px;
+  border: 1px solid #E0E0E0;
+  /* border-radius: 10px; */
+}
+
+.routeDiv:hover{
+
+ border:1px solid #cfcfcf;
+  cursor: pointer;
+  box-shadow:-webkit-box-shadow:0 5px 20px rgba(0,0,0,0.1);
+    box-shadow:0 5px 20px rgba(0,0,0,0.1);   
+}
+
+
+.sparkline {
+ width: 60px;
+ border-right: 1px solid #dcdcdc;
+  box-shadow: 1px 0 0 0 #fff;
+  float: left;
+  margin-right: 9pt;
+  padding: 25px 10px 0 4px;
+  line-height: 70px
+}
+
+.table-bordered > thead > tr > th{
+    border-bottom-width: 0;
+}
+
+
+
+.stats_box .stat_text {
+  float: left;
+  font-size: 9pt;
+  padding: 10px 0px 10px 0;
+  text-align: left;
+  width: 120px;
+  position: relative;
+}
+
+.stats_box .stat_text .percent {
+  color: #444;
+  float: right;
+  font-size: 20px;
+  font-weight: 700;
+  position: absolute;
+  right: 0;
+  top: 17px;
+}
+
+.stats_box .stat_text strong {
+  display: block;
+  font-size: 16px
+;  margin-bottom: 10px;
+  margin-top: 5px;
+
+}
+
+.stat_text b{
+  font-weight: 100;
+}
+
+.stat_text  span,.stats_box span{
+  display: block;
+  margin-bottom:5px;
+}
+
+
+
+.stats_box span a{ 
+padding: 0px 6px;
+margin-right:3px;
+  }
+
+
+  
+  span.response_throbber {
+  background-image: url('../img/throbber.gif');
+  width: 128px;
+  height: 16px;
+  display: block;
+  clear: none;
+  float: left;
+  margin-top: 50px;
+}
+
+div.separator div {
+  text-align: center;
+  line-height: 0;
+}
+
+.titlefont {
+  font-size: 16px;
+}
+
+.separator-line {
+  height: 1px;
+  width: 100%;
+  background: #ddd;
+  overflow: hidden;
+  margin-bottom: 15px;
+  margin-top: 6px;
+  opacity: 0.6;
+}
+
+
+
+.serverInput{
+  display: inline;
+  margin-right: 5px;
+}
+
+.apiRouteInput{
+  float:left;
+    margin-right: 10px
+}
+  
+  
+.input-group {
+  position: relative;
+  display: table;
+  border-collapse: separate;
+}
+
+ .input-group-btn-vertical {
+  position: relative;
+  white-space: nowrap;
+  width: 10px;
+  vertical-align: middle;
+  display: table-cell;
+}
+
+.input-group-btn-vertical .bootstrap-touchspin-up {
+  border-radius: 0;
+  border-top-right-radius: 4px;
+}
+
+.input-group-btn-vertical>.btn {
+  display: block;
+  float: none;
+  width: 100%;
+  max-width: 100%;
+  padding: 8px 10px;
+  margin-left: -1px;
+  position: relative;
+}
+
+.input-group-btn-vertical i {
+  position: absolute;
+  top: 3px;
+  left: 5px;
+  font-size: 9px;
+  font-weight: 400;
+}
+
+.input-group-btn-vertical .bootstrap-touchspin-down {
+  margin-top: -2px;
+  border-radius: 0;
+  border-bottom-right-radius: 4px;
+}
+
+
+
+.small_btn {
+  padding: 0px 6px;
+  margin-right: 3px;
+}
+
+.item-tip {
+  position: absolute;
+  color: #999999;
+  top: 10px;
+  left: 20px;
+  transition: all linear .2s;
+  background-color: #fff;
+  padding: 0px 3px;
+  font-size: 12px;
+}
+.item-tip-focus {top: -8px;font-size: 12px;color: #428bca;}
+
+.form-input-focus {border-color: #428bca;outline: 0;}
+
+.tip_color {
+    color: #f0ad4e;
+    cursor: help;
+}
+
+.item-tip-none{display: none}
+
+.tipArea{
+  border-bottom: 1px solid #d4d4d4;
+    width: 85%;
+    text-align: center;
+    margin-bottom: 20px;
+    margin-left: 30px;
+    font-weight: bold;
+        position: relative;
+
+}
+
+.tipArea:after, .tipArea:before {
+    border: 10px solid transparent;
+    border-top: 10px solid #fff;
+    width: 0;
+    height: 0;
+    right: 241px;
+    top: 20px;
+    content: ' ';
+    position: absolute;
+}
+
+.tipArea:before {
+    border-top-color: #d4d4d4;
+    left: 230px;
+    top: 21px;
+}
+
+
+.help-block {
+    margin-top: 5px;
+    margin-bottom: 5px;
+  }
+
+.form-title {
+    padding-left: 8px;
+    padding-right: 8px;
+    padding-top: 5px;
+    padding-bottom: 5px;
+    margin-bottom: 10px;
+    margin-left:10px;
+    border-left: 2px solid #5b9bd1;
+    color: #1A78CA;
+    font-size: 16px;
+}
+
+.form-title a{
+      cursor: pointer;
+}
+
+.panel-tools {
+    display: inline-block;
+    float: right;
+    margin-top: 0;
+    padding: 0;
+    position: relative;
+}
+
+.panel-tools a {
+    margin-left: 5px;
+    color: #9d9fa2;
+    cursor: pointer;
+}
+
+.panel-tools  a:hover{
+  color: #34495e;
+  text-decoration: none;
+}
+
+.table-responsive{
+      margin-top: 15px;
+}
+
+.btn-s  {
+    padding: 0px 6px;
+    margin-right: 3px;
+}
+
+
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc,
+table.dataTable thead .sorting_asc_disabled,
+table.dataTable thead .sorting_desc_disabled {
+    background: 0 0;
+}
+
+table.dataTable thead .sorting_asc:after {
+    content: "\f0de";
+    float: right;
+    font-family: fontawesome;
+    color:#357ebd;
+}
+
+table.dataTable thead .sorting_desc:after {
+    content: "\f0dd";
+    float: right;
+    font-family: fontawesome;
+    color:#357ebd;
+}
+
+table.dataTable thead .sorting:after {
+    content: "\f0dc";
+    float: right;
+    font-family: fontawesome;
+    color: rgba(50,50,50,.5);
+}
+
+
+.hostTableDiv{
+    height: 100px;
+    overflow: auto;
+  
+  }
+
+.hostTable{
+ font-size: 12px;
+ margin-bottom: 0px;
+}
+
+.hostTable>thead>tr>th, .hostTable>tbody>tr>th, .hostTable>tfoot>tr>th, .hostTable>thead>tr>td, .hostTable>tbody>tr>td, .hostTable>tfoot>tr>td {
+    padding: 6px;
+   
+}
+
+
+td.details-control {
+    background: url('../img/details_open.png') no-repeat center center;
+    cursor: pointer;
+}
+tr.shown td.details-control {
+    background: url('../img/details_close.png') no-repeat center center;
+}
+
+
+input[type="checkbox"] {
+    -webkit-appearance: none;
+    background: #fff url(../img/checkbox-init.png);
+    height: 18px;
+    vertical-align: middle;
+    width: 18px;
+  margin-bottom:5px;
+  margin-right:5px;
+}
+
+input[type="checkbox"]:checked {
+    -webkit-appearance: none;
+    background: #fff url(../img/checkbox-checked.png);
+    height: 18px;
+    vertical-align: middle;
+    width: 18px;
+}
+
+input[type="checkbox"]:focus,
+input[type="checkbox"]:hover {
+    outline: none;
 }
\ No newline at end of file
 }
\ No newline at end of file
index b998d05..4f43cd4 100644 (file)
-<!--\r
-\r
-Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-Licensed under the Apache License, Version 2.0 (the "License");\r
-you may not use this file except in compliance with the License.\r
-You may obtain a copy of the License at\r
-\r
-    http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-Unless required by applicable law or agreed to in writing, software\r
-distributed under the License is distributed on an "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-See the License for the specific language governing permissions and\r
-limitations under the License.\r
-\r
--->\r
-<!DOCTYPE html>\r
-<html>\r
-<head lang="en">\r
-<meta charset="UTF-8">\r
-<title id="org_openo_msb_route_title" name_i18n="org_openo_msb_route_ui_i18n"></title>\r
-<link\r
-       href="js/fontAwesome/css/font-awesome.min.css"\r
-       rel="stylesheet" />\r
-<link\r
-       href="js/bootstrap/css/bootstrap.min.css"\r
-       rel="stylesheet" />\r
-       <link href="css/newRoute.css" rel="stylesheet" type="text/css" />\r
-       <script type="text/javascript">\r
-\r
-       function setIframeUrl(type){\r
-               var url;\r
-               switch(type){\r
-                       case 1:url="/iui/microservices/index.html";break;\r
-                       case 2:url="/iui/msdiscover/index.html";break;\r
-                       case 3:url="/iui/msdiscover/admin.html";break;\r
-               }\r
-\r
-                $('#msbPage').attr("src",url);   \r
-       }\r
-       </script>\r
-\r
-</head>\r
-<body >\r
- <div class="header navbar mega-menu navbar-static-top">\r
-                       <div class="header-inner">\r
-                               <span class="navbar-brand zte-navbar-brand hidden-sm hidden-xs" >\r
-                                       <img id="com_zte_ums_ict_framework_img_netnumenLogo" src="./img/logo.png"  alt="logo" style="display: inline;">\r
-                                       \r
-                               </span>\r
-                               \r
-                               \r
-                       </div>\r
-                       <div class="chineseTitle" id="org_openo_msb_route_chinese_name" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                       <div class="englishTitle" id="org_openo_msb_route_english_name" name_i18n="org_openo_msb_route_ui_i18n">\r
-                       </div>\r
-</div>\r
-\r
-<div>\r
-   <div class="page-sidebar" >\r
-       <div class="sidebar-toggler hidden-xs hidden-sm" ></div>\r
-       <div class="sideBar">\r
-      <a onclick="setIframeUrl(1)" class="router-link-active"><div class="menu"><div class="menu-left"></div><i aria-hidden="true" class="icon fa fa-link"></i><br><label  id="org_openo_msb_route_sideBar_serviceroute" name_i18n="org_openo_msb_route_ui_i18n"></label>\r
-       \r
-      </div>\r
-       \r
-      </a>\r
-\r
-      <a  onclick="setIframeUrl(2)" ><div class="menu"><div class="menu-left"></div><i aria-hidden="true" class="icon fa fa-search-plus"></i><br><label id="org_openo_msb_route_sideBar_servicediscover" name_i18n="org_openo_msb_route_ui_i18n"></label>\r
-               \r
-      </div>\r
-\r
-      </a>\r
-\r
-      <a onclick="setIframeUrl(3)"  >\r
-      <div class="menu">\r
-      <div class="menu-left"></div>\r
-      <i aria-hidden="true" class="icon fa fa-cogs"></i><br><label id="org_openo_msb_route_sideBar_servicemng" name_i18n="org_openo_msb_route_ui_i18n"></label>\r
-    \r
-      </div>\r
-       \r
-      </a>\r
-  </div>\r
-  </div>\r
-<div class="page-content" >\r
-  <div class="page-content-body">\r
-                                               \r
-       <div id="pdiv_page-mainIframeisWare">\r
-                                       <iframe src="/iui/microservices/index.html" width="100%" scrolling="no" marginheight="0" frameborder="0" id="msbPage"  name="msbPage"  class="page-mainIframeisWare"  ></iframe>\r
-          </div>\r
-       </div>\r
- </div>\r
-</div>\r
-<script type="text/javascript" src="js/jquery/jquery-1.10.2.min.js"></script>\r
-<script type="text/javascript" src="js/iframeResizer/iframeResizer.min.js"></script>\r
-<script type="text/javascript" src="js/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>\r
-<script src="i18n/loadi18nApp_iui-route_view.js"></script>\r
-<script type="text/javascript">\r
-\r
-\r
-\r
-$(function(){\r
-\r
- loadPropertiesSideMenu('', 'msb-iui-route-i18n', 'i18n/');\r
-\r
-       //Get window height\r
-       var winHeight=610;\r
-                if (window.innerHeight) \r
-                       winHeight = window.innerHeight;\r
-                else if ((document.body) && (document.body.clientHeight)) \r
-                       winHeight = document.body.clientHeight;\r
-                //Through in-depth internal Document to test the body, for the window size\r
-                if (document.documentElement && document.documentElement.clientHeight ) {\r
-                    winHeight = document.documentElement.clientHeight;\r
-\r
-                }\r
-       winHeight=winHeight-55;\r
-$('iframe').iFrameResize({minHeight:winHeight});\r
-\r
- $(".sideBar a").on({\r
-        click: function(){\r
-        $(".sideBar a").removeClass("router-link-active");\r
-        $(this).addClass("router-link-active");\r
-        }\r
-      });\r
-\r
-$(".sidebar-toggler").click(function(){\r
-  $("body").toggleClass("page-sidebar-closed");\r
-});\r
-\r
-       \r
-\r
-});\r
-       \r
-\r
-</script>\r
-                                       \r
-\r
-</body>\r
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<!DOCTYPE html>
+<html>
+<head lang="en">
+<meta charset="UTF-8">
+<title id="org_openo_msb_route_title" name_i18n="org_openo_msb_route_ui_i18n"></title>
+<link
+       href="js/fontAwesome/css/font-awesome.min.css"
+       rel="stylesheet" />
+<link
+       href="js/bootstrap/css/bootstrap.min.css"
+       rel="stylesheet" />
+       <link href="css/newRoute.css" rel="stylesheet" type="text/css" />
+       <script type="text/javascript">
+
+       function setIframeUrl(type){
+               var url;
+               switch(type){
+                       case 1:url="/iui/microservices/index.html";break;
+                       case 2:url="/iui/msdiscover/index.html";break;
+                       case 3:url="/iui/msdiscover/admin.html";break;
+               }
+
+                $('#msbPage').attr("src",url);   
+       }
+       </script>
+
+</head>
+<body >
+ <div class="header navbar mega-menu navbar-static-top">
+                       <div class="header-inner">
+                               <span class="navbar-brand zte-navbar-brand hidden-sm hidden-xs" >
+                                       <img id="com_zte_ums_ict_framework_img_netnumenLogo" src="./img/logo.png"  alt="logo" style="display: inline;">
+                                       
+                               </span>
+                               
+                               
+                       </div>
+                       <div class="chineseTitle" id="org_openo_msb_route_chinese_name" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                       <div class="englishTitle" id="org_openo_msb_route_english_name" name_i18n="org_openo_msb_route_ui_i18n">
+                       </div>
+</div>
+
+<div>
+   <div class="page-sidebar" >
+       <div class="sidebar-toggler hidden-xs hidden-sm" ></div>
+       <div class="sideBar">
+      <a onclick="setIframeUrl(1)" class="router-link-active"><div class="menu"><div class="menu-left"></div><i aria-hidden="true" class="icon fa fa-link"></i><br><label  id="org_openo_msb_route_sideBar_serviceroute" name_i18n="org_openo_msb_route_ui_i18n"></label>
+       
+      </div>
+       
+      </a>
+
+      <a  onclick="setIframeUrl(2)" ><div class="menu"><div class="menu-left"></div><i aria-hidden="true" class="icon fa fa-search-plus"></i><br><label id="org_openo_msb_route_sideBar_servicediscover" name_i18n="org_openo_msb_route_ui_i18n"></label>
+               
+      </div>
+
+      </a>
+
+      <a onclick="setIframeUrl(3)"  >
+      <div class="menu">
+      <div class="menu-left"></div>
+      <i aria-hidden="true" class="icon fa fa-cogs"></i><br><label id="org_openo_msb_route_sideBar_servicemng" name_i18n="org_openo_msb_route_ui_i18n"></label>
+    
+      </div>
+       
+      </a>
+  </div>
+  </div>
+<div class="page-content" >
+  <div class="page-content-body">
+                                               
+       <div id="pdiv_page-mainIframeisWare">
+                                       <iframe src="/iui/microservices/index.html" width="100%" scrolling="no" marginheight="0" frameborder="0" id="msbPage"  name="msbPage"  class="page-mainIframeisWare"  ></iframe>
+          </div>
+       </div>
+ </div>
+</div>
+<script type="text/javascript" src="js/jquery/jquery-1.10.2.min.js"></script>
+<script type="text/javascript" src="js/iframeResizer/iframeResizer.min.js"></script>
+<script type="text/javascript" src="js/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+<script src="i18n/loadi18nApp_iui-route_view.js"></script>
+<script type="text/javascript">
+
+
+
+$(function(){
+
+ loadPropertiesSideMenu('', 'msb-iui-route-i18n', 'i18n/');
+
+       //Get window height
+       var winHeight=610;
+                if (window.innerHeight) 
+                       winHeight = window.innerHeight;
+                else if ((document.body) && (document.body.clientHeight)) 
+                       winHeight = document.body.clientHeight;
+                //Through in-depth internal Document to test the body, for the window size
+                if (document.documentElement && document.documentElement.clientHeight ) {
+                    winHeight = document.documentElement.clientHeight;
+
+                }
+       winHeight=winHeight-55;
+$('iframe').iFrameResize({minHeight:winHeight});
+
+ $(".sideBar a").on({
+        click: function(){
+        $(".sideBar a").removeClass("router-link-active");
+        $(this).addClass("router-link-active");
+        }
+      });
+
+$(".sidebar-toggler").click(function(){
+  $("body").toggleClass("page-sidebar-closed");
+});
+
+       
+
+});
+       
+
+</script>
+                                       
+
+</body>
 </html>
\ No newline at end of file
 </html>
\ No newline at end of file
index ad8dc39..17642ab 100644 (file)
@@ -1,17 +1,20 @@
 /*
 /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed 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
  *
  *
  * Licensed 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
+ *     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.
  *
  * 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){
     jQuery.i18n.properties({
  */
 function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){
     jQuery.i18n.properties({
index 1f3ff5d..8c00440 100644 (file)
@@ -1,11 +1,11 @@
 #
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 org_openo_msb_route_title=MicroService Bus
 
 org_openo_msb_route_sideBar_serviceroute=Service Route
 org_openo_msb_route_title=MicroService Bus
 
 org_openo_msb_route_sideBar_serviceroute=Service Route
index 75e374a..34bc7dc 100644 (file)
@@ -1,11 +1,11 @@
 #
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 org_openo_msb_route_title=ZTE 微服务
 
 org_openo_msb_route_sideBar_serviceroute=服务路由
 org_openo_msb_route_title=ZTE 微服务
 
 org_openo_msb_route_sideBar_serviceroute=服务路由
index 92af3ca..cc5674b 100644 (file)
-<!--\r
-\r
-Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-Licensed under the Apache License, Version 2.0 (the "License");\r
-you may not use this file except in compliance with the License.\r
-You may obtain a copy of the License at\r
-\r
-    http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-Unless required by applicable law or agreed to in writing, software\r
-distributed under the License is distributed on an "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-See the License for the specific language governing permissions and\r
-limitations under the License.\r
-\r
--->\r
-<!DOCTYPE html>\r
-<html>\r
-<head lang="en">\r
-<meta charset="UTF-8">\r
-<title id="org_openo_msb_route_title" name_i18n="org_openo_msb_route_ui_i18n"></title>\r
-<link rel="shortcut icon" href="img/zte_logo_16.gif" />\r
-<link\r
-       href="js/fontAwesome/css/font-awesome.min.css"\r
-       rel="stylesheet" />\r
-<link\r
-       href="js/bootstrap/css/bootstrap.min.css"\r
-       rel="stylesheet" />\r
-\r
-\r
-\r
-<link href="css/route.css" rel="stylesheet" type="text/css" />\r
-<link href="css/animate.min.css" rel="stylesheet" type="text/css" />\r
-<link href="js/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />\r
-\r
-<style>\r
-.ms-controller {\r
-       visibility: hidden\r
-}\r
-</style>\r
-\r
-  <script type="text/javascript"  src="js/jquery/jquery-1.10.2.min.js"></script>\r
- <script type="text/javascript">\r
-      var iuiRootPath="iui";\r
-      var apiRootPath="api";\r
-    \r
-      $.ajaxSettings.async = false;\r
-        $.getJSON("./ext/initUrlRootPath/initUrlRootPath.json",function(json){\r
-         iuiRootPath=json.iuiRootPath;\r
-         apiRootPath=json.apiRootPath;\r
-        });\r
-      \r
-\r
-      var apiBasePath="/"+apiRootPath+"/microservices/v1";\r
-      var iuiBasePath="/"+iuiRootPath+"/microservices";\r
-\r
-</script>\r
-\r
-\r
-\r
-\r
-</head>\r
-<body class="ms-controller"  ms-controller="routeController">\r
-\r
-<div class="navbar" id="routeHead">\r
-        <div class="navbar-inner container-fluid" id="top-bar">\r
-            <header class="row-fluid">\r
-                <h3 class="span12" id="title">\r
-                <img class="logo" src="img/conductor-logo.png" alt="Logo" id="logo">\r
-                    <small id="org_openo_msb_route_banner_title" name_i18n="org_openo_msb_route_ui_i18n"></small>\r
-                    <button type="button" class="btn btn-default" ms-click="exportServices()" style="float:right;margin-left: 10px; margin-top: 5px;"><i class=" fa fa-external-link"></i> <span id="org_openo_msb_route_btn_export" name_i18n="org_openo_msb_route_ui_i18n"></span></button> \r
-\r
-                </h3>\r
-            </header>\r
-        </div>\r
-    </div>\r
- <script type="text/javascript">\r
- if (self != top) {document.getElementById("routeHead").style.display="none";}\r
-\r
- var currentLang = navigator.language;  \r
-if(!currentLang) {currentLang = navigator.browserLanguage; } \r
-if(currentLang.toLowerCase() != "zh-cn") {$("#logo").hide(); }\r
- </script>\r
-\r
-<div style=" background-color: #f1f3fa !important; ">\r
-\r
-\r
- <div class="row row1 container-fluid" ms-visible="boxVisible">\r
-\r
-   <ul class="nav nav-tabs" id="panelTab" style="margin-top: 10px;">\r
-  <li  class="active" ><a href="#apiPanel" data-toggle="tab" id="apiTab"><i class="fa fa-cloud fa-1x"></i> <span id="org_openo_msb_route_tab_api" name_i18n="org_openo_msb_route_ui_i18n"></span> </a></li>\r
-  <li ><a href="#iuiPanel" data-toggle="tab" id="iuiTab"><i class="fa fa-tv fa-1x"></i> <span id="org_openo_msb_route_tab_iui" name_i18n="org_openo_msb_route_ui_i18n"></span></a></li>\r
-  <li ><a href="#customPanel" data-toggle="tab" id="customTab"><i class="fa fa-cogs fa-1x"></i> <span id="org_openo_msb_route_tab_custom" name_i18n="org_openo_msb_route_ui_i18n"></span> </a></li> \r
-   <li ms-visible="!discoverInfo.enabled" ><a href="#msbPanel" data-toggle="tab" id="msbTab"><i class="fa fa-cubes fa-1x"></i> <span id="org_openo_msb_route_tab_msb" name_i18n="org_openo_msb_route_ui_i18n"></span> </a></li>  \r
-</ul>\r
-<div class="tab-content" >\r
- <div id="apiPanel" class="tab-pane active"> \r
-    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">\r
-   \r
-          <button ms-visible="!discoverInfo.enabled" class="btn btn-primary" id="app-new-btn" ms-click="$showApiRouteDlg()" >\r
-                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_api" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-               </button>\r
-       \r
-    </div>\r
-\r
-\r
-<div id="routeDlg" class="modal  fade" tabindex="-1" role="dialog"\r
-        aria-labelledby="myModalLabel" aria-hidden="true" >\r
-        <div class="modal-dialog">\r
-            <div class="modal-content Changepasswd">\r
-                <div class="content">\r
-                    <div class="modal-header">\r
-                        <button type="button" class="close" data-dismiss="modal"\r
-                            aria-hidden="true">×</button>\r
-                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>\r
-                    </div>\r
-                    <div class="modal-body">\r
-                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>\r
-                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>\r
-                   \r
-\r
-    \r
-\r
- <div id="info" class="tab-pane active">                     \r
-                      \r
-      <form class="form-horizontal" id="routeForm" role="form">   \r
-           \r
-               <div class="tipArea" id="org_openo_msb_route_form_sourceservice" name_i18n="org_openo_msb_route_ui_i18n"></div> \r
-                <div class="form-group" ms-visible="!discoverInfo.enabled">\r
-                            \r
-                             <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  <span class="required" aria-required="true">*</span>\r
-                                </label>   \r
-                          \r
-                              \r
-                                 <div class="col-sm-6" style="padding-right: 5px;">\r
-                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                <input type="text" ms-duplex="apiRouteInfo.server"  name="server" class="form-control form-tip"  ms-attr-disabled="discoverInfo.enabled" style="display:inline-block;" />\r
-                                 <span class="help-block"></span>\r
-                                 </div>\r
-                                  <div class="col-sm-1" style=" padding-left: 0px;" >  \r
-                                 <a href="#" ms-click="addapiHost()"  class="btn btn-default " title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>\r
-                                 </div>\r
-                             </div>\r
-\r
-                              <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                               <span ms-visible="discoverInfo.enabled" id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                            </label>     \r
-                           <div  class="hostTableDiv col-sm-7">\r
-                                 <table class="table table-striped hostTable">\r
-                                   <thead>\r
-                                      <tr>\r
-                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                         <th>IP</th>\r
-                                         <th>PORT</th>\r
-                                         <th ms-visible="!discoverInfo.enabled" id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                      </tr>\r
-                                   </thead>\r
-                                   <tbody ms-each-server="vm.apiRouteInfo.servers">\r
-                                      <tr>\r
-                                         <td>{{$index+1}}</td>\r
-                                         <td ms-text="server.ip"></td>\r
-                                         <td ms-text="server.port"></td>\r
-                                         <td ms-visible="!discoverInfo.enabled"><a href="#" ms-click="delapiHost(server.ip,server.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>\r
-                                      </tr> \r
-                                     \r
-                   \r
-                                   </tbody>\r
-                                   </table> \r
-                                </div> \r
-\r
-                        </div>\r
-              \r
-                         <div class="form-group" tyle="margin-bottom: 0;">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span> \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                                \r
-                                <input type="text" ms-duplex="apiRouteInfo.url"  name="url" class="form-control" id="form-url" value="/" ms-attr-disabled="discoverInfo.enabled"/>\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-                 <div class="tipArea" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>       \r
-               <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                              \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-            \r
-                              {{vm.targetServiceUrl}}/{{vm.apiRootPath}}/{{vm.apiRouteInfo.serviceName}}/{{vm.apiRouteInfo.version}}\r
-                               <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>    \r
-             <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">  \r
-                                <input type="text" ms-duplex="apiRouteInfo.serviceName"  name="serviceName"  class="form-control" ms-attr-disabled="discoverInfo.enabled" />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-            \r
-             <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_version" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                   \r
-                                </label>\r
-                            <div class="col-sm-7">                            \r
-                             <div class="item-tip" ms-class-item-tip-none ="routeDlgInfo.saveType=='update'" id="org_openo_msb_route_form_version_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                <input type="text" ms-duplex="apiRouteInfo.version"  name="version" class="form-control form-tip"  ms-attr-disabled="discoverInfo.enabled" />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-                         \r
-            \r
-            \r
-                         <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span><a href="javascript:;"  class="collapse-box" data-toggle="collapse" \r
-                             data-target="#apiJsonFullurl">\r
-                                    <i class="fa fa-plus" id="apiJsonCollapse"></i> <span id="org_openo_msb_route_form_swagger" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  </a></span>\r
-                                \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                               <div class="input-group">\r
-                        <input type="text" class="form-control"  ms-if="apiRouteInfo.apiJsonType=='1'" ms-duplex="apiJson.custom"  ms-attr-disabled="routeDlgInfo.saveType=='view'"/>\r
-                        <select class="form-control m-b" ms-if="apiRouteInfo.apiJsonType=='0'"  ms-each="jsonApiSelectList.selectItems"   ms-duplex="apiJson.local" id="apiJsonSelect" ms-attr-disabled="routeDlgInfo.saveType=='view'">             \r
-                            <option ms-attr-value='el'>{{el}}</option>\r
-                        </select>\r
-\r
-                            <div class="input-group-btn">\r
-                                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false" ms-attr-disabled="routeDlgInfo.saveType=='view'">{{showAPITypeName[apiRouteInfo.apiJsonType]}} <span class="caret"></span></button>\r
-                                <ul class="dropdown-menu pull-right">\r
-                                    <li><a ms-click="setAPIType(0)">{{showAPITypeName[0]}}</a></li>          \r
-                                    <li><a ms-click="setAPIType(1)">{{showAPITypeName[1]}}</a></li>\r
-                                </ul>\r
-                            </div>\r
-                        </div>\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                         \r
-\r
-                        \r
-                            \r
-                        </div>\r
-\r
-                        <div id="apiJsonFullurl" class="form-group collapse in">\r
-                         <label class="control-label col-sm-3"><span id="org_openo_msb_route_form_swagger_address" name_i18n="org_openo_msb_route_ui_i18n"></span></label>\r
-                                <div  class="col-sm-9">\r
-                                <div> \r
-                                  <i class="fa fa-home fa-fw"></i> <span id="org_openo_msb_route_form_target_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  <span ms-if="vm.apiRouteInfo.apiJsonType==0">{{vm.targetServiceUrl}}/iui/microservices/ext/initSwaggerJson/{{vm.apiJson.local}}</span>\r
-                                  <span ms-if="vm.apiRouteInfo.apiJsonType==1">{{vm.apiRouteInfo.servers[0].ip+":"+vm.apiRouteInfo.servers[0].port}}{{vm.apiJson.custom}}</span>\r
-                                  </div>\r
-                                  <div> \r
-                                  <i class="fa fa-cloud-upload fa-fw"></i><span id="org_openo_msb_route_form_publish_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  <span ms-if="vm.apiRouteInfo.apiJsonType==0">{{vm.targetServiceUrl}}/iui/microservices/ext/initSwaggerJson/{{vm.apiJson.local}}</span>\r
-                                  <span ms-if="vm.apiRouteInfo.apiJsonType==1">{{vm.targetServiceUrl}}/apijson/{{vm.apiRouteInfo.serviceName}}/{{vm.apiRouteInfo.version}}</span>\r
-                                </div> \r
-\r
-                                \r
-                                </div>\r
-                        </div>\r
-\r
-                        <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span><a href="javascript:;"  class=" collapse-box" data-toggle="collapse" \r
-                             data-target="#metricsFullurl">\r
-                                    <i class="fa fa-plus" id="metricsUrlCollapse"></i> <span id="org_openo_msb_route_form_metrics" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  </a></span>                                   \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                                                         \r
-                                <input type="text" ms-duplex="apiRouteInfo.metricsUrl"  name="metricsUrl" class="form-control"  value="/admin/metrics" ms-attr-disabled="routeDlgInfo.saveType=='view'" />\r
-                               \r
-                           \r
-                                 <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                           \r
-                            \r
-                        </div>\r
-                        <div id="metricsFullurl" class="form-group collapse in">\r
-                         <label class="control-label col-sm-3"><span id="org_openo_msb_route_form_metrics_address" name_i18n="org_openo_msb_route_ui_i18n"></span></label>\r
-                                <div  class="col-sm-9">\r
-                                <div> \r
-                                  <i class="fa fa-home fa-fw"></i><span id="org_openo_msb_route_form_target_address" name_i18n="org_openo_msb_route_ui_i18n"></span> {{vm.apiRouteInfo.servers[0].ip+":"+vm.apiRouteInfo.servers[0].port}}{{vm.apiRouteInfo.metricsUrl}}</span>\r
-                                  </div>\r
-                                  <div> \r
-                                  <i class="fa fa-cloud-upload fa-fw"></i><span id="org_openo_msb_route_form_publish_address" name_i18n="org_openo_msb_route_ui_i18n"></span> {{vm.targetServiceUrl}}/admin/{{vm.apiRouteInfo.serviceName}}/{{vm.apiRouteInfo.version}}\r
-                                </div> \r
-                                 \r
-                                </div>\r
-                        </div>\r
-            </form>\r
-   </div>         \r
-      \r
-\r
-          \r
-\r
-                    </div>\r
-                    <div class="modal-footer" \r
-                         ms-visible="routeDlgInfo.saveType!='view'">\r
-                        <button class="btn" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                        <button class="btn btn-primary" type="submit" ms-click="$saveApiRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                    </div>\r
-                    <div class="modal-footer" \r
-                         ms-visible="routeDlgInfo.saveType=='view'">\r
-                        <button class="btn  btn-primary" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_close" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                       \r
-                    </div>\r
-                </div>\r
-\r
-            </div>\r
-        </div>\r
-    </div>\r
-\r
-     <div class="row" data-name="route_zone" >\r
-\r
-        <span class="response_throbber" ms-visible="vm.routeLoading"></span>\r
-\r
-            <div class="stats_box"  ms-each-route="apiRouteArray">\r
-\r
-                 <div class="routeDiv">\r
-                   <div class="sparkline"  ms-click="gotoTarget(route,'api')"  data-name="route_click_zone">                    \r
-                    <i class="fa fa-cloud fa-3x" ms-class-route-valid ="route.status === '1'" ms-class-route-invalid ="route.status === '0'"></i>\r
-                   \r
-                  </div>\r
-                  <div class="stat_text"  ms-click="gotoTarget(route,'api')" data-name="route_click_zone">\r
-                    <strong ms-text="route.serviceName"></strong> \r
-                    <span><b id="org_openo_msb_route_box_version" name_i18n="org_openo_msb_route_ui_i18n"></b>{{route.version}}</span>\r
-                            \r
-                    </div> \r
-                     \r
-                  <span ms-visible="!discoverInfo.enabled">\r
-                    \r
-                         <a class="btn btn-default"  ms-click="updateApiRoute(route,'update')" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa  fa-pencil-square-o" > </i></a>          \r
-                       <a class="btn btn-default" ms-click="delApiRoute(route.serviceName,route.version)" ms-visible="route.control !='1'" title="org_openo_msb_route_box_btn_delete" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-trash-o" > </i></a>\r
-                       <a class="btn btn-default" ms-visible="route.status === '1' && route.control !='1'" title="org_openo_msb_route_box_btn_disable" name_i18n="org_openo_msb_route_ui_i18n"  ms-click="updateApiRouteStatus(route.serviceName,route.version,'0')"><i class="fa fa-stop" style="color:red;font-size:10px"></i></a>\r
-                       <a class="btn btn-default" ms-visible="route.status === '0' && route.control !='1'" title="org_openo_msb_route_box_btn_able" name_i18n="org_openo_msb_route_ui_i18n"  ms-click="updateApiRouteStatus(route.serviceName,route.version,'1')"><i class="fa fa-play"  style="color:green;font-size:10px"></i></a>\r
-                    </span> \r
-                    <span ms-visible="discoverInfo.enabled">\r
-        <a class="btn btn-default"  ms-click="updateApiRoute(route,'update')"><i class="fa  fa-pencil-square-o" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n"> </i></a> \r
-                    <a class="btn btn-default"  ms-click="updateApiRoute(route,'view')"><i class="fa  fa-file-text-o" title="org_openo_msb_route_box_btn_view" name_i18n="org_openo_msb_route_ui_i18n"> </i></a>  </span>\r
-                 \r
-                </div>\r
-\r
-                </div>\r
-\r
-      </div>\r
-\r
-\r
- </div>\r
- <div id="iuiPanel" class="tab-pane"> \r
-    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">\r
-        <button ms-visible="!discoverInfo.enabled" class="btn btn-primary" id="app-new-btn" ms-click="$showiuiRouteDlg()" >\r
-                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_iui" name_i18n="org_openo_msb_route_ui_i18n">\r
-               </button>\r
-       \r
-  </div>\r
-\r
-  <div id="iuirouteDlg" class="modal  fade" tabindex="-1" role="dialog"\r
-        aria-labelledby="myModalLabel" aria-hidden="true" >\r
-        <div class="modal-dialog">\r
-            <div class="modal-content Changepasswd">\r
-                <div class="content">\r
-                    <div class="modal-header">\r
-                        <button type="button" class="close" data-dismiss="modal"\r
-                            aria-hidden="true">×</button>\r
-                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>\r
-                    </div>\r
-                    <div class="modal-body">\r
-                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>\r
-                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>\r
-\r
-      <form class="form-horizontal" id="iuirouteForm" role="form">   \r
-             \r
-          <div class="tipArea" id="org_openo_msb_route_form_sourceservice" name_i18n="org_openo_msb_route_ui_i18n"></div>   \r
-               <div class="form-group"  ms-visible="!discoverInfo.enabled">\r
-                            \r
-                             <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  <span class="required" aria-required="true">*</span>\r
-                                </label>   \r
-                          \r
-                              \r
-                                 <div class="col-sm-6" style="padding-right: 5px;">\r
-                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                <input type="text" ms-duplex="iuiRouteInfo.server"  name="iuiserver" class="form-control form-tip"  style="display:inline-block;"  ms-attr-disabled="discoverInfo.enabled" />\r
-                                 <span class="help-block"></span>\r
-                                 </div>\r
-                                  <div class="col-sm-1" style=" padding-left: 0px;" >  \r
-                                 <a href="#" ms-click="addiuiHost()" class="btn btn-default " title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>\r
-                                 </div>\r
-                             </div>\r
-\r
-                              <div class="form-group">\r
-                            <label class="control-label col-sm-3" >\r
-                              \r
-                               <span ms-visible="discoverInfo.enabled" id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                            </label>     \r
-                           <div  class="hostTableDiv col-sm-7">\r
-                                 <table class="table table-striped hostTable">\r
-                                   <thead>\r
-                                      <tr>\r
-                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                         <th>IP</th>\r
-                                         <th>PORT</th>\r
-                                         <th ms-visible="routeDlgInfo.saveType!='view'" id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                      </tr>\r
-                                   </thead>\r
-                                   <tbody ms-each-server="vm.iuiRouteInfo.servers">\r
-                                      <tr>\r
-                                         <td>{{$index+1}}</td>\r
-                                         <td ms-text="server.ip"></td>\r
-                                         <td ms-text="server.port"></td>\r
-                                         <td ms-visible="routeDlgInfo.saveType!='view'"><a href="#" ms-click="deliuiHost(server.ip,server.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>\r
-                                      </tr> \r
-                                     \r
-                   \r
-                                   </tbody>\r
-                                   </table> \r
-                                </div> \r
-\r
-                        </div>\r
-\r
-               \r
-                         <div class="form-group" tyle="margin-bottom: 0;">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                                \r
-                                <input type="text" ms-duplex="iuiRouteInfo.url"  name="iuiurl" class="form-control" value="/"   ms-attr-disabled="discoverInfo.enabled" />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-                        <div class="tipArea" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-               <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                              \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-            \r
-                               {{vm.targetServiceUrl}}/{{vm.iuiRootPath}}/{{vm.iuiRouteInfo.serviceName}}\r
-                               <span class="help-block"></span>\r
-                            </div>\r
-                             <!--i class="fa fa-info-circle fa-lg tip_color" data-toggle="tooltip" data-placement="bottom" title="org_openo_msb_route_form_iui_tip" name_i18n="org_openo_msb_route_ui_i18n" ></i-->\r
-                            \r
-                        </div>    \r
-             <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">  \r
-                                <input type="text" ms-duplex="iuiRouteInfo.serviceName"  name="iuiserviceName"  class="form-control"  ms-attr-disabled="discoverInfo.enabled" />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-            \r
-             \r
-                       \r
-            \r
-            \r
-                    \r
-            </form>\r
-       \r
-         \r
-        </div>\r
-          \r
-\r
-                    </div>\r
-                    <div class="modal-footer" ms-visible="routeDlgInfo.saveType!='view'">\r
-                        <button class="btn" data-dismiss="modal" aria-hidden="true"  id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                        <button class="btn btn-primary" type="submit" ms-click="$saveiuiRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                    </div>\r
-                    <div class="modal-footer" \r
-                         ms-visible="routeDlgInfo.saveType=='view'">\r
-                        <button class="btn  btn-primary" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_close" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                       \r
-                    </div>\r
-                </div>\r
-\r
-            </div>\r
-  </div>\r
-\r
-     <div class="row" data-name="route_zone" >\r
-\r
-        <span class="response_throbber" ms-visible="vm.routeLoading"></span>\r
-\r
-            <div class="stats_box"  ms-each-route="iuiRouteArray">\r
-\r
-                 <div class="routeDiv" ms-visible="route.control !='2'">\r
-                   <div class="sparkline"  ms-click="gotoTarget(route,'iui')"  data-name="route_click_zone">                    \r
-                    <i class="fa fa-tv fa-3x"  ms-class-route-valid ="route.status === '1'" ms-class-route-invalid ="route.status === '0'"></i>\r
-                   \r
-                  </div>\r
-                  <div class="stat_text"  ms-click="gotoTarget(route,'iui')" data-name="route_click_zone">\r
-                    <strong ms-text="route.serviceName"></strong> \r
-                    <span>{{route.servers[0].ip}}:{{route.servers[0].port}}</span>          \r
-                    </div> \r
-                  <span ms-visible="!discoverInfo.enabled">\r
-                    \r
-                       <a class="btn btn-default"  ms-click="updateiuiRoute(route,'update')"><i class="fa  fa-pencil-square-o" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n" > </i></a>             \r
-                       <a class="btn btn-default" ms-click="deliuiRoute(route.serviceName)" ms-visible="route.control !='1'"><i class="fa fa-trash-o" title="删除"> </i></a>\r
-                       <a class="btn btn-default" ms-visible="route.status === '1' && route.control !='1'" title="org_openo_msb_route_box_btn_disable" name_i18n="org_openo_msb_route_ui_i18n" ms-click="updateiuiRouteStatus(route.serviceName,'0')"><i class="fa fa-stop" style="color:red;font-size:10px"></i></a>\r
-                       <a class="btn btn-default" ms-visible="route.status === '0' && route.control !='1'"  title="org_openo_msb_route_box_btn_able" name_i18n="org_openo_msb_route_ui_i18n" ms-click="updateiuiRouteStatus(route.serviceName,'1')"><i class="fa fa-play"  style="color:green;font-size:10px"></i></a>\r
-                    </span> \r
-                    <span ms-visible="discoverInfo.enabled"><a class="btn btn-default"  ms-click="updateiuiRoute(route,'view')"><i class="fa  fa-file-text-o" title="org_openo_msb_route_box_btn_view" name_i18n="org_openo_msb_route_ui_i18n"> </i></a>  </span>\r
-                 \r
-                </div>\r
-\r
-                </div>\r
-\r
-      </div>\r
-\r
- </div>\r
-\r
- <div id="customPanel" class="tab-pane"> \r
-    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">\r
-        <button ms-visible="!discoverInfo.enabled" class="btn btn-primary" id="app-new-btn" ms-click="$showcustomRouteDlg()" >\r
-                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_custom" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-               </button>\r
-       \r
-  </div>\r
-\r
-  <div id="customrouteDlg" class="modal  fade" tabindex="-1" role="dialog"\r
-        aria-labelledby="myModalLabel" aria-hidden="true" >\r
-        <div class="modal-dialog">\r
-            <div class="modal-content Changepasswd">\r
-                <div class="content">\r
-                    <div class="modal-header">\r
-                        <button type="button" class="close" data-dismiss="modal"\r
-                            aria-hidden="true">×</button>\r
-                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>\r
-                    </div>\r
-                    <div class="modal-body">\r
-                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>\r
-                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>\r
-\r
-      <form class="form-horizontal" id="customrouteForm" role="form">   \r
-             \r
-            <div class="tipArea" id="org_openo_msb_route_form_sourceservice" name_i18n="org_openo_msb_route_ui_i18n"></div> \r
-                <div class="form-group"  ms-visible="!discoverInfo.enabled">\r
-                            \r
-                             <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  <span class="required" aria-required="true">*</span>\r
-                                </label>   \r
-                          \r
-                              \r
-                                 <div class="col-sm-6" style="padding-right: 5px;">\r
-                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                <input type="text" ms-duplex="customRouteInfo.server"  name="customserver" class="form-control form-tip"  style="display:inline-block;"  ms-attr-disabled="discoverInfo.enabled" />\r
-                                 <span class="help-block"></span>\r
-                                 </div>\r
-                                  <div class="col-sm-1" style=" padding-left: 0px;" ms-visible="routeDlgInfo.saveType!='view'">  \r
-                                 <a href="#" ms-click="addcustomHost()" class="btn btn-default "  title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>\r
-                                 </div>\r
-                             </div>\r
-\r
-                              <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                               <span ms-visible="discoverInfo.enabled" id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                            </label>     \r
-                           <div  class="hostTableDiv col-sm-7">\r
-                                 <table class="table table-striped hostTable">\r
-                                   <thead>\r
-                                      <tr>\r
-                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                         <th>IP</th>\r
-                                         <th>PORT</th>\r
-                                         <th ms-visible="routeDlgInfo.saveType!='view'" id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                      </tr>\r
-                                   </thead>\r
-                                   <tbody ms-each-server="vm.customRouteInfo.servers">\r
-                                      <tr>\r
-                                         <td>{{$index+1}}</td>\r
-                                         <td ms-text="server.ip"></td>\r
-                                         <td ms-text="server.port"></td>\r
-                                         <td ms-visible="routeDlgInfo.saveType!='view'"><a href="#" ms-click="delcustomHost(server.ip,server.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>\r
-                                      </tr> \r
-                                     \r
-                   \r
-                                   </tbody>\r
-                                   </table> \r
-                                </div> \r
-\r
-                        </div>\r
-\r
-\r
-               \r
-                         <div class="form-group" tyle="margin-bottom: 0;">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                                \r
-                                <input type="text" ms-duplex="customRouteInfo.url"  name="customurl" class="form-control" value="/"  ms-attr-disabled="discoverInfo.enabled" />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-\r
-                        <div class="tipArea" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-               <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                              \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-            \r
-                               {{vm.targetServiceUrl}}{{vm.customRouteInfo.serviceName}}\r
-                               <span class="help-block"></span>\r
-                            </div>\r
-                           \r
-                            \r
-                        </div>    \r
-             <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    \r
-                                </label>\r
-                            <div class="col-sm-7">  \r
-                                <input type="text" ms-duplex="customRouteInfo.serviceName"  name="customserviceName"  class="form-control"  ms-attr-disabled="discoverInfo.enabled"  />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-            \r
-                    \r
-            </form>\r
-       \r
-         \r
-        </div>\r
-          \r
-\r
-                    </div>\r
-                    <div class="modal-footer" ms-visible="routeDlgInfo.saveType!='view'">\r
-                        <button class="btn" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                        <button class="btn btn-primary" type="submit" ms-click="$savecustomRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                    </div>\r
-                    <div class="modal-footer" \r
-                         ms-visible="routeDlgInfo.saveType=='view'">\r
-                        <button class="btn  btn-primary" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_close" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                       \r
-                    </div>\r
-                </div>\r
-\r
-            </div>\r
-  </div>\r
-\r
-     <div class="row" data-name="route_zone" >\r
-\r
-        <span class="response_throbber" ms-visible="vm.routeLoading"></span>\r
-\r
-\r
-        <div ms-each-el="customGroupRouteArray">\r
-          <div class="form-title">\r
-              <span><a data-toggle="collapse" >{{routeUtil.showGroupName($index,el)}}</a>\r
-                <span class="label label-info" style="margin-left: 10px;">{{customGroupRouteArray[$index].length}}</span>\r
-              </span>\r
-               <div class="panel-tools">                   \r
-                    <a class="showhide" data-toggle="collapse"><i class="fa fa-chevron-up"></i></a>\r
-                </div>\r
-            </div>\r
-          <div style="width: 100%;" class="collapseContent collapse in">\r
-           <div class="stats_box"  ms-each-elem="el">\r
-                 <div class="routeDiv" ms-visible="elem.control !='2'">\r
-                   <div class="sparkline"  data-name="route_click_zone">                    \r
-                    <i class="fa fa-cogs fa-3x"  ms-class-route-valid ="elem.status === '1'" ms-class-route-invalid ="elem.status === '0'"></i>\r
-                   \r
-                  </div>\r
-                  <div class="stat_text"  data-name="route_click_zone" style="padding: 9px 0px 4px 0;">\r
-                    <strong ms-text="elem.serviceName==''?'/':elem.serviceName" style="height: 35px;word-wrap:break-word;word-break: normal;"></strong> \r
-                    <span>{{elem.servers[0].ip}}:{{elem.servers[0].port}}</span>          \r
-                    </div> \r
-                  <span ms-visible="!discoverInfo.enabled">\r
-                    \r
-                       <a class="btn btn-default"  ms-click="updatecustomRoute(elem,'update')"><i class="fa  fa-pencil-square-o" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n" > </i></a>             \r
-                       <a class="btn btn-default" ms-click="delcustomRoute(elem.serviceName)" ms-visible="elem.control !='1'"><i class="fa fa-trash-o" title="删除"> </i></a>\r
-                       <a class="btn btn-default" ms-visible="elem.status === '1' && elem.control !='1'" title="org_openo_msb_route_box_btn_disable" name_i18n="org_openo_msb_route_ui_i18n" ms-click="updatecustomRouteStatus(elem.serviceName,'0')"><i class="fa fa-stop" style="color:red;font-size:10px"></i></a>\r
-                       <a class="btn btn-default" ms-visible="elem.status === '0' && elem.control !='1'" title="org_openo_msb_route_box_btn_able" name_i18n="org_openo_msb_route_ui_i18n"  ms-click="updatecustomRouteStatus(elem.serviceName,'1')"><i class="fa fa-play"  style="color:green;font-size:10px"></i></a>\r
-                    </span> \r
-                    <span ms-visible="discoverInfo.enabled"><a class="btn btn-default"  ms-click="updatecustomRoute(elem,'view')"><i class="fa  fa-file-text-o" title="org_openo_msb_route_box_btn_view" name_i18n="org_openo_msb_route_ui_i18n"> </i></a>  </span>\r
-                 \r
-                </div>\r
-\r
-                </div>\r
-           </div>\r
-\r
-        </div>\r
-\r
-           \r
-\r
-      </div>\r
-\r
- </div>\r
-\r
-\r
- <div id="msbPanel" class="tab-pane"> \r
-    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">\r
-        <button class="btn btn-primary" id="app-new-btn" ms-click="$showmsbRouteDlg()" >\r
-                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_msb" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-               </button>\r
-       \r
-  </div>\r
-\r
-  <div id="msbrouteDlg" class="modal  fade" tabindex="-1" role="dialog"\r
-        aria-labelledby="myModalLabel" aria-hidden="true" >\r
-        <div class="modal-dialog">\r
-            <div class="modal-content">\r
-                <div class="content">\r
-                    <div class="modal-header">\r
-                        <button type="button" class="close" data-dismiss="modal"\r
-                            aria-hidden="true">×</button>\r
-                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>\r
-                    </div>\r
-                    <div class="modal-body">\r
-                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>\r
-                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>\r
-\r
-      <form class="form-horizontal" id="msbForm" role="form">   \r
-          <div class="tipArea" id="org_openo_msb_route_msb_info" name_i18n="org_openo_msb_route_ui_i18n"></div> \r
-                    <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">  \r
-                                <input type="text" ms-duplex="msbRouteInfo.serviceName"  name="serviceName"  class="form-control"  />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-\r
-                        <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_version" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                </label>\r
-                            <div class="col-sm-7">                            \r
-                             <div class="item-tip" id="org_openo_msb_route_form_version_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                <input type="text" ms-duplex="msbRouteInfo.version"  name="version" class="form-control form-tip"   />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-\r
-                     \r
-\r
-                        <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>                                   \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                              \r
-                                <input type="text" ms-duplex="msbRouteInfo.url"  name="url" class="form-control" />\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-\r
-\r
-                        <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_protocol" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                                <select class="form-control m-b" ms-each="$msbProtocol"  name="protocol" ms-duplex="msbRouteInfo.protocol" >             \r
-                                  <option ms-attr-value='el'>{{el}}</option>\r
-                                 </select>\r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-\r
-                        <div class="form-group">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_visualrange" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                    <span class="required" aria-required="true">*</span>\r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                             <input  type="checkbox" ms-duplex="msbRouteInfo.visualRangeArray" value="0" ><span style="margin-right: 20px;"  id="org_openo_msb_route_form_intersystem" name_i18n="org_openo_msb_route_ui_i18n" ></span>\r
-                                     <input type="checkbox" ms-duplex="msbRouteInfo.visualRangeArray" value="1" ><span style="margin-right: 20px;" id="org_openo_msb_route_form_insystem" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                               \r
-                                <span class="help-block"></span>\r
-                            </div>\r
-                            \r
-                        </div>\r
-\r
-                          <div class="tipArea" id="org_openo_msb_route_msb_hostlist" name_i18n="org_openo_msb_route_ui_i18n"></div> \r
-\r
-                            <div class="form-group">\r
-                            \r
-                             <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_msb_host" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                                  <span class="required" aria-required="true">*</span>\r
-                                </label>   \r
-                          \r
-                              \r
-                                 <div class="col-sm-4" style="padding-right: 5px;">\r
-                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                \r
-                                <input type="text"  placeholder=""  ms-duplex="msbRouteInfo.newHost" class="form-control form-tip"   name="newHost" style="display:inline-block;" />\r
-                                 \r
-                                 <span class="help-block"></span>\r
-                                 </div>\r
-                                  <div class="col-sm-2" style="padding-right: 5px;">\r
-                                 <div class="item-tip" id="org_openo_msb_route_form_ttl_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>\r
-                                \r
-                                <input type="text"  placeholder=""  ms-duplex="msbRouteInfo.newttl" class="form-control form-tip"   name="newttl" style="display:inline-block;" />\r
-                                 \r
-                                 <span class="help-block"></span>\r
-                                 </div>\r
-                                  <div class="col-sm-1" style=" padding-left: 0px;">  \r
-                                 <a href="#" ms-click="addmsbHost()" class="btn btn-default " title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>\r
-                                 </div>\r
-                             </div>\r
-\r
-                              <div class="form-group">\r
-                            <label class="control-label col-sm-3"></label>     \r
-                           <div  class="hostTableDiv col-sm-7">\r
-                                 <table class="table table-striped hostTable">\r
-                                   <thead>\r
-                                      <tr>\r
-                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                         <th>IP</th>\r
-                                         <th>PORT</th>\r
-                                         <th>TTL</th>\r
-                                         <th id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                      </tr>\r
-                                   </thead>\r
-                                   <tbody ms-each-node="vm.msbRouteInfo.nodes">\r
-                                      <tr>\r
-                                         <td>{{$index+1}}</td>\r
-                                         <td ms-text="node.ip"></td>\r
-                                         <td ms-text="node.port"></td>\r
-                                         <td ms-text="node.ttl"></td>\r
-                                         <td><a href="#"  title="org_openo_msb_route_form_btn_delhost" name_i18n="org_openo_msb_route_ui_i18n" ms-click="delmsbHost(node.ip,node.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>\r
-                                      </tr> \r
-                                     \r
-                   \r
-                                   </tbody>\r
-                                   </table> \r
-                                </div> \r
-\r
-                        </div>\r
-\r
-                        <div class="tipArea"  ms-visible="msbRouteInfo.protocol=='REST'||msbRouteInfo.protocol=='UI'" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div> \r
-                         <div class="form-group"  ms-visible="msbRouteInfo.protocol=='REST'||msbRouteInfo.protocol=='UI'">\r
-                            <label class="control-label col-sm-3">\r
-                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>\r
-                              \r
-                                </label>\r
-                            <div class="col-sm-7">\r
-                           {{vm.targetFullServiceUrl}}             \r
-                              \r
-                             \r
-                            </div>\r
-                            \r
-                        </div> \r
-          \r
-            </form>\r
-       \r
-         \r
-        </div>\r
-          \r
-\r
-                    </div>\r
-                    <div class="modal-footer">\r
-                        <button class="btn" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                        <button class="btn btn-primary" type="submit" ms-click="$savemsbRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>\r
-                    </div>\r
-                </div>\r
-\r
-            </div>\r
-  </div>\r
-\r
-     <div class="row" data-name="route_zone" >\r
-\r
-   \r
-      <div class="table-responsive">\r
-               <table class="table table-striped table-bordered  table-hover" id="msbTable">\r
-                                    <thead>\r
-                                        <tr>\r
-                                         <th></th> \r
-                                            <th style="display:none"></th> \r
-                                            <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th> \r
-                                            <th id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                            <th id="org_openo_msb_route_form_version" name_i18n="org_openo_msb_route_ui_i18n"></th>                                        \r
-                                         \r
-                                            <th id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></th>                                 \r
-                                            <th id="org_openo_msb_route_form_protocol" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                            <th id="org_openo_msb_route_form_visualrange" name_i18n="org_openo_msb_route_ui_i18n"></th>\r
-                                            <!--th>状态</th--> \r
-                                             <th id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>                                                                                \r
-                                        </tr>\r
-                                    </thead>\r
-                                    <tbody ms-each-msb="msbRouteArray">\r
-                                        <tr>\r
-                                         <td class="details-control"></td>\r
-                                            <td ms-each-node="msb.nodes" style="display:none">\r
-                                              {{node.ip}}:{{node.port}}:{{node.ttl}}\r
-                                            </td> \r
-                                            <td ms-text="$index+1"></td>\r
-                                            <td ms-text="msb.serviceName"></td>\r
-                                            <td ms-text="msb.version"></td>\r
-                                            \r
-                                            <td>{{msb.url==""?"/":msb.url}}</td>            \r
-                                            <td ms-text="msb.protocol"></td>\r
-                                            <td ms-text="routeUtil.showVisualRange(msb.visualRange)"></td>\r
-                                            <!--td ms-html="routeUtil.showStatus(msb.status)"></td--> \r
-                                            <td>\r
-                                           \r
-                                              <a href="#"  title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n" class="btn btn-default btn-s" ms-click="updatemsbRoute(msb)"><i class="fa fa  fa-pencil-square-o"></i></a>\r
-                                              <a href="#"  title="org_openo_msb_route_box_btn_delete" name_i18n="org_openo_msb_route_ui_i18n" class="btn btn-default btn-s" ms-click="delmsbRoute(msb.serviceName,msb.version,this)"><i class="fa fa-trash-o"></i></a>\r
-                                           \r
-                                            </td>                                      \r
-                                        </tr> \r
-                                                                            \r
-                                    </tbody>\r
-                                </table>\r
-                           \r
-                      </div>\r
-\r
-      \r
-\r
-           \r
-\r
-      </div>\r
-\r
- </div>\r
-\r
- </div>\r
-\r
-\r
-\r
-  <div class="row-fluid separator" id="upArrawDiv">\r
-           <div ms-visible="boxVisible" class="col-xs-12">\r
-                <a href="#" ms-click="clickDisplayGraphAlink()"><img src="img/up.png"/></a>\r
-             </div>\r
-   </div>\r
-\r
\r
-</div>\r
-\r
-<div class="row-fluid separator">\r
-\r
-            <div ms-visible="!boxVisible" class="col-xs-12">\r
-                <a href="#" ms-click="clickDisplayGraphAlink()" ><img src="img/down.png"/></a>\r
-            </div>\r
-</div>\r
-\r
-   <div class="container-fluid" style="margin-top:20px" id="serviceContent">\r
-\r
-       <div class="row" style=" margin-top: 15px;">\r
-         <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6">\r
-           <i class="fa fa-file-text-o fa-fw"></i> \r
-           <span class=" titlefont" ms-text="routeTargetTitle"></span>\r
-\r
-         </div>\r
-         <div class="pull-right"  ms-visible="vm.selectedRouteType=='api'">\r
-          <button type="button" class="btn btn-default btn-sm" style="padding:3px 8px"  ms-click="gotoRestDoc()"><i class="fa fa-link"></i> <span id="org_openo_msb_route_servicecontent_swagger" name_i18n="org_openo_msb_route_ui_i18n"></span></button>\r
-          <button type="button" class="btn btn-default btn-sm" style="padding:3px 8px"   ms-click="gotoJVM()"  ms-visible="vm.selectedRoute.metricsUrl!=''"><i class="fa fa-bar-chart"></i>   <span id="org_openo_msb_route_servicecontent_metrics" name_i18n="org_openo_msb_route_ui_i18n"></span></button>\r
-         </div>\r
-        \r
-       </div>\r
-     <div class="separator-line"></div>\r
-         \r
-\r
-        \r
-  <iframe src="" width="100%" scrolling="no" marginheight="0" frameborder="0" id="msbSubPage"  name="msbSubPage"  class="page-mainIframeisWare"  ></iframe>\r
-             \r
-\r
-      \r
-  </div>\r
\r
-\r
-</div>\r
-\r
-<script type="text/javascript" src="js/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>\r
-\r
-\r
-  <script type="text/javascript"  src="js/iframeResizer/iframeResizer.min.js"></script>\r
-  <script type="text/javascript" src="js/iframeResizer/iframeResizer.contentWindow.min.js"></script>\r
-\r
-       <script type="text/javascript"  src="js/bootstrap/js/bootstrap.min.js"></script>\r
-  <script type="text/javascript"  src="js/dataTables/jquery.dataTables.min.js"></script>\r
-  <script type="text/javascript"  src="js/dataTables/dataTables.bootstrap.min.js"></script>\r
-  <script type="text/javascript" src="js/bootbox/bootbox.min.js"></script>\r
-  <script src="js/bootstrap-growl.min.js"></script>\r
-  <script src="js/jquery-validation/jquery.validate.js"></script>\r
-       <script type="text/javascript"  src="js/avalon.js"></script>\r
-\r
-\r
-<script src="i18n/loadi18nApp_iui-route_view.js"></script>\r
-\r
-\r
-  <script type="text/javascript"   src="js/routeController.js"></script>\r
-\r
-\r
-<script type="text/javascript">\r
-\r
-$(function(){\r
-\r
-$('iframe').iFrameResize();\r
- loadPropertiesSideMenu('', 'msb-iui-route-i18n', 'i18n/'); \r
-avalon.scan();\r
-vm.$initRoute();\r
-\r
-\r
-});\r
-\r
-</script>\r
-  <script src="js/routeUtil.js"></script>\r
-  <script src="js/routeFunc.js"></script>\r
\r
-</body>\r
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<!DOCTYPE html>
+<html>
+<head lang="en">
+<meta charset="UTF-8">
+<title id="org_openo_msb_route_title" name_i18n="org_openo_msb_route_ui_i18n"></title>
+<link rel="shortcut icon" href="img/zte_logo_16.gif" />
+<link
+       href="js/fontAwesome/css/font-awesome.min.css"
+       rel="stylesheet" />
+<link
+       href="js/bootstrap/css/bootstrap.min.css"
+       rel="stylesheet" />
+
+
+
+<link href="css/route.css" rel="stylesheet" type="text/css" />
+<link href="css/animate.min.css" rel="stylesheet" type="text/css" />
+<link href="js/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
+
+<style>
+.ms-controller {
+       visibility: hidden
+}
+</style>
+
+  <script type="text/javascript"  src="js/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript">
+      var iuiRootPath="iui";
+      var apiRootPath="api";
+    
+      $.ajaxSettings.async = false;
+        $.getJSON("./ext/initUrlRootPath/initUrlRootPath.json",function(json){
+         iuiRootPath=json.iuiRootPath;
+         apiRootPath=json.apiRootPath;
+        });
+      
+
+      var apiBasePath="/"+apiRootPath+"/microservices/v1";
+      var iuiBasePath="/"+iuiRootPath+"/microservices";
+
+</script>
+
+
+
+
+</head>
+<body class="ms-controller"  ms-controller="routeController">
+
+<div class="navbar" id="routeHead">
+        <div class="navbar-inner container-fluid" id="top-bar">
+            <header class="row-fluid">
+                <h3 class="span12" id="title">
+                <img class="logo" src="img/conductor-logo.png" alt="Logo" id="logo">
+                    <small id="org_openo_msb_route_banner_title" name_i18n="org_openo_msb_route_ui_i18n"></small>
+                    <button type="button" class="btn btn-default" ms-click="exportServices()" style="float:right;margin-left: 10px; margin-top: 5px;"><i class=" fa fa-external-link"></i> <span id="org_openo_msb_route_btn_export" name_i18n="org_openo_msb_route_ui_i18n"></span></button> 
+
+                </h3>
+            </header>
+        </div>
+    </div>
+ <script type="text/javascript">
+ if (self != top) {document.getElementById("routeHead").style.display="none";}
+
+ var currentLang = navigator.language;  
+if(!currentLang) {currentLang = navigator.browserLanguage; } 
+if(currentLang.toLowerCase() != "zh-cn") {$("#logo").hide(); }
+ </script>
+
+<div style=" background-color: #f1f3fa !important; ">
+
+
+ <div class="row row1 container-fluid" ms-visible="boxVisible">
+
+   <ul class="nav nav-tabs" id="panelTab" style="margin-top: 10px;">
+  <li  class="active" ><a href="#apiPanel" data-toggle="tab" id="apiTab"><i class="fa fa-cloud fa-1x"></i> <span id="org_openo_msb_route_tab_api" name_i18n="org_openo_msb_route_ui_i18n"></span> </a></li>
+  <li ><a href="#iuiPanel" data-toggle="tab" id="iuiTab"><i class="fa fa-tv fa-1x"></i> <span id="org_openo_msb_route_tab_iui" name_i18n="org_openo_msb_route_ui_i18n"></span></a></li> 
+</ul>
+<div class="tab-content" >
+ <div id="apiPanel" class="tab-pane active"> 
+    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">
+   
+          <button ms-visible="!discoverInfo.enabled" class="btn btn-primary" id="app-new-btn" ms-click="$showApiRouteDlg()" >
+                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_api" name_i18n="org_openo_msb_route_ui_i18n"></span>
+               </button>
+       
+    </div>
+
+
+<div id="routeDlg" class="modal  fade" tabindex="-1" role="dialog"
+        aria-labelledby="myModalLabel" aria-hidden="true" >
+        <div class="modal-dialog">
+            <div class="modal-content Changepasswd">
+                <div class="content">
+                    <div class="modal-header">
+                        <button type="button" class="close" data-dismiss="modal"
+                            aria-hidden="true">×</button>
+                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>
+                    </div>
+                    <div class="modal-body">
+                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>
+                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>
+                   
+
+    
+
+ <div id="info" class="tab-pane active">                     
+                      
+      <form class="form-horizontal" id="routeForm" role="form">   
+           
+               <div class="tipArea" id="org_openo_msb_route_form_sourceservice" name_i18n="org_openo_msb_route_ui_i18n"></div> 
+                <div class="form-group" ms-visible="!discoverInfo.enabled">
+                            
+                             <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  <span class="required" aria-required="true">*</span>
+                                </label>   
+                          
+                              
+                                 <div class="col-sm-6" style="padding-right: 5px;">
+                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                <input type="text" ms-duplex="apiRouteInfo.server"  name="server" class="form-control form-tip"  ms-attr-disabled="discoverInfo.enabled" style="display:inline-block;" />
+                                 <span class="help-block"></span>
+                                 </div>
+                                  <div class="col-sm-1" style=" padding-left: 0px;" >  
+                                 <a href="#" ms-click="addapiHost()"  class="btn btn-default " title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>
+                                 </div>
+                             </div>
+
+                              <div class="form-group">
+                            <label class="control-label col-sm-3">
+                               <span ms-visible="discoverInfo.enabled" id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                            </label>     
+                           <div  class="hostTableDiv col-sm-7">
+                                 <table class="table table-striped hostTable">
+                                   <thead>
+                                      <tr>
+                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                         <th>IP</th>
+                                         <th>PORT</th>
+                                         <th ms-visible="!discoverInfo.enabled" id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                      </tr>
+                                   </thead>
+                                   <tbody ms-each-server="vm.apiRouteInfo.servers">
+                                      <tr>
+                                         <td>{{$index+1}}</td>
+                                         <td ms-text="server.ip"></td>
+                                         <td ms-text="server.port"></td>
+                                         <td ms-visible="!discoverInfo.enabled"><a href="#" ms-click="delapiHost(server.ip,server.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>
+                                      </tr> 
+                                     
+                   
+                                   </tbody>
+                                   </table> 
+                                </div> 
+
+                        </div>
+              
+                         <div class="form-group" tyle="margin-bottom: 0;">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span> 
+                                </label>
+                            <div class="col-sm-7">
+                                
+                                <input type="text" ms-duplex="apiRouteInfo.url"  name="url" class="form-control" id="form-url" value="/" ms-attr-disabled="discoverInfo.enabled"/>
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+                 <div class="tipArea" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>       
+               <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                              
+                                </label>
+                            <div class="col-sm-7">
+            
+                              {{vm.targetServiceUrl}}/{{vm.apiRootPath}}/{{vm.apiRouteInfo.serviceName}}/{{vm.apiRouteInfo.version}}
+                               <span class="help-block"></span>
+                            </div>
+                            
+                        </div>    
+             <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">  
+                                <input type="text" ms-duplex="apiRouteInfo.serviceName"  name="serviceName"  class="form-control" ms-attr-disabled="discoverInfo.enabled" />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+            
+             <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_version" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                   
+                                </label>
+                            <div class="col-sm-7">                            
+                             <div class="item-tip" ms-class-item-tip-none ="routeDlgInfo.saveType=='update'" id="org_openo_msb_route_form_version_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                <input type="text" ms-duplex="apiRouteInfo.version"  name="version" class="form-control form-tip"  ms-attr-disabled="discoverInfo.enabled" />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+                         
+            
+            
+                         <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span><a href="javascript:;"  class="collapse-box" data-toggle="collapse" 
+                             data-target="#apiJsonFullurl">
+                                    <i class="fa fa-plus" id="apiJsonCollapse"></i> <span id="org_openo_msb_route_form_swagger" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  </a></span>
+                                
+                                </label>
+                            <div class="col-sm-7">
+                               <div class="input-group">
+                        <input type="text" class="form-control"  ms-if="apiRouteInfo.apiJsonType=='1'" ms-duplex="apiJson.custom"  ms-attr-disabled="routeDlgInfo.saveType=='view'"/>
+                        <select class="form-control m-b" ms-if="apiRouteInfo.apiJsonType=='0'"  ms-each="jsonApiSelectList.selectItems"   ms-duplex="apiJson.local" id="apiJsonSelect" ms-attr-disabled="routeDlgInfo.saveType=='view'">             
+                            <option ms-attr-value='el'>{{el}}</option>
+                        </select>
+
+                            <div class="input-group-btn">
+                                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false" ms-attr-disabled="routeDlgInfo.saveType=='view'">{{showAPITypeName[apiRouteInfo.apiJsonType]}} <span class="caret"></span></button>
+                                <ul class="dropdown-menu pull-right">
+                                    <li><a ms-click="setAPIType(0)">{{showAPITypeName[0]}}</a></li>          
+                                    <li><a ms-click="setAPIType(1)">{{showAPITypeName[1]}}</a></li>
+                                </ul>
+                            </div>
+                        </div>
+                                <span class="help-block"></span>
+                            </div>
+                         
+
+                        
+                            
+                        </div>
+
+                        <div id="apiJsonFullurl" class="form-group collapse in">
+                         <label class="control-label col-sm-3"><span id="org_openo_msb_route_form_swagger_address" name_i18n="org_openo_msb_route_ui_i18n"></span></label>
+                                <div  class="col-sm-9">
+                                <div> 
+                                  <i class="fa fa-home fa-fw"></i> <span id="org_openo_msb_route_form_target_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  <span ms-if="vm.apiRouteInfo.apiJsonType==0">{{vm.targetServiceUrl}}/iui/microservices/ext/initSwaggerJson/{{vm.apiJson.local}}</span>
+                                  <span ms-if="vm.apiRouteInfo.apiJsonType==1">{{vm.apiRouteInfo.servers[0].ip+":"+vm.apiRouteInfo.servers[0].port}}{{vm.apiJson.custom}}</span>
+                                  </div>
+                                  <div> 
+                                  <i class="fa fa-cloud-upload fa-fw"></i><span id="org_openo_msb_route_form_publish_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  <span ms-if="vm.apiRouteInfo.apiJsonType==0">{{vm.targetServiceUrl}}/iui/microservices/ext/initSwaggerJson/{{vm.apiJson.local}}</span>
+                                  <span ms-if="vm.apiRouteInfo.apiJsonType==1">{{vm.targetServiceUrl}}/apijson/{{vm.apiRouteInfo.serviceName}}/{{vm.apiRouteInfo.version}}</span>
+                                </div> 
+
+                                
+                                </div>
+                        </div>
+
+                        <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span><a href="javascript:;"  class=" collapse-box" data-toggle="collapse" 
+                             data-target="#metricsFullurl">
+                                    <i class="fa fa-plus" id="metricsUrlCollapse"></i> <span id="org_openo_msb_route_form_metrics" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  </a></span>                                   
+                                </label>
+                            <div class="col-sm-7">
+                                                         
+                                <input type="text" ms-duplex="apiRouteInfo.metricsUrl"  name="metricsUrl" class="form-control"  value="/admin/metrics" ms-attr-disabled="routeDlgInfo.saveType=='view'" />
+                               
+                           
+                                 <span class="help-block"></span>
+                            </div>
+                            
+                           
+                            
+                        </div>
+                        <div id="metricsFullurl" class="form-group collapse in">
+                         <label class="control-label col-sm-3"><span id="org_openo_msb_route_form_metrics_address" name_i18n="org_openo_msb_route_ui_i18n"></span></label>
+                                <div  class="col-sm-9">
+                                <div> 
+                                  <i class="fa fa-home fa-fw"></i><span id="org_openo_msb_route_form_target_address" name_i18n="org_openo_msb_route_ui_i18n"></span> {{vm.apiRouteInfo.servers[0].ip+":"+vm.apiRouteInfo.servers[0].port}}{{vm.apiRouteInfo.metricsUrl}}</span>
+                                  </div>
+                                  <div> 
+                                  <i class="fa fa-cloud-upload fa-fw"></i><span id="org_openo_msb_route_form_publish_address" name_i18n="org_openo_msb_route_ui_i18n"></span> {{vm.targetServiceUrl}}/admin/{{vm.apiRouteInfo.serviceName}}/{{vm.apiRouteInfo.version}}
+                                </div> 
+                                 
+                                </div>
+                        </div>
+            </form>
+   </div>         
+      
+
+          
+
+                    </div>
+                    <div class="modal-footer" 
+                         ms-visible="routeDlgInfo.saveType!='view'">
+                        <button class="btn" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                        <button class="btn btn-primary" type="submit" ms-click="$saveApiRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                    </div>
+                    <div class="modal-footer" 
+                         ms-visible="routeDlgInfo.saveType=='view'">
+                        <button class="btn  btn-primary" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_close" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                       
+                    </div>
+                </div>
+
+            </div>
+        </div>
+    </div>
+
+     <div class="row" data-name="route_zone" >
+
+        <span class="response_throbber" ms-visible="vm.routeLoading"></span>
+
+            <div class="stats_box"  ms-each-route="apiRouteArray">
+
+                 <div class="routeDiv">
+                   <div class="sparkline"  ms-click="gotoTarget(route,'api')"  data-name="route_click_zone">                    
+                    <i class="fa fa-cloud fa-3x" ms-class-route-valid ="route.status === '1'" ms-class-route-invalid ="route.status === '0'"></i>
+                   
+                  </div>
+                  <div class="stat_text"  ms-click="gotoTarget(route,'api')" data-name="route_click_zone">
+                    <strong ms-text="route.serviceName"></strong> 
+                    <span><b id="org_openo_msb_route_box_version" name_i18n="org_openo_msb_route_ui_i18n"></b>{{route.version}}</span>
+                            
+                    </div> 
+                     
+                  <span ms-visible="!discoverInfo.enabled">
+                    
+                         <a class="btn btn-default"  ms-click="updateApiRoute(route,'update')" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa  fa-pencil-square-o" > </i></a>          
+                       <a class="btn btn-default" ms-click="delApiRoute(route.serviceName,route.version)" ms-visible="route.control !='1'" title="org_openo_msb_route_box_btn_delete" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-trash-o" > </i></a>
+                       <a class="btn btn-default" ms-visible="route.status === '1' && route.control !='1'" title="org_openo_msb_route_box_btn_disable" name_i18n="org_openo_msb_route_ui_i18n"  ms-click="updateApiRouteStatus(route.serviceName,route.version,'0')"><i class="fa fa-stop" style="color:red;font-size:10px"></i></a>
+                       <a class="btn btn-default" ms-visible="route.status === '0' && route.control !='1'" title="org_openo_msb_route_box_btn_able" name_i18n="org_openo_msb_route_ui_i18n"  ms-click="updateApiRouteStatus(route.serviceName,route.version,'1')"><i class="fa fa-play"  style="color:green;font-size:10px"></i></a>
+                    </span> 
+                    <span ms-visible="discoverInfo.enabled">
+        <a class="btn btn-default"  ms-click="updateApiRoute(route,'update')"><i class="fa  fa-pencil-square-o" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n"> </i></a> 
+                    <a class="btn btn-default"  ms-click="updateApiRoute(route,'view')"><i class="fa  fa-file-text-o" title="org_openo_msb_route_box_btn_view" name_i18n="org_openo_msb_route_ui_i18n"> </i></a>  </span>
+                 
+                </div>
+
+                </div>
+
+      </div>
+
+
+ </div>
+ <div id="iuiPanel" class="tab-pane"> 
+    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">
+        <button ms-visible="!discoverInfo.enabled" class="btn btn-primary" id="app-new-btn" ms-click="$showiuiRouteDlg()" >
+                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_iui" name_i18n="org_openo_msb_route_ui_i18n">
+               </button>
+       
+  </div>
+
+  <div id="iuirouteDlg" class="modal  fade" tabindex="-1" role="dialog"
+        aria-labelledby="myModalLabel" aria-hidden="true" >
+        <div class="modal-dialog">
+            <div class="modal-content Changepasswd">
+                <div class="content">
+                    <div class="modal-header">
+                        <button type="button" class="close" data-dismiss="modal"
+                            aria-hidden="true">×</button>
+                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>
+                    </div>
+                    <div class="modal-body">
+                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>
+                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>
+
+      <form class="form-horizontal" id="iuirouteForm" role="form">   
+             
+          <div class="tipArea" id="org_openo_msb_route_form_sourceservice" name_i18n="org_openo_msb_route_ui_i18n"></div>   
+               <div class="form-group"  ms-visible="!discoverInfo.enabled">
+                            
+                             <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  <span class="required" aria-required="true">*</span>
+                                </label>   
+                          
+                              
+                                 <div class="col-sm-6" style="padding-right: 5px;">
+                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                <input type="text" ms-duplex="iuiRouteInfo.server"  name="iuiserver" class="form-control form-tip"  style="display:inline-block;"  ms-attr-disabled="discoverInfo.enabled" />
+                                 <span class="help-block"></span>
+                                 </div>
+                                  <div class="col-sm-1" style=" padding-left: 0px;" >  
+                                 <a href="#" ms-click="addiuiHost()" class="btn btn-default " title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>
+                                 </div>
+                             </div>
+
+                              <div class="form-group">
+                            <label class="control-label col-sm-3" >
+                              
+                               <span ms-visible="discoverInfo.enabled" id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                            </label>     
+                           <div  class="hostTableDiv col-sm-7">
+                                 <table class="table table-striped hostTable">
+                                   <thead>
+                                      <tr>
+                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                         <th>IP</th>
+                                         <th>PORT</th>
+                                         <th ms-visible="routeDlgInfo.saveType!='view'" id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                      </tr>
+                                   </thead>
+                                   <tbody ms-each-server="vm.iuiRouteInfo.servers">
+                                      <tr>
+                                         <td>{{$index+1}}</td>
+                                         <td ms-text="server.ip"></td>
+                                         <td ms-text="server.port"></td>
+                                         <td ms-visible="routeDlgInfo.saveType!='view'"><a href="#" ms-click="deliuiHost(server.ip,server.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>
+                                      </tr> 
+                                     
+                   
+                                   </tbody>
+                                   </table> 
+                                </div> 
+
+                        </div>
+
+               
+                         <div class="form-group" tyle="margin-bottom: 0;">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">
+                                
+                                <input type="text" ms-duplex="iuiRouteInfo.url"  name="iuiurl" class="form-control" value="/"   ms-attr-disabled="discoverInfo.enabled" />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+                        <div class="tipArea" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+               <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                              
+                                </label>
+                            <div class="col-sm-7">
+            
+                               {{vm.targetServiceUrl}}/{{vm.iuiRootPath}}/{{vm.iuiRouteInfo.serviceName}}
+                               <span class="help-block"></span>
+                            </div>
+                             <!--i class="fa fa-info-circle fa-lg tip_color" data-toggle="tooltip" data-placement="bottom" title="org_openo_msb_route_form_iui_tip" name_i18n="org_openo_msb_route_ui_i18n" ></i-->
+                            
+                        </div>    
+             <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">  
+                                <input type="text" ms-duplex="iuiRouteInfo.serviceName"  name="iuiserviceName"  class="form-control"  ms-attr-disabled="discoverInfo.enabled" />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+            
+             
+                       
+            
+            
+                    
+            </form>
+       
+         
+        </div>
+          
+
+                    </div>
+                    <div class="modal-footer" ms-visible="routeDlgInfo.saveType!='view'">
+                        <button class="btn" data-dismiss="modal" aria-hidden="true"  id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                        <button class="btn btn-primary" type="submit" ms-click="$saveiuiRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                    </div>
+                    <div class="modal-footer" 
+                         ms-visible="routeDlgInfo.saveType=='view'">
+                        <button class="btn  btn-primary" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_close" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                       
+                    </div>
+                </div>
+
+            </div>
+  </div>
+
+     <div class="row" data-name="route_zone" >
+
+        <span class="response_throbber" ms-visible="vm.routeLoading"></span>
+
+            <div class="stats_box"  ms-each-route="iuiRouteArray">
+
+                 <div class="routeDiv" ms-visible="route.control !='2'">
+                   <div class="sparkline"  ms-click="gotoTarget(route,'iui')"  data-name="route_click_zone">                    
+                    <i class="fa fa-tv fa-3x"  ms-class-route-valid ="route.status === '1'" ms-class-route-invalid ="route.status === '0'"></i>
+                   
+                  </div>
+                  <div class="stat_text"  ms-click="gotoTarget(route,'iui')" data-name="route_click_zone">
+                    <strong ms-text="route.serviceName"></strong> 
+                    <span>{{route.servers[0].ip}}:{{route.servers[0].port}}</span>          
+                    </div> 
+                  <span ms-visible="!discoverInfo.enabled">
+                    
+                       <a class="btn btn-default"  ms-click="updateiuiRoute(route,'update')"><i class="fa  fa-pencil-square-o" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n" > </i></a>             
+                       <a class="btn btn-default" ms-click="deliuiRoute(route.serviceName)" ms-visible="route.control !='1'"><i class="fa fa-trash-o" title="删除"> </i></a>
+                       <a class="btn btn-default" ms-visible="route.status === '1' && route.control !='1'" title="org_openo_msb_route_box_btn_disable" name_i18n="org_openo_msb_route_ui_i18n" ms-click="updateiuiRouteStatus(route.serviceName,'0')"><i class="fa fa-stop" style="color:red;font-size:10px"></i></a>
+                       <a class="btn btn-default" ms-visible="route.status === '0' && route.control !='1'"  title="org_openo_msb_route_box_btn_able" name_i18n="org_openo_msb_route_ui_i18n" ms-click="updateiuiRouteStatus(route.serviceName,'1')"><i class="fa fa-play"  style="color:green;font-size:10px"></i></a>
+                    </span> 
+                    <span ms-visible="discoverInfo.enabled"><a class="btn btn-default"  ms-click="updateiuiRoute(route,'view')"><i class="fa  fa-file-text-o" title="org_openo_msb_route_box_btn_view" name_i18n="org_openo_msb_route_ui_i18n"> </i></a>  </span>
+                 
+                </div>
+
+                </div>
+
+      </div>
+
+ </div>
+
+ <div id="customPanel" class="tab-pane"> 
+    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">
+        <button ms-visible="!discoverInfo.enabled" class="btn btn-primary" id="app-new-btn" ms-click="$showcustomRouteDlg()" >
+                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_custom" name_i18n="org_openo_msb_route_ui_i18n"></span>
+               </button>
+       
+  </div>
+
+  <div id="customrouteDlg" class="modal  fade" tabindex="-1" role="dialog"
+        aria-labelledby="myModalLabel" aria-hidden="true" >
+        <div class="modal-dialog">
+            <div class="modal-content Changepasswd">
+                <div class="content">
+                    <div class="modal-header">
+                        <button type="button" class="close" data-dismiss="modal"
+                            aria-hidden="true">×</button>
+                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>
+                    </div>
+                    <div class="modal-body">
+                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>
+                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>
+
+      <form class="form-horizontal" id="customrouteForm" role="form">   
+             
+            <div class="tipArea" id="org_openo_msb_route_form_sourceservice" name_i18n="org_openo_msb_route_ui_i18n"></div> 
+                <div class="form-group"  ms-visible="!discoverInfo.enabled">
+                            
+                             <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  <span class="required" aria-required="true">*</span>
+                                </label>   
+                          
+                              
+                                 <div class="col-sm-6" style="padding-right: 5px;">
+                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                <input type="text" ms-duplex="customRouteInfo.server"  name="customserver" class="form-control form-tip"  style="display:inline-block;"  ms-attr-disabled="discoverInfo.enabled" />
+                                 <span class="help-block"></span>
+                                 </div>
+                                  <div class="col-sm-1" style=" padding-left: 0px;" ms-visible="routeDlgInfo.saveType!='view'">  
+                                 <a href="#" ms-click="addcustomHost()" class="btn btn-default "  title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>
+                                 </div>
+                             </div>
+
+                              <div class="form-group">
+                            <label class="control-label col-sm-3">
+                               <span ms-visible="discoverInfo.enabled" id="org_openo_msb_route_form_address" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                            </label>     
+                           <div  class="hostTableDiv col-sm-7">
+                                 <table class="table table-striped hostTable">
+                                   <thead>
+                                      <tr>
+                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                         <th>IP</th>
+                                         <th>PORT</th>
+                                         <th ms-visible="routeDlgInfo.saveType!='view'" id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                      </tr>
+                                   </thead>
+                                   <tbody ms-each-server="vm.customRouteInfo.servers">
+                                      <tr>
+                                         <td>{{$index+1}}</td>
+                                         <td ms-text="server.ip"></td>
+                                         <td ms-text="server.port"></td>
+                                         <td ms-visible="routeDlgInfo.saveType!='view'"><a href="#" ms-click="delcustomHost(server.ip,server.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>
+                                      </tr> 
+                                     
+                   
+                                   </tbody>
+                                   </table> 
+                                </div> 
+
+                        </div>
+
+
+               
+                         <div class="form-group" tyle="margin-bottom: 0;">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">
+                                
+                                <input type="text" ms-duplex="customRouteInfo.url"  name="customurl" class="form-control" value="/"  ms-attr-disabled="discoverInfo.enabled" />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+
+                        <div class="tipArea" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+               <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                              
+                                </label>
+                            <div class="col-sm-7">
+            
+                               {{vm.targetServiceUrl}}{{vm.customRouteInfo.serviceName}}
+                               <span class="help-block"></span>
+                            </div>
+                           
+                            
+                        </div>    
+             <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    
+                                </label>
+                            <div class="col-sm-7">  
+                                <input type="text" ms-duplex="customRouteInfo.serviceName"  name="customserviceName"  class="form-control"  ms-attr-disabled="discoverInfo.enabled"  />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+            
+                    
+            </form>
+       
+         
+        </div>
+          
+
+                    </div>
+                    <div class="modal-footer" ms-visible="routeDlgInfo.saveType!='view'">
+                        <button class="btn" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                        <button class="btn btn-primary" type="submit" ms-click="$savecustomRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                    </div>
+                    <div class="modal-footer" 
+                         ms-visible="routeDlgInfo.saveType=='view'">
+                        <button class="btn  btn-primary" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_close" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                       
+                    </div>
+                </div>
+
+            </div>
+  </div>
+
+     <div class="row" data-name="route_zone" >
+
+        <span class="response_throbber" ms-visible="vm.routeLoading"></span>
+
+
+        <div ms-each-el="customGroupRouteArray">
+          <div class="form-title">
+              <span><a data-toggle="collapse" >{{routeUtil.showGroupName($index,el)}}</a>
+                <span class="label label-info" style="margin-left: 10px;">{{customGroupRouteArray[$index].length}}</span>
+              </span>
+               <div class="panel-tools">                   
+                    <a class="showhide" data-toggle="collapse"><i class="fa fa-chevron-up"></i></a>
+                </div>
+            </div>
+          <div style="width: 100%;" class="collapseContent collapse in">
+           <div class="stats_box"  ms-each-elem="el">
+                 <div class="routeDiv" ms-visible="elem.control !='2'">
+                   <div class="sparkline"  data-name="route_click_zone">                    
+                    <i class="fa fa-cogs fa-3x"  ms-class-route-valid ="elem.status === '1'" ms-class-route-invalid ="elem.status === '0'"></i>
+                   
+                  </div>
+                  <div class="stat_text"  data-name="route_click_zone" style="padding: 9px 0px 4px 0;">
+                    <strong ms-text="elem.serviceName==''?'/':elem.serviceName" style="height: 35px;word-wrap:break-word;word-break: normal;"></strong> 
+                    <span>{{elem.servers[0].ip}}:{{elem.servers[0].port}}</span>          
+                    </div> 
+                  <span ms-visible="!discoverInfo.enabled">
+                    
+                       <a class="btn btn-default"  ms-click="updatecustomRoute(elem,'update')"><i class="fa  fa-pencil-square-o" title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n" > </i></a>             
+                       <a class="btn btn-default" ms-click="delcustomRoute(elem.serviceName)" ms-visible="elem.control !='1'"><i class="fa fa-trash-o" title="删除"> </i></a>
+                       <a class="btn btn-default" ms-visible="elem.status === '1' && elem.control !='1'" title="org_openo_msb_route_box_btn_disable" name_i18n="org_openo_msb_route_ui_i18n" ms-click="updatecustomRouteStatus(elem.serviceName,'0')"><i class="fa fa-stop" style="color:red;font-size:10px"></i></a>
+                       <a class="btn btn-default" ms-visible="elem.status === '0' && elem.control !='1'" title="org_openo_msb_route_box_btn_able" name_i18n="org_openo_msb_route_ui_i18n"  ms-click="updatecustomRouteStatus(elem.serviceName,'1')"><i class="fa fa-play"  style="color:green;font-size:10px"></i></a>
+                    </span> 
+                    <span ms-visible="discoverInfo.enabled"><a class="btn btn-default"  ms-click="updatecustomRoute(elem,'view')"><i class="fa  fa-file-text-o" title="org_openo_msb_route_box_btn_view" name_i18n="org_openo_msb_route_ui_i18n"> </i></a>  </span>
+                 
+                </div>
+
+                </div>
+           </div>
+
+        </div>
+
+           
+
+      </div>
+
+ </div>
+
+
+ <div id="msbPanel" class="tab-pane"> 
+    <div class="row" style=" margin-top: 10px;text-align:right;  margin-right: 20px;">
+        <button class="btn btn-primary" id="app-new-btn" ms-click="$showmsbRouteDlg()" >
+                  <i class=" fa fa-plus-circle"></i> <span id="org_openo_msb_route_btn_add_msb" name_i18n="org_openo_msb_route_ui_i18n"></span>
+               </button>
+       
+  </div>
+
+  <div id="msbrouteDlg" class="modal  fade" tabindex="-1" role="dialog"
+        aria-labelledby="myModalLabel" aria-hidden="true" >
+        <div class="modal-dialog">
+            <div class="modal-content">
+                <div class="content">
+                    <div class="modal-header">
+                        <button type="button" class="close" data-dismiss="modal"
+                            aria-hidden="true">×</button>
+                        <h3 id="myModalLabel" ms-text="routeDlgInfo.titleName"></h3>
+                    </div>
+                    <div class="modal-body">
+                     <div class="alert alert-info" ms-visible="server_rtn.info_block"></div>
+                    <div class="alert alert-danger " ms-visible="server_rtn.warning_block" ms-text="server_rtn.rtn_info"></div>
+
+      <form class="form-horizontal" id="msbForm" role="form">   
+          <div class="tipArea" id="org_openo_msb_route_msb_info" name_i18n="org_openo_msb_route_ui_i18n"></div> 
+                    <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">  
+                                <input type="text" ms-duplex="msbRouteInfo.serviceName"  name="serviceName"  class="form-control"  />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+
+                        <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_version" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                </label>
+                            <div class="col-sm-7">                            
+                             <div class="item-tip" id="org_openo_msb_route_form_version_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                <input type="text" ms-duplex="msbRouteInfo.version"  name="version" class="form-control form-tip"   />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+
+                     
+
+                        <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></span>                                   
+                                </label>
+                            <div class="col-sm-7">
+                              
+                                <input type="text" ms-duplex="msbRouteInfo.url"  name="url" class="form-control" />
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+
+
+                        <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_protocol" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">
+                                <select class="form-control m-b" ms-each="$msbProtocol"  name="protocol" ms-duplex="msbRouteInfo.protocol" >             
+                                  <option ms-attr-value='el'>{{el}}</option>
+                                 </select>
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+
+                        <div class="form-group">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_visualrange" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                    <span class="required" aria-required="true">*</span>
+                                </label>
+                            <div class="col-sm-7">
+                             <input  type="checkbox" ms-duplex="msbRouteInfo.visualRangeArray" value="0" ><span style="margin-right: 20px;"  id="org_openo_msb_route_form_intersystem" name_i18n="org_openo_msb_route_ui_i18n" ></span>
+                                     <input type="checkbox" ms-duplex="msbRouteInfo.visualRangeArray" value="1" ><span style="margin-right: 20px;" id="org_openo_msb_route_form_insystem" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                               
+                                <span class="help-block"></span>
+                            </div>
+                            
+                        </div>
+
+                          <div class="tipArea" id="org_openo_msb_route_msb_hostlist" name_i18n="org_openo_msb_route_ui_i18n"></div> 
+
+                            <div class="form-group">
+                            
+                             <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_msb_host" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                                  <span class="required" aria-required="true">*</span>
+                                </label>   
+                          
+                              
+                                 <div class="col-sm-4" style="padding-right: 5px;">
+                                 <div class="item-tip" id="org_openo_msb_route_form_host_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                
+                                <input type="text"  placeholder=""  ms-duplex="msbRouteInfo.newHost" class="form-control form-tip"   name="newHost" style="display:inline-block;" />
+                                 
+                                 <span class="help-block"></span>
+                                 </div>
+                                  <div class="col-sm-2" style="padding-right: 5px;">
+                                 <div class="item-tip" id="org_openo_msb_route_form_ttl_tip" name_i18n="org_openo_msb_route_ui_i18n"></div>
+                                
+                                <input type="text"  placeholder=""  ms-duplex="msbRouteInfo.newttl" class="form-control form-tip"   name="newttl" style="display:inline-block;" />
+                                 
+                                 <span class="help-block"></span>
+                                 </div>
+                                  <div class="col-sm-1" style=" padding-left: 0px;">  
+                                 <a href="#" ms-click="addmsbHost()" class="btn btn-default " title="org_openo_msb_route_form_btn_addhost" name_i18n="org_openo_msb_route_ui_i18n"><i class="fa fa-plus-circle"></i></a>
+                                 </div>
+                             </div>
+
+                              <div class="form-group">
+                            <label class="control-label col-sm-3"></label>     
+                           <div  class="hostTableDiv col-sm-7">
+                                 <table class="table table-striped hostTable">
+                                   <thead>
+                                      <tr>
+                                         <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                         <th>IP</th>
+                                         <th>PORT</th>
+                                         <th>TTL</th>
+                                         <th id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                      </tr>
+                                   </thead>
+                                   <tbody ms-each-node="vm.msbRouteInfo.nodes">
+                                      <tr>
+                                         <td>{{$index+1}}</td>
+                                         <td ms-text="node.ip"></td>
+                                         <td ms-text="node.port"></td>
+                                         <td ms-text="node.ttl"></td>
+                                         <td><a href="#"  title="org_openo_msb_route_form_btn_delhost" name_i18n="org_openo_msb_route_ui_i18n" ms-click="delmsbHost(node.ip,node.port)" style="padding: 0px 6px;" class="btn btn-default btn-s"><i class="fa fa-trash-o"></i></a></td>
+                                      </tr> 
+                                     
+                   
+                                   </tbody>
+                                   </table> 
+                                </div> 
+
+                        </div>
+
+                        <div class="tipArea"  ms-visible="msbRouteInfo.protocol=='REST'||msbRouteInfo.protocol=='UI'" id="org_openo_msb_route_form_target_tip" name_i18n="org_openo_msb_route_ui_i18n"></div> 
+                         <div class="form-group"  ms-visible="msbRouteInfo.protocol=='REST'||msbRouteInfo.protocol=='UI'">
+                            <label class="control-label col-sm-3">
+                                    <span id="org_openo_msb_route_form_target_service" name_i18n="org_openo_msb_route_ui_i18n"></span>
+                              
+                                </label>
+                            <div class="col-sm-7">
+                           {{vm.targetFullServiceUrl}}             
+                              
+                             
+                            </div>
+                            
+                        </div> 
+          
+            </form>
+       
+         
+        </div>
+          
+
+                    </div>
+                    <div class="modal-footer">
+                        <button class="btn" data-dismiss="modal" aria-hidden="true" id="org_openo_msb_route_form_btn_cancel" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                        <button class="btn btn-primary" type="submit" ms-click="$savemsbRoute()" id="org_openo_msb_route_form_btn_save" name_i18n="org_openo_msb_route_ui_i18n"></button>
+                    </div>
+                </div>
+
+            </div>
+  </div>
+
+     <div class="row" data-name="route_zone" >
+
+   
+      <div class="table-responsive">
+               <table class="table table-striped table-bordered  table-hover" id="msbTable">
+                                    <thead>
+                                        <tr>
+                                         <th></th> 
+                                            <th style="display:none"></th> 
+                                            <th id="org_openo_msb_route_form_node_no" name_i18n="org_openo_msb_route_ui_i18n"></th> 
+                                            <th id="org_openo_msb_route_form_servicename" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                            <th id="org_openo_msb_route_form_version" name_i18n="org_openo_msb_route_ui_i18n"></th>                                        
+                                         
+                                            <th id="org_openo_msb_route_form_url" name_i18n="org_openo_msb_route_ui_i18n"></th>                                 
+                                            <th id="org_openo_msb_route_form_protocol" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                            <th id="org_openo_msb_route_form_visualrange" name_i18n="org_openo_msb_route_ui_i18n"></th>
+                                            <!--th>状态</th--> 
+                                             <th id="org_openo_msb_route_form_node_control" name_i18n="org_openo_msb_route_ui_i18n"></th>                                                                                
+                                        </tr>
+                                    </thead>
+                                    <tbody ms-each-msb="msbRouteArray">
+                                        <tr>
+                                         <td class="details-control"></td>
+                                            <td ms-each-node="msb.nodes" style="display:none">
+                                              {{node.ip}}:{{node.port}}:{{node.ttl}}
+                                            </td> 
+                                            <td ms-text="$index+1"></td>
+                                            <td ms-text="msb.serviceName"></td>
+                                            <td ms-text="msb.version"></td>
+                                            
+                                            <td>{{msb.url==""?"/":msb.url}}</td>            
+                                            <td ms-text="msb.protocol"></td>
+                                            <td ms-text="routeUtil.showVisualRange(msb.visualRange)"></td>
+                                            <!--td ms-html="routeUtil.showStatus(msb.status)"></td--> 
+                                            <td>
+                                           
+                                              <a href="#"  title="org_openo_msb_route_box_btn_update" name_i18n="org_openo_msb_route_ui_i18n" class="btn btn-default btn-s" ms-click="updatemsbRoute(msb)"><i class="fa fa  fa-pencil-square-o"></i></a>
+                                              <a href="#"  title="org_openo_msb_route_box_btn_delete" name_i18n="org_openo_msb_route_ui_i18n" class="btn btn-default btn-s" ms-click="delmsbRoute(msb.serviceName,msb.version,this)"><i class="fa fa-trash-o"></i></a>
+                                           
+                                            </td>                                      
+                                        </tr> 
+                                                                            
+                                    </tbody>
+                                </table>
+                           
+                      </div>
+
+      
+
+           
+
+      </div>
+
+ </div>
+
+ </div>
+
+
+
+  <div class="row-fluid separator" id="upArrawDiv">
+           <div ms-visible="boxVisible" class="col-xs-12">
+                <a href="#" ms-click="clickDisplayGraphAlink()"><img src="img/up.png"/></a>
+             </div>
+   </div>
+
+</div>
+
+<div class="row-fluid separator">
+
+            <div ms-visible="!boxVisible" class="col-xs-12">
+                <a href="#" ms-click="clickDisplayGraphAlink()" ><img src="img/down.png"/></a>
+            </div>
+</div>
+
+   <div class="container-fluid" style="margin-top:20px" id="serviceContent">
+
+       <div class="row" style=" margin-top: 15px;">
+         <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6">
+           <i class="fa fa-file-text-o fa-fw"></i> 
+           <span class=" titlefont" ms-text="routeTargetTitle"></span>
+
+         </div>
+         <div class="pull-right"  ms-visible="vm.selectedRouteType=='api'">
+          <button type="button" class="btn btn-default btn-sm" style="padding:3px 8px"  ms-click="gotoRestDoc()"><i class="fa fa-link"></i> <span id="org_openo_msb_route_servicecontent_swagger" name_i18n="org_openo_msb_route_ui_i18n"></span></button>
+          <button type="button" class="btn btn-default btn-sm" style="padding:3px 8px"   ms-click="gotoJVM()"  ms-visible="vm.selectedRoute.metricsUrl!=''"><i class="fa fa-bar-chart"></i>   <span id="org_openo_msb_route_servicecontent_metrics" name_i18n="org_openo_msb_route_ui_i18n"></span></button>
+         </div>
+        
+       </div>
+     <div class="separator-line"></div>
+         
+
+        
+  <iframe src="" width="100%" scrolling="no" marginheight="0" frameborder="0" id="msbSubPage"  name="msbSubPage"  class="page-mainIframeisWare"  ></iframe>
+             
+
+      
+  </div>
+
+</div>
+
+<script type="text/javascript" src="js/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+
+
+  <script type="text/javascript"  src="js/iframeResizer/iframeResizer.min.js"></script>
+  <script type="text/javascript" src="js/iframeResizer/iframeResizer.contentWindow.min.js"></script>
+
+       <script type="text/javascript"  src="js/bootstrap/js/bootstrap.min.js"></script>
+  <script type="text/javascript"  src="js/dataTables/jquery.dataTables.min.js"></script>
+  <script type="text/javascript"  src="js/dataTables/dataTables.bootstrap.min.js"></script>
+  <script type="text/javascript" src="js/bootbox/bootbox.min.js"></script>
+  <script src="js/bootstrap-growl.min.js"></script>
+  <script src="js/jquery-validation/jquery.validate.js"></script>
+       <script type="text/javascript"  src="js/avalon.js"></script>
+
+
+<script src="i18n/loadi18nApp_iui-route_view.js"></script>
+
+
+  <script type="text/javascript"   src="js/routeController.js"></script>
+
+
+<script type="text/javascript">
+
+$(function(){
+
+$('iframe').iFrameResize();
+ loadPropertiesSideMenu('', 'msb-iui-route-i18n', 'i18n/'); 
+avalon.scan();
+vm.$initRoute();
+
+
+});
+
+</script>
+  <script src="js/routeUtil.js"></script>
+  <script src="js/routeFunc.js"></script>
+</body>
 </html>
\ No newline at end of file
 </html>
\ No newline at end of file
index a22bb7d..73698dc 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /*==================================================
  Copyright (c) 2013-2015 司徒正美 and other contributors
  http://www.cnblogs.com/rubylouvre/
 /*==================================================
  Copyright (c) 2013-2015 司徒正美 and other contributors
  http://www.cnblogs.com/rubylouvre/
index 2828337..8ec95e1 100644 (file)
@@ -1,9 +1,3 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */
 html {
   font-family: sans-serif;
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */
 html {
   font-family: sans-serif;
index 679272d..9611bd2 100644 (file)
@@ -1,7 +1 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
 /*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
index 8ae571b..a5271e0 100644 (file)
@@ -1,9 +1,3 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
 if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
 
 /* ========================================================================
 if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
 
 /* ========================================================================
index b04a0e8..b4f2fa3 100644 (file)
@@ -1,6 +1 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
 if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
 if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
index 1d11b34..3e66cd6 100644 (file)
@@ -1,21 +1,2 @@
-/* =============================================================
- * bootstrap-typeahead.js v2.3.2
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed 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.
- * ============================================================ */
-
 
 !function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,s),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var s=this;return e=t.grep(e,function(t){return s.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,s=[],i=[],n=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):n.push(e):s.push(e);return s.concat(i,n)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var s=this;return e=t(e).map(function(e,i){return e=t(s.options.item).attr("data-value",i),e.find("a").html(s.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),s=e.next();s.length||(s=t(this.$menu.find("li")[0])),s.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var s=t.fn.typeahead;t.fn.typeahead=function(s){return this.each(function(){var i=t(this),n=i.data("typeahead"),h="object"==typeof s&&s;n||i.data("typeahead",n=new e(this,h)),"string"==typeof s&&n[s]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=s,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery);
\ No newline at end of file
 
 !function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,s),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var s=this;return e=t.grep(e,function(t){return s.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,s=[],i=[],n=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):n.push(e):s.push(e);return s.concat(i,n)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var s=this;return e=t(e).map(function(e,i){return e=t(s.options.item).attr("data-value",i),e.find("a").html(s.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),s=e.next();s.length||(s=t(this.$menu.find("li")[0])),s.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var s=t.fn.typeahead;t.fn.typeahead=function(s){return this.each(function(){var i=t(this),n=i.data("typeahead"),h="object"==typeof s&&s;n||i.data("typeahead",n=new e(this,h)),"string"==typeof s&&n[s]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=s,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery);
\ No newline at end of file
index c80d1bf..4ec986a 100644 (file)
@@ -1,3 +1,21 @@
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 div.dataTables_length label {
        font-weight: normal;
        text-align: left;
 div.dataTables_length label {
        font-weight: normal;
        text-align: left;
index ee4e978..28431ad 100644 (file)
@@ -1,4 +1 @@
-/*!
- *  Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome
- *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
  */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}
  */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}
index 9330e0f..5b66af2 100644 (file)
@@ -1,10 +1,2 @@
-/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v3.5.3 - 2016-02-23
- *  Desc: Include this file in any page being loaded into an iframe
- *        to force the iframe to resize to the content size.
- *  Requires: iframeResizer.min.js on host page.
- *  Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
- *  License: MIT
- */
-
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Fa(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Fa();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(b){la&&"object"==typeof a.console&&console.log(f(b))}function h(b){"object"==typeof a.console&&console.warn(f(b))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function a(a){return"true"===a?!0:!1}var b=ha.substr(na).split(":");oa=b[0],X=void 0!==b[1]?Number(b[1]):X,_=void 0!==b[2]?a(b[2]):_,la=void 0!==b[3]?a(b[3]):la,ja=void 0!==b[4]?Number(b[4]):ja,U=void 0!==b[6]?a(b[6]):U,Y=b[7],fa=void 0!==b[8]?b[8]:fa,W=b[9],$=b[10],ua=void 0!==b[11]?Number(b[11]):ua,ia.enable=void 0!==b[12]?a(b[12]):!1,qa=void 0!==b[13]?b[13]:qa,Aa=void 0!==b[14]?b[14]:Aa}function k(){function b(){var b=a.iFrameResizer;g("Reading data from page: "+JSON.stringify(b)),Ca="messageCallback"in b?b.messageCallback:Ca,Da="readyCallback"in b?b.readyCallback:Da,ta="targetOrigin"in b?b.targetOrigin:ta,fa="heightCalculationMethod"in b?b.heightCalculationMethod:fa,Aa="widthCalculationMethod"in b?b.widthCalculationMethod:Aa}"iFrameResizer"in a&&Object===a.iFrameResizer.constructor&&b(),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,g("Body "+a+' set to "'+b+'"'))}function n(){void 0===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g('HTML & body height set to "auto"')}function p(e){function f(){N(e.eventName,e.eventType)}var h={add:function(c){b(a,c,f)},remove:function(b){c(a,b,f)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(h[e.method])):h[e.method](e.eventName),g(d(e.method)+" event listener: "+e.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+' calculation method set to "'+a+'"')),a}function s(){fa=r(fa,ea,Ga,"height")}function t(){Aa=r(Aa,za,Ha,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(a,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(a){function b(a){var b=d(a);g("Moving to in page link (#"+c+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var c=a.split("#")[1]||a,e=decodeURIComponent(c),f=document.getElementById(e)||document.getElementsByName(e)[0];void 0!==f?b(f):(g("In page link (#"+c+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+c))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),a)}function j(){b(a,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(a,b,c){d(a.target),N(b,c+": "+a.target.src,void 0,void 0)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=a.MutationObserver||a.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var b=0>ja;a.MutationObserver||a.WebKitMutationObserver?b?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Fa(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Fa()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),da}var d=document.querySelectorAll("["+b+"]");return 0===d.length?c():I(a,d)}function L(){return document.querySelectorAll("body *")}function M(a,b,c,d){function e(){da=l,ya=m,R(da,ya,a)}function f(){function a(a,b){var c=Math.abs(a-b)<=ua;return!c}return l=void 0!==c?c:Ga[fa](),m=void 0!==d?d:Ha[Aa](),a(da,l)||_&&a(ya,m)}function h(){return!(a in{init:1,interval:1,size:1})}function i(){return fa in pa||_&&Aa in pa}function j(){g("No change in size detected")}function k(){h()&&i()?Q(b):a in{interval:1}||j()}var l,m;f()||"init"===a?(O(),e()):k()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ia(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ga[fa](),ya=Ha[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(a,b,c,d,e){function f(){void 0===e?e=ta:g("Message targetOrigin: "+e)}function h(){var f=a+":"+b,h=oa+":"+f+":"+c+(void 0!==d?":"+d:"");g("Sending message to host page ("+h+")"),sa.postMessage(ma+h,e)}!0===ra&&(f(),h())}function S(b){function c(){return ma===(""+b.data).substr(0,na)}function d(){ha=b.data,sa=b.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}function e(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))}function f(){N("resizeParent","Parent window requested size check")}function j(){var a=l();ia.findTarget(a)}function k(){return b.data.split("]")[1].split(":")[0]}function l(){return b.data.substr(b.data.indexOf(":")+1)}function m(){return"iFrameResize"in a}function n(){var a=l();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}function o(){var a=l();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")}function p(){return b.data.split(":")[2]in{"true":1,"false":1}}function q(){switch(k()){case"reset":e();break;case"resize":f();break;case"moveToAnchor":j();break;case"message":n();break;case"pageInfo":o();break;default:m()||p()||h("Unexpected message ("+b.data+")")}}function r(){!1===ca?q():p()?d():g('Ignored message of type "'+k()+'". Received before initialization.')}c()&&r()}function T(){"loading"!==document.readyState&&a.parent.postMessage("[iFrameResizerChild]Ready","*")}var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=a.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=a,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa=Date.now||function(){return(new Date).getTime()},Ga={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ga.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ga))},min:function(){return Math.min.apply(null,J(Ga))},grow:function(){return Ga.max()},lowestElement:function(){return Math.max(Ga.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ha={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ha.bodyScroll(),Ha.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ha))},min:function(){return Math.min.apply(null,J(Ha))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ia=e(M);b(a,"message",S),T()}(window||{});
 //# sourceMappingURL=iframeResizer.contentWindow.map
\ No newline at end of file
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function e(a){var b,c,d,e=null,f=0,g=function(){f=Fa(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Fa();f||(f=h);var i=xa-(h-f);return b=this,c=arguments,0>=i||i>xa?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function f(a){return ma+"["+oa+"] "+a}function g(b){la&&"object"==typeof a.console&&console.log(f(b))}function h(b){"object"==typeof a.console&&console.warn(f(b))}function i(){j(),g("Initialising iFrame ("+location.href+")"),k(),n(),m("background",W),m("padding",$),A(),s(),t(),o(),C(),u(),ia=B(),N("init","Init message from host page"),Da()}function j(){function a(a){return"true"===a?!0:!1}var b=ha.substr(na).split(":");oa=b[0],X=void 0!==b[1]?Number(b[1]):X,_=void 0!==b[2]?a(b[2]):_,la=void 0!==b[3]?a(b[3]):la,ja=void 0!==b[4]?Number(b[4]):ja,U=void 0!==b[6]?a(b[6]):U,Y=b[7],fa=void 0!==b[8]?b[8]:fa,W=b[9],$=b[10],ua=void 0!==b[11]?Number(b[11]):ua,ia.enable=void 0!==b[12]?a(b[12]):!1,qa=void 0!==b[13]?b[13]:qa,Aa=void 0!==b[14]?b[14]:Aa}function k(){function b(){var b=a.iFrameResizer;g("Reading data from page: "+JSON.stringify(b)),Ca="messageCallback"in b?b.messageCallback:Ca,Da="readyCallback"in b?b.readyCallback:Da,ta="targetOrigin"in b?b.targetOrigin:ta,fa="heightCalculationMethod"in b?b.heightCalculationMethod:fa,Aa="widthCalculationMethod"in b?b.widthCalculationMethod:Aa}"iFrameResizer"in a&&Object===a.iFrameResizer.constructor&&b(),g("TargetOrigin for parent set to: "+ta)}function l(a,b){return-1!==b.indexOf("-")&&(h("Negative CSS value ignored for "+a),b=""),b}function m(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,g("Body "+a+' set to "'+b+'"'))}function n(){void 0===Y&&(Y=X+"px"),m("margin",l("margin",Y))}function o(){document.documentElement.style.height="",document.body.style.height="",g('HTML & body height set to "auto"')}function p(e){function f(){N(e.eventName,e.eventType)}var h={add:function(c){b(a,c,f)},remove:function(b){c(a,b,f)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(h[e.method])):h[e.method](e.eventName),g(d(e.method)+" event listener: "+e.eventType)}function q(a){p({method:a,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),p({method:a,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),p({method:a,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),p({method:a,eventType:"Input",eventName:"input"}),p({method:a,eventType:"Mouse Up",eventName:"mouseup"}),p({method:a,eventType:"Mouse Down",eventName:"mousedown"}),p({method:a,eventType:"Orientation Change",eventName:"orientationchange"}),p({method:a,eventType:"Print",eventName:["afterprint","beforeprint"]}),p({method:a,eventType:"Ready State Change",eventName:"readystatechange"}),p({method:a,eventType:"Touch Start",eventName:"touchstart"}),p({method:a,eventType:"Touch End",eventName:"touchend"}),p({method:a,eventType:"Touch Cancel",eventName:"touchcancel"}),p({method:a,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),p({method:a,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),p({method:a,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===qa&&p({method:a,eventType:"IFrame Resized",eventName:"resize"})}function r(a,b,c,d){return b!==a&&(a in c||(h(a+" is not a valid option for "+d+"CalculationMethod."),a=b),g(d+' calculation method set to "'+a+'"')),a}function s(){fa=r(fa,ea,Ga,"height")}function t(){Aa=r(Aa,za,Ha,"width")}function u(){!0===U?(q("add"),F()):g("Auto Resize disabled")}function v(){g("Disable outgoing messages"),ra=!1}function w(){g("Remove event listener: Message"),c(a,"message",S)}function x(){null!==Z&&Z.disconnect()}function y(){q("remove"),x(),clearInterval(ka)}function z(){v(),w(),!0===U&&y()}function A(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function B(){function c(){return{x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop}}function d(a){var b=a.getBoundingClientRect(),d=c();return{x:parseInt(b.left,10)+parseInt(d.x,10),y:parseInt(b.top,10)+parseInt(d.y,10)}}function e(a){function b(a){var b=d(a);g("Moving to in page link (#"+c+") at x: "+b.x+" y: "+b.y),R(b.y,b.x,"scrollToOffset")}var c=a.split("#")[1]||a,e=decodeURIComponent(c),f=document.getElementById(e)||document.getElementsByName(e)[0];void 0!==f?b(f):(g("In page link (#"+c+") not found in iFrame, so sending to parent"),R(0,0,"inPageLink","#"+c))}function f(){""!==location.hash&&"#"!==location.hash&&e(location.href)}function i(){function a(a){function c(a){a.preventDefault(),e(this.getAttribute("href"))}"#"!==a.getAttribute("href")&&b(a,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),a)}function j(){b(a,"hashchange",f)}function k(){setTimeout(f,ba)}function l(){Array.prototype.forEach&&document.querySelectorAll?(g("Setting up location.hash handlers"),i(),j(),k()):h("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return ia.enable?l():g("In page linking not enabled"),{findTarget:e}}function C(){g("Enable public methods"),Ba.parentIFrame={autoResize:function(a){return!0===a&&!1===U?(U=!0,u()):!1===a&&!0===U&&(U=!1,y()),U},close:function(){R(0,0,"close"),z()},getId:function(){return oa},getPageInfo:function(a){"function"==typeof a?(Ea=a,R(0,0,"pageInfo")):(Ea=function(){},R(0,0,"pageInfoStop"))},moveToAnchor:function(a){ia.findTarget(a)},reset:function(){Q("parentIFrame.reset")},scrollTo:function(a,b){R(b,a,"scrollTo")},scrollToOffset:function(a,b){R(b,a,"scrollToOffset")},sendMessage:function(a,b){R(0,0,"message",JSON.stringify(a),b)},setHeightCalculationMethod:function(a){fa=a,s()},setWidthCalculationMethod:function(a){Aa=a,t()},setTargetOrigin:function(a){g("Set targetOrigin: "+a),ta=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");N("size","parentIFrame.size("+c+")",a,b)}}}function D(){0!==ja&&(g("setInterval: "+ja+"ms"),ka=setInterval(function(){N("interval","setInterval: "+ja)},Math.abs(ja)))}function E(){function b(a){function b(a){!1===a.complete&&(g("Attach listeners to "+a.src),a.addEventListener("load",f,!1),a.addEventListener("error",h,!1),k.push(a))}"attributes"===a.type&&"src"===a.attributeName?b(a.target):"childList"===a.type&&Array.prototype.forEach.call(a.target.querySelectorAll("img"),b)}function c(a){k.splice(k.indexOf(a),1)}function d(a){g("Remove listeners from "+a.src),a.removeEventListener("load",f,!1),a.removeEventListener("error",h,!1),c(a)}function e(a,b,c){d(a.target),N(b,c+": "+a.target.src,void 0,void 0)}function f(a){e(a,"imageLoad","Image loaded")}function h(a){e(a,"imageLoadFailed","Image load failed")}function i(a){N("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),a.forEach(b)}function j(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return m=new l(i),g("Create body MutationObserver"),m.observe(a,b),m}var k=[],l=a.MutationObserver||a.WebKitMutationObserver,m=j();return{disconnect:function(){"disconnect"in m&&(g("Disconnect body MutationObserver"),m.disconnect(),k.forEach(d))}}}function F(){var b=0>ja;a.MutationObserver||a.WebKitMutationObserver?b?D():Z=E():(g("MutationObserver not supported in this browser!"),D())}function G(a,b){function c(a){var c=/^\d+(px)?$/i;if(c.test(a))return parseInt(a,V);var d=b.style.left,e=b.runtimeStyle.left;return b.runtimeStyle.left=b.currentStyle.left,b.style.left=a||0,a=b.style.pixelLeft,b.style.left=d,b.runtimeStyle.left=e,a}var d=0;return b=b||document.body,"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(b,null),d=null!==d?d[a]:0):d=c(b.currentStyle[a]),parseInt(d,V)}function H(a){a>xa/2&&(xa=2*a,g("Event throttle increased to "+xa+"ms"))}function I(a,b){for(var c=b.length,e=0,f=0,h=d(a),i=Fa(),j=0;c>j;j++)e=b[j].getBoundingClientRect()[a]+G("margin"+h,b[j]),e>f&&(f=e);return i=Fa()-i,g("Parsed "+c+" HTML elements"),g("Element position calculated in "+i+"ms"),H(i),f}function J(a){return[a.bodyOffset(),a.bodyScroll(),a.documentElementOffset(),a.documentElementScroll()]}function K(a,b){function c(){return h("No tagged elements ("+b+") found on page"),da}var d=document.querySelectorAll("["+b+"]");return 0===d.length?c():I(a,d)}function L(){return document.querySelectorAll("body *")}function M(a,b,c,d){function e(){da=l,ya=m,R(da,ya,a)}function f(){function a(a,b){var c=Math.abs(a-b)<=ua;return!c}return l=void 0!==c?c:Ga[fa](),m=void 0!==d?d:Ha[Aa](),a(da,l)||_&&a(ya,m)}function h(){return!(a in{init:1,interval:1,size:1})}function i(){return fa in pa||_&&Aa in pa}function j(){g("No change in size detected")}function k(){h()&&i()?Q(b):a in{interval:1}||j()}var l,m;f()||"init"===a?(O(),e()):k()}function N(a,b,c,d){function e(){a in{reset:1,resetPage:1,init:1}||g("Trigger event: "+b)}function f(){return va&&a in aa}f()?g("Trigger event cancelled: "+a):(e(),Ia(a,b,c,d))}function O(){va||(va=!0,g("Trigger event lock on")),clearTimeout(wa),wa=setTimeout(function(){va=!1,g("Trigger event lock off"),g("--")},ba)}function P(a){da=Ga[fa](),ya=Ha[Aa](),R(da,ya,a)}function Q(a){var b=fa;fa=ea,g("Reset trigger event: "+a),O(),P("reset"),fa=b}function R(a,b,c,d,e){function f(){void 0===e?e=ta:g("Message targetOrigin: "+e)}function h(){var f=a+":"+b,h=oa+":"+f+":"+c+(void 0!==d?":"+d:"");g("Sending message to host page ("+h+")"),sa.postMessage(ma+h,e)}!0===ra&&(f(),h())}function S(b){function c(){return ma===(""+b.data).substr(0,na)}function d(){ha=b.data,sa=b.source,i(),ca=!1,setTimeout(function(){ga=!1},ba)}function e(){ga?g("Page reset ignored by init"):(g("Page size reset by host page"),P("resetPage"))}function f(){N("resizeParent","Parent window requested size check")}function j(){var a=l();ia.findTarget(a)}function k(){return b.data.split("]")[1].split(":")[0]}function l(){return b.data.substr(b.data.indexOf(":")+1)}function m(){return"iFrameResize"in a}function n(){var a=l();g("MessageCallback called from parent: "+a),Ca(JSON.parse(a)),g(" --")}function o(){var a=l();g("PageInfoFromParent called from parent: "+a),Ea(JSON.parse(a)),g(" --")}function p(){return b.data.split(":")[2]in{"true":1,"false":1}}function q(){switch(k()){case"reset":e();break;case"resize":f();break;case"moveToAnchor":j();break;case"message":n();break;case"pageInfo":o();break;default:m()||p()||h("Unexpected message ("+b.data+")")}}function r(){!1===ca?q():p()?d():g('Ignored message of type "'+k()+'". Received before initialization.')}c()&&r()}function T(){"loading"!==document.readyState&&a.parent.postMessage("[iFrameResizerChild]Ready","*")}var U=!0,V=10,W="",X=0,Y="",Z=null,$="",_=!1,aa={resize:1,click:1},ba=128,ca=!0,da=1,ea="bodyOffset",fa=ea,ga=!0,ha="",ia={},ja=32,ka=null,la=!1,ma="[iFrameSizer]",na=ma.length,oa="",pa={max:1,min:1,bodyScroll:1,documentElementScroll:1},qa="child",ra=!0,sa=a.parent,ta="*",ua=0,va=!1,wa=null,xa=16,ya=1,za="scroll",Aa=za,Ba=a,Ca=function(){h("MessageCallback function not defined")},Da=function(){},Ea=function(){},Fa=Date.now||function(){return(new Date).getTime()},Ga={bodyOffset:function(){return document.body.offsetHeight+G("marginTop")+G("marginBottom")},offset:function(){return Ga.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,J(Ga))},min:function(){return Math.min.apply(null,J(Ga))},grow:function(){return Ga.max()},lowestElement:function(){return Math.max(Ga.bodyOffset(),I("bottom",L()))},taggedElement:function(){return K("bottom","data-iframe-height")}},Ha={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Ha.bodyScroll(),Ha.documentElementScroll())},max:function(){return Math.max.apply(null,J(Ha))},min:function(){return Math.min.apply(null,J(Ha))},rightMostElement:function(){return I("right",L())},taggedElement:function(){return K("right","data-iframe-width")}},Ia=e(M);b(a,"message",S),T()}(window||{});
 //# sourceMappingURL=iframeResizer.contentWindow.map
\ No newline at end of file
index e8f4bcb..f5c4c4e 100644 (file)
@@ -1,9 +1,2 @@
-/*! iFrame Resizer (iframeSizer.min.js ) - v3.5.3 - 2016-02-23
- *  Desc: Force cross domain iframes to size to content.
- *  Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
- *  Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
- *  License: MIT
- */
-
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(){var b,c=["moz","webkit","o","ms"];for(b=0;b<c.length&&!N;b+=1)N=a[c[b]+"RequestAnimationFrame"];N||h("setup","RequestAnimationFrame not supported")}function e(b){var c="Host page: "+b;return a.top!==a.self&&(c=a.parentIFrame&&a.parentIFrame.getId?a.parentIFrame.getId()+": "+b:"Nested host page: "+b),c}function f(a){return K+"["+e(a)+"]"}function g(a){return P[a]?P[a].log:G}function h(a,b){k("log",a,b,g(a))}function i(a,b){k("info",a,b,g(a))}function j(a,b){k("warn",a,b,!0)}function k(b,c,d,e){!0===e&&"object"==typeof a.console&&console[b](f(c),d)}function l(d){function e(){function a(){s(V),p(W)}g("Height"),g("Width"),t(a,V,"init")}function f(){var a=U.substr(L).split(":");return{iframe:P[a[0]].iframe,id:a[0],height:a[1],width:a[2],type:a[3]}}function g(a){var b=Number(P[W]["max"+a]),c=Number(P[W]["min"+a]),d=a.toLowerCase(),e=Number(V[d]);h(W,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,h(W,"Set "+d+" to min value")),e>b&&(e=b,h(W,"Set "+d+" to max value")),V[d]=""+e}function k(){function a(){function a(){var a=0,d=!1;for(h(W,"Checking connection is from allowed list of origins: "+c);a<c.length;a++)if(c[a]===b){d=!0;break}return d}function d(){var a=P[W].remoteHost;return h(W,"Checking connection is from: "+a),b===a}return c.constructor===Array?a():d()}var b=d.origin,c=P[W].checkOrigin;if(c&&""+b!="null"&&!a())throw new Error("Unexpected message received from: "+b+" for "+V.iframe.id+". Message was: "+d.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function l(){return K===(""+U).substr(0,L)&&U.substr(L).split(":")[0]in P}function w(){var a=V.type in{"true":1,"false":1,undefined:1};return a&&h(W,"Ignoring init message from meta parent page"),a}function y(a){return U.substr(U.indexOf(":")+J+a)}function z(a){h(W,"MessageCallback passed: {iframe: "+V.iframe.id+", message: "+a+"}"),N("messageCallback",{iframe:V.iframe,message:JSON.parse(a)}),h(W,"--")}function A(){var b=document.body.getBoundingClientRect(),c=V.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:c.height,iframeWidth:c.width,clientHeight:Math.max(document.documentElement.clientHeight,a.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,a.innerWidth||0),offsetTop:parseInt(c.top-b.top,10),offsetLeft:parseInt(c.left-b.left,10),scrollTop:a.pageYOffset,scrollLeft:a.pageXOffset})}function B(a,b){function c(){u("Send Page Info","pageInfo:"+A(),a,b)}x(c,32)}function C(){function d(b,c){function d(){P[g]?B(P[g].iframe,g):e()}["scroll","resize"].forEach(function(e){h(g,b+e+" listener for sendPageInfo"),c(a,e,d)})}function e(){d("Remove ",c)}function f(){d("Add ",b)}var g=W;f(),P[g].stopPageInfo=e}function D(){P[W]&&P[W].stopPageInfo&&(P[W].stopPageInfo(),delete P[W].stopPageInfo)}function E(){var a=!0;return null===V.iframe&&(j(W,"IFrame ("+V.id+") not found"),a=!1),a}function F(a){var b=a.getBoundingClientRect();return o(W),{x:Math.floor(Number(b.left)+Number(M.x)),y:Math.floor(Number(b.top)+Number(M.y))}}function G(b){function c(){M=g,H(),h(W,"--")}function d(){return{x:Number(V.width)+f.x,y:Number(V.height)+f.y}}function e(){a.parentIFrame?a.parentIFrame["scrollTo"+(b?"Offset":"")](g.x,g.y):j(W,"Unable to scroll to requested position, window.parentIFrame not found")}var f=b?F(V.iframe):{x:0,y:0},g=d();h(W,"Reposition requested from iFrame (offset x:"+f.x+" y:"+f.y+")"),a.top!==a.self?e():c()}function H(){!1!==N("scrollCallback",M)?p(W):q()}function I(b){function c(){var a=F(g);h(W,"Moving to in page link (#"+e+") at x: "+a.x+" y: "+a.y),M={x:a.x,y:a.y},H(),h(W,"--")}function d(){a.parentIFrame?a.parentIFrame.moveToAnchor(e):h(W,"In page link #"+e+" not found and window.parentIFrame not found")}var e=b.split("#")[1]||"",f=decodeURIComponent(e),g=document.getElementById(f)||document.getElementsByName(f)[0];g?c():a.top!==a.self?d():h(W,"In page link #"+e+" not found")}function N(a,b){return m(W,a,b)}function O(){switch(P[W].firstRun&&T(),V.type){case"close":n(V.iframe);break;case"message":z(y(6));break;case"scrollTo":G(!1);break;case"scrollToOffset":G(!0);break;case"pageInfo":B(P[W].iframe,W),C();break;case"pageInfoStop":D();break;case"inPageLink":I(y(9));break;case"reset":r(V);break;case"init":e(),N("initCallback",V.iframe),N("resizedCallback",V);break;default:e(),N("resizedCallback",V)}}function Q(a){var b=!0;return P[a]||(b=!1,j(V.type+" No settings for "+a+". Message was: "+U)),b}function S(){for(var a in P)u("iFrame requested init",v(a),document.getElementById(a),a)}function T(){P[W].firstRun=!1}var U=d.data,V={},W=null;"[iFrameResizerChild]Ready"===U?S():l()?(V=f(),W=R=V.id,!w()&&Q(W)&&(h(W,"Received: "+U),E()&&k()&&O())):i(W,"Ignored: "+U)}function m(a,b,c){var d=null,e=null;if(P[a]){if(d=P[a][b],"function"!=typeof d)throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function n(a){var b=a.id;h(b,"Removing iFrame: "+b),a.parentNode.removeChild(a),m(b,"closedCallback",b),h(b,"--"),delete P[b]}function o(b){null===M&&(M={x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop},h(b,"Get page position: "+M.x+","+M.y))}function p(b){null!==M&&(a.scrollTo(M.x,M.y),h(b,"Set page position: "+M.x+","+M.y),q())}function q(){M=null}function r(a){function b(){s(a),u("reset","reset",a.iframe,a.id)}h(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(b,a,"reset")}function s(a){function b(b){a.iframe.style[b]=a[b]+"px",h(a.id,"IFrame ("+e+") "+b+" set to "+a[b]+"px")}function c(b){H||"0"!==a[b]||(H=!0,h(e,"Hidden iFrame detected, creating visibility listener"),y())}function d(a){b(a),c(a)}var e=a.iframe.id;P[e]&&(P[e].sizeHeight&&d("height"),P[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&N?(h(b.id,"Requesting animation frame"),N(a)):a()}function u(a,b,c,d){function e(){var e=P[d].targetOrigin;h(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+e),c.contentWindow.postMessage(K+b,e)}function f(){i(d,"["+a+"] IFrame("+d+") not found"),P[d]&&delete P[d]}function g(){c&&"contentWindow"in c&&null!==c.contentWindow?e():f()}d=d||c.id,P[d]&&g()}function v(a){return a+":"+P[a].bodyMarginV1+":"+P[a].sizeWidth+":"+P[a].log+":"+P[a].interval+":"+P[a].enablePublicMethods+":"+P[a].autoResize+":"+P[a].bodyMargin+":"+P[a].heightCalculationMethod+":"+P[a].bodyBackground+":"+P[a].bodyPadding+":"+P[a].tolerance+":"+P[a].inPageLinks+":"+P[a].resizeFrom+":"+P[a].widthCalculationMethod}function w(a,c){function d(){function b(b){1/0!==P[w][b]&&0!==P[w][b]&&(a.style[b]=P[w][b]+"px",h(w,"Set "+b+" = "+P[w][b]+"px"))}function c(a){if(P[w]["min"+a]>P[w]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}c("Height"),c("Width"),b("maxHeight"),b("minHeight"),b("maxWidth"),b("minWidth")}function e(){var a=c&&c.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function f(b){return R=b,""===b&&(a.id=b=e(),G=(c||{}).log,R=b,h(b,"Added missing iframe ID: "+b+" ("+a.src+")")),b}function g(){h(w,"IFrame scrolling "+(P[w].scrolling?"enabled":"disabled")+" for "+w),a.style.overflow=!1===P[w].scrolling?"hidden":"auto",a.scrolling=!1===P[w].scrolling?"no":"yes"}function i(){("number"==typeof P[w].bodyMargin||"0"===P[w].bodyMargin)&&(P[w].bodyMarginV1=P[w].bodyMargin,P[w].bodyMargin=""+P[w].bodyMargin+"px")}function k(){var b=P[w].firstRun,c=P[w].heightCalculationMethod in O;!b&&c&&r({iframe:a,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(P[w].iframe.iFrameResizer={close:n.bind(null,P[w].iframe),resize:u.bind(null,"Window resize","resize",P[w].iframe),moveToAnchor:function(a){u("Move to anchor","inPageLink:"+a,P[w].iframe,w)},sendMessage:function(a){a=JSON.stringify(a),u("Send Message","message:"+a,P[w].iframe,w)}})}function m(c){function d(){u("iFrame.onload",c,a),k()}b(a,"load",d),u("init",c,a)}function o(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function p(a){for(var b in S)S.hasOwnProperty(b)&&(P[w][b]=a.hasOwnProperty(b)?a[b]:S[b])}function q(a){return""===a||"file://"===a?"*":a}function s(b){b=b||{},P[w]={firstRun:!0,iframe:a,remoteHost:a.src.split("/").slice(0,3).join("/")},o(b),p(b),P[w].targetOrigin=!0===P[w].checkOrigin?q(P[w].remoteHost):"*"}function t(){return w in P&&"iFrameResizer"in a}var w=f(a.id);t()?j(w,"Ignored iFrame, already setup."):(s(c),g(),d(),i(),m(v(w)),l())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function b(){function a(a){function b(b){return"0px"===P[a].iframe.style[b]}function c(a){return null!==a.offsetParent}c(P[a].iframe)&&(b("height")||b("width"))&&u("Visibility change","resize",P[a].iframe,a)}for(var b in P)a(b)}function c(a){h("window","Mutation observed: "+a[0].target+" "+a[0].type),x(b,16)}function d(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},d=new e(c);d.observe(a,b)}var e=a.MutationObserver||a.WebKitMutationObserver;e&&d()}function z(a){function b(){B("Window "+a,"resize")}h("window","Trigger event: "+a),x(b,16)}function A(){function a(){B("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),x(a,16))}function B(a,b){function c(a){return"parent"===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(a,"message",l),b(a,"resize",function(){z("resize")}),b(document,"visibilitychange",A),b(document,"-webkit-visibilitychange",A),b(a,"focusin",function(){z("focus")}),b(a,"focus",function(){z("focus")})}function D(){function a(a,c){function d(){if(!c.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==c.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+c.tagName+">")}c&&(d(),w(c,a),b.push(c))}var b;return d(),C(),function(c,d){switch(b=[],typeof d){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(d||"iframe"),a.bind(void 0,c));break;case"object":a(c,d);break;default:throw new TypeError("Unexpected data type ("+typeof d+")")}return b}}function E(a){a.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}}var F=0,G=!1,H=!1,I="message",J=I.length,K="[iFrameSizer]",L=K.length,M=null,N=a.requestAnimationFrame,O={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},P={},Q=null,R="Host Page",S={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){j("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};a.jQuery&&E(jQuery),"function"==typeof define&&define.amd?define([],D):"object"==typeof module&&"object"==typeof module.exports?module.exports=D():a.iFrameResize=a.iFrameResize||D()}(window||{});
 //# sourceMappingURL=iframeResizer.map
\ No newline at end of file
 !function(a){"use strict";function b(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function c(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function d(){var b,c=["moz","webkit","o","ms"];for(b=0;b<c.length&&!N;b+=1)N=a[c[b]+"RequestAnimationFrame"];N||h("setup","RequestAnimationFrame not supported")}function e(b){var c="Host page: "+b;return a.top!==a.self&&(c=a.parentIFrame&&a.parentIFrame.getId?a.parentIFrame.getId()+": "+b:"Nested host page: "+b),c}function f(a){return K+"["+e(a)+"]"}function g(a){return P[a]?P[a].log:G}function h(a,b){k("log",a,b,g(a))}function i(a,b){k("info",a,b,g(a))}function j(a,b){k("warn",a,b,!0)}function k(b,c,d,e){!0===e&&"object"==typeof a.console&&console[b](f(c),d)}function l(d){function e(){function a(){s(V),p(W)}g("Height"),g("Width"),t(a,V,"init")}function f(){var a=U.substr(L).split(":");return{iframe:P[a[0]].iframe,id:a[0],height:a[1],width:a[2],type:a[3]}}function g(a){var b=Number(P[W]["max"+a]),c=Number(P[W]["min"+a]),d=a.toLowerCase(),e=Number(V[d]);h(W,"Checking "+d+" is in range "+c+"-"+b),c>e&&(e=c,h(W,"Set "+d+" to min value")),e>b&&(e=b,h(W,"Set "+d+" to max value")),V[d]=""+e}function k(){function a(){function a(){var a=0,d=!1;for(h(W,"Checking connection is from allowed list of origins: "+c);a<c.length;a++)if(c[a]===b){d=!0;break}return d}function d(){var a=P[W].remoteHost;return h(W,"Checking connection is from: "+a),b===a}return c.constructor===Array?a():d()}var b=d.origin,c=P[W].checkOrigin;if(c&&""+b!="null"&&!a())throw new Error("Unexpected message received from: "+b+" for "+V.iframe.id+". Message was: "+d.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function l(){return K===(""+U).substr(0,L)&&U.substr(L).split(":")[0]in P}function w(){var a=V.type in{"true":1,"false":1,undefined:1};return a&&h(W,"Ignoring init message from meta parent page"),a}function y(a){return U.substr(U.indexOf(":")+J+a)}function z(a){h(W,"MessageCallback passed: {iframe: "+V.iframe.id+", message: "+a+"}"),N("messageCallback",{iframe:V.iframe,message:JSON.parse(a)}),h(W,"--")}function A(){var b=document.body.getBoundingClientRect(),c=V.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:c.height,iframeWidth:c.width,clientHeight:Math.max(document.documentElement.clientHeight,a.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,a.innerWidth||0),offsetTop:parseInt(c.top-b.top,10),offsetLeft:parseInt(c.left-b.left,10),scrollTop:a.pageYOffset,scrollLeft:a.pageXOffset})}function B(a,b){function c(){u("Send Page Info","pageInfo:"+A(),a,b)}x(c,32)}function C(){function d(b,c){function d(){P[g]?B(P[g].iframe,g):e()}["scroll","resize"].forEach(function(e){h(g,b+e+" listener for sendPageInfo"),c(a,e,d)})}function e(){d("Remove ",c)}function f(){d("Add ",b)}var g=W;f(),P[g].stopPageInfo=e}function D(){P[W]&&P[W].stopPageInfo&&(P[W].stopPageInfo(),delete P[W].stopPageInfo)}function E(){var a=!0;return null===V.iframe&&(j(W,"IFrame ("+V.id+") not found"),a=!1),a}function F(a){var b=a.getBoundingClientRect();return o(W),{x:Math.floor(Number(b.left)+Number(M.x)),y:Math.floor(Number(b.top)+Number(M.y))}}function G(b){function c(){M=g,H(),h(W,"--")}function d(){return{x:Number(V.width)+f.x,y:Number(V.height)+f.y}}function e(){a.parentIFrame?a.parentIFrame["scrollTo"+(b?"Offset":"")](g.x,g.y):j(W,"Unable to scroll to requested position, window.parentIFrame not found")}var f=b?F(V.iframe):{x:0,y:0},g=d();h(W,"Reposition requested from iFrame (offset x:"+f.x+" y:"+f.y+")"),a.top!==a.self?e():c()}function H(){!1!==N("scrollCallback",M)?p(W):q()}function I(b){function c(){var a=F(g);h(W,"Moving to in page link (#"+e+") at x: "+a.x+" y: "+a.y),M={x:a.x,y:a.y},H(),h(W,"--")}function d(){a.parentIFrame?a.parentIFrame.moveToAnchor(e):h(W,"In page link #"+e+" not found and window.parentIFrame not found")}var e=b.split("#")[1]||"",f=decodeURIComponent(e),g=document.getElementById(f)||document.getElementsByName(f)[0];g?c():a.top!==a.self?d():h(W,"In page link #"+e+" not found")}function N(a,b){return m(W,a,b)}function O(){switch(P[W].firstRun&&T(),V.type){case"close":n(V.iframe);break;case"message":z(y(6));break;case"scrollTo":G(!1);break;case"scrollToOffset":G(!0);break;case"pageInfo":B(P[W].iframe,W),C();break;case"pageInfoStop":D();break;case"inPageLink":I(y(9));break;case"reset":r(V);break;case"init":e(),N("initCallback",V.iframe),N("resizedCallback",V);break;default:e(),N("resizedCallback",V)}}function Q(a){var b=!0;return P[a]||(b=!1,j(V.type+" No settings for "+a+". Message was: "+U)),b}function S(){for(var a in P)u("iFrame requested init",v(a),document.getElementById(a),a)}function T(){P[W].firstRun=!1}var U=d.data,V={},W=null;"[iFrameResizerChild]Ready"===U?S():l()?(V=f(),W=R=V.id,!w()&&Q(W)&&(h(W,"Received: "+U),E()&&k()&&O())):i(W,"Ignored: "+U)}function m(a,b,c){var d=null,e=null;if(P[a]){if(d=P[a][b],"function"!=typeof d)throw new TypeError(b+" on iFrame["+a+"] is not a function");e=d(c)}return e}function n(a){var b=a.id;h(b,"Removing iFrame: "+b),a.parentNode.removeChild(a),m(b,"closedCallback",b),h(b,"--"),delete P[b]}function o(b){null===M&&(M={x:void 0!==a.pageXOffset?a.pageXOffset:document.documentElement.scrollLeft,y:void 0!==a.pageYOffset?a.pageYOffset:document.documentElement.scrollTop},h(b,"Get page position: "+M.x+","+M.y))}function p(b){null!==M&&(a.scrollTo(M.x,M.y),h(b,"Set page position: "+M.x+","+M.y),q())}function q(){M=null}function r(a){function b(){s(a),u("reset","reset",a.iframe,a.id)}h(a.id,"Size reset requested by "+("init"===a.type?"host page":"iFrame")),o(a.id),t(b,a,"reset")}function s(a){function b(b){a.iframe.style[b]=a[b]+"px",h(a.id,"IFrame ("+e+") "+b+" set to "+a[b]+"px")}function c(b){H||"0"!==a[b]||(H=!0,h(e,"Hidden iFrame detected, creating visibility listener"),y())}function d(a){b(a),c(a)}var e=a.iframe.id;P[e]&&(P[e].sizeHeight&&d("height"),P[e].sizeWidth&&d("width"))}function t(a,b,c){c!==b.type&&N?(h(b.id,"Requesting animation frame"),N(a)):a()}function u(a,b,c,d){function e(){var e=P[d].targetOrigin;h(d,"["+a+"] Sending msg to iframe["+d+"] ("+b+") targetOrigin: "+e),c.contentWindow.postMessage(K+b,e)}function f(){i(d,"["+a+"] IFrame("+d+") not found"),P[d]&&delete P[d]}function g(){c&&"contentWindow"in c&&null!==c.contentWindow?e():f()}d=d||c.id,P[d]&&g()}function v(a){return a+":"+P[a].bodyMarginV1+":"+P[a].sizeWidth+":"+P[a].log+":"+P[a].interval+":"+P[a].enablePublicMethods+":"+P[a].autoResize+":"+P[a].bodyMargin+":"+P[a].heightCalculationMethod+":"+P[a].bodyBackground+":"+P[a].bodyPadding+":"+P[a].tolerance+":"+P[a].inPageLinks+":"+P[a].resizeFrom+":"+P[a].widthCalculationMethod}function w(a,c){function d(){function b(b){1/0!==P[w][b]&&0!==P[w][b]&&(a.style[b]=P[w][b]+"px",h(w,"Set "+b+" = "+P[w][b]+"px"))}function c(a){if(P[w]["min"+a]>P[w]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}c("Height"),c("Width"),b("maxHeight"),b("minHeight"),b("maxWidth"),b("minWidth")}function e(){var a=c&&c.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function f(b){return R=b,""===b&&(a.id=b=e(),G=(c||{}).log,R=b,h(b,"Added missing iframe ID: "+b+" ("+a.src+")")),b}function g(){h(w,"IFrame scrolling "+(P[w].scrolling?"enabled":"disabled")+" for "+w),a.style.overflow=!1===P[w].scrolling?"hidden":"auto",a.scrolling=!1===P[w].scrolling?"no":"yes"}function i(){("number"==typeof P[w].bodyMargin||"0"===P[w].bodyMargin)&&(P[w].bodyMarginV1=P[w].bodyMargin,P[w].bodyMargin=""+P[w].bodyMargin+"px")}function k(){var b=P[w].firstRun,c=P[w].heightCalculationMethod in O;!b&&c&&r({iframe:a,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(P[w].iframe.iFrameResizer={close:n.bind(null,P[w].iframe),resize:u.bind(null,"Window resize","resize",P[w].iframe),moveToAnchor:function(a){u("Move to anchor","inPageLink:"+a,P[w].iframe,w)},sendMessage:function(a){a=JSON.stringify(a),u("Send Message","message:"+a,P[w].iframe,w)}})}function m(c){function d(){u("iFrame.onload",c,a),k()}b(a,"load",d),u("init",c,a)}function o(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function p(a){for(var b in S)S.hasOwnProperty(b)&&(P[w][b]=a.hasOwnProperty(b)?a[b]:S[b])}function q(a){return""===a||"file://"===a?"*":a}function s(b){b=b||{},P[w]={firstRun:!0,iframe:a,remoteHost:a.src.split("/").slice(0,3).join("/")},o(b),p(b),P[w].targetOrigin=!0===P[w].checkOrigin?q(P[w].remoteHost):"*"}function t(){return w in P&&"iFrameResizer"in a}var w=f(a.id);t()?j(w,"Ignored iFrame, already setup."):(s(c),g(),d(),i(),m(v(w)),l())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function b(){function a(a){function b(b){return"0px"===P[a].iframe.style[b]}function c(a){return null!==a.offsetParent}c(P[a].iframe)&&(b("height")||b("width"))&&u("Visibility change","resize",P[a].iframe,a)}for(var b in P)a(b)}function c(a){h("window","Mutation observed: "+a[0].target+" "+a[0].type),x(b,16)}function d(){var a=document.querySelector("body"),b={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},d=new e(c);d.observe(a,b)}var e=a.MutationObserver||a.WebKitMutationObserver;e&&d()}function z(a){function b(){B("Window "+a,"resize")}h("window","Trigger event: "+a),x(b,16)}function A(){function a(){B("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),x(a,16))}function B(a,b){function c(a){return"parent"===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(a,"message",l),b(a,"resize",function(){z("resize")}),b(document,"visibilitychange",A),b(document,"-webkit-visibilitychange",A),b(a,"focusin",function(){z("focus")}),b(a,"focus",function(){z("focus")})}function D(){function a(a,c){function d(){if(!c.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==c.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+c.tagName+">")}c&&(d(),w(c,a),b.push(c))}var b;return d(),C(),function(c,d){switch(b=[],typeof d){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(d||"iframe"),a.bind(void 0,c));break;case"object":a(c,d);break;default:throw new TypeError("Unexpected data type ("+typeof d+")")}return b}}function E(a){a.fn.iFrameResize=function(a){return this.filter("iframe").each(function(b,c){w(c,a)}).end()}}var F=0,G=!1,H=!1,I="message",J=I.length,K="[iFrameSizer]",L=K.length,M=null,N=a.requestAnimationFrame,O={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},P={},Q=null,R="Host Page",S={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,widthCalculationMethod:"scroll",closedCallback:function(){},initCallback:function(){},messageCallback:function(){j("MessageCallback function not defined")},resizedCallback:function(){},scrollCallback:function(){return!0}};a.jQuery&&E(jQuery),"function"==typeof define&&define.amd?define([],D):"object"==typeof module&&"object"==typeof module.exports?module.exports=D():a.iFrameResize=a.iFrameResize||D()}(window||{});
 //# sourceMappingURL=iframeResizer.map
\ No newline at end of file
index 7491439..5288bf3 100644 (file)
@@ -1,10 +1,20 @@
-/*!
- * jQuery Validation Plugin v1.13.0
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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
  *
  *
- * http://jqueryvalidation.org/
+ * 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.
  *
  *
- * Copyright (c) 2014 Jörn Zaefferer
- * Released under the MIT license
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
  */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
index 3b6c812..21ea121 100644 (file)
@@ -1,10 +1,20 @@
-/*!
- * jQuery Validation Plugin v1.13.0
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  *
- * http://jqueryvalidation.org/
+ * Licensed 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
  *
  *
- * Copyright (c) 2014 Jörn Zaefferer
- * Released under the MIT license
+ *     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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
  */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
index e609dbb..470708a 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index fea21cf..e631723 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 0b308e1..347cfba 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 6c27e2b..2fd84c6 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index e862aba..387ff01 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 7f5bc8f..9379fa9 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 5758f56..aa72674 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index bf37c17..715b484 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index c7279e4..fcee4fd 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 0dd93cd..5e51364 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index a9b0777..24578b2 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index eb7d336..0fb97a3 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 1486128..e49c4f9 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index d465538..0f35785 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index a36f609..d3e6bd6 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index b50beb0..27a4742 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 792ac44..7e8f665 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 735bc3b..d71dbdf 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 48f7b9a..d2f0391 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 00948d4..fc1ce55 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 7fbee3b..8194d9d 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 3eed43d..281de3c 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 494ec91..8d61fb9 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 17c8b83..8ec07ab 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index f6b5355..23efa22 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index df17a1e..051a44c 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index ade1b88..f7d0e8a 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 9de974a..4f18499 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index cdba381..8232517 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 308b715..a9700b2 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 453ba77..841a1cf 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 71b1ef8..b4594ec 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 4c2a782..25b2398 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index be77eab..bde95ad 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 896827b..747c2a6 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 8e04a9d..ac37c75 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index cf3680e..5ab253a 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 6eb9e0b..c5a3c69 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index e268be8..c360e43 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 3c14afc..edfe3ce 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 758c8a7..cddf20d 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index e354e50..73e3f9e 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 67e1e2c..db2a3dd 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 1d4c55e..b873bc3 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index ecb855c..678fe80 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index f37b00e..2c62ad0 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index a4e121c..45f7b25 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index fc86be3..35b37d6 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 470133e..c173234 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 16446e4..e0840ad 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 44b3e36..b8afcbc 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 91e0d8c..35f9058 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index d06ccec..1ff2221 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
 (function( factory ) {
        if ( typeof define === "function" && define.amd ) {
                define( ["jquery", "../jquery.validate"], factory );
index 5f9b195..5d31628 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
 /******************************************************************************
  * jquery.i18n.properties
  * 
 /******************************************************************************
  * jquery.i18n.properties
  * 
index ba7f6d5..90c8bbd 100644 (file)
-/*\r
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-var table;\r
-var vm = avalon\r
-               .define({\r
-                       $id : "routeController",\r
-                       targetServiceUrl:"",\r
-                       targetFullServiceUrl:"",\r
-                       iuiRootPath:iuiRootPath,\r
-                       apiRootPath:apiRootPath,\r
-                       apiIframeUrl:"",\r
-                       iuiIframeUrl:"",\r
-                       boxVisible:true,\r
-                       routeTargetTitle:$.i18n.prop("org_openo_msb_route_content_title"),                      \r
-                       server_rtn:{\r
-                               info_block:false,\r
-                               warning_block:false,\r
-                               rtn_info:""\r
-                       },\r
-                       showAPIType:"0",\r
-                       showAPITypeName:[$.i18n.prop("org_openo_msb_route_swagger_type_predefined"),$.i18n.prop("org_openo_msb_route_swagger_type_custominput")],\r
-                       $msbProtocol :["REST","UI","MQ","FTP","SNMP","TCP","UDP"],\r
-                       $msbType:["UI","NAF","SAF"],\r
-                       apiJson:{\r
-                               local:"",\r
-                               custom:""\r
-                       },\r
-                       setAPIType:function(type){\r
-                               vm.apiRouteInfo.apiJsonType=type;\r
-                               if(type==0){\r
-                                       vm.apiJson.local=vm.jsonApiSelectList.selectItems[0];\r
-                               }\r
-\r
-                       },      \r
-                       jsonApiSelectList:  {\r
-                                       condName : "type",\r
-                                       component_type : 'select',\r
-                                       selectItems : []\r
-                               },\r
-                       \r
-                dataTableLanguage: {\r
-                "sProcessing": "<img src='../img/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loadding...</span>",   \r
-                "sLengthMenu": $.i18n.prop("org_openo_msb_route-table-sLengthMenu"),\r
-                "sZeroRecords": $.i18n.prop("org_openo_msb_route-table-sZeroRecords"),\r
-                "sInfo": "<span class='seperator'>  </span>" + $.i18n.prop("org_openo_msb_route-table-sInfo"),\r
-                "sInfoEmpty": $.i18n.prop("org_openo_msb_route-table-sInfoEmpty"),\r
-                "sGroupActions": $.i18n.prop("org_openo_msb_route-table-sGroupActions"),\r
-                "sAjaxRequestGeneralError": $.i18n.prop("org_openo_msb_route-table-sAjaxRequestGeneralError"),\r
-                "sEmptyTable": $.i18n.prop("org_openo_msb_route-table-sEmptyTable"),\r
-                "oPaginate": {\r
-                    "sPrevious": $.i18n.prop("org_openo_msb_route-table-sPrevious"),\r
-                    "sNext": $.i18n.prop("org_openo_msb_route-table-sNext"),\r
-                    "sPage": $.i18n.prop("org_openo_msb_route-table-sPage"),\r
-                    "sPageOf": $.i18n.prop("org_openo_msb_route-table-sPageOf")\r
-                },\r
-                "sSearch": $.i18n.prop("org_openo_msb_route-table-search"),\r
-                "sInfoFiltered": $.i18n.prop("org_openo_msb_route-table-infofilter") \r
-            }, \r
-                       $apiRouteUrl :apiBasePath+'/apiRoute',\r
-                       $apiRouteInstanceUrl :apiBasePath+'/apiRoute/{serviceName}/version/{version}',  \r
-                       $apiRouteStatusUrl :apiBasePath+'/apiRoute/{serviceName}/version/{version}/status/{status}',\r
-                       $apiDocsUrl :apiBasePath+'/apiRoute/apiDocs',   \r
-                       $apiGatewayPortUrl :apiBasePath+'/apiRoute/apiGatewayPort',     \r
-                       $discoverInfoUrl :apiBasePath+'/apiRoute/discoverInfo', \r
-                       $iuiRouteUrl :apiBasePath+'/iuiRoute',\r
-                       $iuiRouteInstanceUrl :apiBasePath+'/iuiRoute/{serviceName}',\r
-                       $iuiRouteStatusUrl :apiBasePath+'/iuiRoute/{serviceName}/status/{status}',\r
-                       $customRouteUrl :apiBasePath+'/customRoute/all',\r
-                       $customRouteInstanceUrl :apiBasePath+'/customRoute/instance',\r
-                       $customRouteStatusUrl :apiBasePath+'/customRoute/status',       \r
-                       $msbRouteUrl:apiBasePath+'/services',   \r
-                       $msbRouteInstanceUrl :apiBasePath+'/services/{serviceName}/version/{version}',\r
-                       routeLoading:false,             \r
-                       apiRouteArray :  [],\r
-                       apiRouteInfo : {\r
-                           oldServiceName:"",                                  \r
-                               serviceName : "",\r
-                               oldVersion:"",  \r
-                               version : "",\r
-                               status:"",\r
-                               url:"",\r
-                               metricsUrl:"/admin/metrics",\r
-                               apiJson:"/swagger.json",\r
-                               apiJsonType:"1",\r
-                               control:"",\r
-                               server:"",\r
-                               servers: []\r
-                       },      \r
-                       iuiRouteArray :  [],\r
-                       iuiRouteInfo : {        \r
-                           oldServiceName:"",                          \r
-                               serviceName : "",\r
-                               status:"",\r
-                               url:"",\r
-                               server:"",\r
-                               control:"",\r
-                               servers: []\r
-                       },      \r
-                       customRouteArray :  [],\r
-                       customGroupRouteArray :  [],\r
-                       customRouteInfo : {     \r
-                           oldServiceName:"",          \r
-                               serviceName : "",\r
-                               status:"",\r
-                               url:"",\r
-                               server:"",\r
-                               control:"",\r
-                               servers: []\r
-                       },\r
-                       msbRouteArray :  [],\r
-                       msbRouteInfo : {        \r
-                           oldServiceName:"",  \r
-                           oldVersion:"",                              \r
-                               serviceName : "",\r
-                               version:"",\r
-                               status:"0",\r
-                               nodes:[],\r
-                               newHost:"",\r
-                               newttl:0,\r
-                               url:"",\r
-                               protocol:"",\r
-                               visualRange:"",\r
-                               visualRangeArray:[]                     \r
-                       },\r
-                       discoverInfo:{\r
-                               ip:"",\r
-                               port:"",\r
-                               enabled:false,\r
-                               deployMode:""\r
-                       },\r
-                       selectedRoute:"",\r
-                       selectedRouteType:"",\r
-                       routeDlgInfo:{\r
-                               titleName:"",\r
-                               saveType:""\r
-                       },                                                                                              \r
-                       $initRoute : function() {\r
-                       \r
-\r
-\r
-                           vm.routeLoading=true;\r
-\r
-                            $.ajax({\r
-                                       "type": 'get',\r
-                                        async: false,\r
-                                       "url":  vm.$discoverInfoUrl,\r
-                                       "dataType": "json",\r
-                                       success: function (resp) { \r
-                                  \r
-                                        vm.discoverInfo = (resp==null)?"":resp;\r
-                                                                                                       \r
-                                       },\r
-                                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                                  bootbox.alert("get discoverInfo fails:"+textStatus+":"+errorThrown); \r
-                                        }\r
-                                   });\r
-\r
-                                 $.ajax({\r
-                       "type": 'get',\r
-                       "url":  vm.$apiRouteUrl,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                            vm.apiRouteArray = (resp==null)?[]:resp;  \r
-                            vm.apiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1});                     \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                  bootbox.alert("get api services fails:"+textStatus+":"+errorThrown);                       \r
-                              return;\r
-                        },\r
-                        complete:function(){\r
-                               vm.routeLoading=false;\r
-                               routeUtil.refreshRoute();\r
-                                $.ajax({\r
-                                       "type": 'get',\r
-                                       "url":  vm.$apiGatewayPortUrl,\r
-                                       "dataType": "text",\r
-                                       success: function (resp) { \r
-                                  \r
-                                        vm.targetServiceUrl=location.hostname+":"+resp;\r
-                                                                                                       \r
-                                       },\r
-                                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                                  bootbox.alert("get apiGateway published port fails:"+textStatus+":"+errorThrown); \r
-                                        }\r
-                                   });\r
-                         }\r
-                   });\r
-\r
-\r
-\r
-                                 $.ajax({\r
-                       "type": 'get',\r
-                       "url":  vm.$iuiRouteUrl,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                            vm.iuiRouteArray = (resp==null)?[]:resp;  \r
-                            vm.iuiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1});                     \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                  bootbox.alert("get iui services fails:"+textStatus+":"+errorThrown);                       \r
-                              return;\r
-                        },\r
-                        complete:function(){                           \r
-                               routeUtil.refreshRoute();                               \r
-                         }\r
-                   });\r
-\r
-\r
-\r
-                                 $.ajax({\r
-                       "type": 'get',\r
-                       "url":  vm.$customRouteUrl,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                             vm.customRouteArray = (resp==null)?[]:resp;   \r
-                       \r
-                           if(resp!=null && resp.length>0)\r
-                           {\r
-                            routeUtil.groupRoute(resp);\r
-                           }\r
-\r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                  bootbox.alert("get custom services fails:"+textStatus+":"+errorThrown);                       \r
-                              return;\r
-                        },\r
-                        complete:function(){                           \r
-                               routeUtil.refreshRoute();                               \r
-                         }\r
-                   });\r
-\r
-\r
-                                 $.ajax({\r
-                       "type": 'get',\r
-                       "url":  vm.$apiDocsUrl,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                            vm.jsonApiSelectList.selectItems= (resp==null)?[]:resp;                    \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                  bootbox.alert("get local apiDocs  fails:"+textStatus+":"+errorThrown); \r
-                        }\r
-                   });\r
-\r
-\r
-\r
-                                 vm.initMSBRoute();\r
-\r
-\r
-               \r
-\r
-                       },\r
-                       initMSBRoute:function(){\r
-                               vm.initIUIfori18n();\r
-\r
-                               $.ajax({\r
-                       "type": 'get',\r
-                       "url":  vm.$msbRouteUrl,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                             vm.msbRouteArray = (resp==null)?[]:resp;  \r
-                       \r
-                            vm.msbRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1}); \r
-                                               \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                                  bootbox.alert("get msb services fails:"+XMLHttpRequest.responseText);                       \r
-                              return;\r
-                        },\r
-                        complete:function(){\r
-\r
-                               table=$('#msbTable').DataTable({\r
-                                                    \r
-                                                         "oLanguage": vm.dataTableLanguage,\r
-                                                         columnDefs: [ {\r
-                                                                     targets: [ 0,8 ],\r
-                                                                     "searchable": false,\r
-                                                                     "bSortable": false,\r
-                                                                   }],                                                              \r
-                                                                  "order": [[2, 'asc']]\r
-                                                       });\r
-                               \r
-                               }\r
-                               });\r
-              \r
-                  \r
-                       },\r
-                       \r
-                       clickDisplayGraphAlink: function () {\r
-               vm.boxVisible = !vm.boxVisible;\r
-               },\r
-               addmsbHost:function(){\r
-                       if(vm.msbRouteInfo.newHost==""){\r
-                               vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_empty");\r
-                                       return;\r
-                       }\r
-\r
-                       if(vm.msbRouteInfo.newttl==""){\r
-                               vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_ttl_empty");\r
-                                       return;\r
-                       }\r
-\r
-                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   \r
-                          var ip,port; \r
-                                  if(!reg.test(vm.msbRouteInfo.newHost)){  \r
-                                       vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_format");\r
-                                       return;\r
-                                  }\r
-                                  else{\r
-                       \r
-                                       var hosts=vm.msbRouteInfo.newHost.split(":");  \r
-                                       ip=hosts[0];\r
-                                       port=hosts[1];\r
-                                  }\r
-\r
-                var reg_ttl=/^\d+$/\r
-         \r
-                                if(!reg_ttl.test(vm.msbRouteInfo.newttl)){  \r
-                                       vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_ttl_format");\r
-                                       return;\r
-                                  }  \r
-\r
-                                 \r
-\r
-                       // determine whether host repeated\r
-                               for(var i=0;i<vm.msbRouteInfo.nodes.length;i++){\r
-                               \r
-                                               if(vm.msbRouteInfo.nodes[i].ip==ip && vm.msbRouteInfo.nodes[i].port==port )\r
-                                               {\r
-                                                       vm.server_rtn.warning_block=true;\r
-                                                   vm.server_rtn.info_block=false; \r
-                                                   vm.server_rtn.rtn_info=  $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.msbRouteInfo.newHost]); \r
-                                                   return;\r
-                                               }\r
-                                       \r
-                               }\r
-\r
-                               vm.msbRouteInfo.nodes.push({"ip":ip,"port":port,"ttl":vm.msbRouteInfo.newttl});\r
-                               vm.msbRouteInfo.newHost="";\r
-                               vm.msbRouteInfo.newttl="";\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-\r
-               },\r
-               delmsbHost:function(ip,port){\r
-                       \r
-                       bootbox.confirm( $.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){\r
-                               if(result){\r
-                                       \r
-                                        for(var i=0;i<vm.msbRouteInfo.nodes.length;i++){\r
-                                              if(vm.msbRouteInfo.nodes[i].ip == ip && vm.msbRouteInfo.nodes[i].port == port){\r
-                                                   vm.msbRouteInfo.nodes.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                              }\r
-       \r
-                               });\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-               },\r
-               addapiHost:function(){\r
-                       if(vm.apiRouteInfo.server==""){\r
-                               vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_empty");\r
-                                       return;\r
-                       }\r
-\r
-                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   \r
-                         var ip,port;\r
-                                  if(!reg.test(vm.apiRouteInfo.server)){  \r
-                                       vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info=  $.i18n.prop("org_openo_msb_route_err_host_format");\r
-                                       return;\r
-                                  }\r
-                                  else{\r
-                                       var hosts=vm.apiRouteInfo.server.split(":")\r
-                                       ip=hosts[0];\r
-                                       port=hosts[1];\r
-                                  }\r
-\r
-                       // determine whether host repeated\r
-                               for(var i=0;i<vm.apiRouteInfo.servers.length;i++){\r
-                               \r
-                                               if(vm.apiRouteInfo.servers[i].ip==ip && vm.apiRouteInfo.servers[i].port==port)\r
-                                               {\r
-                                                       vm.server_rtn.warning_block=true;\r
-                                                   vm.server_rtn.info_block=false; \r
-                                                   vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.apiRouteInfo.server]); \r
-                                                       return;\r
-                                               }\r
-                                       \r
-                               }\r
-                               var server={ip:ip,port:port,weight: 0};\r
-                               vm.apiRouteInfo.servers.push(server);\r
-                               vm.apiRouteInfo.server="";\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-\r
-               },\r
-               delapiHost:function(ip,port){\r
-                       \r
-                       bootbox.confirm( $.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){\r
-                               if(result){\r
-                                       \r
-                                        for(var i=0;i<vm.apiRouteInfo.servers.length;i++){\r
-                                              if(vm.apiRouteInfo.servers[i].ip == ip && vm.apiRouteInfo.servers[i].port == port ){\r
-                                                   vm.apiRouteInfo.servers.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                              }\r
-       \r
-                               });\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-               },\r
-               addcustomHost:function(){\r
-                       if(vm.customRouteInfo.server==""){\r
-                               vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info=  $.i18n.prop("org_openo_msb_route_err_host_empty");\r
-                                       return;\r
-                       }\r
-\r
-                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   \r
-                         var ip,port;\r
-                                  if(!reg.test(vm.customRouteInfo.server)){  \r
-                                       vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_format");\r
-                                       return;\r
-                                  }\r
-                                  else{\r
-                                       var hosts=vm.customRouteInfo.server.split(":")\r
-                                       ip=hosts[0];\r
-                                       port=hosts[1];\r
-                                  }\r
-\r
-                       //判断host是否重复\r
-                               for(var i=0;i<vm.customRouteInfo.servers.length;i++){\r
-                               \r
-                                               if(vm.customRouteInfo.servers[i].ip==ip && vm.customRouteInfo.servers[i].port==port)\r
-                                               {\r
-                                                       vm.server_rtn.warning_block=true;\r
-                                                   vm.server_rtn.info_block=false; \r
-                                                   vm.server_rtn.rtn_info=  $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.apiRouteInfo.server]);\r
-                                                       return;\r
-                                               }\r
-                                       \r
-                               }\r
-                               var server={ip:ip,port:port,weight: 0};\r
-                               vm.customRouteInfo.servers.push(server);\r
-                               vm.customRouteInfo.server="";\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-\r
-               },\r
-               delcustomHost:function(ip,port){\r
-                       \r
-                       bootbox.confirm( $.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){\r
-                               if(result){\r
-                                       \r
-                                        for(var i=0;i<vm.customRouteInfo.servers.length;i++){\r
-                                              if(vm.customRouteInfo.servers[i].ip == ip && vm.customRouteInfo.servers[i].port == port ){\r
-                                                   vm.customRouteInfo.servers.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                              }\r
-       \r
-                               });\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-               },\r
-               addiuiHost:function(){\r
-                       if(vm.iuiRouteInfo.server==""){\r
-                               vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_empty");\r
-                                       return;\r
-                       }\r
-\r
-                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   \r
-                         var ip,port;\r
-                                  if(!reg.test(vm.iuiRouteInfo.server)){  \r
-                                       vm.server_rtn.warning_block=true;\r
-                                   vm.server_rtn.info_block=false; \r
-                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_format");\r
-                                       return;\r
-                                  }\r
-                                  else{\r
-                                       var hosts=vm.iuiRouteInfo.server.split(":")\r
-                                       ip=hosts[0];\r
-                                       port=hosts[1];\r
-                                  }\r
-\r
-                       //判断host是否重复\r
-                               for(var i=0;i<vm.iuiRouteInfo.servers.length;i++){\r
-                               \r
-                                               if(vm.iuiRouteInfo.servers[i].ip==ip && vm.iuiRouteInfo.servers[i].port==port)\r
-                                               {\r
-                                                       vm.server_rtn.warning_block=true;\r
-                                                   vm.server_rtn.info_block=false; \r
-                                                   vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.apiRouteInfo.server]);\r
-                                                       return;\r
-                                               }\r
-                                       \r
-                               }\r
-                               var server={ip:ip,port:port,weight: 0};\r
-                               vm.iuiRouteInfo.servers.push(server);\r
-                               vm.iuiRouteInfo.server="";\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-\r
-               },\r
-               deliuiHost:function(ip,port){\r
-                       \r
-                       bootbox.confirm($.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){\r
-                               if(result){\r
-                                       \r
-                                        for(var i=0;i<vm.iuiRouteInfo.servers.length;i++){\r
-                                              if(vm.iuiRouteInfo.servers[i].ip == ip && vm.iuiRouteInfo.servers[i].port == port ){\r
-                                                   vm.iuiRouteInfo.servers.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                              }\r
-       \r
-                               });\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                           vm.server_rtn.info_block=false; \r
-                               vm.server_rtn.rtn_info= "";\r
-\r
-               },\r
-               $showmsbRouteDlg:function() {\r
-                       vm.msbRouteInfo.serviceName=""; \r
-                               vm.msbRouteInfo.version="";\r
-                               vm.msbRouteInfo.url="";\r
-                               vm.msbRouteInfo.protocol="";\r
-                               vm.msbRouteInfo.visualRange="";\r
-                               vm.msbRouteInfo.visualRangeArray=[];\r
-                               vm.msbRouteInfo.newHost="";\r
-                               vm.msbRouteInfo.nodes=[];                                       \r
-                               vm.msbRouteInfo.status="1";     \r
-                       \r
-\r
-                               vm.routeDlgInfo.saveType = "add";\r
-                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_msb');\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-               \r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                               $(this).find(".item-tip").removeClass('item-tip-focus');\r
-                                       });\r
-\r
-                               $("#msbrouteDlg").modal("show");\r
-               },\r
-               $showiuiRouteDlg:function() {\r
-\r
-                               vm.iuiRouteInfo.serviceName="";\r
-                               vm.iuiRouteInfo.url="";\r
-                               vm.iuiRouteInfo.server="";\r
-                               vm.iuiRouteInfo.servers=[];     \r
-                               vm.iuiRouteInfo.control="0";    \r
-                               vm.iuiRouteInfo.status="1";     \r
-                       \r
-\r
-                               vm.routeDlgInfo.saveType = "add";\r
-                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_iui');\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-                               //$("input[name='iuioriService']").val("");\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                               $(this).find(".item-tip").removeClass('item-tip-focus');\r
-                                       });\r
-\r
-                               $("#iuirouteDlg").modal("show");\r
-                       },\r
-                       $showcustomRouteDlg:function() {\r
-\r
-                               vm.customRouteInfo.serviceName="";\r
-                               vm.customRouteInfo.url="";\r
-                               vm.customRouteInfo.server="";\r
-                               vm.customRouteInfo.servers=[];  \r
-                               vm.customRouteInfo.control="0"; \r
-                               vm.customRouteInfo.status="1";          \r
-                       \r
-\r
-                               vm.routeDlgInfo.saveType = "add";\r
-                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_custom');\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-                               //$("input[name='customoriService']").val("");\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                               $(this).find(".item-tip").removeClass('item-tip-focus');\r
-                                       });\r
-\r
-                               $("#customrouteDlg").modal("show");\r
-                       },\r
-                       $showApiRouteDlg : function() {\r
-\r
-                               $('#apiTab a:first').tab('show');\r
-                               vm.apiRouteInfo.serviceName="";\r
-                               vm.apiRouteInfo.version="";\r
-                               vm.apiRouteInfo.url="";\r
-                               vm.apiRouteInfo.metricsUrl="/admin/metrics";\r
-                               vm.apiRouteInfo.control="0";\r
-                               vm.apiRouteInfo.status="1";\r
-                               // vm.apiRouteInfo.apiJson="/service/swagger.json";\r
-                               vm.apiRouteInfo.apiJsonType="1";                                \r
-                               vm.apiRouteInfo.server="";\r
-                               vm.apiRouteInfo.servers=[];     \r
-                       \r
-                               vm.apiJson.custom="/swagger.json";\r
-\r
-                               //$("input[name='oriService']").val("");\r
-\r
-                               $('#metricsFullurl').collapse('hide');\r
-                               $('#apiJsonFullurl').collapse('hide');\r
-\r
-                       \r
-\r
-                               vm.routeDlgInfo.saveType = "add";\r
-                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_api');\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                               $(this).find(".item-tip").removeClass('item-tip-focus');\r
-                                       });\r
-\r
-\r
-                               $("#routeDlg").modal("show");\r
-                       },\r
-                       $saveiuiRoute : function() {\r
-\r
-                               iuisuccess.hide();\r
-                               iuierror.hide();\r
-                               if (iuiform.valid() == false) {\r
-                                       return false;\r
-                               }\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=true;\r
-\r
-                               vm.iuiRouteInfo.serviceName=$.trim(vm.iuiRouteInfo.serviceName);\r
-                               \r
-                               var servers=[];\r
-                               for(var i=0;i<vm.iuiRouteInfo.servers.length;i++){\r
-                                       var server={ip:vm.iuiRouteInfo.servers[i].ip,port:vm.iuiRouteInfo.servers[i].port,weight: 0};\r
-                                       servers.push(server);\r
-                               }\r
-\r
-\r
-\r
-                               var iuiRouteUrl=vm.iuiRouteInfo.url=="/"?"":vm.iuiRouteInfo.url;\r
-                               var data= JSON.stringify({\r
-                                                        "serviceName": vm.iuiRouteInfo.serviceName,\r
-                                                         "url": iuiRouteUrl,\r
-                                                         "control":vm.iuiRouteInfo.control,\r
-                                                         "status":vm.iuiRouteInfo.status,\r
-                                                         "servers": servers\r
-                                               });\r
-\r
-                               if(vm.routeDlgInfo.saveType=="add")\r
-                               {\r
-\r
-                                       //Determine whether to repeat\r
-                                       for(var i=0;i<vm.iuiRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.iuiRouteArray[i].serviceName==vm.iuiRouteInfo.serviceName)\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.iuiRouteInfo.serviceName]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-\r
-                 //save service\r
-                 \r
-              \r
-                   $.ajax({\r
-                       "type": 'POST',\r
-                       "url":  vm.$iuiRouteUrl,\r
-                       "data" : data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                               \r
-                                               vm.iuiRouteArray.push(JSON.parse(data)); \r
-                                               vm.iuiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1}); \r
-\r
-                                               routeUtil.refreshRoute();       \r
-                                               $('#iuirouteDlg').modal('hide');                                                        \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                  \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                \r
-                             \r
-                        }\r
-                   });\r
-               }\r
-               else{  //update\r
-\r
-                                var url= vm.$iuiRouteInstanceUrl;\r
-                        url=url.replace("{serviceName}",vm.iuiRouteInfo.oldServiceName);\r
-\r
-                           //Determine whether to repeat\r
-                         if(vm.iuiRouteInfo.serviceName!=vm.iuiRouteInfo.oldServiceName)  //Has been modified service name\r
-                         {\r
-                                       for(var i=0;i<vm.iuiRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.iuiRouteArray[i].serviceName==vm.iuiRouteInfo.serviceName)\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.iuiRouteInfo.serviceName]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-                               }\r
-\r
-                       $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                        "data" :data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                         \r
-                                                       for(var i=0;i<vm.iuiRouteArray.length;i++){\r
-                                           if(vm.iuiRouteArray[i].serviceName == vm.iuiRouteInfo.oldServiceName)\r
-                                           { \r
-                                               vm.iuiRouteArray[i].serviceName=vm.iuiRouteInfo.serviceName;                                          \r
-                                               vm.iuiRouteArray[i].url=iuiRouteUrl;\r
-                                               vm.iuiRouteArray[i].servers=vm.iuiRouteInfo.servers;\r
-                                              \r
-                                               break;\r
-                                           }\r
-                                        }\r
-                             \r
-\r
-\r
-                                               $('#iuirouteDlg').modal('hide');                                                        \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); \r
-                                               \r
-\r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                \r
-                             \r
-                        }\r
-                   });\r
-\r
-              \r
-                          }\r
-                       },\r
-                       $savecustomRoute : function() {\r
-\r
-                               customsuccess.hide();\r
-                               customerror.hide();\r
-                               if (customform.valid() == false) {\r
-                                       return false;\r
-                               }\r
-\r
-                               if(vm.customRouteInfo.servers.length==0){\r
-                                       vm.server_rtn.warning_block=true;\r
-                                       vm.server_rtn.info_block=false; \r
-                                       vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_leastone');\r
-                                       return;\r
-                               }\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=true;\r
-\r
-                               vm.customRouteInfo.serviceName=$.trim(vm.customRouteInfo.serviceName);\r
-                               \r
-                               var servers=[];\r
-                               for(var i=0;i<vm.customRouteInfo.servers.length;i++){\r
-                                       var server={ip:vm.customRouteInfo.servers[i].ip,port:vm.customRouteInfo.servers[i].port,weight: 0};\r
-                                       servers.push(server);\r
-                               }\r
-\r
-                               var customRouteUrl=vm.customRouteInfo.url=="/"?"":vm.customRouteInfo.url;\r
-                               var data= JSON.stringify({\r
-                                                        "serviceName": vm.customRouteInfo.serviceName,\r
-                                                         "url": customRouteUrl,\r
-                                                         "control":vm.customRouteInfo.control,\r
-                                                         "status":vm.customRouteInfo.status,\r
-                                                         "servers": servers\r
-                                               });\r
-\r
-                               if(vm.routeDlgInfo.saveType=="add")\r
-                               {\r
-\r
-                                       //Determine whether to repeat\r
-                                       for(var i=0;i<vm.customRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.customRouteArray[i].serviceName==vm.customRouteInfo.serviceName)\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.customRouteInfo.serviceName]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-\r
-                 //save \r
-                 \r
-              \r
-                   $.ajax({\r
-                       "type": 'POST',\r
-                       "url":  vm.$customRouteInstanceUrl,\r
-                       "data" : data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                               \r
-                                               vm.customRouteArray.push(JSON.parse(data)); \r
-                                               routeUtil.groupRoute(vm.customRouteArray);\r
-\r
-\r
-                                               routeUtil.refreshRoute();       \r
-                                               $('#customrouteDlg').modal('hide');                                                     \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                       \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                \r
-                             \r
-                        }\r
-                   });\r
-               }\r
-               else{  //update\r
-\r
-                           //Determine whether to repeat\r
-                         if(vm.customRouteInfo.serviceName!=vm.customRouteInfo.oldServiceName)  //Has been modified service name\r
-                         {\r
-                                       for(var i=0;i<vm.customRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.customRouteArray[i].serviceName==vm.customRouteInfo.serviceName)\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.customRouteInfo.serviceName]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-                               }\r
-\r
-                                var url= vm.$customRouteInstanceUrl+"?serviceName="+vm.customRouteInfo.oldServiceName;\r
-               \r
-                       $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                        "data" :data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                    \r
-                                                       for(var i=0;i<vm.customRouteArray.length;i++){\r
-                                           if(vm.customRouteArray[i].serviceName == vm.customRouteInfo.oldServiceName)\r
-                                           {\r
-                                               vm.customRouteArray[i].serviceName=vm.customRouteInfo.serviceName;                                            \r
-                                               vm.customRouteArray[i].url=customRouteUrl;\r
-                                               vm.customRouteArray[i].servers=vm.customRouteInfo.servers;\r
-                                               break;\r
-                                           }\r
-                                        }\r
-                                               \r
-                                               routeUtil.groupRoute(vm.customRouteArray);\r
-                             \r
-\r
-\r
-                                               $('#customrouteDlg').modal('hide');                                                     \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); \r
-                                               \r
-\r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info=$.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                \r
-                             \r
-                        }\r
-                   });\r
-\r
-              \r
-                          }\r
-                       },\r
-                       $saveApiRoute : function() {\r
-\r
-                               success.hide();\r
-                               error.hide();\r
-                               if (form.valid() == false) {\r
-                                       return false;\r
-                               }\r
-\r
-                               if(vm.apiRouteInfo.servers.length==0){\r
-                                       vm.server_rtn.warning_block=true;\r
-                                       vm.server_rtn.info_block=false; \r
-                                       vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_leastone');\r
-                                       return;\r
-                               }\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=true;\r
-\r
-                               \r
-                               var apiRouteUrl=vm.apiRouteInfo.url=="/"?"":vm.apiRouteInfo.url;\r
-                               var apiJson=vm.apiRouteInfo.apiJsonType=="1"?vm.apiJson.custom:vm.apiJson.local;        \r
-\r
-                               var servers=[];\r
-                               for(var i=0;i<vm.apiRouteInfo.servers.length;i++){\r
-                                       var server={ip:vm.apiRouteInfo.servers[i].ip,port:vm.apiRouteInfo.servers[i].port,weight: 0};\r
-                                       servers.push(server);\r
-                               }\r
-\r
-\r
-                               var data= JSON.stringify({\r
-                                                        "serviceName": vm.apiRouteInfo.serviceName,\r
-                                                         "version": vm.apiRouteInfo.version,\r
-                                                         "url": apiRouteUrl,\r
-                                                         "metricsUrl":vm.apiRouteInfo.metricsUrl,\r
-                                                         "apiJson": apiJson,\r
-                                                         "apiJsonType":vm.apiRouteInfo.apiJsonType,\r
-                                                         "control":vm.apiRouteInfo.control,\r
-                                                         "status":vm.apiRouteInfo.status,\r
-                                                         "servers": servers\r
-                                               \r
-                                               });\r
-\r
-                               if(vm.routeDlgInfo.saveType=="add")\r
-                               {\r
-\r
-                                        //Determine whether to repeat\r
-                                       for(var i=0;i<vm.apiRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.apiRouteArray[i].serviceName==vm.apiRouteInfo.serviceName \r
-                                                               && vm.apiRouteArray[i].version==vm.apiRouteInfo.version )\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info=$.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.apiRouteInfo.serviceName],[vm.apiRouteInfo.version]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-\r
-                 //save\r
-                 \r
-              \r
-                   $.ajax({\r
-                       "type": 'POST',\r
-                       "url":  vm.$apiRouteUrl,\r
-                       "data" : data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                               \r
-                                               vm.apiRouteArray.push(JSON.parse(data)); \r
-                                               vm.apiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1}); \r
-\r
-                                               routeUtil.refreshRoute();       \r
-                                               $('#routeDlg').modal('hide');                                                   \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                  \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                \r
-                             \r
-                        }\r
-                   });\r
-               }\r
-               else{  //update\r
-                               \r
-\r
-                //Determine whether to repeat\r
-                         if(vm.apiRouteInfo.serviceName!=vm.apiRouteInfo.oldServiceName || \r
-                         vm.apiRouteInfo.version!=vm.apiRouteInfo.oldVersion)  //Has been modified service name\r
-                         {\r
-                                       for(var i=0;i<vm.apiRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.apiRouteArray[i].serviceName==vm.apiRouteInfo.serviceName \r
-                                                               && vm.apiRouteArray[i].version==vm.apiRouteInfo.version )\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.apiRouteInfo.serviceName],[vm.apiRouteInfo.version]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-                               }\r
-\r
-                                var url= vm.$apiRouteInstanceUrl;\r
-                                var version=vm.apiRouteInfo.oldVersion==""?"null":vm.apiRouteInfo.oldVersion;\r
-                        url=url.replace("{serviceName}",vm.apiRouteInfo.oldServiceName).replace("{version}",version);\r
-\r
-\r
-                                $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                        "data" :data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                         \r
-                                                       for(var i=0;i<vm.apiRouteArray.length;i++){\r
-                                           if(vm.apiRouteArray[i].serviceName == vm.apiRouteInfo.oldServiceName && \r
-                                               vm.apiRouteArray[i].version == vm.apiRouteInfo.oldVersion)\r
-                                           {\r
-                                               //vm.apiRouteArray[i] = JSON.parse(data);\r
-                                                               vm.apiRouteArray[i].serviceName=vm.apiRouteInfo.serviceName;\r
-                                                                       vm.apiRouteArray[i].version= vm.apiRouteInfo.version;\r
-                                                                       vm.apiRouteArray[i].url=apiRouteUrl;\r
-                                                                       vm.apiRouteArray[i].metricsUrl=vm.apiRouteInfo.metricsUrl;\r
-                                                                       vm.apiRouteArray[i].apiJson=apiJson;\r
-                                                                       vm.apiRouteArray[i].apiJsonType=vm.apiRouteInfo.apiJsonType;\r
-\r
-                                                                       vm.apiRouteArray[i].servers=vm.apiRouteInfo.servers;\r
-\r
-                                                                       \r
-                                               break;\r
-                                           }\r
-                                        }\r
-                             \r
-\r
-\r
-                                               $('#routeDlg').modal('hide');                                                   \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); \r
-                                               \r
-\r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                \r
-                             \r
-                        }\r
-                   });\r
-\r
-              \r
-                          }\r
-                       },\r
-                       $savemsbRoute : function() {\r
-\r
-                               msbsuccess.hide();\r
-                               msberror.hide();\r
-                               if (msbform.valid() == false) {\r
-                                       return false;\r
-                               }\r
-\r
-                               if(vm.msbRouteInfo.nodes.length==0){\r
-                                       vm.server_rtn.warning_block=true;\r
-                                       vm.server_rtn.info_block=false; \r
-                                       vm.server_rtn.rtn_info=$.i18n.prop('org_openo_msb_route_err_host_leastone');\r
-                                       return;\r
-                               }\r
-\r
-                               if(vm.msbRouteInfo.visualRangeArray.length==0){\r
-                                       vm.server_rtn.warning_block=true;\r
-                                       vm.server_rtn.info_block=false; \r
-                                       vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_visualrange_empty');\r
-                                       return;\r
-                               }\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=true;\r
-\r
-                               var msbUrl=vm.msbRouteInfo.url=="/"?"":vm.msbRouteInfo.url;\r
-               \r
-\r
-                               var nodes=[];\r
-                               for(var i=0;i<vm.msbRouteInfo.nodes.length;i++){\r
-                                       var node={ip:vm.msbRouteInfo.nodes[i].ip,port:vm.msbRouteInfo.nodes[i].port,ttl: vm.msbRouteInfo.nodes[i].ttl};\r
-                                       nodes.push(node);\r
-                               }\r
-\r
-                               var data= JSON.stringify({\r
-                                                        "serviceName": vm.msbRouteInfo.serviceName,\r
-                                                         "version": vm.msbRouteInfo.version,\r
-                                                         "url": msbUrl,                                                         \r
-                                                         "nodes": nodes,\r
-                                                         "protocol":vm.msbRouteInfo.protocol,\r
-                                                         "visualRange":vm.msbRouteInfo.visualRangeArray.join("|")\r
-                                               });\r
-\r
-                               if(vm.routeDlgInfo.saveType=="add")\r
-                               {\r
-\r
-                                       //Determine whether to repeat\r
-                                       for(var i=0;i<vm.msbRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.msbRouteArray[i].serviceName==vm.msbRouteInfo.serviceName \r
-                                                               && vm.msbRouteArray[i].version==vm.msbRouteInfo.version )\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.msbRouteInfo.serviceName],[vm.msbRouteInfo.version]);\r
-                                                       }\r
-                                               \r
-                                       }\r
-\r
-                 //save\r
-                 \r
-              \r
-                   $.ajax({\r
-                       "type": 'POST',\r
-                       "url":  vm.$msbRouteUrl,\r
-                       "data" : data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                          \r
-                                                // vm.msbRouteArray.push(JSON.parse(data)); \r
-                                                 table.destroy();\r
-                                                 vm.initMSBRoute();\r
-\r
-                                         //       table=$('#msbTable').DataTable({\r
-                                                    \r
-                                                       //   "oLanguage": vm.$dataTableLanguage,\r
-                                                       //   columnDefs: [ {\r
-                                                       //            targets: [ 7 ],\r
-                                                       //            "searchable": false,\r
-                                                       //            "bSortable": false,\r
-                                                       //          }]\r
-                                                       // });\r
-       \r
-                                               $('#msbrouteDlg').modal('hide');                                                        \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_msb'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                  \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+XMLHttpRequest.responseText;                \r
-                             \r
-                        }\r
-                   });\r
-               }\r
-               else{  //update\r
-                               \r
-\r
-                //Determine whether to repeat\r
-                         if(vm.msbRouteInfo.serviceName!=vm.msbRouteInfo.oldServiceName || \r
-                         vm.msbRouteInfo.version!=vm.msbRouteInfo.oldVersion)  //Has been modified service name or version\r
-                         {\r
-                                       for(var i=0;i<vm.msbRouteArray.length;i++){\r
-                                       \r
-                                                       if(vm.msbRouteArray[i].serviceName==vm.msbRouteInfo.serviceName \r
-                                                               && vm.msbRouteArray[i].version==vm.msbRouteInfo.version )\r
-                                                       {\r
-                                                               vm.server_rtn.warning_block=true;\r
-                                                           vm.server_rtn.info_block=false; \r
-                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.msbRouteInfo.serviceName],[vm.msbRouteInfo.version]);\r
-                                                               return;\r
-                                                       }\r
-                                               \r
-                                       }\r
-                               }\r
-\r
-                                var url= vm.$msbRouteInstanceUrl;\r
-                                var version=vm.msbRouteInfo.oldVersion==""?"null":vm.msbRouteInfo.oldVersion;\r
-                                var serviceName2= vm.msbRouteInfo.oldServiceName.replace(/\//g,"*");\r
-                        url=url.replace("{serviceName}",serviceName2).replace("{version}",version);\r
-\r
-\r
-                                $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                        "data" :data,\r
-                       "dataType": "json",\r
-                       "contentType":"application/json",\r
-                       success: function (resp) {  \r
-                    \r
-                                                       for(var i=0;i<vm.msbRouteArray.length;i++){\r
-                                           if(vm.msbRouteArray[i].serviceName == vm.msbRouteInfo.oldServiceName && \r
-                                               vm.msbRouteArray[i].version == vm.msbRouteInfo.oldVersion)\r
-                                           {\r
-                                               //vm.apiRouteArray[i] = JSON.parse(data);\r
-                                                               vm.msbRouteArray[i].serviceName=vm.msbRouteInfo.serviceName;\r
-                                                                       vm.msbRouteArray[i].version= vm.msbRouteInfo.version;\r
-                                                                       vm.msbRouteArray[i].url=msbUrl;\r
-                                                                       vm.msbRouteArray[i].protocol=vm.msbRouteInfo.protocol;\r
-                                                                       vm.msbRouteArray[i].visualRange=vm.msbRouteInfo.visualRange;\r
-                                                                       vm.msbRouteArray[i].visualRangeArray=vm.msbRouteInfo.visualRangeArray;\r
-                                                                       vm.msbRouteArray[i].nodes=nodes;\r
-                                                                                                            \r
-                                               break;\r
-                                           }\r
-                                        }\r
-                             \r
-\r
-\r
-                                               $('#msbrouteDlg').modal('hide');                                                        \r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_msb'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); \r
-                                               \r
-\r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                                  vm.server_rtn.warning_block=true;\r
-                                              vm.server_rtn.info_block=false; \r
-                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+XMLHttpRequest.responseText;                \r
-                             \r
-                        }\r
-                   });\r
-\r
-              \r
-                          }\r
-                       },\r
-\r
-                       updateApiRouteStatus:function(serviceName,version,status){\r
-\r
-                               var url= vm.$apiRouteStatusUrl;\r
-                                   var version2=version==""?"null":version;\r
-                        url=url.replace("{serviceName}",serviceName).replace("{version}",version2).replace("{status}",status);\r
-       \r
-                                        $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               \r
-                             \r
-                                                        for(var i=0;i<vm.apiRouteArray.length;i++){\r
-                                              if(vm.apiRouteArray[i].serviceName == serviceName && \r
-                                               vm.apiRouteArray[i].version == version){\r
-                                                   vm.apiRouteArray[i].status=status;\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                                         if(status=='1')   \r
-                                         {\r
-                                           routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_status_enable'),"success");\r
-                                         }\r
-                                         else{\r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_status_disable'),"success");\r
-                                         }\r
-                                       \r
-\r
-               \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_err_status')+textStatus+":"+errorThrown);                \r
-                             \r
-                        }\r
-                   });\r
-\r
-                       },\r
-                       updateiuiRouteStatus:function(serviceName,status){\r
-\r
-                               var url= vm.$iuiRouteStatusUrl;\r
-                               \r
-                     url=url.replace("{serviceName}",serviceName).replace("{status}",status);\r
-       \r
-                                        $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               \r
-                              \r
-                                                        for(var i=0;i<vm.iuiRouteArray.length;i++){\r
-                                              if(vm.iuiRouteArray[i].serviceName == serviceName){\r
-                                                   vm.iuiRouteArray[i].status=status;\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                                         if(status=='1')   \r
-                                         {\r
-                                           routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_status_enable'),"success");\r
-                                         }\r
-                                         else{\r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_status_disable'),"success");\r
-                                         }\r
-                                       \r
-               \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_err_status')+textStatus+":"+errorThrown);                \r
-                             \r
-                        }\r
-                   });\r
-\r
-                       },\r
-                       updatecustomRouteStatus:function(serviceName,status){\r
-\r
-                               \r
-              var url= vm.$customRouteStatusUrl+"?serviceName="+serviceName+"&status="+status;\r
-\r
-       \r
-                                        $.ajax({\r
-                       "type": 'PUT',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               \r
-                         \r
-                                                        for(var i=0;i<vm.customRouteArray.length;i++){\r
-                                              if(vm.customRouteArray[i].serviceName == serviceName){\r
-                                                   vm.customRouteArray[i].status=status;\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-\r
-                                   routeUtil.groupRoute(vm.customRouteArray);\r
-\r
-                                         if(status=='1')   \r
-                                         {\r
-                                           routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_status_enable'),"success");\r
-                                         }\r
-                                         else{\r
-                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_status_disable'),"success");\r
-                                         }\r
-                                       \r
-\r
-               \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_err_status')+textStatus+":"+errorThrown);                \r
-                             \r
-                        }\r
-                   });\r
-\r
-                       },\r
-                       updateApiRoute:function(apiRouteInfo,type){\r
-                       \r
-\r
-                       \r
-\r
-                               $('#metricsFullurl').collapse('hide');\r
-                               $('#apiJsonFullurl').collapse('hide');\r
-                               $('#apiTab a:first').tab('show');\r
-                               \r
-                               vm.apiRouteInfo.serviceName=apiRouteInfo.serviceName;\r
-                               vm.apiRouteInfo.oldServiceName=apiRouteInfo.serviceName;\r
-                               vm.apiRouteInfo.version= apiRouteInfo.version;\r
-                               vm.apiRouteInfo.oldVersion=apiRouteInfo.version;\r
-                               vm.apiRouteInfo.url=apiRouteInfo.url==""?"/":apiRouteInfo.url;\r
-                               vm.apiRouteInfo.metricsUrl=apiRouteInfo.metricsUrl;\r
-                               vm.apiRouteInfo.apiJson=apiRouteInfo.apiJson;\r
-                               vm.apiRouteInfo.apiJsonType=apiRouteInfo.apiJsonType;\r
-                               vm.apiRouteInfo.control=apiRouteInfo.control;\r
-                               vm.apiRouteInfo.status= apiRouteInfo.status;\r
-\r
-                               if(vm.apiRouteInfo.apiJsonType=="1"){\r
-                                       vm.apiJson.custom=apiRouteInfo.apiJson;\r
-                               }\r
-                               else{\r
-                                       vm.apiJson.local=apiRouteInfo.apiJson;\r
-                                       vm.apiJson.custom="/swagger.json";\r
-                                        $("#apiJsonSelect").val(apiRouteInfo.apiJson);\r
-                               }\r
-\r
-                               vm.apiRouteInfo.server="";\r
-                               vm.apiRouteInfo.servers=[];\r
-                               vm.apiRouteInfo.servers=apiRouteInfo.servers;\r
-\r
-                               \r
-\r
-\r
-                               // vm.apiRouteInfo= jQuery.extend({},apiRouteInfo);\r
-               \r
-                               vm.routeDlgInfo.saveType = type;\r
-                               if(type=='update'){\r
-                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_api');    \r
-                               }\r
-                               else if(type=='view'){\r
-                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_view_api');    \r
-                               }\r
-                               \r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".item-tip").addClass("item-tip-focus");\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                       });\r
-\r
-                               $("#routeDlg").modal("show");\r
-                       },\r
-                       updateiuiRoute:function(iuiRouteInfo,type){\r
-                               \r
-                               \r
-                               vm.iuiRouteInfo.serviceName=iuiRouteInfo.serviceName;\r
-                               vm.iuiRouteInfo.oldServiceName=iuiRouteInfo.serviceName;\r
-                               vm.iuiRouteInfo.url=iuiRouteInfo.url==""?"/":iuiRouteInfo.url;\r
-                               vm.iuiRouteInfo.server="";\r
-                               vm.iuiRouteInfo.servers=[];\r
-                               vm.iuiRouteInfo.servers=iuiRouteInfo.servers;\r
-                               vm.iuiRouteInfo.control=iuiRouteInfo.control;\r
-                               vm.iuiRouteInfo.status=iuiRouteInfo.status;\r
-\r
-\r
-                               // vm.apiRouteInfo= jQuery.extend({},apiRouteInfo);\r
-               \r
-                               \r
-                               vm.routeDlgInfo.saveType = type;\r
-                               if(type=='update'){\r
-                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_iui');    \r
-                               }\r
-                               else if(type=='view'){\r
-                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_view_iui');    \r
-                               }\r
-\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".item-tip").addClass("item-tip-focus");\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                       });\r
-\r
-                               $("#iuirouteDlg").modal("show");\r
-                       },\r
-                       updatecustomRoute:function(customRouteInfo,type){\r
-                               \r
-                               \r
-                               vm.customRouteInfo.serviceName=customRouteInfo.serviceName;\r
-                               vm.customRouteInfo.oldServiceName=customRouteInfo.serviceName;\r
-                               \r
-                               vm.customRouteInfo.url=customRouteInfo.url==""?"/":customRouteInfo.url;\r
-                               vm.customRouteInfo.server="";\r
-                               vm.customRouteInfo.servers=[];\r
-                               vm.customRouteInfo.servers=customRouteInfo.servers;\r
-                               vm.customRouteInfo.control=customRouteInfo.control;\r
-                               vm.customRouteInfo.status=customRouteInfo.status;\r
-\r
-                               // vm.apiRouteInfo= jQuery.extend({},apiRouteInfo);\r
-               \r
-                               vm.routeDlgInfo.saveType = type;\r
-                               if(type=='update'){\r
-                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_custom');\r
-                               }\r
-                               else if(type=='view'){\r
-                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_view_custom');\r
-                               }\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".item-tip").addClass("item-tip-focus");\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                       });\r
-\r
-                               $("#customrouteDlg").modal("show");\r
-                       },\r
-                       updatemsbRoute:function(msbRouteInfo){\r
-                       \r
-                                       vm.msbRouteInfo.serviceName=msbRouteInfo.serviceName;\r
-                                       vm.msbRouteInfo.oldServiceName=msbRouteInfo.serviceName;\r
-                                       vm.msbRouteInfo.version= msbRouteInfo.version;\r
-                                       vm.msbRouteInfo.oldVersion= msbRouteInfo.version\r
-                                       vm.msbRouteInfo.url=msbRouteInfo.url==""?"/":msbRouteInfo.url;\r
-                                       vm.msbRouteInfo.protocol=msbRouteInfo.protocol;\r
-                                       vm.msbRouteInfo.visualRange=msbRouteInfo.visualRange;\r
-                                       vm.msbRouteInfo.visualRangeArray=msbRouteInfo.visualRange.split("|");\r
-                                       vm.msbRouteInfo.nodes=msbRouteInfo.nodes;\r
-                                       vm.msbRouteInfo.newHost="";\r
-                                       vm.msbRouteInfo.newttl="";\r
-                       \r
-                               routeUtil.changeTargetServiceUrl();\r
-               \r
-                               vm.routeDlgInfo.saveType = "update";\r
-                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_msb');\r
-                               vm.server_rtn.warning_block=false;\r
-                               vm.server_rtn.info_block=false;\r
-\r
-\r
-                               $(".form-group").each(function () {\r
-                                               $(this).removeClass('has-success');\r
-                                               $(this).removeClass('has-error');\r
-                                               $(this).find(".help-block[id]").remove();\r
-                                               $(this).find(".item-tip").addClass("item-tip-focus");\r
-                                               $(this).find(".form-tip").removeClass('form-input-focus');\r
-                                       });\r
-\r
-                               $("#msbrouteDlg").modal("show");\r
-                       },\r
-                       delApiRoute:function(serviceName,version){\r
-                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service_del_ask',[serviceName],[version]),function(result){\r
-                               if(result){\r
-                                       var url= vm.$apiRouteInstanceUrl;\r
-                                   var version2=version==""?"null":version;\r
-                        url=url.replace("{serviceName}",serviceName).replace("{version}",version2);\r
-       \r
-                                        $.ajax({\r
-                       "type": 'DELETE',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               \r
-                                                        for(var i=0;i<vm.apiRouteArray.length;i++){\r
-                                              if(vm.apiRouteArray[i].serviceName == serviceName && \r
-                                               vm.apiRouteArray[i].version == version){\r
-                                                   vm.apiRouteArray.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");\r
-                                       \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+textStatus+":"+errorThrown);                \r
-                             \r
-                        }\r
-                   });\r
-\r
-\r
-                              }\r
-       \r
-                               });\r
-                               \r
-                       },\r
-                       deliuiRoute:function(serviceName){\r
-                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service2_del_ask',[serviceName]),function(result){\r
-                               if(result){\r
-                                       var url= vm.$iuiRouteInstanceUrl;\r
-                                \r
-                        url=url.replace("{serviceName}",serviceName);\r
-       \r
-                                        $.ajax({\r
-                       "type": 'DELETE',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               \r
-                                                        for(var i=0;i<vm.iuiRouteArray.length;i++){\r
-                                              if(vm.iuiRouteArray[i].serviceName == serviceName){\r
-                                                   vm.iuiRouteArray.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                           }   \r
-\r
-                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");\r
-                                       \r
-               \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+textStatus+":"+errorThrown);                \r
-                             \r
-                        }\r
-                   });\r
-\r
-\r
-                              }\r
-       \r
-                               });\r
-                               \r
-                       },\r
-                       delcustomRoute:function(serviceName){\r
-                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service2_del_ask',[serviceName]),function(result){\r
-                               if(result){\r
-                                       var url= vm.$customRouteInstanceUrl+"?serviceName="+serviceName;\r
-       \r
-                                        $.ajax({\r
-                       "type": 'DELETE',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               \r
-                                                        for(var i=0;i<vm.customRouteArray.length;i++){\r
-                                              if(vm.customRouteArray[i].serviceName == serviceName){\r
-                                                   vm.customRouteArray.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                                               }\r
-\r
-                                            routeUtil.groupRoute(vm.customRouteArray);\r
-                                               \r
-\r
-                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");\r
-                                       \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+textStatus+":"+errorThrown);                \r
-                             \r
-                        }\r
-                   });\r
-\r
-\r
-                              }\r
-       \r
-                               });\r
-                               \r
-                       },\r
-                       delmsbRoute:function(serviceName,version,obj){\r
-                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service_del_ask',[serviceName],[version]),function(result){\r
-                               if(result){\r
-                                       var url= vm.$msbRouteInstanceUrl;\r
-                                   var version2=version==""?"null":version;\r
-                                   var serviceName2= serviceName.replace(/\//g,"*");\r
-                        url=url.replace("{serviceName}",serviceName2).replace("{version}",version2);\r
-       \r
-                                        $.ajax({\r
-                       "type": 'DELETE',\r
-                       "url": url,\r
-                       "dataType": "json",\r
-                       success: function (resp) {  \r
-                               $(obj).parent().parent().addClass('selected');\r
-                               \r
-                               for(var i=0;i<vm.msbRouteArray.length;i++){\r
-                                              if(vm.msbRouteArray[i].serviceName == serviceName &&\r
-                                                       vm.msbRouteArray[i].version==version ){\r
-                                                   vm.msbRouteArray.splice(i, 1);\r
-                                                   break;\r
-                                               }\r
-                                                               }\r
-\r
-                                                        table.row('.selected').remove().draw( false );\r
-\r
-                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_msb'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");\r
-                                       \r
-               \r
-                       },\r
-                        error: function(XMLHttpRequest, textStatus, errorThrown) {\r
-                                               \r
-                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+XMLHttpRequest.responseText);                \r
-                             \r
-                        }\r
-                        \r
-                            \r
-                   });\r
-\r
-\r
-                              }\r
-       \r
-                               });\r
-                               \r
-                       },\r
-                       exportServices:function(){\r
-                               var url=apiBasePath+"/apiRoute/export";\r
-                               window.open(url); \r
-\r
-                       },\r
-                       gotoTarget:function(route,type){\r
-                               vm.selectedRoute=route;\r
-                               vm.selectedRouteType=type;\r
-\r
-                               if(type=="api")\r
-                               {\r
-                                 vm.gotoRestDoc(); \r
-                               }\r
-                               else if(type=="iui"){\r
-                                 vm.gotoIUI(); \r
-                               }\r
-                               \r
-                       },\r
-                       gotoRestDoc:function(){\r
-                               vm.routeTargetTitle=vm.selectedRoute.serviceName+"-"+$.i18n.prop("org_openo_msb_route_content_title");  \r
-\r
-                               var version=vm.selectedRoute.version==""?"":"/"+vm.selectedRoute.version;       \r
-\r
-                                   if(vm.selectedRoute.apiJsonType=="1")\r
-                                   {                   \r
-                                    \r
-                                    var sourceUrl= "/apijson/"+vm.selectedRoute.serviceName+version;\r
-                                       }\r
-                                       else{\r
-                                        var sourceUrl= iuiBasePath+"/ext/initSwaggerJson/"+vm.selectedRoute.apiJson;   \r
-                                       }\r
-                                       //Local json data read from the real API service service address parameter\r
-                                       var url=iuiBasePath+"/api-doc/index.html?url="+sourceUrl+"&api=/api/"+vm.selectedRoute.serviceName+version;\r
-\r
-                                $('#msbSubPage').attr("src",url);  \r
-                                vm.apiIframeUrl=url; \r
-                       },\r
-                       gotoJVM:function(){\r
-                               vm.routeTargetTitle=vm.selectedRoute.serviceName+"-"+$.i18n.prop('org_openo_msb_route_metric_content_title');   \r
-                       \r
-                               var version=vm.selectedRoute.version==""?"":"/"+vm.selectedRoute.version;       \r
-\r
-                               var sourceUrl= "/admin/"+vm.selectedRoute.serviceName+version;\r
-                        \r
-                               \r
-                               var url=iuiBasePath+"/metrics/index.html?url="+sourceUrl;\r
-\r
-                                $('#msbSubPage').attr("src",url);   \r
-                       },\r
-                       gotoIUI:function(){\r
-                               vm.routeTargetTitle=vm.selectedRoute.serviceName+"-"+$.i18n.prop('org_openo_msb_route_iui_content_title');                              \r
-                               var url= "/iui/"+vm.selectedRoute.serviceName+"/";\r
-                                $('#msbSubPage').attr("src",url);   \r
-                                 vm.iuiIframeUrl=url; \r
-                       },\r
-                       initIUIfori18n:function(){\r
-                               vm.routeTargetTitle=$.i18n.prop("org_openo_msb_route_content_title");   \r
-                               vm.showAPITypeName=[$.i18n.prop("org_openo_msb_route_swagger_type_predefined"),$.i18n.prop("org_openo_msb_route_swagger_type_custominput")];\r
-                               vm.dataTableLanguage={\r
-                "sProcessing": "<img src='../img/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loadding...</span>",   \r
-                "sLengthMenu": $.i18n.prop("org_openo_msb_route-table-sLengthMenu"),\r
-                "sZeroRecords": $.i18n.prop("org_openo_msb_route-table-sZeroRecords"),\r
-                "sInfo": "<span class='seperator'>  </span>" + $.i18n.prop("org_openo_msb_route-table-sInfo"),\r
-                "sInfoEmpty": $.i18n.prop("org_openo_msb_route-table-sInfoEmpty"),\r
-                "sGroupActions": $.i18n.prop("org_openo_msb_route-table-sGroupActions"),\r
-                "sAjaxRequestGeneralError": $.i18n.prop("org_openo_msb_route-table-sAjaxRequestGeneralError"),\r
-                "sEmptyTable": $.i18n.prop("org_openo_msb_route-table-sEmptyTable"),\r
-                "oPaginate": {\r
-                    "sPrevious": $.i18n.prop("org_openo_msb_route-table-sPrevious"),\r
-                    "sNext": $.i18n.prop("org_openo_msb_route-table-sNext"),\r
-                    "sPage": $.i18n.prop("org_openo_msb_route-table-sPage"),\r
-                    "sPageOf": $.i18n.prop("org_openo_msb_route-table-sPageOf")\r
-                },\r
-                "sSearch": $.i18n.prop("org_openo_msb_route-table-search"),\r
-                "sInfoFiltered": $.i18n.prop("org_openo_msb_route-table-infofilter") \r
-            }; \r
-\r
-                       }\r
-                       \r
-               \r
-\r
-       });\r
-\r
-\r
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
+var table;
+var vm = avalon
+               .define({
+                       $id : "routeController",
+                       targetServiceUrl:"",
+                       targetFullServiceUrl:"",
+                       iuiRootPath:iuiRootPath,
+                       apiRootPath:apiRootPath,
+                       apiIframeUrl:"",
+                       iuiIframeUrl:"",
+                       boxVisible:true,
+                       routeTargetTitle:$.i18n.prop("org_openo_msb_route_content_title"),                      
+                       server_rtn:{
+                               info_block:false,
+                               warning_block:false,
+                               rtn_info:""
+                       },
+                       showAPIType:"0",
+                       showAPITypeName:[$.i18n.prop("org_openo_msb_route_swagger_type_predefined"),$.i18n.prop("org_openo_msb_route_swagger_type_custominput")],
+                       $msbProtocol :["REST","UI","MQ","FTP","SNMP","TCP","UDP"],
+                       $msbType:["UI","NAF","SAF"],
+                       apiJson:{
+                               local:"",
+                               custom:""
+                       },
+                       setAPIType:function(type){
+                               vm.apiRouteInfo.apiJsonType=type;
+                               if(type==0){
+                                       vm.apiJson.local=vm.jsonApiSelectList.selectItems[0];
+                               }
+
+                       },      
+                       jsonApiSelectList:  {
+                                       condName : "type",
+                                       component_type : 'select',
+                                       selectItems : []
+                               },
+                       
+                dataTableLanguage: {
+                "sProcessing": "<img src='../img/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loadding...</span>",   
+                "sLengthMenu": $.i18n.prop("org_openo_msb_route-table-sLengthMenu"),
+                "sZeroRecords": $.i18n.prop("org_openo_msb_route-table-sZeroRecords"),
+                "sInfo": "<span class='seperator'>  </span>" + $.i18n.prop("org_openo_msb_route-table-sInfo"),
+                "sInfoEmpty": $.i18n.prop("org_openo_msb_route-table-sInfoEmpty"),
+                "sGroupActions": $.i18n.prop("org_openo_msb_route-table-sGroupActions"),
+                "sAjaxRequestGeneralError": $.i18n.prop("org_openo_msb_route-table-sAjaxRequestGeneralError"),
+                "sEmptyTable": $.i18n.prop("org_openo_msb_route-table-sEmptyTable"),
+                "oPaginate": {
+                    "sPrevious": $.i18n.prop("org_openo_msb_route-table-sPrevious"),
+                    "sNext": $.i18n.prop("org_openo_msb_route-table-sNext"),
+                    "sPage": $.i18n.prop("org_openo_msb_route-table-sPage"),
+                    "sPageOf": $.i18n.prop("org_openo_msb_route-table-sPageOf")
+                },
+                "sSearch": $.i18n.prop("org_openo_msb_route-table-search"),
+                "sInfoFiltered": $.i18n.prop("org_openo_msb_route-table-infofilter") 
+            }, 
+                       $apiRouteUrl :apiBasePath+'/apiRoute',
+                       $apiRouteInstanceUrl :apiBasePath+'/apiRoute/{serviceName}/version/{version}',  
+                       $apiRouteStatusUrl :apiBasePath+'/apiRoute/{serviceName}/version/{version}/status/{status}',
+                       $apiDocsUrl :apiBasePath+'/apiRoute/apiDocs',   
+                       $apiGatewayPortUrl :apiBasePath+'/apiRoute/apiGatewayPort',     
+                       $discoverInfoUrl :apiBasePath+'/apiRoute/discoverInfo', 
+                       $iuiRouteUrl :apiBasePath+'/iuiRoute',
+                       $iuiRouteInstanceUrl :apiBasePath+'/iuiRoute/{serviceName}',
+                       $iuiRouteStatusUrl :apiBasePath+'/iuiRoute/{serviceName}/status/{status}',
+                       $customRouteUrl :apiBasePath+'/customRoute/all',
+                       $customRouteInstanceUrl :apiBasePath+'/customRoute/instance',
+                       $customRouteStatusUrl :apiBasePath+'/customRoute/status',       
+                       $msbRouteUrl:apiBasePath+'/services',   
+                       $msbRouteInstanceUrl :apiBasePath+'/services/{serviceName}/version/{version}',
+                       routeLoading:false,             
+                       apiRouteArray :  [],
+                       apiRouteInfo : {
+                           oldServiceName:"",                                  
+                               serviceName : "",
+                               oldVersion:"",  
+                               version : "",
+                               status:"",
+                               url:"",
+                               metricsUrl:"/admin/metrics",
+                               apiJson:"/swagger.json",
+                               apiJsonType:"1",
+                               control:"",
+                               server:"",
+                               servers: []
+                       },      
+                       iuiRouteArray :  [],
+                       iuiRouteInfo : {        
+                           oldServiceName:"",                          
+                               serviceName : "",
+                               status:"",
+                               url:"",
+                               server:"",
+                               control:"",
+                               servers: []
+                       },      
+                       customRouteArray :  [],
+                       customGroupRouteArray :  [],
+                       customRouteInfo : {     
+                           oldServiceName:"",          
+                               serviceName : "",
+                               status:"",
+                               url:"",
+                               server:"",
+                               control:"",
+                               servers: []
+                       },
+                       msbRouteArray :  [],
+                       msbRouteInfo : {        
+                           oldServiceName:"",  
+                           oldVersion:"",                              
+                               serviceName : "",
+                               version:"",
+                               status:"0",
+                               nodes:[],
+                               newHost:"",
+                               newttl:0,
+                               url:"",
+                               protocol:"",
+                               visualRange:"",
+                               visualRangeArray:[]                     
+                       },
+                       discoverInfo:{
+                               ip:"",
+                               port:"",
+                               enabled:false,
+                               deployMode:""
+                       },
+                       selectedRoute:"",
+                       selectedRouteType:"",
+                       routeDlgInfo:{
+                               titleName:"",
+                               saveType:""
+                       },                                                                                              
+                       $initRoute : function() {
+                       
+
+
+                           vm.routeLoading=true;
+
+                            $.ajax({
+                                       "type": 'get',
+                                        async: false,
+                                       "url":  vm.$discoverInfoUrl,
+                                       "dataType": "json",
+                                       success: function (resp) { 
+                                  
+                                        vm.discoverInfo = (resp==null)?"":resp;
+                                                                                                       
+                                       },
+                                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                                  bootbox.alert("get discoverInfo fails:"+textStatus+":"+errorThrown); 
+                                        }
+                                   });
+
+                                 $.ajax({
+                       "type": 'get',
+                       "url":  vm.$apiRouteUrl,
+                       "dataType": "json",
+                       success: function (resp) {  
+                            vm.apiRouteArray = (resp==null)?[]:resp;  
+                            vm.apiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1});                     
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                  bootbox.alert("get api services fails:"+textStatus+":"+errorThrown);                       
+                              return;
+                        },
+                        complete:function(){
+                               vm.routeLoading=false;
+                               routeUtil.refreshRoute();
+                                $.ajax({
+                                       "type": 'get',
+                                       "url":  vm.$apiGatewayPortUrl,
+                                       "dataType": "text",
+                                       success: function (resp) { 
+                                  
+                                        vm.targetServiceUrl=location.hostname+":"+resp;
+                                                                                                       
+                                       },
+                                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                                  bootbox.alert("get apiGateway published port fails:"+textStatus+":"+errorThrown); 
+                                        }
+                                   });
+                         }
+                   });
+
+
+
+                                 $.ajax({
+                       "type": 'get',
+                       "url":  vm.$iuiRouteUrl,
+                       "dataType": "json",
+                       success: function (resp) {  
+                            vm.iuiRouteArray = (resp==null)?[]:resp;  
+                            vm.iuiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1});                     
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                  bootbox.alert("get iui services fails:"+textStatus+":"+errorThrown);                       
+                              return;
+                        },
+                        complete:function(){                           
+                               routeUtil.refreshRoute();                               
+                         }
+                   });
+
+
+
+                                 $.ajax({
+                       "type": 'get',
+                       "url":  vm.$customRouteUrl,
+                       "dataType": "json",
+                       success: function (resp) {  
+                             vm.customRouteArray = (resp==null)?[]:resp;   
+                       
+                           if(resp!=null && resp.length>0)
+                           {
+                            routeUtil.groupRoute(resp);
+                           }
+
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                  bootbox.alert("get custom services fails:"+textStatus+":"+errorThrown);                       
+                              return;
+                        },
+                        complete:function(){                           
+                               routeUtil.refreshRoute();                               
+                         }
+                   });
+
+
+                                 $.ajax({
+                       "type": 'get',
+                       "url":  vm.$apiDocsUrl,
+                       "dataType": "json",
+                       success: function (resp) {  
+                            vm.jsonApiSelectList.selectItems= (resp==null)?[]:resp;                    
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                  bootbox.alert("get local apiDocs  fails:"+textStatus+":"+errorThrown); 
+                        }
+                   });
+
+
+
+                                 vm.initMSBRoute();
+
+
+               
+
+                       },
+                       initMSBRoute:function(){
+                               vm.initIUIfori18n();
+
+                               $.ajax({
+                       "type": 'get',
+                       "url":  vm.$msbRouteUrl,
+                       "dataType": "json",
+                       success: function (resp) {  
+                             vm.msbRouteArray = (resp==null)?[]:resp;  
+                       
+                            vm.msbRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1}); 
+                                               
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                                  bootbox.alert("get msb services fails:"+XMLHttpRequest.responseText);                       
+                              return;
+                        },
+                        complete:function(){
+
+                               table=$('#msbTable').DataTable({
+                                                    
+                                                         "oLanguage": vm.dataTableLanguage,
+                                                         columnDefs: [ {
+                                                                     targets: [ 0,8 ],
+                                                                     "searchable": false,
+                                                                     "bSortable": false,
+                                                                   }],                                                              
+                                                                  "order": [[2, 'asc']]
+                                                       });
+                               
+                               }
+                               });
+              
+                  
+                       },
+                       
+                       clickDisplayGraphAlink: function () {
+               vm.boxVisible = !vm.boxVisible;
+               },
+               addmsbHost:function(){
+                       if(vm.msbRouteInfo.newHost==""){
+                               vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_empty");
+                                       return;
+                       }
+
+                       if(vm.msbRouteInfo.newttl==""){
+                               vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_ttl_empty");
+                                       return;
+                       }
+
+                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   
+                          var ip,port; 
+                                  if(!reg.test(vm.msbRouteInfo.newHost)){  
+                                       vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_format");
+                                       return;
+                                  }
+                                  else{
+                       
+                                       var hosts=vm.msbRouteInfo.newHost.split(":");  
+                                       ip=hosts[0];
+                                       port=hosts[1];
+                                  }
+
+                var reg_ttl=/^\d+$/
+         
+                                if(!reg_ttl.test(vm.msbRouteInfo.newttl)){  
+                                       vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_ttl_format");
+                                       return;
+                                  }  
+
+                                 
+
+                       // determine whether host repeated
+                               for(var i=0;i<vm.msbRouteInfo.nodes.length;i++){
+                               
+                                               if(vm.msbRouteInfo.nodes[i].ip==ip && vm.msbRouteInfo.nodes[i].port==port )
+                                               {
+                                                       vm.server_rtn.warning_block=true;
+                                                   vm.server_rtn.info_block=false; 
+                                                   vm.server_rtn.rtn_info=  $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.msbRouteInfo.newHost]); 
+                                                   return;
+                                               }
+                                       
+                               }
+
+                               vm.msbRouteInfo.nodes.push({"ip":ip,"port":port,"ttl":vm.msbRouteInfo.newttl});
+                               vm.msbRouteInfo.newHost="";
+                               vm.msbRouteInfo.newttl="";
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+
+               },
+               delmsbHost:function(ip,port){
+                       
+                       bootbox.confirm( $.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){
+                               if(result){
+                                       
+                                        for(var i=0;i<vm.msbRouteInfo.nodes.length;i++){
+                                              if(vm.msbRouteInfo.nodes[i].ip == ip && vm.msbRouteInfo.nodes[i].port == port){
+                                                   vm.msbRouteInfo.nodes.splice(i, 1);
+                                                   break;
+                                               }
+                                           }   
+
+                              }
+       
+                               });
+
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+               },
+               addapiHost:function(){
+                       if(vm.apiRouteInfo.server==""){
+                               vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_empty");
+                                       return;
+                       }
+
+                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   
+                         var ip,port;
+                                  if(!reg.test(vm.apiRouteInfo.server)){  
+                                       vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info=  $.i18n.prop("org_openo_msb_route_err_host_format");
+                                       return;
+                                  }
+                                  else{
+                                       var hosts=vm.apiRouteInfo.server.split(":")
+                                       ip=hosts[0];
+                                       port=hosts[1];
+                                  }
+
+                       // determine whether host repeated
+                               for(var i=0;i<vm.apiRouteInfo.servers.length;i++){
+                               
+                                               if(vm.apiRouteInfo.servers[i].ip==ip && vm.apiRouteInfo.servers[i].port==port)
+                                               {
+                                                       vm.server_rtn.warning_block=true;
+                                                   vm.server_rtn.info_block=false; 
+                                                   vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.apiRouteInfo.server]); 
+                                                       return;
+                                               }
+                                       
+                               }
+                               var server={ip:ip,port:port,weight: 0};
+                               vm.apiRouteInfo.servers.push(server);
+                               vm.apiRouteInfo.server="";
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+
+               },
+               delapiHost:function(ip,port){
+                       
+                       bootbox.confirm( $.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){
+                               if(result){
+                                       
+                                        for(var i=0;i<vm.apiRouteInfo.servers.length;i++){
+                                              if(vm.apiRouteInfo.servers[i].ip == ip && vm.apiRouteInfo.servers[i].port == port ){
+                                                   vm.apiRouteInfo.servers.splice(i, 1);
+                                                   break;
+                                               }
+                                           }   
+
+                              }
+       
+                               });
+
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+               },
+               addcustomHost:function(){
+                       if(vm.customRouteInfo.server==""){
+                               vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info=  $.i18n.prop("org_openo_msb_route_err_host_empty");
+                                       return;
+                       }
+
+                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   
+                         var ip,port;
+                                  if(!reg.test(vm.customRouteInfo.server)){  
+                                       vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_format");
+                                       return;
+                                  }
+                                  else{
+                                       var hosts=vm.customRouteInfo.server.split(":")
+                                       ip=hosts[0];
+                                       port=hosts[1];
+                                  }
+
+                       //判断host是否重复
+                               for(var i=0;i<vm.customRouteInfo.servers.length;i++){
+                               
+                                               if(vm.customRouteInfo.servers[i].ip==ip && vm.customRouteInfo.servers[i].port==port)
+                                               {
+                                                       vm.server_rtn.warning_block=true;
+                                                   vm.server_rtn.info_block=false; 
+                                                   vm.server_rtn.rtn_info=  $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.apiRouteInfo.server]);
+                                                       return;
+                                               }
+                                       
+                               }
+                               var server={ip:ip,port:port,weight: 0};
+                               vm.customRouteInfo.servers.push(server);
+                               vm.customRouteInfo.server="";
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+
+               },
+               delcustomHost:function(ip,port){
+                       
+                       bootbox.confirm( $.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){
+                               if(result){
+                                       
+                                        for(var i=0;i<vm.customRouteInfo.servers.length;i++){
+                                              if(vm.customRouteInfo.servers[i].ip == ip && vm.customRouteInfo.servers[i].port == port ){
+                                                   vm.customRouteInfo.servers.splice(i, 1);
+                                                   break;
+                                               }
+                                           }   
+
+                              }
+       
+                               });
+
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+               },
+               addiuiHost:function(){
+                       if(vm.iuiRouteInfo.server==""){
+                               vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_empty");
+                                       return;
+                       }
+
+                         var reg=/^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/   
+                         var ip,port;
+                                  if(!reg.test(vm.iuiRouteInfo.server)){  
+                                       vm.server_rtn.warning_block=true;
+                                   vm.server_rtn.info_block=false; 
+                                   vm.server_rtn.rtn_info= $.i18n.prop("org_openo_msb_route_err_host_format");
+                                       return;
+                                  }
+                                  else{
+                                       var hosts=vm.iuiRouteInfo.server.split(":")
+                                       ip=hosts[0];
+                                       port=hosts[1];
+                                  }
+
+                       //判断host是否重复
+                               for(var i=0;i<vm.iuiRouteInfo.servers.length;i++){
+                               
+                                               if(vm.iuiRouteInfo.servers[i].ip==ip && vm.iuiRouteInfo.servers[i].port==port)
+                                               {
+                                                       vm.server_rtn.warning_block=true;
+                                                   vm.server_rtn.info_block=false; 
+                                                   vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_repeat',[vm.apiRouteInfo.server]);
+                                                       return;
+                                               }
+                                       
+                               }
+                               var server={ip:ip,port:port,weight: 0};
+                               vm.iuiRouteInfo.servers.push(server);
+                               vm.iuiRouteInfo.server="";
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+
+               },
+               deliuiHost:function(ip,port){
+                       
+                       bootbox.confirm($.i18n.prop('org_openo_msb_route_err_host_del',[ip],[port]),function(result){
+                               if(result){
+                                       
+                                        for(var i=0;i<vm.iuiRouteInfo.servers.length;i++){
+                                              if(vm.iuiRouteInfo.servers[i].ip == ip && vm.iuiRouteInfo.servers[i].port == port ){
+                                                   vm.iuiRouteInfo.servers.splice(i, 1);
+                                                   break;
+                                               }
+                                           }   
+
+                              }
+       
+                               });
+
+                               vm.server_rtn.warning_block=false;
+                           vm.server_rtn.info_block=false; 
+                               vm.server_rtn.rtn_info= "";
+
+               },
+               $showmsbRouteDlg:function() {
+                       vm.msbRouteInfo.serviceName=""; 
+                               vm.msbRouteInfo.version="";
+                               vm.msbRouteInfo.url="";
+                               vm.msbRouteInfo.protocol="";
+                               vm.msbRouteInfo.visualRange="";
+                               vm.msbRouteInfo.visualRangeArray=[];
+                               vm.msbRouteInfo.newHost="";
+                               vm.msbRouteInfo.nodes=[];                                       
+                               vm.msbRouteInfo.status="1";     
+                       
+
+                               vm.routeDlgInfo.saveType = "add";
+                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_msb');
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+               
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                               $(this).find(".item-tip").removeClass('item-tip-focus');
+                                       });
+
+                               $("#msbrouteDlg").modal("show");
+               },
+               $showiuiRouteDlg:function() {
+
+                               vm.iuiRouteInfo.serviceName="";
+                               vm.iuiRouteInfo.url="";
+                               vm.iuiRouteInfo.server="";
+                               vm.iuiRouteInfo.servers=[];     
+                               vm.iuiRouteInfo.control="0";    
+                               vm.iuiRouteInfo.status="1";     
+                       
+
+                               vm.routeDlgInfo.saveType = "add";
+                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_iui');
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+                               //$("input[name='iuioriService']").val("");
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                               $(this).find(".item-tip").removeClass('item-tip-focus');
+                                       });
+
+                               $("#iuirouteDlg").modal("show");
+                       },
+                       $showcustomRouteDlg:function() {
+
+                               vm.customRouteInfo.serviceName="";
+                               vm.customRouteInfo.url="";
+                               vm.customRouteInfo.server="";
+                               vm.customRouteInfo.servers=[];  
+                               vm.customRouteInfo.control="0"; 
+                               vm.customRouteInfo.status="1";          
+                       
+
+                               vm.routeDlgInfo.saveType = "add";
+                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_custom');
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+                               //$("input[name='customoriService']").val("");
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                               $(this).find(".item-tip").removeClass('item-tip-focus');
+                                       });
+
+                               $("#customrouteDlg").modal("show");
+                       },
+                       $showApiRouteDlg : function() {
+
+                               $('#apiTab a:first').tab('show');
+                               vm.apiRouteInfo.serviceName="";
+                               vm.apiRouteInfo.version="";
+                               vm.apiRouteInfo.url="";
+                               vm.apiRouteInfo.metricsUrl="/admin/metrics";
+                               vm.apiRouteInfo.control="0";
+                               vm.apiRouteInfo.status="1";
+                               // vm.apiRouteInfo.apiJson="/service/swagger.json";
+                               vm.apiRouteInfo.apiJsonType="1";                                
+                               vm.apiRouteInfo.server="";
+                               vm.apiRouteInfo.servers=[];     
+                       
+                               vm.apiJson.custom="/swagger.json";
+
+                               //$("input[name='oriService']").val("");
+
+                               $('#metricsFullurl').collapse('hide');
+                               $('#apiJsonFullurl').collapse('hide');
+
+                       
+
+                               vm.routeDlgInfo.saveType = "add";
+                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_add_api');
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                               $(this).find(".item-tip").removeClass('item-tip-focus');
+                                       });
+
+
+                               $("#routeDlg").modal("show");
+                       },
+                       $saveiuiRoute : function() {
+
+                               iuisuccess.hide();
+                               iuierror.hide();
+                               if (iuiform.valid() == false) {
+                                       return false;
+                               }
+
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=true;
+
+                               vm.iuiRouteInfo.serviceName=$.trim(vm.iuiRouteInfo.serviceName);
+                               
+                               var servers=[];
+                               for(var i=0;i<vm.iuiRouteInfo.servers.length;i++){
+                                       var server={ip:vm.iuiRouteInfo.servers[i].ip,port:vm.iuiRouteInfo.servers[i].port,weight: 0};
+                                       servers.push(server);
+                               }
+
+
+
+                               var iuiRouteUrl=vm.iuiRouteInfo.url=="/"?"":vm.iuiRouteInfo.url;
+                               var data= JSON.stringify({
+                                                        "serviceName": vm.iuiRouteInfo.serviceName,
+                                                         "url": iuiRouteUrl,
+                                                         "control":vm.iuiRouteInfo.control,
+                                                         "status":vm.iuiRouteInfo.status,
+                                                         "servers": servers
+                                               });
+
+                               if(vm.routeDlgInfo.saveType=="add")
+                               {
+
+                                       //Determine whether to repeat
+                                       for(var i=0;i<vm.iuiRouteArray.length;i++){
+                                       
+                                                       if(vm.iuiRouteArray[i].serviceName==vm.iuiRouteInfo.serviceName)
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.iuiRouteInfo.serviceName]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+
+                 //save service
+                 
+              
+                   $.ajax({
+                       "type": 'POST',
+                       "url":  vm.$iuiRouteUrl,
+                       "data" : data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                               
+                                               vm.iuiRouteArray.push(JSON.parse(data)); 
+                                               vm.iuiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1}); 
+
+                                               routeUtil.refreshRoute();       
+                                               $('#iuirouteDlg').modal('hide');                                                        
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                  
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                
+                             
+                        }
+                   });
+               }
+               else{  //update
+
+                                var url= vm.$iuiRouteInstanceUrl;
+                        url=url.replace("{serviceName}",vm.iuiRouteInfo.oldServiceName);
+
+                           //Determine whether to repeat
+                         if(vm.iuiRouteInfo.serviceName!=vm.iuiRouteInfo.oldServiceName)  //Has been modified service name
+                         {
+                                       for(var i=0;i<vm.iuiRouteArray.length;i++){
+                                       
+                                                       if(vm.iuiRouteArray[i].serviceName==vm.iuiRouteInfo.serviceName)
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.iuiRouteInfo.serviceName]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+                               }
+
+                       $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                        "data" :data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                         
+                                                       for(var i=0;i<vm.iuiRouteArray.length;i++){
+                                           if(vm.iuiRouteArray[i].serviceName == vm.iuiRouteInfo.oldServiceName)
+                                           { 
+                                               vm.iuiRouteArray[i].serviceName=vm.iuiRouteInfo.serviceName;                                          
+                                               vm.iuiRouteArray[i].url=iuiRouteUrl;
+                                               vm.iuiRouteArray[i].servers=vm.iuiRouteInfo.servers;
+                                              
+                                               break;
+                                           }
+                                        }
+                             
+
+
+                                               $('#iuirouteDlg').modal('hide');                                                        
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); 
+                                               
+
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                
+                             
+                        }
+                   });
+
+              
+                          }
+                       },
+                       $savecustomRoute : function() {
+
+                               customsuccess.hide();
+                               customerror.hide();
+                               if (customform.valid() == false) {
+                                       return false;
+                               }
+
+                               if(vm.customRouteInfo.servers.length==0){
+                                       vm.server_rtn.warning_block=true;
+                                       vm.server_rtn.info_block=false; 
+                                       vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_leastone');
+                                       return;
+                               }
+
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=true;
+
+                               vm.customRouteInfo.serviceName=$.trim(vm.customRouteInfo.serviceName);
+                               
+                               var servers=[];
+                               for(var i=0;i<vm.customRouteInfo.servers.length;i++){
+                                       var server={ip:vm.customRouteInfo.servers[i].ip,port:vm.customRouteInfo.servers[i].port,weight: 0};
+                                       servers.push(server);
+                               }
+
+                               var customRouteUrl=vm.customRouteInfo.url=="/"?"":vm.customRouteInfo.url;
+                               var data= JSON.stringify({
+                                                        "serviceName": vm.customRouteInfo.serviceName,
+                                                         "url": customRouteUrl,
+                                                         "control":vm.customRouteInfo.control,
+                                                         "status":vm.customRouteInfo.status,
+                                                         "servers": servers
+                                               });
+
+                               if(vm.routeDlgInfo.saveType=="add")
+                               {
+
+                                       //Determine whether to repeat
+                                       for(var i=0;i<vm.customRouteArray.length;i++){
+                                       
+                                                       if(vm.customRouteArray[i].serviceName==vm.customRouteInfo.serviceName)
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.customRouteInfo.serviceName]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+
+                 //save 
+                 
+              
+                   $.ajax({
+                       "type": 'POST',
+                       "url":  vm.$customRouteInstanceUrl,
+                       "data" : data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                               
+                                               vm.customRouteArray.push(JSON.parse(data)); 
+                                               routeUtil.groupRoute(vm.customRouteArray);
+
+
+                                               routeUtil.refreshRoute();       
+                                               $('#customrouteDlg').modal('hide');                                                     
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                       
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                
+                             
+                        }
+                   });
+               }
+               else{  //update
+
+                           //Determine whether to repeat
+                         if(vm.customRouteInfo.serviceName!=vm.customRouteInfo.oldServiceName)  //Has been modified service name
+                         {
+                                       for(var i=0;i<vm.customRouteArray.length;i++){
+                                       
+                                                       if(vm.customRouteArray[i].serviceName==vm.customRouteInfo.serviceName)
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_repeat',[vm.customRouteInfo.serviceName]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+                               }
+
+                                var url= vm.$customRouteInstanceUrl+"?serviceName="+vm.customRouteInfo.oldServiceName;
+               
+                       $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                        "data" :data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                    
+                                                       for(var i=0;i<vm.customRouteArray.length;i++){
+                                           if(vm.customRouteArray[i].serviceName == vm.customRouteInfo.oldServiceName)
+                                           {
+                                               vm.customRouteArray[i].serviceName=vm.customRouteInfo.serviceName;                                            
+                                               vm.customRouteArray[i].url=customRouteUrl;
+                                               vm.customRouteArray[i].servers=vm.customRouteInfo.servers;
+                                               break;
+                                           }
+                                        }
+                                               
+                                               routeUtil.groupRoute(vm.customRouteArray);
+                             
+
+
+                                               $('#customrouteDlg').modal('hide');                                                     
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); 
+                                               
+
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info=$.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                
+                             
+                        }
+                   });
+
+              
+                          }
+                       },
+                       $saveApiRoute : function() {
+
+                               success.hide();
+                               error.hide();
+                               if (form.valid() == false) {
+                                       return false;
+                               }
+
+                               if(vm.apiRouteInfo.servers.length==0){
+                                       vm.server_rtn.warning_block=true;
+                                       vm.server_rtn.info_block=false; 
+                                       vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_host_leastone');
+                                       return;
+                               }
+
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=true;
+
+                               
+                               var apiRouteUrl=vm.apiRouteInfo.url=="/"?"":vm.apiRouteInfo.url;
+                               var apiJson=vm.apiRouteInfo.apiJsonType=="1"?vm.apiJson.custom:vm.apiJson.local;        
+
+                               var servers=[];
+                               for(var i=0;i<vm.apiRouteInfo.servers.length;i++){
+                                       var server={ip:vm.apiRouteInfo.servers[i].ip,port:vm.apiRouteInfo.servers[i].port,weight: 0};
+                                       servers.push(server);
+                               }
+
+
+                               var data= JSON.stringify({
+                                                        "serviceName": vm.apiRouteInfo.serviceName,
+                                                         "version": vm.apiRouteInfo.version,
+                                                         "url": apiRouteUrl,
+                                                         "metricsUrl":vm.apiRouteInfo.metricsUrl,
+                                                         "apiJson": apiJson,
+                                                         "apiJsonType":vm.apiRouteInfo.apiJsonType,
+                                                         "control":vm.apiRouteInfo.control,
+                                                         "status":vm.apiRouteInfo.status,
+                                                         "servers": servers
+                                               
+                                               });
+
+                               if(vm.routeDlgInfo.saveType=="add")
+                               {
+
+                                        //Determine whether to repeat
+                                       for(var i=0;i<vm.apiRouteArray.length;i++){
+                                       
+                                                       if(vm.apiRouteArray[i].serviceName==vm.apiRouteInfo.serviceName 
+                                                               && vm.apiRouteArray[i].version==vm.apiRouteInfo.version )
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info=$.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.apiRouteInfo.serviceName],[vm.apiRouteInfo.version]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+
+                 //save
+                 
+              
+                   $.ajax({
+                       "type": 'POST',
+                       "url":  vm.$apiRouteUrl,
+                       "data" : data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                               
+                                               vm.apiRouteArray.push(JSON.parse(data)); 
+                                               vm.apiRouteArray.sort(function(a,b){return a.serviceName>b.serviceName?1:-1}); 
+
+                                               routeUtil.refreshRoute();       
+                                               $('#routeDlg').modal('hide');                                                   
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                  
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                
+                             
+                        }
+                   });
+               }
+               else{  //update
+                               
+
+                //Determine whether to repeat
+                         if(vm.apiRouteInfo.serviceName!=vm.apiRouteInfo.oldServiceName || 
+                         vm.apiRouteInfo.version!=vm.apiRouteInfo.oldVersion)  //Has been modified service name
+                         {
+                                       for(var i=0;i<vm.apiRouteArray.length;i++){
+                                       
+                                                       if(vm.apiRouteArray[i].serviceName==vm.apiRouteInfo.serviceName 
+                                                               && vm.apiRouteArray[i].version==vm.apiRouteInfo.version )
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.apiRouteInfo.serviceName],[vm.apiRouteInfo.version]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+                               }
+
+                                var url= vm.$apiRouteInstanceUrl;
+                                var version=vm.apiRouteInfo.oldVersion==""?"null":vm.apiRouteInfo.oldVersion;
+                        url=url.replace("{serviceName}",vm.apiRouteInfo.oldServiceName).replace("{version}",version);
+
+
+                                $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                        "data" :data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                         
+                                                       for(var i=0;i<vm.apiRouteArray.length;i++){
+                                           if(vm.apiRouteArray[i].serviceName == vm.apiRouteInfo.oldServiceName && 
+                                               vm.apiRouteArray[i].version == vm.apiRouteInfo.oldVersion)
+                                           {
+                                               //vm.apiRouteArray[i] = JSON.parse(data);
+                                                               vm.apiRouteArray[i].serviceName=vm.apiRouteInfo.serviceName;
+                                                                       vm.apiRouteArray[i].version= vm.apiRouteInfo.version;
+                                                                       vm.apiRouteArray[i].url=apiRouteUrl;
+                                                                       vm.apiRouteArray[i].metricsUrl=vm.apiRouteInfo.metricsUrl;
+                                                                       vm.apiRouteArray[i].apiJson=apiJson;
+                                                                       vm.apiRouteArray[i].apiJsonType=vm.apiRouteInfo.apiJsonType;
+
+                                                                       vm.apiRouteArray[i].servers=vm.apiRouteInfo.servers;
+
+                                                                       
+                                               break;
+                                           }
+                                        }
+                             
+
+
+                                               $('#routeDlg').modal('hide');                                                   
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); 
+                                               
+
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+textStatus+":"+errorThrown;                
+                             
+                        }
+                   });
+
+              
+                          }
+                       },
+                       $savemsbRoute : function() {
+
+                               msbsuccess.hide();
+                               msberror.hide();
+                               if (msbform.valid() == false) {
+                                       return false;
+                               }
+
+                               if(vm.msbRouteInfo.nodes.length==0){
+                                       vm.server_rtn.warning_block=true;
+                                       vm.server_rtn.info_block=false; 
+                                       vm.server_rtn.rtn_info=$.i18n.prop('org_openo_msb_route_err_host_leastone');
+                                       return;
+                               }
+
+                               if(vm.msbRouteInfo.visualRangeArray.length==0){
+                                       vm.server_rtn.warning_block=true;
+                                       vm.server_rtn.info_block=false; 
+                                       vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_visualrange_empty');
+                                       return;
+                               }
+
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=true;
+
+                               var msbUrl=vm.msbRouteInfo.url=="/"?"":vm.msbRouteInfo.url;
+               
+
+                               var nodes=[];
+                               for(var i=0;i<vm.msbRouteInfo.nodes.length;i++){
+                                       var node={ip:vm.msbRouteInfo.nodes[i].ip,port:vm.msbRouteInfo.nodes[i].port,ttl: vm.msbRouteInfo.nodes[i].ttl};
+                                       nodes.push(node);
+                               }
+
+                               var data= JSON.stringify({
+                                                        "serviceName": vm.msbRouteInfo.serviceName,
+                                                         "version": vm.msbRouteInfo.version,
+                                                         "url": msbUrl,                                                         
+                                                         "nodes": nodes,
+                                                         "protocol":vm.msbRouteInfo.protocol,
+                                                         "visualRange":vm.msbRouteInfo.visualRangeArray.join("|")
+                                               });
+
+                               if(vm.routeDlgInfo.saveType=="add")
+                               {
+
+                                       //Determine whether to repeat
+                                       for(var i=0;i<vm.msbRouteArray.length;i++){
+                                       
+                                                       if(vm.msbRouteArray[i].serviceName==vm.msbRouteInfo.serviceName 
+                                                               && vm.msbRouteArray[i].version==vm.msbRouteInfo.version )
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.msbRouteInfo.serviceName],[vm.msbRouteInfo.version]);
+                                                       }
+                                               
+                                       }
+
+                 //save
+                 
+              
+                   $.ajax({
+                       "type": 'POST',
+                       "url":  vm.$msbRouteUrl,
+                       "data" : data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                          
+                                                // vm.msbRouteArray.push(JSON.parse(data)); 
+                                                 table.destroy();
+                                                 vm.initMSBRoute();
+
+                                         //       table=$('#msbTable').DataTable({
+                                                    
+                                                       //   "oLanguage": vm.$dataTableLanguage,
+                                                       //   columnDefs: [ {
+                                                       //            targets: [ 7 ],
+                                                       //            "searchable": false,
+                                                       //            "bSortable": false,
+                                                       //          }]
+                                                       // });
+       
+                                               $('#msbrouteDlg').modal('hide');                                                        
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_msb'),$.i18n.prop('org_openo_msb_route_service_save'),"success");                  
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+XMLHttpRequest.responseText;                
+                             
+                        }
+                   });
+               }
+               else{  //update
+                               
+
+                //Determine whether to repeat
+                         if(vm.msbRouteInfo.serviceName!=vm.msbRouteInfo.oldServiceName || 
+                         vm.msbRouteInfo.version!=vm.msbRouteInfo.oldVersion)  //Has been modified service name or version
+                         {
+                                       for(var i=0;i<vm.msbRouteArray.length;i++){
+                                       
+                                                       if(vm.msbRouteArray[i].serviceName==vm.msbRouteInfo.serviceName 
+                                                               && vm.msbRouteArray[i].version==vm.msbRouteInfo.version )
+                                                       {
+                                                               vm.server_rtn.warning_block=true;
+                                                           vm.server_rtn.info_block=false; 
+                                                           vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_api_repeat',[vm.msbRouteInfo.serviceName],[vm.msbRouteInfo.version]);
+                                                               return;
+                                                       }
+                                               
+                                       }
+                               }
+
+                                var url= vm.$msbRouteInstanceUrl;
+                                var version=vm.msbRouteInfo.oldVersion==""?"null":vm.msbRouteInfo.oldVersion;
+                                var serviceName2= vm.msbRouteInfo.oldServiceName.replace(/\//g,"*");
+                        url=url.replace("{serviceName}",serviceName2).replace("{version}",version);
+
+
+                                $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                        "data" :data,
+                       "dataType": "json",
+                       "contentType":"application/json",
+                       success: function (resp) {  
+                    
+                                                       for(var i=0;i<vm.msbRouteArray.length;i++){
+                                           if(vm.msbRouteArray[i].serviceName == vm.msbRouteInfo.oldServiceName && 
+                                               vm.msbRouteArray[i].version == vm.msbRouteInfo.oldVersion)
+                                           {
+                                               //vm.apiRouteArray[i] = JSON.parse(data);
+                                                               vm.msbRouteArray[i].serviceName=vm.msbRouteInfo.serviceName;
+                                                                       vm.msbRouteArray[i].version= vm.msbRouteInfo.version;
+                                                                       vm.msbRouteArray[i].url=msbUrl;
+                                                                       vm.msbRouteArray[i].protocol=vm.msbRouteInfo.protocol;
+                                                                       vm.msbRouteArray[i].visualRange=vm.msbRouteInfo.visualRange;
+                                                                       vm.msbRouteArray[i].visualRangeArray=vm.msbRouteInfo.visualRangeArray;
+                                                                       vm.msbRouteArray[i].nodes=nodes;
+                                                                                                            
+                                               break;
+                                           }
+                                        }
+                             
+
+
+                                               $('#msbrouteDlg').modal('hide');                                                        
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_msb'),$.i18n.prop('org_openo_msb_route_service_update'),"success"); 
+                                               
+
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                                  vm.server_rtn.warning_block=true;
+                                              vm.server_rtn.info_block=false; 
+                                              vm.server_rtn.rtn_info= $.i18n.prop('org_openo_msb_route_err_service_save')+XMLHttpRequest.responseText;                
+                             
+                        }
+                   });
+
+              
+                          }
+                       },
+
+                       updateApiRouteStatus:function(serviceName,version,status){
+
+                               var url= vm.$apiRouteStatusUrl;
+                                   var version2=version==""?"null":version;
+                        url=url.replace("{serviceName}",serviceName).replace("{version}",version2).replace("{status}",status);
+       
+                                        $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               
+                             
+                                                        for(var i=0;i<vm.apiRouteArray.length;i++){
+                                              if(vm.apiRouteArray[i].serviceName == serviceName && 
+                                               vm.apiRouteArray[i].version == version){
+                                                   vm.apiRouteArray[i].status=status;
+                                                   break;
+                                               }
+                                           }   
+
+                                         if(status=='1')   
+                                         {
+                                           routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_status_enable'),"success");
+                                         }
+                                         else{
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_status_disable'),"success");
+                                         }
+                                       
+
+               
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_err_status')+textStatus+":"+errorThrown);                
+                             
+                        }
+                   });
+
+                       },
+                       updateiuiRouteStatus:function(serviceName,status){
+
+                               var url= vm.$iuiRouteStatusUrl;
+                               
+                     url=url.replace("{serviceName}",serviceName).replace("{status}",status);
+       
+                                        $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               
+                              
+                                                        for(var i=0;i<vm.iuiRouteArray.length;i++){
+                                              if(vm.iuiRouteArray[i].serviceName == serviceName){
+                                                   vm.iuiRouteArray[i].status=status;
+                                                   break;
+                                               }
+                                           }   
+
+                                         if(status=='1')   
+                                         {
+                                           routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_status_enable'),"success");
+                                         }
+                                         else{
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_status_disable'),"success");
+                                         }
+                                       
+               
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_err_status')+textStatus+":"+errorThrown);                
+                             
+                        }
+                   });
+
+                       },
+                       updatecustomRouteStatus:function(serviceName,status){
+
+                               
+              var url= vm.$customRouteStatusUrl+"?serviceName="+serviceName+"&status="+status;
+
+       
+                                        $.ajax({
+                       "type": 'PUT',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               
+                         
+                                                        for(var i=0;i<vm.customRouteArray.length;i++){
+                                              if(vm.customRouteArray[i].serviceName == serviceName){
+                                                   vm.customRouteArray[i].status=status;
+                                                   break;
+                                               }
+                                           }   
+
+
+                                   routeUtil.groupRoute(vm.customRouteArray);
+
+                                         if(status=='1')   
+                                         {
+                                           routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_status_enable'),"success");
+                                         }
+                                         else{
+                                               routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_status_disable'),"success");
+                                         }
+                                       
+
+               
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_err_status')+textStatus+":"+errorThrown);                
+                             
+                        }
+                   });
+
+                       },
+                       updateApiRoute:function(apiRouteInfo,type){
+                       
+
+                       
+
+                               $('#metricsFullurl').collapse('hide');
+                               $('#apiJsonFullurl').collapse('hide');
+                               $('#apiTab a:first').tab('show');
+                               
+                               vm.apiRouteInfo.serviceName=apiRouteInfo.serviceName;
+                               vm.apiRouteInfo.oldServiceName=apiRouteInfo.serviceName;
+                               vm.apiRouteInfo.version= apiRouteInfo.version;
+                               vm.apiRouteInfo.oldVersion=apiRouteInfo.version;
+                               vm.apiRouteInfo.url=apiRouteInfo.url==""?"/":apiRouteInfo.url;
+                               vm.apiRouteInfo.metricsUrl=apiRouteInfo.metricsUrl;
+                               vm.apiRouteInfo.apiJson=apiRouteInfo.apiJson;
+                               vm.apiRouteInfo.apiJsonType=apiRouteInfo.apiJsonType;
+                               vm.apiRouteInfo.control=apiRouteInfo.control;
+                               vm.apiRouteInfo.status= apiRouteInfo.status;
+
+                               if(vm.apiRouteInfo.apiJsonType=="1"){
+                                       vm.apiJson.custom=apiRouteInfo.apiJson;
+                               }
+                               else{
+                                       vm.apiJson.local=apiRouteInfo.apiJson;
+                                       vm.apiJson.custom="/swagger.json";
+                                        $("#apiJsonSelect").val(apiRouteInfo.apiJson);
+                               }
+
+                               vm.apiRouteInfo.server="";
+                               vm.apiRouteInfo.servers=[];
+                               vm.apiRouteInfo.servers=apiRouteInfo.servers;
+
+                               
+
+
+                               // vm.apiRouteInfo= jQuery.extend({},apiRouteInfo);
+               
+                               vm.routeDlgInfo.saveType = type;
+                               if(type=='update'){
+                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_api');    
+                               }
+                               else if(type=='view'){
+                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_view_api');    
+                               }
+                               
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".item-tip").addClass("item-tip-focus");
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                       });
+
+                               $("#routeDlg").modal("show");
+                       },
+                       updateiuiRoute:function(iuiRouteInfo,type){
+                               
+                               
+                               vm.iuiRouteInfo.serviceName=iuiRouteInfo.serviceName;
+                               vm.iuiRouteInfo.oldServiceName=iuiRouteInfo.serviceName;
+                               vm.iuiRouteInfo.url=iuiRouteInfo.url==""?"/":iuiRouteInfo.url;
+                               vm.iuiRouteInfo.server="";
+                               vm.iuiRouteInfo.servers=[];
+                               vm.iuiRouteInfo.servers=iuiRouteInfo.servers;
+                               vm.iuiRouteInfo.control=iuiRouteInfo.control;
+                               vm.iuiRouteInfo.status=iuiRouteInfo.status;
+
+
+                               // vm.apiRouteInfo= jQuery.extend({},apiRouteInfo);
+               
+                               
+                               vm.routeDlgInfo.saveType = type;
+                               if(type=='update'){
+                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_iui');    
+                               }
+                               else if(type=='view'){
+                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_view_iui');    
+                               }
+
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".item-tip").addClass("item-tip-focus");
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                       });
+
+                               $("#iuirouteDlg").modal("show");
+                       },
+                       updatecustomRoute:function(customRouteInfo,type){
+                               
+                               
+                               vm.customRouteInfo.serviceName=customRouteInfo.serviceName;
+                               vm.customRouteInfo.oldServiceName=customRouteInfo.serviceName;
+                               
+                               vm.customRouteInfo.url=customRouteInfo.url==""?"/":customRouteInfo.url;
+                               vm.customRouteInfo.server="";
+                               vm.customRouteInfo.servers=[];
+                               vm.customRouteInfo.servers=customRouteInfo.servers;
+                               vm.customRouteInfo.control=customRouteInfo.control;
+                               vm.customRouteInfo.status=customRouteInfo.status;
+
+                               // vm.apiRouteInfo= jQuery.extend({},apiRouteInfo);
+               
+                               vm.routeDlgInfo.saveType = type;
+                               if(type=='update'){
+                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_custom');
+                               }
+                               else if(type=='view'){
+                                       vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_view_custom');
+                               }
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".item-tip").addClass("item-tip-focus");
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                       });
+
+                               $("#customrouteDlg").modal("show");
+                       },
+                       updatemsbRoute:function(msbRouteInfo){
+                       
+                                       vm.msbRouteInfo.serviceName=msbRouteInfo.serviceName;
+                                       vm.msbRouteInfo.oldServiceName=msbRouteInfo.serviceName;
+                                       vm.msbRouteInfo.version= msbRouteInfo.version;
+                                       vm.msbRouteInfo.oldVersion= msbRouteInfo.version
+                                       vm.msbRouteInfo.url=msbRouteInfo.url==""?"/":msbRouteInfo.url;
+                                       vm.msbRouteInfo.protocol=msbRouteInfo.protocol;
+                                       vm.msbRouteInfo.visualRange=msbRouteInfo.visualRange;
+                                       vm.msbRouteInfo.visualRangeArray=msbRouteInfo.visualRange.split("|");
+                                       vm.msbRouteInfo.nodes=msbRouteInfo.nodes;
+                                       vm.msbRouteInfo.newHost="";
+                                       vm.msbRouteInfo.newttl="";
+                       
+                               routeUtil.changeTargetServiceUrl();
+               
+                               vm.routeDlgInfo.saveType = "update";
+                               vm.routeDlgInfo.titleName=$.i18n.prop('org_openo_msb_route_title_edit_msb');
+                               vm.server_rtn.warning_block=false;
+                               vm.server_rtn.info_block=false;
+
+
+                               $(".form-group").each(function () {
+                                               $(this).removeClass('has-success');
+                                               $(this).removeClass('has-error');
+                                               $(this).find(".help-block[id]").remove();
+                                               $(this).find(".item-tip").addClass("item-tip-focus");
+                                               $(this).find(".form-tip").removeClass('form-input-focus');
+                                       });
+
+                               $("#msbrouteDlg").modal("show");
+                       },
+                       delApiRoute:function(serviceName,version){
+                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service_del_ask',[serviceName],[version]),function(result){
+                               if(result){
+                                       var url= vm.$apiRouteInstanceUrl;
+                                   var version2=version==""?"null":version;
+                        url=url.replace("{serviceName}",serviceName).replace("{version}",version2);
+       
+                                        $.ajax({
+                       "type": 'DELETE',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               
+                                                        for(var i=0;i<vm.apiRouteArray.length;i++){
+                                              if(vm.apiRouteArray[i].serviceName == serviceName && 
+                                               vm.apiRouteArray[i].version == version){
+                                                   vm.apiRouteArray.splice(i, 1);
+                                                   break;
+                                               }
+                                           }   
+
+                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_api'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");
+                                       
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+textStatus+":"+errorThrown);                
+                             
+                        }
+                   });
+
+
+                              }
+       
+                               });
+                               
+                       },
+                       deliuiRoute:function(serviceName){
+                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service2_del_ask',[serviceName]),function(result){
+                               if(result){
+                                       var url= vm.$iuiRouteInstanceUrl;
+                                
+                        url=url.replace("{serviceName}",serviceName);
+       
+                                        $.ajax({
+                       "type": 'DELETE',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               
+                                                        for(var i=0;i<vm.iuiRouteArray.length;i++){
+                                              if(vm.iuiRouteArray[i].serviceName == serviceName){
+                                                   vm.iuiRouteArray.splice(i, 1);
+                                                   break;
+                                               }
+                                           }   
+
+                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_iui'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");
+                                       
+               
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+textStatus+":"+errorThrown);                
+                             
+                        }
+                   });
+
+
+                              }
+       
+                               });
+                               
+                       },
+                       delcustomRoute:function(serviceName){
+                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service2_del_ask',[serviceName]),function(result){
+                               if(result){
+                                       var url= vm.$customRouteInstanceUrl+"?serviceName="+serviceName;
+       
+                                        $.ajax({
+                       "type": 'DELETE',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               
+                                                        for(var i=0;i<vm.customRouteArray.length;i++){
+                                              if(vm.customRouteArray[i].serviceName == serviceName){
+                                                   vm.customRouteArray.splice(i, 1);
+                                                   break;
+                                               }
+                                                               }
+
+                                            routeUtil.groupRoute(vm.customRouteArray);
+                                               
+
+                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_custom'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");
+                                       
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+textStatus+":"+errorThrown);                
+                             
+                        }
+                   });
+
+
+                              }
+       
+                               });
+                               
+                       },
+                       delmsbRoute:function(serviceName,version,obj){
+                               bootbox.confirm($.i18n.prop('org_openo_msb_route_err_service_del_ask',[serviceName],[version]),function(result){
+                               if(result){
+                                       var url= vm.$msbRouteInstanceUrl;
+                                   var version2=version==""?"null":version;
+                                   var serviceName2= serviceName.replace(/\//g,"*");
+                        url=url.replace("{serviceName}",serviceName2).replace("{version}",version2);
+       
+                                        $.ajax({
+                       "type": 'DELETE',
+                       "url": url,
+                       "dataType": "json",
+                       success: function (resp) {  
+                               $(obj).parent().parent().addClass('selected');
+                               
+                               for(var i=0;i<vm.msbRouteArray.length;i++){
+                                              if(vm.msbRouteArray[i].serviceName == serviceName &&
+                                                       vm.msbRouteArray[i].version==version ){
+                                                   vm.msbRouteArray.splice(i, 1);
+                                                   break;
+                                               }
+                                                               }
+
+                                                        table.row('.selected').remove().draw( false );
+
+                                        routeUtil.growl($.i18n.prop('org_openo_msb_route_tab_msb'),$.i18n.prop('org_openo_msb_route_service_del_success'),"success");
+                                       
+               
+                       },
+                        error: function(XMLHttpRequest, textStatus, errorThrown) {
+                                               
+                                               bootbox.alert($.i18n.prop('org_openo_msb_route_service_del_fail')+XMLHttpRequest.responseText);                
+                             
+                        }
+                        
+                            
+                   });
+
+
+                              }
+       
+                               });
+                               
+                       },
+                       exportServices:function(){
+                               var url=apiBasePath+"/apiRoute/export";
+                               window.open(url); 
+
+                       },
+                       gotoTarget:function(route,type){
+                               vm.selectedRoute=route;
+                               vm.selectedRouteType=type;
+
+                               if(type=="api")
+                               {
+                                 vm.gotoRestDoc(); 
+                               }
+                               else if(type=="iui"){
+                                 vm.gotoIUI(); 
+                               }
+                               
+                       },
+                       gotoRestDoc:function(){
+                               vm.routeTargetTitle=vm.selectedRoute.serviceName+"-"+$.i18n.prop("org_openo_msb_route_content_title");  
+
+                               var version=vm.selectedRoute.version==""?"":"/"+vm.selectedRoute.version;       
+
+                                   if(vm.selectedRoute.apiJsonType=="1")
+                                   {                   
+                                    
+                                    var sourceUrl= "/apijson/"+vm.selectedRoute.serviceName+version;
+                                       }
+                                       else{
+                                        var sourceUrl= iuiBasePath+"/ext/initSwaggerJson/"+vm.selectedRoute.apiJson;   
+                                       }
+                                       //Local json data read from the real API service service address parameter
+                                       var url=iuiBasePath+"/api-doc/index.html?url="+sourceUrl+"&api=/api/"+vm.selectedRoute.serviceName+version;
+
+                                $('#msbSubPage').attr("src",url);  
+                                vm.apiIframeUrl=url; 
+                       },
+                       gotoJVM:function(){
+                               vm.routeTargetTitle=vm.selectedRoute.serviceName+"-"+$.i18n.prop('org_openo_msb_route_metric_content_title');   
+                       
+                               var version=vm.selectedRoute.version==""?"":"/"+vm.selectedRoute.version;       
+
+                               var sourceUrl= "/admin/"+vm.selectedRoute.serviceName+version;
+                        
+                               
+                               var url=iuiBasePath+"/metrics/index.html?url="+sourceUrl;
+
+                                $('#msbSubPage').attr("src",url);   
+                       },
+                       gotoIUI:function(){
+                               vm.routeTargetTitle=vm.selectedRoute.serviceName+"-"+$.i18n.prop('org_openo_msb_route_iui_content_title');                              
+                               var url= "/iui/"+vm.selectedRoute.serviceName+"/";
+                                $('#msbSubPage').attr("src",url);   
+                                 vm.iuiIframeUrl=url; 
+                       },
+                       initIUIfori18n:function(){
+                               vm.routeTargetTitle=$.i18n.prop("org_openo_msb_route_content_title");   
+                               vm.showAPITypeName=[$.i18n.prop("org_openo_msb_route_swagger_type_predefined"),$.i18n.prop("org_openo_msb_route_swagger_type_custominput")];
+                               vm.dataTableLanguage={
+                "sProcessing": "<img src='../img/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loadding...</span>",   
+                "sLengthMenu": $.i18n.prop("org_openo_msb_route-table-sLengthMenu"),
+                "sZeroRecords": $.i18n.prop("org_openo_msb_route-table-sZeroRecords"),
+                "sInfo": "<span class='seperator'>  </span>" + $.i18n.prop("org_openo_msb_route-table-sInfo"),
+                "sInfoEmpty": $.i18n.prop("org_openo_msb_route-table-sInfoEmpty"),
+                "sGroupActions": $.i18n.prop("org_openo_msb_route-table-sGroupActions"),
+                "sAjaxRequestGeneralError": $.i18n.prop("org_openo_msb_route-table-sAjaxRequestGeneralError"),
+                "sEmptyTable": $.i18n.prop("org_openo_msb_route-table-sEmptyTable"),
+                "oPaginate": {
+                    "sPrevious": $.i18n.prop("org_openo_msb_route-table-sPrevious"),
+                    "sNext": $.i18n.prop("org_openo_msb_route-table-sNext"),
+                    "sPage": $.i18n.prop("org_openo_msb_route-table-sPage"),
+                    "sPageOf": $.i18n.prop("org_openo_msb_route-table-sPageOf")
+                },
+                "sSearch": $.i18n.prop("org_openo_msb_route-table-search"),
+                "sInfoFiltered": $.i18n.prop("org_openo_msb_route-table-infofilter") 
+            }; 
+
+                       }
+                       
+               
+
+       });
+
+
index 3c06b46..26fe171 100644 (file)
-/*\r
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *         http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-$(function(){\r
-\r
-   $('#msbTable tbody').on('click', 'td.details-control', function () {\r
-        var tr = $(this).closest('tr');\r
-        var row = table.row( tr );\r
-        if ( row.child.isShown() ) {\r
-            // This row is already open - close it\r
-            row.child.hide();\r
-            tr.removeClass('shown');\r
-        }\r
-        else {\r
-            // Open this row\r
-            var nodes=row.data()[1].match(/\d+.\d+.\d+.\d+:\d+:(-)?\d+/g) \r
-            \r
-            row.child( routeUtil.formatDetail(nodes) ).show();\r
-            tr.addClass('shown');\r
-        }\r
-    } );\r
-\r
- $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {\r
-      //Get the name of the TAB has been activated\r
-      var activeTab = $(e.target).text(); \r
-      if(this.id=="customTab" || this.id=="msbTab"){\r
-          $("#serviceContent").hide();\r
-          $("#upArrawDiv").hide();\r
-      }\r
-      else{\r
-        $("#serviceContent").show();\r
-        $("#upArrawDiv").show();\r
-         $('#msbSubPage').attr("src","");\r
-          $(".stats_box .routeDiv").removeClass("active");\r
-          vm.selectedRouteType="";\r
-          vm.routeTargetTitle=$.i18n.prop("org_openo_msb_route_content_title");\r
-       \r
-      }\r
-   });\r
-\r
-\r
- $("[data-toggle='tooltip']").tooltip();\r
-\r
-   $('#metricsFullurl').on('show.bs.collapse', function () {\r
-        $('#metricsUrlCollapse').removeClass('fa-plus').addClass('fa-minus');\r
-      \r
-  });\r
-  \r
-  $('#metricsFullurl').on('hide.bs.collapse', function () {\r
-        $('#metricsUrlCollapse').removeClass('fa-minus').addClass('fa-plus');\r
-  });\r
-\r
-   $('#apiJsonFullurl').on('show.bs.collapse', function () {\r
-        $('#apiJsonCollapse').removeClass('fa-plus').addClass('fa-minus');\r
-      \r
-  });\r
-  \r
-  $('#apiJsonFullurl').on('hide.bs.collapse', function () {\r
-        $('#apiJsonCollapse').removeClass('fa-minus').addClass('fa-plus');\r
-  });\r
-\r
-\r
-\r
-   $(".form-tip").blur(function(){\r
-    if($.trim($(this).val())==""){\r
-      $(this).removeClass("form-input-focus");\r
-      $(this).prev().removeClass("item-tip-focus");\r
-    }});\r
-\r
-$(".form-tip").focus(function(){\r
-  if(!$(this).hasClass("form-input-focus")){\r
-  $(this).addClass("form-input-focus");\r
-  $(this).prev().addClass("item-tip-focus");\r
-  }});\r
-\r
-$(".item-tip").click(function(){\r
-  $(this).next().focus();\r
-});\r
-\r
-\r
-\r
-$("input[name='version']").blur(function(){\r
-    $(this).val($(this).val().toLowerCase());\r
-    routeUtil.changeTargetServiceUrl();\r
-});\r
-\r
-\r
-$("input[name='url']").blur(function(){\r
-\r
-routeUtil.changeTargetServiceUrl();\r
-\r
-});\r
-$("input[name='serviceName']").blur(function(){\r
-\r
-routeUtil.changeTargetServiceUrl();\r
-\r
-});\r
-\r
-\r
-\r
-$("select[name='protocol']").change(function(){\r
-\r
-routeUtil.changeTargetServiceUrl();\r
-\r
-});\r
-\r
-/*\r
-\r
-$("input[name='oriService']").blur(function(){\r
-    var oriService=$.trim($(this).val());\r
-    if(oriService==""){\r
-      $("input[name='serviceName']").val("");\r
-      $("input[name='version']").val("");\r
-      $("input[name='server']").val("");\r
-      $("input[name='url']").val("");\r
-      return;\r
-    }\r
-    \r
-    \r
-\r
-    var reg=/^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/   \r
-        var reg_standard_match=/^(.*:\d{1,5})\/api\/(.*)\/(v.*)$/ \r
-    var reg_unstandard_match=/^(.*:\d{1,5})(\/.*)$/     \r
-        if(reg.test(oriService)){  \r
-       if(reg_standard_match.test(oriService)){  \r
-          //标准api\r
-          var group = oriService.match(reg_standard_match);\r
-          $("input[name='serviceName']").val(group[2]);        \r
-          $("input[name='server']").val(group[1].replace("http://",""));\r
-\r
-\r
-         var version=group[3];\r
-        var reg_endName_match=/^(.*?)\/.*$/\r
-        if(reg_endName_match.test(version)){\r
-            version = version.match(reg_endName_match)[1];\r
-        }\r
-          $("input[name='version']").val(version);\r
-           $("input[name='url']").val("/api/"+group[2]+"/"+version);\r
-\r
-        if(!$("input[name='version']").hasClass("form-input-focus")){\r
-          $("input[name='version']").addClass("form-input-focus");\r
-          $("input[name='version']").prev().addClass("item-tip-focus");\r
-          }\r
-          \r
-    \r
-\r
-       }\r
-       else{\r
-           //非标准api\r
-          var group = oriService.match(reg_unstandard_match);\r
-         var reg_endName_match=/^(.*?)\/$/\r
-         var url=group[2];\r
-        if(url!="/" && reg_endName_match.test(url)){\r
-            url = url.match(reg_endName_match)[1];\r
-        }\r
-\r
-\r
-        $("input[name='serviceName']").val("");\r
-        $("input[name='version']").val("");\r
-        $("input[name='server']").val(group[1].replace("http://",""));\r
-        $("input[name='url']").val(url);\r
-      }\r
-\r
-          if(!$("input[name='server']").hasClass("form-input-focus")){\r
-          $("input[name='server']").addClass("form-input-focus");\r
-          $("input[name='server']").prev().addClass("item-tip-focus");\r
-          }\r
-    }\r
-  \r
-    \r
-});\r
-\r
-\r
-$("input[name='iuioriService']").blur(function(){\r
-    var oriService=$.trim($(this).val());\r
-    if(oriService==""){\r
-      $("input[name='iuiserviceName']").val("");\r
-      $("input[name='iuiserver']").val("");\r
-      $("input[name='iuiurl']").val("");\r
-      return;\r
-    }\r
-    \r
-    \r
-\r
-    var reg=/^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/   \r
-        var reg_standard_match=/^(.*:\d{1,5})\/iui\/(.*|.*\/)$/ \r
-    var reg_unstandard_match=/^(.*:\d{1,5})(\/.*)$/     \r
-   if(reg.test(oriService)){  \r
-       if(reg_standard_match.test(oriService)){  \r
-          //标准api\r
-          var group = oriService.match(reg_standard_match);\r
-\r
-        \r
-        $("input[name='iuiserver']").val(group[1].replace("http://",""));\r
-        \r
-\r
-        var serviceName=group[2];\r
-        var reg_endName_match=/^(.*?)\/.*$/\r
-        if(reg_endName_match.test(serviceName)){\r
-           serviceName = serviceName.match(reg_endName_match)[1];\r
-        }\r
-          $("input[name='iuiserviceName']").val(serviceName);\r
-          $("input[name='iuiurl']").val("/iui/"+serviceName);\r
-      \r
-       }\r
-       else{\r
-           //非标准api\r
-          var group = oriService.match(reg_unstandard_match);\r
-       \r
-         var reg_endName_match=/^(.*?)\/$/\r
-         var url=group[2];\r
-        if(url!="/" && reg_endName_match.test(url)){\r
-            url = url.match(reg_endName_match)[1];\r
-        }\r
-        $("input[name='iuiserver']").val(group[1].replace("http://",""));\r
-        $("input[name='iuiurl']").val(url);\r
-      }\r
-\r
-          if(!$("input[name='iuiserver']").hasClass("form-input-focus")){\r
-          $("input[name='iuiserver']").addClass("form-input-focus");\r
-          $("input[name='iuiserver']").prev().addClass("item-tip-focus");\r
-          }\r
-    }\r
-  \r
-    \r
-});\r
-\r
-$("input[name='customoriService']").blur(function(){\r
-    var oriService=$.trim($(this).val());\r
-    if(oriService==""){\r
-      $("input[name='customserviceName']").val("");\r
-      $("input[name='customserver']").val("");\r
-      $("input[name='customurl']").val("");\r
-      return;\r
-    }\r
-    \r
-    \r
-\r
-    var reg=/^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/   \r
-       \r
-    var reg_unstandard_match=/^(.*:\d{1,5})(\/.*)$/     \r
-   if(reg.test(oriService)){  \r
-      \r
-\r
-          var group = oriService.match(reg_unstandard_match);\r
-       \r
-         var reg_endName_match=/^(.*?)\/$/\r
-         var url=group[2];\r
-        if(url!="/" && reg_endName_match.test(url)){\r
-            url = url.match(reg_endName_match)[1];\r
-        }\r
-        $("input[name='customserver']").val(group[1].replace("http://",""));\r
-        $("input[name='customurl']").val(url);\r
-        $("input[name='customserviceName']").val(url);\r
-     \r
-\r
-          if(!$("input[name='customserver']").hasClass("form-input-focus")){\r
-          $("input[name='customserver']").addClass("form-input-focus");\r
-          $("input[name='customserver']").prev().addClass("item-tip-focus");\r
-          }\r
-    }\r
-  \r
-    \r
-});\r
-\r
-*/\r
-\r
-   jQuery.validator.addMethod("ip", function(value, element) {    \r
-      return this.optional(element) || /^(([-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_ip_format'));\r
-\r
-\r
-\r
-  jQuery.validator.addMethod("url_head", function(value, element) {    \r
-      return this.optional(element) || /^\/.+((?!\/).)$/i.test(value) || /^\/$/i.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_url_head_format'));\r
-\r
-\r
-jQuery.validator.addMethod("url_head_only", function(value, element) {    \r
-      return this.optional(element) || /^\/.*$/i.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_url_head_only_format'));\r
-  \r
-    jQuery.validator.addMethod("version", function(value, element) {    \r
-      return this.optional(element) || /^v\d+(\.\d+)?$/i.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_form_version_tip'));\r
-\r
-     jQuery.validator.addMethod("service_url", function(value, element) {    \r
-    return this.optional(element) || /^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_url_format'));\r
-\r
-     jQuery.validator.addMethod("url_line", function(value, element) {    \r
-      return this.optional(element) || /^((?!\/).)*$/.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_url_line_format'));\r
-\r
-     jQuery.validator.addMethod("content", function(value, element) {    \r
-      return this.optional(element) ||  /^([0-9a-zA-Z]|-|_)*$/i.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_content_format'));\r
-\r
-     jQuery.validator.addMethod("custom_content", function(value, element) {    \r
-      return this.optional(element) ||  /^([0-9a-zA-Z]|-|_|\/)*$/i.test(value);    \r
-    }, $.i18n.prop('org_openo_msb_route_validator_content_format'));\r
-\r
-\r
- });\r
-\r
-  var form = $('#routeForm');\r
-  var error = $('.alert-danger', form);\r
-  var success = $('.alert-success', form);\r
-\r
-    var iuiform = $('#iuirouteForm');\r
-     var iuierror = $('.alert-danger', iuiform);\r
-      var iuisuccess = $('.alert-success', iuiform);\r
-\r
-\r
-      var customform = $('#customrouteForm');\r
-     var customerror = $('.alert-danger', customform);\r
-      var customsuccess = $('.alert-success', customform);\r
-\r
-      var msbform = $('#msbForm');\r
-     var msberror = $('.alert-danger', msbform);\r
-      var msbsuccess = $('.alert-success', msbform);\r
-\r
-\r
-    form.validate({\r
-    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.\r
-    errorElement: 'span', //default input error message container\r
-    errorClass: 'help-block', // default input error message class\r
-    focusInvalid: false, // do not focus the last invalid input\r
-    rules: {     \r
-     /* oriService:{\r
-    service_url:true,\r
-    maxlength:100\r
-    },*/\r
-      serviceName:{\r
-        required: true,\r
-        url_line:true,\r
-        content:true,\r
-        maxlength:50\r
-      },\r
-      version:{\r
-       // required: true,\r
-        maxlength:50,\r
-        version:true\r
-      },\r
-       url:{\r
-        required: true,\r
-        url_head:true,\r
-        maxlength:50\r
-      },\r
-      metricsUrl:{\r
-        url_head:true,\r
-        maxlength:50\r
-      },\r
-      server:{\r
-        ip:true,\r
-        maxlength:50\r
-      }\r
-    },\r
-    messages: { \r
-        serviceName:{\r
-        required: "Please enter the service name"\r
-      },      \r
-       url:{\r
-        required: "Please enter the URL address"\r
-       \r
-      },     \r
-       server:{\r
-        required:"Please enter the Host address"\r
-       \r
-      },\r
-\r
-    },\r
-    errorPlacement: function (error, element) { // render error placement for each input type\r
-      error.insertAfter(element); // for other inputs, just perform default behavior\r
-    },\r
-\r
-    invalidHandler: function (event, validator) { //display error alert on form submit   \r
-      success.hide();\r
-      error.show();\r
-      //ZteFrameWork.scrollTo(error, -200);\r
-    },\r
-\r
-    highlight: function (element) { // hightlight error inputs\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    unhighlight: function (element) { // revert the change done by hightlight\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    success: function (label) {\r
-      label\r
-        .addClass('valid') // mark the current input as valid and display OK icon\r
-        .closest('.form-group').removeClass('has-error'); // set success class to the control group\r
-    },\r
-    submitHandler: function (form) {\r
-      success.show();\r
-      error.hide();\r
-      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax\r
-    }\r
-\r
-   });\r
-\r
-    iuiform.validate({\r
-    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.\r
-    errorElement: 'span', //default input error message container\r
-    errorClass: 'help-block', // default input error message class\r
-    focusInvalid: false, // do not focus the last invalid input\r
-    rules: {     \r
-    /*iuioriService:{\r
-    service_url:true,\r
-    maxlength:100\r
-    },*/\r
-    iuiserviceName:{\r
-        required: true,\r
-        url_line:true,\r
-        maxlength:50,\r
-        content:true\r
-      },     \r
-    iuiurl:{\r
-        required: true,\r
-        url_head:true,\r
-        maxlength:50\r
-      },\r
-   iuiserver:{\r
-        ip:true,\r
-        maxlength:50\r
-      }\r
-    },\r
-    messages: { \r
-      iuiserviceName:{\r
-        required: "Please enter the service name"\r
-      },\r
-      iuiurl:{\r
-        required:"Please enter the URL address"\r
-       \r
-      },\r
-      iuiserver:{\r
-        required: "Please enter the Host address"\r
-      },\r
-\r
-    },\r
-    errorPlacement: function (iuierror, element) { // render error placement for each input type\r
-      iuierror.insertAfter(element); // for other inputs, just perform default behavior\r
-    },\r
-\r
-    invalidHandler: function (event, validator) { //display error alert on form submit   \r
-      iuisuccess.hide();\r
-      iuierror.show();\r
-      //ZteFrameWork.scrollTo(error, -200);\r
-    },\r
-\r
-    highlight: function (element) { // hightlight error inputs\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    unhighlight: function (element) { // revert the change done by hightlight\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    success: function (label) {\r
-      label\r
-        .addClass('valid') // mark the current input as valid and display OK icon\r
-        .closest('.form-group').removeClass('has-error'); // set success class to the control group\r
-    },\r
-    submitHandler: function (form) {\r
-      iuisuccess.show();\r
-      iuierror.hide();\r
-      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax\r
-    }\r
-\r
-   });\r
-\r
-    customform.validate({\r
-    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.\r
-    errorElement: 'span', //default input error message container\r
-    errorClass: 'help-block', // default input error message class\r
-    focusInvalid: false, // do not focus the last invalid input\r
-    rules: {     \r
-    /*customoriService:{\r
-    service_url:true,\r
-    maxlength:100\r
-    },*/\r
-    customserviceName:{\r
-        required: false,\r
-        url_head:true,\r
-        maxlength:100,\r
-        custom_content:true\r
-      },     \r
-    customurl:{\r
-        required: true,\r
-        url_head:true,\r
-        maxlength:50\r
-      },\r
-   customserver:{\r
-        ip:true,\r
-        maxlength:50\r
-      }\r
-    },\r
-    messages: { \r
-      customserviceName:{\r
-        required: "Please enter the service name"\r
-      },     \r
-      customurl:{\r
-        required: "Please enter the URL address"\r
-       \r
-      }\r
-\r
-    },\r
-    errorPlacement: function (customerror, element) { // render error placement for each input type\r
-      customerror.insertAfter(element); // for other inputs, just perform default behavior\r
-    },\r
-\r
-    invalidHandler: function (event, validator) { //display error alert on form submit   \r
-      customsuccess.hide();\r
-      customerror.show();\r
-      //ZteFrameWork.scrollTo(error, -200);\r
-    },\r
-\r
-    highlight: function (element) { // hightlight error inputs\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    unhighlight: function (element) { // revert the change done by hightlight\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    success: function (label) {\r
-      label\r
-        .addClass('valid') // mark the current input as valid and display OK icon\r
-        .closest('.form-group').removeClass('has-error'); // set success class to the control group\r
-    },\r
-    submitHandler: function (form) {\r
-      customsuccess.show();\r
-      customerror.hide();\r
-      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax\r
-    }\r
-\r
-   });\r
-\r
-\r
-    msbform.validate({\r
-    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.\r
-    errorElement: 'span', //default input error message container\r
-    errorClass: 'help-block', // default input error message class\r
-    focusInvalid: false, // do not focus the last invalid input\r
-    rules: {     \r
-    \r
-      serviceName:{\r
-        required: true,\r
-       // url_line:true,\r
-        custom_content:true,\r
-        maxlength:50\r
-      },\r
-      version:{\r
-        maxlength:50,\r
-        version:true\r
-      },\r
-       url:{\r
-        url_head:true,\r
-        maxlength:50\r
-      },\r
-      newHost:{\r
-        ip:true,\r
-        maxlength:50\r
-      },\r
-      newttl:{\r
-        digits:true,\r
-        min:0\r
-      },\r
-      protocol:{\r
-        required: true\r
-      },\r
-      type:{\r
-        required: true\r
-      }\r
-    },\r
-    messages: { \r
-        serviceName:{\r
-        required: "Please enter the service name"\r
-      },\r
-       protocol:{\r
-        required:  "Please select a service protocol"\r
-      },     \r
-       type:{\r
-        required: "Please select a service type"\r
-       \r
-      },\r
-      newttl:{\r
-        digits:"Please enter an integer",\r
-        min: "Not a negative" \r
-      }\r
-\r
-    },\r
-    errorPlacement: function (msberror, element) { // render error placement for each input type\r
-      msberror.insertAfter(element); // for other inputs, just perform default behavior\r
-    },\r
-\r
-    invalidHandler: function (event, validator) { //display error alert on form submit   \r
-      msbsuccess.hide();\r
-      msberror.show();\r
-      //ZteFrameWork.scrollTo(error, -200);\r
-    },\r
-\r
-    highlight: function (element) { // hightlight error inputs\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    unhighlight: function (element) { // revert the change done by hightlight\r
-      $(element)\r
-        .closest('.form-group').removeClass('has-error'); // set error class to the control group\r
-    },\r
-\r
-    success: function (label) {\r
-      label\r
-        .addClass('valid') // mark the current input as valid and display OK icon\r
-        .closest('.form-group').removeClass('has-error'); // set success class to the control group\r
-    },\r
-    submitHandler: function (form) {\r
-      msbsuccess.show();\r
-      msberror.hide();\r
-      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax\r
-    }\r
-\r
-   });\r
-\r
-\r
+/*
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
+ */
+$(function(){
+
+   $('#msbTable tbody').on('click', 'td.details-control', function () {
+        var tr = $(this).closest('tr');
+        var row = table.row( tr );
+        if ( row.child.isShown() ) {
+            // This row is already open - close it
+            row.child.hide();
+            tr.removeClass('shown');
+        }
+        else {
+            // Open this row
+            var nodes=row.data()[1].match(/\d+.\d+.\d+.\d+:\d+:(-)?\d+/g) 
+            
+            row.child( routeUtil.formatDetail(nodes) ).show();
+            tr.addClass('shown');
+        }
+    } );
+
+ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
+      //Get the name of the TAB has been activated
+      var activeTab = $(e.target).text(); 
+      if(this.id=="customTab" || this.id=="msbTab"){
+          $("#serviceContent").hide();
+          $("#upArrawDiv").hide();
+      }
+      else{
+        $("#serviceContent").show();
+        $("#upArrawDiv").show();
+         $('#msbSubPage').attr("src","");
+          $(".stats_box .routeDiv").removeClass("active");
+          vm.selectedRouteType="";
+          vm.routeTargetTitle=$.i18n.prop("org_openo_msb_route_content_title");
+       
+      }
+   });
+
+
+ $("[data-toggle='tooltip']").tooltip();
+
+   $('#metricsFullurl').on('show.bs.collapse', function () {
+        $('#metricsUrlCollapse').removeClass('fa-plus').addClass('fa-minus');
+      
+  });
+  
+  $('#metricsFullurl').on('hide.bs.collapse', function () {
+        $('#metricsUrlCollapse').removeClass('fa-minus').addClass('fa-plus');
+  });
+
+   $('#apiJsonFullurl').on('show.bs.collapse', function () {
+        $('#apiJsonCollapse').removeClass('fa-plus').addClass('fa-minus');
+      
+  });
+  
+  $('#apiJsonFullurl').on('hide.bs.collapse', function () {
+        $('#apiJsonCollapse').removeClass('fa-minus').addClass('fa-plus');
+  });
+
+
+
+   $(".form-tip").blur(function(){
+    if($.trim($(this).val())==""){
+      $(this).removeClass("form-input-focus");
+      $(this).prev().removeClass("item-tip-focus");
+    }});
+
+$(".form-tip").focus(function(){
+  if(!$(this).hasClass("form-input-focus")){
+  $(this).addClass("form-input-focus");
+  $(this).prev().addClass("item-tip-focus");
+  }});
+
+$(".item-tip").click(function(){
+  $(this).next().focus();
+});
+
+
+
+$("input[name='version']").blur(function(){
+    $(this).val($(this).val().toLowerCase());
+    routeUtil.changeTargetServiceUrl();
+});
+
+
+$("input[name='url']").blur(function(){
+
+routeUtil.changeTargetServiceUrl();
+
+});
+$("input[name='serviceName']").blur(function(){
+
+routeUtil.changeTargetServiceUrl();
+
+});
+
+
+
+$("select[name='protocol']").change(function(){
+
+routeUtil.changeTargetServiceUrl();
+
+});
+
+/*
+
+$("input[name='oriService']").blur(function(){
+    var oriService=$.trim($(this).val());
+    if(oriService==""){
+      $("input[name='serviceName']").val("");
+      $("input[name='version']").val("");
+      $("input[name='server']").val("");
+      $("input[name='url']").val("");
+      return;
+    }
+    
+    
+
+    var reg=/^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/   
+        var reg_standard_match=/^(.*:\d{1,5})\/api\/(.*)\/(v.*)$/ 
+    var reg_unstandard_match=/^(.*:\d{1,5})(\/.*)$/     
+        if(reg.test(oriService)){  
+       if(reg_standard_match.test(oriService)){  
+          //标准api
+          var group = oriService.match(reg_standard_match);
+          $("input[name='serviceName']").val(group[2]);        
+          $("input[name='server']").val(group[1].replace("http://",""));
+
+
+         var version=group[3];
+        var reg_endName_match=/^(.*?)\/.*$/
+        if(reg_endName_match.test(version)){
+            version = version.match(reg_endName_match)[1];
+        }
+          $("input[name='version']").val(version);
+           $("input[name='url']").val("/api/"+group[2]+"/"+version);
+
+        if(!$("input[name='version']").hasClass("form-input-focus")){
+          $("input[name='version']").addClass("form-input-focus");
+          $("input[name='version']").prev().addClass("item-tip-focus");
+          }
+          
+    
+
+       }
+       else{
+           //非标准api
+          var group = oriService.match(reg_unstandard_match);
+         var reg_endName_match=/^(.*?)\/$/
+         var url=group[2];
+        if(url!="/" && reg_endName_match.test(url)){
+            url = url.match(reg_endName_match)[1];
+        }
+
+
+        $("input[name='serviceName']").val("");
+        $("input[name='version']").val("");
+        $("input[name='server']").val(group[1].replace("http://",""));
+        $("input[name='url']").val(url);
+      }
+
+          if(!$("input[name='server']").hasClass("form-input-focus")){
+          $("input[name='server']").addClass("form-input-focus");
+          $("input[name='server']").prev().addClass("item-tip-focus");
+          }
+    }
+  
+    
+});
+
+
+$("input[name='iuioriService']").blur(function(){
+    var oriService=$.trim($(this).val());
+    if(oriService==""){
+      $("input[name='iuiserviceName']").val("");
+      $("input[name='iuiserver']").val("");
+      $("input[name='iuiurl']").val("");
+      return;
+    }
+    
+    
+
+    var reg=/^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/   
+        var reg_standard_match=/^(.*:\d{1,5})\/iui\/(.*|.*\/)$/ 
+    var reg_unstandard_match=/^(.*:\d{1,5})(\/.*)$/     
+   if(reg.test(oriService)){  
+       if(reg_standard_match.test(oriService)){  
+          //标准api
+          var group = oriService.match(reg_standard_match);
+
+        
+        $("input[name='iuiserver']").val(group[1].replace("http://",""));
+        
+
+        var serviceName=group[2];
+        var reg_endName_match=/^(.*?)\/.*$/
+        if(reg_endName_match.test(serviceName)){
+           serviceName = serviceName.match(reg_endName_match)[1];
+        }
+          $("input[name='iuiserviceName']").val(serviceName);
+          $("input[name='iuiurl']").val("/iui/"+serviceName);
+      
+       }
+       else{
+           //非标准api
+          var group = oriService.match(reg_unstandard_match);
+       
+         var reg_endName_match=/^(.*?)\/$/
+         var url=group[2];
+        if(url!="/" && reg_endName_match.test(url)){
+            url = url.match(reg_endName_match)[1];
+        }
+        $("input[name='iuiserver']").val(group[1].replace("http://",""));
+        $("input[name='iuiurl']").val(url);
+      }
+
+          if(!$("input[name='iuiserver']").hasClass("form-input-focus")){
+          $("input[name='iuiserver']").addClass("form-input-focus");
+          $("input[name='iuiserver']").prev().addClass("item-tip-focus");
+          }
+    }
+  
+    
+});
+
+$("input[name='customoriService']").blur(function(){
+    var oriService=$.trim($(this).val());
+    if(oriService==""){
+      $("input[name='customserviceName']").val("");
+      $("input[name='customserver']").val("");
+      $("input[name='customurl']").val("");
+      return;
+    }
+    
+    
+
+    var reg=/^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/   
+       
+    var reg_unstandard_match=/^(.*:\d{1,5})(\/.*)$/     
+   if(reg.test(oriService)){  
+      
+
+          var group = oriService.match(reg_unstandard_match);
+       
+         var reg_endName_match=/^(.*?)\/$/
+         var url=group[2];
+        if(url!="/" && reg_endName_match.test(url)){
+            url = url.match(reg_endName_match)[1];
+        }
+        $("input[name='customserver']").val(group[1].replace("http://",""));
+        $("input[name='customurl']").val(url);
+        $("input[name='customserviceName']").val(url);
+     
+
+          if(!$("input[name='customserver']").hasClass("form-input-focus")){
+          $("input[name='customserver']").addClass("form-input-focus");
+          $("input[name='customserver']").prev().addClass("item-tip-focus");
+          }
+    }
+  
+    
+});
+
+*/
+
+   jQuery.validator.addMethod("ip", function(value, element) {    
+      return this.optional(element) || /^(([-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})$/.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_ip_format'));
+
+
+
+  jQuery.validator.addMethod("url_head", function(value, element) {    
+      return this.optional(element) || /^\/.+((?!\/).)$/i.test(value) || /^\/$/i.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_url_head_format'));
+
+
+jQuery.validator.addMethod("url_head_only", function(value, element) {    
+      return this.optional(element) || /^\/.*$/i.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_url_head_only_format'));
+  
+    jQuery.validator.addMethod("version", function(value, element) {    
+      return this.optional(element) || /^v\d+(\.\d+)?$/i.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_form_version_tip'));
+
+     jQuery.validator.addMethod("service_url", function(value, element) {    
+    return this.optional(element) || /^(|http:\/\/)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))):(\d{1,5})\/.*$/.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_url_format'));
+
+     jQuery.validator.addMethod("url_line", function(value, element) {    
+      return this.optional(element) || /^((?!\/).)*$/.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_url_line_format'));
+
+     jQuery.validator.addMethod("content", function(value, element) {    
+      return this.optional(element) ||  /^([0-9a-zA-Z]|-|_)*$/i.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_content_format'));
+
+     jQuery.validator.addMethod("custom_content", function(value, element) {    
+      return this.optional(element) ||  /^([0-9a-zA-Z]|-|_|\/)*$/i.test(value);    
+    }, $.i18n.prop('org_openo_msb_route_validator_content_format'));
+
+
+ });
+
+  var form = $('#routeForm');
+  var error = $('.alert-danger', form);
+  var success = $('.alert-success', form);
+
+    var iuiform = $('#iuirouteForm');
+     var iuierror = $('.alert-danger', iuiform);
+      var iuisuccess = $('.alert-success', iuiform);
+
+
+      var customform = $('#customrouteForm');
+     var customerror = $('.alert-danger', customform);
+      var customsuccess = $('.alert-success', customform);
+
+      var msbform = $('#msbForm');
+     var msberror = $('.alert-danger', msbform);
+      var msbsuccess = $('.alert-success', msbform);
+
+
+    form.validate({
+    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
+    errorElement: 'span', //default input error message container
+    errorClass: 'help-block', // default input error message class
+    focusInvalid: false, // do not focus the last invalid input
+    rules: {     
+     /* oriService:{
+    service_url:true,
+    maxlength:100
+    },*/
+      serviceName:{
+        required: true,
+        url_line:true,
+        content:true,
+        maxlength:50
+      },
+      version:{
+       // required: true,
+        maxlength:50,
+        version:true
+      },
+       url:{
+        required: true,
+        url_head:true,
+        maxlength:50
+      },
+      metricsUrl:{
+        url_head:true,
+        maxlength:50
+      },
+      server:{
+        ip:true,
+        maxlength:50
+      }
+    },
+    messages: { 
+        serviceName:{
+        required: "Please enter the service name"
+      },      
+       url:{
+        required: "Please enter the URL address"
+       
+      },     
+       server:{
+        required:"Please enter the Host address"
+       
+      },
+
+    },
+    errorPlacement: function (error, element) { // render error placement for each input type
+      error.insertAfter(element); // for other inputs, just perform default behavior
+    },
+
+    invalidHandler: function (event, validator) { //display error alert on form submit   
+      success.hide();
+      error.show();
+      //ZteFrameWork.scrollTo(error, -200);
+    },
+
+    highlight: function (element) { // hightlight error inputs
+      $(element)
+        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
+    },
+
+    unhighlight: function (element) { // revert the change done by hightlight
+      $(element)
+        .closest('.form-group').removeClass('has-error'); // set error class to the control group
+    },
+
+    success: function (label) {
+      label
+        .addClass('valid') // mark the current input as valid and display OK icon
+        .closest('.form-group').removeClass('has-error'); // set success class to the control group
+    },
+    submitHandler: function (form) {
+      success.show();
+      error.hide();
+      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
+    }
+
+   });
+
+    iuiform.validate({
+    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
+    errorElement: 'span', //default input error message container
+    errorClass: 'help-block', // default input error message class
+    focusInvalid: false, // do not focus the last invalid input
+    rules: {     
+    /*iuioriService:{
+    service_url:true,
+    maxlength:100
+    },*/
+    iuiserviceName:{
+        required: true,
+        url_line:true,
+        maxlength:50,
+        content:true
+      },     
+    iuiurl:{
+        required: true,
+        url_head:true,
+        maxlength:50
+      },
+   iuiserver:{
+        ip:true,
+        maxlength:50
+      }
+    },
+    messages: { 
+      iuiserviceName:{
+        required: "Please enter the service name"
+      },
+      iuiurl:{
+        required:"Please enter the URL address"
+       
+      },
+      iuiserver:{
+        required: "Please enter the Host address"
+      },
+
+    },
+    errorPlacement: function (iuierror, element) { // render error placement for each input type
+      iuierror.insertAfter(element); // for other inputs, just perform default behavior
+    },
+
+    invalidHandler: function (event, validator) { //display error alert on form submit   
+      iuisuccess.hide();
+      iuierror.show();
+      //ZteFrameWork.scrollTo(error, -200);
+    },
+
+    highlight: function (element) { // hightlight error inputs
+      $(element)
+        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
+    },
+
+    unhighlight: function (element) { // revert the change done by hightlight
+      $(element)
+        .closest('.form-group').removeClass('has-error'); // set error class to the control group
+    },
+
+    success: function (label) {
+      label
+        .addClass('valid') // mark the current input as valid and display OK icon
+        .closest('.form-group').removeClass('has-error'); // set success class to the control group
+    },
+    submitHandler: function (form) {
+      iuisuccess.show();
+      iuierror.hide();
+      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
+    }
+
+   });
+
+    customform.validate({
+    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
+    errorElement: 'span', //default input error message container
+    errorClass: 'help-block', // default input error message class
+    focusInvalid: false, // do not focus the last invalid input
+    rules: {     
+    /*customoriService:{
+    service_url:true,
+    maxlength:100
+    },*/
+    customserviceName:{
+        required: false,
+        url_head:true,
+        maxlength:100,
+        custom_content:true
+      },     
+    customurl:{
+        required: true,
+        url_head:true,
+        maxlength:50
+      },
+   customserver:{
+        ip:true,
+        maxlength:50
+      }
+    },
+    messages: { 
+      customserviceName:{
+        required: "Please enter the service name"
+      },     
+      customurl:{
+        required: "Please enter the URL address"
+       
+      }
+
+    },
+    errorPlacement: function (customerror, element) { // render error placement for each input type
+      customerror.insertAfter(element); // for other inputs, just perform default behavior
+    },
+
+    invalidHandler: function (event, validator) { //display error alert on form submit   
+      customsuccess.hide();
+      customerror.show();
+      //ZteFrameWork.scrollTo(error, -200);
+    },
+
+    highlight: function (element) { // hightlight error inputs
+      $(element)
+        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
+    },
+
+    unhighlight: function (element) { // revert the change done by hightlight
+      $(element)
+        .closest('.form-group').removeClass('has-error'); // set error class to the control group
+    },
+
+    success: function (label) {
+      label
+        .addClass('valid') // mark the current input as valid and display OK icon
+        .closest('.form-group').removeClass('has-error'); // set success class to the control group
+    },
+    submitHandler: function (form) {
+      customsuccess.show();
+      customerror.hide();
+      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
+    }
+
+   });
+
+
+    msbform.validate({
+    doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
+    errorElement: 'span', //default input error message container
+    errorClass: 'help-block', // default input error message class
+    focusInvalid: false, // do not focus the last invalid input
+    rules: {     
+    
+      serviceName:{
+        required: true,
+       // url_line:true,
+        custom_content:true,
+        maxlength:50
+      },
+      version:{
+        maxlength:50,
+        version:true
+      },
+       url:{
+        url_head:true,
+        maxlength:50
+      },
+      newHost:{
+        ip:true,
+        maxlength:50
+      },
+      newttl:{
+        digits:true,
+        min:0
+      },
+      protocol:{
+        required: true
+      },
+      type:{
+        required: true
+      }
+    },
+    messages: { 
+        serviceName:{
+        required: "Please enter the service name"
+      },
+       protocol:{
+        required:  "Please select a service protocol"
+      },     
+       type:{
+        required: "Please select a service type"
+       
+      },
+      newttl:{
+        digits:"Please enter an integer",
+        min: "Not a negative" 
+      }
+
+    },
+    errorPlacement: function (msberror, element) { // render error placement for each input type
+      msberror.insertAfter(element); // for other inputs, just perform default behavior
+    },
+
+    invalidHandler: function (event, validator) { //display error alert on form submit   
+      msbsuccess.hide();
+      msberror.show();
+      //ZteFrameWork.scrollTo(error, -200);
+    },
+
+    highlight: function (element) { // hightlight error inputs
+      $(element)
+        .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
+    },
+
+    unhighlight: function (element) { // revert the change done by hightlight
+      $(element)
+        .closest('.form-group').removeClass('has-error'); // set error class to the control group
+    },
+
+    success: function (label) {
+      label
+        .addClass('valid') // mark the current input as valid and display OK icon
+        .closest('.form-group').removeClass('has-error'); // set success class to the control group
+    },
+    submitHandler: function (form) {
+      msbsuccess.show();
+      msberror.hide();
+      //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
+    }
+
+   });
+
+
index c010506..42629cc 100644 (file)
@@ -1,17 +1,20 @@
 /*
 /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
  *
  * Licensed 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
  *
  *
  * Licensed 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
+ *     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.
  *
  * 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.
+ *
+ *     Author: Zhaoxing Meng
+ *     email: meng.zhaoxing1@zte.com.cn
  */
 var routeUtil = {};
 
  */
 var routeUtil = {};
 
index ad5e744..5b0867c 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import org.junit.After;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.BeforeClass;\r
-import org.junit.Test;\r
-import org.openo.msb.api.ApiRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-\r
-public class ApiRouteServiceWrapperTest {\r
-    private static ApiRouteServiceWrapper apiRouteServiceWrapper;\r
-    \r
-    @BeforeClass\r
-    public static void setUpBeforeClass() throws Exception {\r
-        apiRouteServiceWrapper=ApiRouteServiceWrapper.getInstance();\r
-    }\r
-    \r
-    @Before\r
-    public void setUp() {\r
-        ApiRouteInfo apiRouteInfo=new ApiRouteInfo();\r
-        apiRouteInfo.setServiceName("testForJunit");\r
-        apiRouteInfo.setVersion("v1");\r
-        apiRouteInfo.setUrl("/api/test/v1");\r
-        RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};\r
-        apiRouteInfo.setServers(servers);\r
-        try {\r
-            apiRouteServiceWrapper.saveApiRouteInstance(apiRouteInfo, "");\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch (Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-        \r
-    }\r
-    \r
-    @After\r
-    public void tearDown() {        \r
-        try {\r
-            apiRouteServiceWrapper.deleteApiRoute("testForJunit", "v1", "*", "");      \r
-        } \r
-        catch(ExtendedInternalServerErrorException e){\r
-            \r
-        }catch (Exception e) {\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testGetAllApiRouteInstances(){\r
-        try {\r
-        ApiRouteInfo[] apiRouteInfoList=apiRouteServiceWrapper.getAllApiRouteInstances();\r
-        Assert.assertTrue(apiRouteInfoList.length >= 0);\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-            \r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetApiRouteInstance_not_exist(){\r
-        ApiRouteInfo apiRouteInfo = null;\r
-        try {\r
-           apiRouteInfo=apiRouteServiceWrapper.getApiRouteInstance("testForJunit", "v2");\r
-           Assert.assertNotNull(apiRouteInfo);\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-            \r
-        }\r
-        catch(ExtendedNotFoundException e){\r
-            Assert.assertNull(apiRouteInfo);\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetApiRouteInstance_exist(){\r
-        try {\r
-        ApiRouteInfo apiRouteInfo=apiRouteServiceWrapper.getApiRouteInstance("testForJunit", "v1");\r
-        Assert.assertNotNull(apiRouteInfo);\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-            \r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateApiRouteInstance(){\r
-        try {\r
-            \r
-            ApiRouteInfo apiRouteInfo=new ApiRouteInfo();\r
-            apiRouteInfo.setServiceName("testForJunit");\r
-            apiRouteInfo.setVersion("v1");\r
-            apiRouteInfo.setUrl("/api/test_update/v1");\r
-            RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};\r
-            apiRouteInfo.setServers(servers);\r
-            \r
-            ApiRouteInfo new_apiRouteInfo= apiRouteServiceWrapper.updateApiRouteInstance("testForJunit", "v1", apiRouteInfo, "");\r
-            Assert.assertEquals("/api/test_update/v1", new_apiRouteInfo.getUrl());\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-            \r
-        }\r
-        catch(Exception e){\r
-            Assert.assertEquals("Get Jedis from pool failed!",e.getMessage());\r
-            \r
-//            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateApiRouteStatus(){\r
-        try { \r
-            ApiRouteInfo new_apiRouteInfo= apiRouteServiceWrapper.updateApiRouteStatus("testForJunit", "v1", "0");\r
-            Assert.assertEquals("0",new_apiRouteInfo.getStatus());\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-            \r
-        }catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testGetApiGatewayPort(){\r
-        try { \r
-            String port= apiRouteServiceWrapper.getApiGatewayPort();\r
-            Assert.assertEquals("10080",port);\r
-        }catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-   \r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openo.msb.api.ApiRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+
+public class ApiRouteServiceWrapperTest {
+    private static ApiRouteServiceWrapper apiRouteServiceWrapper;
+    
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        apiRouteServiceWrapper=ApiRouteServiceWrapper.getInstance();
+    }
+    
+    @Before
+    public void setUp() {
+        ApiRouteInfo apiRouteInfo=new ApiRouteInfo();
+        apiRouteInfo.setServiceName("testForJunit");
+        apiRouteInfo.setVersion("v1");
+        apiRouteInfo.setUrl("/api/test/v1");
+        RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};
+        apiRouteInfo.setServers(servers);
+        try {
+            apiRouteServiceWrapper.saveApiRouteInstance(apiRouteInfo, "");
+        }
+        catch(ExtendedInternalServerErrorException e){
+        }
+        catch (Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+        
+    }
+    
+    @After
+    public void tearDown() {        
+        try {
+            apiRouteServiceWrapper.deleteApiRoute("testForJunit", "v1", "*", "");      
+        } 
+        catch(ExtendedInternalServerErrorException e){
+            
+        }catch (Exception e) {
+            Assert.fail("Exception" + e.getMessage());
+        }
+    }
+    
+    @Test
+    public void testGetAllApiRouteInstances(){
+        try {
+        ApiRouteInfo[] apiRouteInfoList=apiRouteServiceWrapper.getAllApiRouteInstances();
+        Assert.assertTrue(apiRouteInfoList.length >= 0);
+        }
+        catch(ExtendedInternalServerErrorException e){
+            
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testGetApiRouteInstance_not_exist(){
+        ApiRouteInfo apiRouteInfo = null;
+        try {
+           apiRouteInfo=apiRouteServiceWrapper.getApiRouteInstance("testForJunit", "v2");
+           Assert.assertNotNull(apiRouteInfo);
+        }
+        catch(ExtendedInternalServerErrorException e){
+            
+        }
+        catch(ExtendedNotFoundException e){
+            Assert.assertNull(apiRouteInfo);
+        }
+       
+    }
+    
+    @Test
+    public void testGetApiRouteInstance_exist(){
+        try {
+        ApiRouteInfo apiRouteInfo=apiRouteServiceWrapper.getApiRouteInstance("testForJunit", "v1");
+        Assert.assertNotNull(apiRouteInfo);
+        }
+        catch(ExtendedInternalServerErrorException e){
+            
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testUpdateApiRouteInstance(){
+        try {
+            
+            ApiRouteInfo apiRouteInfo=new ApiRouteInfo();
+            apiRouteInfo.setServiceName("testForJunit");
+            apiRouteInfo.setVersion("v1");
+            apiRouteInfo.setUrl("/api/test_update/v1");
+            RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};
+            apiRouteInfo.setServers(servers);
+            
+            ApiRouteInfo new_apiRouteInfo= apiRouteServiceWrapper.updateApiRouteInstance("testForJunit", "v1", apiRouteInfo, "");
+            Assert.assertEquals("/api/test_update/v1", new_apiRouteInfo.getUrl());
+        }
+        catch(ExtendedInternalServerErrorException e){
+            
+        }
+        catch(Exception e){
+            Assert.assertEquals("Get Jedis from pool failed!",e.getMessage());
+            
+//            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+    @Test
+    public void testUpdateApiRouteStatus(){
+        try { 
+            ApiRouteInfo new_apiRouteInfo= apiRouteServiceWrapper.updateApiRouteStatus("testForJunit", "v1", "0");
+            Assert.assertEquals("0",new_apiRouteInfo.getStatus());
+        }
+        catch(ExtendedInternalServerErrorException e){
+            
+        }catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+    @Test
+    public void testGetApiGatewayPort(){
+        try { 
+            String port= apiRouteServiceWrapper.getApiGatewayPort();
+            Assert.assertEquals("10080",port);
+        }catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+   
+    
+}
index 0bbcd25..09935a0 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import org.junit.After;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.BeforeClass;\r
-import org.junit.Test;\r
-import org.openo.msb.api.CustomRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-\r
-public class CustomRouteServiceWrapperTest {\r
-\r
-  private static CustomRouteServiceWrapper customRouteServiceWrapper;\r
-    \r
-    @BeforeClass\r
-    public static void setUpBeforeClass() throws Exception {\r
-        customRouteServiceWrapper=CustomRouteServiceWrapper.getInstance();\r
-    }\r
-    \r
-    @Before\r
-    public void setUp() {\r
-        CustomRouteInfo customRouteInfo=new CustomRouteInfo();\r
-        customRouteInfo.setServiceName("/testForJunit");\r
-        customRouteInfo.setUrl("/test");\r
-        RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};\r
-        customRouteInfo.setServers(servers);\r
-        try {\r
-            customRouteServiceWrapper.saveCustomRouteInstance(customRouteInfo,"");\r
-        }\r
-        catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-        \r
-    }\r
-    \r
-    @After\r
-    public void tearDown() {        \r
-        try {\r
-            customRouteServiceWrapper.deleteCustomRoute("/testForJunit", "*","");      \r
-        } \r
-        catch(ExtendedInternalServerErrorException e){\r
-        }catch (Exception e) {\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testGetAllCustomRouteInstances(){\r
-        try {\r
-            CustomRouteInfo[] customRouteInfoList=customRouteServiceWrapper.getAllCustomRouteInstances();\r
-            Assert.assertTrue(customRouteInfoList.length >= 0);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetCustomRouteInstance_not_exist(){\r
-        CustomRouteInfo customRouteInfo = null;\r
-        try {\r
-            customRouteInfo=customRouteServiceWrapper.getCustomRouteInstance("/testForJunit2");\r
-            Assert.assertNotNull(customRouteInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(ExtendedNotFoundException e){\r
-            Assert.assertNull(customRouteInfo);\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetCustomRouteInstance_exist(){\r
-        try {\r
-            CustomRouteInfo customRouteInfo=customRouteServiceWrapper.getCustomRouteInstance("/testForJunit");\r
-            Assert.assertNotNull(customRouteInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateCustomRouteInstance(){\r
-        try {\r
-            \r
-            CustomRouteInfo customRouteInfo=new CustomRouteInfo();\r
-            customRouteInfo.setServiceName("/testForJunit");\r
-            customRouteInfo.setUrl("/test_update");\r
-            RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};\r
-            customRouteInfo.setServers(servers);\r
-            \r
-            CustomRouteInfo new_customRouteInfo= customRouteServiceWrapper.updateCustomRouteInstance("/testForJunit", customRouteInfo,"");\r
-            Assert.assertEquals("/test_update", new_customRouteInfo.getUrl());\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateCustomRouteStatus(){\r
-        try { \r
-            CustomRouteInfo new_CustomRouteInfo= customRouteServiceWrapper.updateCustomRouteStatus("/testForJunit", "0");\r
-            Assert.assertEquals("0",new_CustomRouteInfo.getStatus());\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openo.msb.api.CustomRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+
+public class CustomRouteServiceWrapperTest {
+
+  private static CustomRouteServiceWrapper customRouteServiceWrapper;
+    
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        customRouteServiceWrapper=CustomRouteServiceWrapper.getInstance();
+    }
+    
+    @Before
+    public void setUp() {
+        CustomRouteInfo customRouteInfo=new CustomRouteInfo();
+        customRouteInfo.setServiceName("/testForJunit");
+        customRouteInfo.setUrl("/test");
+        RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};
+        customRouteInfo.setServers(servers);
+        try {
+            customRouteServiceWrapper.saveCustomRouteInstance(customRouteInfo,"");
+        }
+        catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+        
+    }
+    
+    @After
+    public void tearDown() {        
+        try {
+            customRouteServiceWrapper.deleteCustomRoute("/testForJunit", "*","");      
+        } 
+        catch(ExtendedInternalServerErrorException e){
+        }catch (Exception e) {
+            Assert.fail("Exception" + e.getMessage());
+        }
+    }
+    
+    @Test
+    public void testGetAllCustomRouteInstances(){
+        try {
+            CustomRouteInfo[] customRouteInfoList=customRouteServiceWrapper.getAllCustomRouteInstances();
+            Assert.assertTrue(customRouteInfoList.length >= 0);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testGetCustomRouteInstance_not_exist(){
+        CustomRouteInfo customRouteInfo = null;
+        try {
+            customRouteInfo=customRouteServiceWrapper.getCustomRouteInstance("/testForJunit2");
+            Assert.assertNotNull(customRouteInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(ExtendedNotFoundException e){
+            Assert.assertNull(customRouteInfo);
+        }
+       
+    }
+    
+    @Test
+    public void testGetCustomRouteInstance_exist(){
+        try {
+            CustomRouteInfo customRouteInfo=customRouteServiceWrapper.getCustomRouteInstance("/testForJunit");
+            Assert.assertNotNull(customRouteInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testUpdateCustomRouteInstance(){
+        try {
+            
+            CustomRouteInfo customRouteInfo=new CustomRouteInfo();
+            customRouteInfo.setServiceName("/testForJunit");
+            customRouteInfo.setUrl("/test_update");
+            RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};
+            customRouteInfo.setServers(servers);
+            
+            CustomRouteInfo new_customRouteInfo= customRouteServiceWrapper.updateCustomRouteInstance("/testForJunit", customRouteInfo,"");
+            Assert.assertEquals("/test_update", new_customRouteInfo.getUrl());
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+    @Test
+    public void testUpdateCustomRouteStatus(){
+        try { 
+            CustomRouteInfo new_CustomRouteInfo= customRouteServiceWrapper.updateCustomRouteStatus("/testForJunit", "0");
+            Assert.assertEquals("0",new_CustomRouteInfo.getStatus());
+        }catch(ExtendedInternalServerErrorException e){
+        }catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+}
index a1d561a..33dc01c 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import org.junit.After;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.BeforeClass;\r
-import org.junit.Test;\r
-import org.openo.msb.api.IuiRouteInfo;\r
-import org.openo.msb.api.RouteServer;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-\r
-public class IuiRouteServiceWrapperTest {\r
-    private static IuiRouteServiceWrapper iuiRouteServiceWrapper;\r
-    \r
-    @BeforeClass\r
-    public static void setUpBeforeClass() throws Exception {\r
-        iuiRouteServiceWrapper=IuiRouteServiceWrapper.getInstance();\r
-    }\r
-    \r
-    @Before\r
-    public void setUp() {\r
-        IuiRouteInfo iuiRouteInfo=new IuiRouteInfo();\r
-        iuiRouteInfo.setServiceName("testForJunit");\r
-        iuiRouteInfo.setUrl("/iui/test");\r
-        RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};\r
-        iuiRouteInfo.setServers(servers);\r
-        try {\r
-            iuiRouteServiceWrapper.saveIuiRouteInstance(iuiRouteInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-        \r
-    }\r
-    \r
-    @After\r
-    public void tearDown() {        \r
-        try {\r
-            iuiRouteServiceWrapper.deleteIuiRoute("testForJunit", "*");      \r
-        }catch(ExtendedInternalServerErrorException e){\r
-        } catch (Exception e) {\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testGetAllIuiRouteInstances(){\r
-        try {\r
-            IuiRouteInfo[] iuiRouteInfoList=iuiRouteServiceWrapper.getAllIuiRouteInstances();\r
-            Assert.assertTrue(iuiRouteInfoList.length >= 0);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetIuiRouteInstance_not_exist(){\r
-        IuiRouteInfo iuiRouteInfo = null;\r
-        try {\r
-            iuiRouteInfo=iuiRouteServiceWrapper.getIuiRouteInstance("testForJunit2");\r
-            Assert.assertNotNull(iuiRouteInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(ExtendedNotFoundException e){\r
-            Assert.assertNull(iuiRouteInfo);\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetIuiRouteInstance_exist(){\r
-        try {\r
-            IuiRouteInfo iuiRouteInfo=iuiRouteServiceWrapper.getIuiRouteInstance("testForJunit");\r
-            Assert.assertNotNull(iuiRouteInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateIuiRouteInstance(){\r
-        try {\r
-            \r
-            IuiRouteInfo iuiRouteInfo=new IuiRouteInfo();\r
-            iuiRouteInfo.setServiceName("testForJunit");\r
-            iuiRouteInfo.setUrl("/iui/test_update");\r
-            RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};\r
-            iuiRouteInfo.setServers(servers);\r
-            \r
-            IuiRouteInfo new_iuiRouteInfo= iuiRouteServiceWrapper.updateIuiRouteInstance("testForJunit", iuiRouteInfo);\r
-            Assert.assertEquals("/iui/test_update", new_iuiRouteInfo.getUrl());\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateIuiRouteStatus(){\r
-        try { \r
-            IuiRouteInfo new_iuiRouteInfo= iuiRouteServiceWrapper.updateIuiRouteStatus("testForJunit", "0");\r
-            Assert.assertEquals("0",new_iuiRouteInfo.getStatus());\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-   \r
-    \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openo.msb.api.IuiRouteInfo;
+import org.openo.msb.api.RouteServer;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+
+public class IuiRouteServiceWrapperTest {
+    private static IuiRouteServiceWrapper iuiRouteServiceWrapper;
+    
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        iuiRouteServiceWrapper=IuiRouteServiceWrapper.getInstance();
+    }
+    
+    @Before
+    public void setUp() {
+        IuiRouteInfo iuiRouteInfo=new IuiRouteInfo();
+        iuiRouteInfo.setServiceName("testForJunit");
+        iuiRouteInfo.setUrl("/iui/test");
+        RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};
+        iuiRouteInfo.setServers(servers);
+        try {
+            iuiRouteServiceWrapper.saveIuiRouteInstance(iuiRouteInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+        
+    }
+    
+    @After
+    public void tearDown() {        
+        try {
+            iuiRouteServiceWrapper.deleteIuiRoute("testForJunit", "*");      
+        }catch(ExtendedInternalServerErrorException e){
+        } catch (Exception e) {
+            Assert.fail("Exception" + e.getMessage());
+        }
+    }
+    
+    @Test
+    public void testGetAllIuiRouteInstances(){
+        try {
+            IuiRouteInfo[] iuiRouteInfoList=iuiRouteServiceWrapper.getAllIuiRouteInstances();
+            Assert.assertTrue(iuiRouteInfoList.length >= 0);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testGetIuiRouteInstance_not_exist(){
+        IuiRouteInfo iuiRouteInfo = null;
+        try {
+            iuiRouteInfo=iuiRouteServiceWrapper.getIuiRouteInstance("testForJunit2");
+            Assert.assertNotNull(iuiRouteInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(ExtendedNotFoundException e){
+            Assert.assertNull(iuiRouteInfo);
+        }
+       
+    }
+    
+    @Test
+    public void testGetIuiRouteInstance_exist(){
+        try {
+            IuiRouteInfo iuiRouteInfo=iuiRouteServiceWrapper.getIuiRouteInstance("testForJunit");
+            Assert.assertNotNull(iuiRouteInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testUpdateIuiRouteInstance(){
+        try {
+            
+            IuiRouteInfo iuiRouteInfo=new IuiRouteInfo();
+            iuiRouteInfo.setServiceName("testForJunit");
+            iuiRouteInfo.setUrl("/iui/test_update");
+            RouteServer[] servers=new RouteServer[]{new RouteServer("127.0.0.1","80")};
+            iuiRouteInfo.setServers(servers);
+            
+            IuiRouteInfo new_iuiRouteInfo= iuiRouteServiceWrapper.updateIuiRouteInstance("testForJunit", iuiRouteInfo);
+            Assert.assertEquals("/iui/test_update", new_iuiRouteInfo.getUrl());
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+    @Test
+    public void testUpdateIuiRouteStatus(){
+        try { 
+            IuiRouteInfo new_iuiRouteInfo= iuiRouteServiceWrapper.updateIuiRouteStatus("testForJunit", "0");
+            Assert.assertEquals("0",new_iuiRouteInfo.getStatus());
+        }catch(ExtendedInternalServerErrorException e){
+        }catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+   
+    
+}
index 3b05960..3832bd0 100644 (file)
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper;\r
-\r
-import java.util.HashSet;\r
-import java.util.Set;\r
-\r
-import org.junit.After;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.BeforeClass;\r
-import org.junit.Test;\r
-import org.openo.msb.api.MicroServiceFullInfo;\r
-import org.openo.msb.api.MicroServiceInfo;\r
-import org.openo.msb.api.Node;\r
-import org.openo.msb.api.exception.ExtendedInternalServerErrorException;\r
-import org.openo.msb.api.exception.ExtendedNotFoundException;\r
-\r
-public class MicroServiceWrapperTest {\r
- private static MicroServiceWrapper microServiceWrapper;\r
-    \r
-    @BeforeClass\r
-    public static void setUpBeforeClass() throws Exception {\r
-        microServiceWrapper=microServiceWrapper.getInstance();\r
-    }\r
-    \r
-    @Before\r
-    public void setUp() {\r
-        MicroServiceInfo microServiceInfo=new MicroServiceInfo();\r
-        microServiceInfo.setServiceName("testForJunit");\r
-        microServiceInfo.setVersion("v1");\r
-        microServiceInfo.setUrl("/api/test/v1");\r
-        microServiceInfo.setProtocol("REST");\r
-        microServiceInfo.setVisualRange("0");\r
-        Set<Node> nodes=new HashSet<Node>();\r
-        nodes.add(new Node("127.0.0.1","8080",0));\r
-        microServiceInfo.setNodes(nodes);\r
-        try {\r
-            microServiceWrapper.saveMicroServiceInstance(microServiceInfo,true,"","");\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-        \r
-    }\r
-    \r
-    @After\r
-    public void tearDown() {        \r
-        try {\r
-            microServiceWrapper.deleteMicroService("testForJunit", "v1", "");      \r
-        }catch(ExtendedInternalServerErrorException e){\r
-        } catch (Exception e) {\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testGetAllMicroServiceInstances(){\r
-        try {\r
-         MicroServiceFullInfo[] MicroServiceInfoList=microServiceWrapper.getAllMicroServiceInstances();\r
-        Assert.assertTrue(MicroServiceInfoList.length >= 0);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetMicroServiceInstance_not_exist(){\r
-        MicroServiceFullInfo microServiceInfo = null;\r
-        try {\r
-           microServiceInfo=microServiceWrapper.getMicroServiceInstance("testForJunit", "v2","");\r
-           Assert.assertNotNull(microServiceInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(ExtendedNotFoundException e){\r
-            Assert.assertNull(microServiceInfo);\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testGetMicroServiceInstance_exist(){\r
-        try {\r
-        MicroServiceFullInfo microServiceInfo=microServiceWrapper.getMicroServiceInstance("testForJunit", "v1","");\r
-        Assert.assertNotNull(microServiceInfo);\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-       \r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateMicroServiceInstance(){\r
-        try {\r
-            \r
-            MicroServiceInfo microServiceInfo=new MicroServiceInfo();\r
-            microServiceInfo.setServiceName("testForJunit");\r
-            microServiceInfo.setVersion("v1");\r
-            microServiceInfo.setUrl("/api/test2/v1");\r
-            microServiceInfo.setProtocol("REST");\r
-            microServiceInfo.setVisualRange("0");\r
-            Set<Node> nodes=new HashSet<Node>();\r
-            nodes.add(new Node("127.0.0.1","8080",0));\r
-            microServiceInfo.setNodes(nodes);\r
-            \r
-            MicroServiceFullInfo new_MicroServiceInfo= microServiceWrapper.updateMicroServiceInstance("testForJunit", "v1", microServiceInfo);\r
-            Assert.assertEquals("/api/test2/v1", new_MicroServiceInfo.getUrl());\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testUpdateMicroServiceStatus(){\r
-        try { \r
-            MicroServiceFullInfo new_MicroServiceInfo= microServiceWrapper.updateMicroServiceStatus("testForJunit", "v1", "0");\r
-            Assert.assertEquals("0",new_MicroServiceInfo.getStatus());\r
-        }catch(ExtendedInternalServerErrorException e){\r
-        }catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        \r
-        }\r
-    }\r
-    \r
-   \r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openo.msb.api.MicroServiceFullInfo;
+import org.openo.msb.api.MicroServiceInfo;
+import org.openo.msb.api.Node;
+import org.openo.msb.api.exception.ExtendedInternalServerErrorException;
+import org.openo.msb.api.exception.ExtendedNotFoundException;
+
+public class MicroServiceWrapperTest {
+ private static MicroServiceWrapper microServiceWrapper;
+    
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        microServiceWrapper=microServiceWrapper.getInstance();
+    }
+    
+    @Before
+    public void setUp() {
+        MicroServiceInfo microServiceInfo=new MicroServiceInfo();
+        microServiceInfo.setServiceName("testForJunit");
+        microServiceInfo.setVersion("v1");
+        microServiceInfo.setUrl("/api/test/v1");
+        microServiceInfo.setProtocol("REST");
+        microServiceInfo.setVisualRange("0");
+        Set<Node> nodes=new HashSet<Node>();
+        nodes.add(new Node("127.0.0.1","8080",0));
+        microServiceInfo.setNodes(nodes);
+        try {
+            microServiceWrapper.saveMicroServiceInstance(microServiceInfo,true,"","");
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+        
+    }
+    
+    @After
+    public void tearDown() {        
+        try {
+            microServiceWrapper.deleteMicroService("testForJunit", "v1", "");      
+        }catch(ExtendedInternalServerErrorException e){
+        } catch (Exception e) {
+            Assert.fail("Exception" + e.getMessage());
+        }
+    }
+    
+    @Test
+    public void testGetAllMicroServiceInstances(){
+        try {
+         MicroServiceFullInfo[] MicroServiceInfoList=microServiceWrapper.getAllMicroServiceInstances();
+        Assert.assertTrue(MicroServiceInfoList.length >= 0);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testGetMicroServiceInstance_not_exist(){
+        MicroServiceFullInfo microServiceInfo = null;
+        try {
+           microServiceInfo=microServiceWrapper.getMicroServiceInstance("testForJunit", "v2","");
+           Assert.assertNotNull(microServiceInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(ExtendedNotFoundException e){
+            Assert.assertNull(microServiceInfo);
+        }
+       
+    }
+    
+    @Test
+    public void testGetMicroServiceInstance_exist(){
+        try {
+        MicroServiceFullInfo microServiceInfo=microServiceWrapper.getMicroServiceInstance("testForJunit", "v1","");
+        Assert.assertNotNull(microServiceInfo);
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+       
+    }
+    
+    @Test
+    public void testUpdateMicroServiceInstance(){
+        try {
+            
+            MicroServiceInfo microServiceInfo=new MicroServiceInfo();
+            microServiceInfo.setServiceName("testForJunit");
+            microServiceInfo.setVersion("v1");
+            microServiceInfo.setUrl("/api/test2/v1");
+            microServiceInfo.setProtocol("REST");
+            microServiceInfo.setVisualRange("0");
+            Set<Node> nodes=new HashSet<Node>();
+            nodes.add(new Node("127.0.0.1","8080",0));
+            microServiceInfo.setNodes(nodes);
+            
+            MicroServiceFullInfo new_MicroServiceInfo= microServiceWrapper.updateMicroServiceInstance("testForJunit", "v1", microServiceInfo);
+            Assert.assertEquals("/api/test2/v1", new_MicroServiceInfo.getUrl());
+        }catch(ExtendedInternalServerErrorException e){
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+    @Test
+    public void testUpdateMicroServiceStatus(){
+        try { 
+            MicroServiceFullInfo new_MicroServiceInfo= microServiceWrapper.updateMicroServiceStatus("testForJunit", "v1", "0");
+            Assert.assertEquals("0",new_MicroServiceInfo.getStatus());
+        }catch(ExtendedInternalServerErrorException e){
+        }catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        
+        }
+    }
+    
+   
+}
index d2c383d..255cc77 100644 (file)
@@ -1,48 +1,48 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper.util;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openo.msb.api.RouteServer;\r
-\r
-\r
-public class JacksonJsonUtilTest {\r
-    @Test\r
-    public void testBeanToJson(){\r
-        try{\r
-            RouteServer server=new RouteServer("127.0.0.1","80");\r
-            String json=JacksonJsonUtil.beanToJson(server);\r
-            Assert.assertEquals("{\"ip\":\"127.0.0.1\",\"port\":\"80\",\"weight\":0}",json);\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-    }\r
-    \r
-    @Test\r
-    public void testJsonToBean(){\r
-        try{\r
-            String json="{\"ip\":\"127.0.0.1\",\"port\":\"80\",\"weight\":0}";\r
-            RouteServer server=(RouteServer) JacksonJsonUtil.jsonToBean(json, RouteServer.class);\r
-            Assert.assertEquals("127.0.0.1",server.getIp());\r
-            Assert.assertEquals("80",server.getPort());\r
-        }\r
-        catch(Exception e){\r
-            Assert.fail("Exception" + e.getMessage());\r
-        }\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openo.msb.api.RouteServer;
+
+
+public class JacksonJsonUtilTest {
+    @Test
+    public void testBeanToJson(){
+        try{
+            RouteServer server=new RouteServer("127.0.0.1","80");
+            String json=JacksonJsonUtil.beanToJson(server);
+            Assert.assertEquals("{\"ip\":\"127.0.0.1\",\"port\":\"80\",\"weight\":0}",json);
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+    }
+    
+    @Test
+    public void testJsonToBean(){
+        try{
+            String json="{\"ip\":\"127.0.0.1\",\"port\":\"80\",\"weight\":0}";
+            RouteServer server=(RouteServer) JacksonJsonUtil.jsonToBean(json, RouteServer.class);
+            Assert.assertEquals("127.0.0.1",server.getIp());
+            Assert.assertEquals("80",server.getPort());
+        }
+        catch(Exception e){
+            Assert.fail("Exception" + e.getMessage());
+        }
+    }
+}
index f53da23..c744026 100644 (file)
@@ -1,86 +1,86 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper.util;\r
-\r
-import org.junit.Assert;\r
-\r
-import org.junit.Test;\r
-\r
-public class RegExpTestUtilTest {\r
-\r
-    @Test\r
-    public void testHostRegExpTest(){\r
-        boolean result=RegExpTestUtil.hostRegExpTest("127.0.0.1:8080");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.hostRegExpTest("0.0.0.1:89");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-    \r
-    @Test\r
-    public void testIpRegExpTest(){\r
-        boolean result=RegExpTestUtil.ipRegExpTest("127.0.0.1");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.ipRegExpTest("127.0.0.1.5");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-    \r
-    @Test\r
-    public void testPortRegExpTest(){\r
-        boolean result=RegExpTestUtil.portRegExpTest("80");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.portRegExpTest("898989");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-    \r
-    @Test\r
-    public void testVersionRegExpTest(){\r
-        boolean result=RegExpTestUtil.versionRegExpTest("v1");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.versionRegExpTest("23");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-    \r
-    @Test\r
-    public void testurlRegExpTest(){\r
-        boolean result=RegExpTestUtil.urlRegExpTest("/test");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.urlRegExpTest("test");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-    \r
-    @Test\r
-    public void testapiRouteUrlRegExpTest(){\r
-        boolean result=RegExpTestUtil.apiRouteUrlRegExpTest("/api/test/v1");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.apiRouteUrlRegExpTest("/test");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-    \r
-    @Test\r
-    public void testiuiRouteUrlRegExpTest(){\r
-        boolean result=RegExpTestUtil.iuiRouteUrlRegExpTest("/iui/test");\r
-        Assert.assertTrue(result);\r
-        \r
-        boolean err_result=RegExpTestUtil.iuiRouteUrlRegExpTest("/test");\r
-        Assert.assertFalse(err_result);\r
-    }\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import org.junit.Assert;
+
+import org.junit.Test;
+
+public class RegExpTestUtilTest {
+
+    @Test
+    public void testHostRegExpTest(){
+        boolean result=RegExpTestUtil.hostRegExpTest("127.0.0.1:8080");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.hostRegExpTest("0.0.0.1:89");
+        Assert.assertFalse(err_result);
+    }
+    
+    @Test
+    public void testIpRegExpTest(){
+        boolean result=RegExpTestUtil.ipRegExpTest("127.0.0.1");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.ipRegExpTest("127.0.0.1.5");
+        Assert.assertFalse(err_result);
+    }
+    
+    @Test
+    public void testPortRegExpTest(){
+        boolean result=RegExpTestUtil.portRegExpTest("80");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.portRegExpTest("898989");
+        Assert.assertFalse(err_result);
+    }
+    
+    @Test
+    public void testVersionRegExpTest(){
+        boolean result=RegExpTestUtil.versionRegExpTest("v1");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.versionRegExpTest("23");
+        Assert.assertFalse(err_result);
+    }
+    
+    @Test
+    public void testurlRegExpTest(){
+        boolean result=RegExpTestUtil.urlRegExpTest("/test");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.urlRegExpTest("test");
+        Assert.assertFalse(err_result);
+    }
+    
+    @Test
+    public void testapiRouteUrlRegExpTest(){
+        boolean result=RegExpTestUtil.apiRouteUrlRegExpTest("/api/test/v1");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.apiRouteUrlRegExpTest("/test");
+        Assert.assertFalse(err_result);
+    }
+    
+    @Test
+    public void testiuiRouteUrlRegExpTest(){
+        boolean result=RegExpTestUtil.iuiRouteUrlRegExpTest("/iui/test");
+        Assert.assertTrue(result);
+        
+        boolean err_result=RegExpTestUtil.iuiRouteUrlRegExpTest("/test");
+        Assert.assertFalse(err_result);
+    }
+}
index 0cb4d48..af5c28b 100644 (file)
@@ -1,64 +1,64 @@
-/**\r
- * Copyright 2016 ZTE, Inc. and others.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.openo.msb.wrapper.util;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-\r
-public class RouteUtilTest {\r
-    \r
-    @Test\r
-    public void testGetPrefixedKey(){\r
-        String path=RouteUtil.getPrefixedKey("","test","v1");\r
-        Assert.assertEquals("msb:routing:test:v1",path);\r
-    }\r
-    \r
-    @Test\r
-    public void testConcat(){\r
-        Object[] str1=new String[]{"test1","test2"}; \r
-        Object[] str2=new String[]{"test3"}; \r
-        Object[] str3=RouteUtil.concat(str1, str2);\r
-        \r
-        Assert.assertEquals(3,str3.length);\r
-    }\r
-    \r
-    @Test\r
-    public void testContainStr(){\r
-        String value="1";\r
-        String array[]={"1","2"};\r
-        boolean result=RouteUtil.contain(array, value);\r
-        Assert.assertTrue(result);\r
-    }\r
-    \r
-    @Test\r
-    public void testContainArray(){\r
-        String value[]={"0"};\r
-        String array[]={"1","2"};\r
-        boolean result=RouteUtil.contain(array, value);\r
-        Assert.assertFalse(result);\r
-        \r
-    }\r
-    \r
-    @Test\r
-    public void testShow(){\r
-        String array[]={"1","2"};\r
-        String result=RouteUtil.show(array);\r
-        Assert.assertEquals("1|2",result);\r
-        \r
-    }\r
-\r
-}\r
+/**
+ * Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+ *
+ * Licensed 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.
+ */
+package org.openo.msb.wrapper.util;
+
+import org.apache.commons.lang3.StringUtils;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class RouteUtilTest {
+    
+    @Test
+    public void testGetPrefixedKey(){
+        String path=RouteUtil.getPrefixedKey("","test","v1");
+        Assert.assertEquals("msb:routing:test:v1",path);
+    }
+    
+    @Test
+    public void testConcat(){
+        Object[] str1=new String[]{"test1","test2"}; 
+        Object[] str2=new String[]{"test3"}; 
+        Object[] str3=RouteUtil.concat(str1, str2);
+        
+        Assert.assertEquals(3,str3.length);
+    }
+    
+    @Test
+    public void testContainStr(){
+        String value="1";
+        String array[]={"1","2"};
+        boolean result=RouteUtil.contain(array, value);
+        Assert.assertTrue(result);
+    }
+    
+    @Test
+    public void testContainArray(){
+        String value[]={"0"};
+        String array[]={"1","2"};
+        boolean result=RouteUtil.contain(array, value);
+        Assert.assertFalse(result);
+        
+    }
+    
+    @Test
+    public void testShow(){
+        String array[]={"1","2"};
+        String result=RouteUtil.show(array);
+        Assert.assertEquals("1|2",result);
+        
+    }
+
+}
index eaf892d..fcda376 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
index f885a95..ab92b2f 100644 (file)
@@ -1,13 +1,33 @@
-<service>\r
-  <id>msb_apiroute</id>\r
-  <name>msb_apiroute</name>\r
-  <description>This service runs apiroute.</description>\r
-  <workingdirectory>%BASE%</workingdirectory>\r
-  <env name="JAVA_HOME" value="c:\jdk"/>\r
-  <env name="RUNHOME" value="%BASE%"/>\r
-  <executable>java</executable>\r
-  <arguments>-jar "apiroute-service.jar" server "conf/apiroute.yml"</arguments>\r
-  <stopexecutable>stop.bat</stopexecutable>\r
-  <logmode>rotate</logmode>\r
-  <!-- stopparentprocessfirst>true</stopparentprocessfirst -->\r
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<service>
+  <id>msb_apiroute</id>
+  <name>msb_apiroute</name>
+  <description>This service runs apiroute.</description>
+  <workingdirectory>%BASE%</workingdirectory>
+  <env name="JAVA_HOME" value="c:\jdk"/>
+  <env name="RUNHOME" value="%BASE%"/>
+  <executable>java</executable>
+  <arguments>-jar "apiroute-service.jar" server "conf/apiroute.yml"</arguments>
+  <stopexecutable>stop.bat</stopexecutable>
+  <logmode>rotate</logmode>
+  <!-- stopparentprocessfirst>true</stopparentprocessfirst -->
 </service>
\ No newline at end of file
 </service>
\ No newline at end of file
index 172fae3..4fe697d 100644 (file)
@@ -1,52 +1,71 @@
-defaultWorkspace: ../apiroute-works\r
-\r
-defaultName: ${DW_DEFAULT_NAME:-Stranger}\r
-\r
-propertiesName: redis.properties\r
-propertiesDir: conf\r
-\r
-# use the discover config if you want to monitor a discover service and register microservices change\r
-discoverInfo:\r
-   ip: 127.0.0.1\r
-   port: 10081\r
-   enabled: false\r
-\r
-consulInfo:\r
-   ip: 127.0.0.1\r
-   port: 8500\r
\r
-# use the simple server factory if you only want to run on a single port\r
-server:\r
-  type: simple\r
-  rootPath: '/api/microservices/v1/*'\r
-  applicationContextPath: /\r
-  adminContextPath: /admin\r
-  connector:\r
-    type: http\r
-    port: 8086\r
-\r
-# Logging settings.\r
-logging:\r
-\r
-  # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.\r
-  level: ALL\r
-\r
-  # Logger-specific levels.\r
-  loggers:\r
-\r
-    # Sets the level for 'com.example.app' to DEBUG.\r
-    com.example: DEBUG\r
-\r
-  appenders:\r
-    - type: console\r
-      threshold: INFO\r
-      timeZone: UTC\r
-      logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"\r
-    - type: file\r
-      threshold: INFO\r
-      logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"\r
-      currentLogFilename: ../apiroute-works/logs/application.log\r
-      archivedLogFilenamePattern: ../apiroute-works/logs/application-%d{yyyy-MM-dd}-%i.log.gz\r
-      archivedFileCount: 7\r
-      timeZone: UTC\r
-\r
+#
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+#
+# Licensed 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.
+#
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
+defaultWorkspace: ../apiroute-works
+
+defaultName: ${DW_DEFAULT_NAME:-Stranger}
+
+propertiesName: redis.properties
+propertiesDir: conf
+
+# use the discover config if you want to monitor a discover service and register microservices change
+discoverInfo:
+   ip: 127.0.0.1
+   port: 10081
+   enabled: false
+
+consulInfo:
+   ip: 127.0.0.1
+   port: 8500
+# use the simple server factory if you only want to run on a single port
+server:
+  type: simple
+  rootPath: '/api/microservices/v1/*'
+  applicationContextPath: /
+  adminContextPath: /admin
+  connector:
+    type: http
+    port: 8086
+
+# Logging settings.
+logging:
+
+  # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
+  level: ALL
+
+  # Logger-specific levels.
+  loggers:
+
+    # Sets the level for 'com.example.app' to DEBUG.
+    com.example: DEBUG
+
+  appenders:
+    - type: console
+      threshold: INFO
+      timeZone: UTC
+      logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"
+    - type: file
+      threshold: INFO
+      logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"
+      currentLogFilename: ../apiroute-works/logs/application.log
+      archivedLogFilenamePattern: ../apiroute-works/logs/application-%d{yyyy-MM-dd}-%i.log.gz
+      archivedFileCount: 7
+      timeZone: UTC
+
index e493556..7c0ec0d 100644 (file)
@@ -1,29 +1,29 @@
-[{\r
-               "serviceName" : "microservices",\r
-               "version" : "v1",\r
-               "url" : "/api/microservices/v1",\r
-               "apiJson" : "/api/microservices/v1/swagger.json",\r
-               "apiJsonType" : "1",\r
-               "metricsUrl" : "/admin/metrics",\r
-               "control" : "1",\r
-               "status" : "1",\r
-               "servers" : [{\r
-                               "ip" : "127.0.0.1",\r
-                               "port" : "8086",\r
-                               "weight" : 0\r
-                       }\r
-               ]\r
-       },\r
-{\r
-               "serviceName" : "microservices",\r
-               "url" : "/iui/microservices",\r
-               "control" : "1",\r
-               "status" : "1",\r
-               "servers" : [{\r
-                               "ip" : "127.0.0.1",\r
-                               "port" : "8086",\r
-                               "weight" : 0\r
-                       }\r
-               ]\r
-       }\r
-]\r
+[{
+               "serviceName" : "microservices",
+               "version" : "v1",
+               "url" : "/api/microservices/v1",
+               "apiJson" : "/api/microservices/v1/swagger.json",
+               "apiJsonType" : "1",
+               "metricsUrl" : "/admin/metrics",
+               "control" : "1",
+               "status" : "1",
+               "servers" : [{
+                               "ip" : "127.0.0.1",
+                               "port" : "8086",
+                               "weight" : 0
+                       }
+               ]
+       },
+{
+               "serviceName" : "microservices",
+               "url" : "/iui/microservices",
+               "control" : "1",
+               "status" : "1",
+               "servers" : [{
+                               "ip" : "127.0.0.1",
+                               "port" : "8086",
+                               "weight" : 0
+                       }
+               ]
+       }
+]
index 59ef5e4..2df5d10 100644 (file)
@@ -1,63 +1,82 @@
-########################## initialize default routeInfo to redis ##########################\r
-\r
-#when msb is starting, it will automatically read all json files under this folder, and initializes to redis. \r
-#If the routeInfo is exist, it will be ignored, otherwise it will be saved.\r
-\r
-\r
-# JSON File content must be routeInfo format array like below examples:\r
-\r
-#  optional:\r
-#  apiJsonType: 1:user-defined json type    0:pre-defined json type\r
-#  control:   0:default   1:readonly  2:hidden\r
-#  status:    0:disabled   1:enabled  \r
-#  Tip£ºcontrol¡¢status¡¢weight are  non-mandatory \r
-\r
-[\r
-##########################apiRoute example##########################\r
-\r
-{\r
-               "serviceName" : "microservices",\r
-               "version" : "v1",\r
-               "url" : "/api/microservices/v1",\r
-               "apiJson" : "/api/microservices/v1/swagger.json",\r
-               "apiJsonType" : "1",\r
-               "metricsUrl" : "/admin/metrics",\r
-               "control" : "1",\r
-               "status" : "1",\r
-               "servers" : [{\r
-                               "ip" : "127.0.0.1",\r
-                               "port" : "8086",\r
-                               "weight" : 0\r
-                       }\r
-               ]\r
-       },\r
-       \r
-##########################iuiRoute example##########################\r
-       \r
-{\r
-               "serviceName" : "microservices",\r
-               "url" : "/iui/microservices",\r
-               "control" : "1",\r
-               "status" : "1",\r
-               "servers" : [{\r
-                               "ip" : "127.0.0.1",\r
-                               "port" : "8086",\r
-                               "weight" : 0\r
-                       }\r
-               ]\r
-       },\r
-       \r
-##########################customRoute example##########################        \r
-       {\r
-               "serviceName" : "/test",\r
-               "url" : "/test",\r
-               "control" : "0",\r
-               "status" : "1",\r
-               "servers" : [{\r
-                               "ip" : "10.74.56.36",\r
-                               "port" : "8989",\r
-                               "weight" : 0\r
-                       }\r
-               ]\r
-       }\r
+====
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+====
+
+########################## initialize default routeInfo to redis ##########################
+
+#when msb is starting, it will automatically read all json files under this folder, and initializes to redis. 
+#If the routeInfo is exist, it will be ignored, otherwise it will be saved.
+
+
+# JSON File content must be routeInfo format array like below examples:
+
+#  optional:
+#  apiJsonType: 1:user-defined json type    0:pre-defined json type
+#  control:   0:default   1:readonly  2:hidden
+#  status:    0:disabled   1:enabled  
+#  Tip��control��status��weight are  non-mandatory 
+
+[
+##########################apiRoute example##########################
+
+{
+               "serviceName" : "microservices",
+               "version" : "v1",
+               "url" : "/api/microservices/v1",
+               "apiJson" : "/api/microservices/v1/swagger.json",
+               "apiJsonType" : "1",
+               "metricsUrl" : "/admin/metrics",
+               "control" : "1",
+               "status" : "1",
+               "servers" : [{
+                               "ip" : "127.0.0.1",
+                               "port" : "8086",
+                               "weight" : 0
+                       }
+               ]
+       },
+       
+##########################iuiRoute example##########################
+       
+{
+               "serviceName" : "microservices",
+               "url" : "/iui/microservices",
+               "control" : "1",
+               "status" : "1",
+               "servers" : [{
+                               "ip" : "127.0.0.1",
+                               "port" : "8086",
+                               "weight" : 0
+                       }
+               ]
+       },
+       
+##########################customRoute example##########################        
+       {
+               "serviceName" : "/test",
+               "url" : "/test",
+               "control" : "0",
+               "status" : "1",
+               "servers" : [{
+                               "ip" : "10.74.56.36",
+                               "port" : "8989",
+                               "weight" : 0
+                       }
+               ]
+       }
 ]
\ No newline at end of file
 ]
\ No newline at end of file
index 2fe9f72..36e9244 100644 (file)
@@ -1,14 +1,33 @@
-########################## initialize default visualRange Matches from msdiscover to redis ##########################\r
-\r
-\r
-visualRange:·þÎñµÄ¿É¼û·¶Î§   ÏµÍ³¼ä:0   ÏµÍ³ÄÚ:1 \r
-\r
-#when msb is starting, it will automatically read this json file named "initVisualRangeMatches.json"\r
-\r
-#when  msdiscover will sysn datas  to apiGateway,only visualRange Matches will be save to redis. \r
-\r
-\r
-\r
-# JSON File content must be  format array like below examples:\r
-\r
+====
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+====
+
+########################## initialize default visualRange Matches from msdiscover to redis ##########################
+
+
+visualRange:����Ŀɼ���Χ   ϵͳ��:0   ϵͳ��:1 
+
+#when msb is starting, it will automatically read this json file named "initVisualRangeMatches.json"
+
+#when  msdiscover will sysn datas  to apiGateway,only visualRange Matches will be save to redis. 
+
+
+
+# JSON File content must be  format array like below examples:
+
 0 or 1 or 0,1
\ No newline at end of file
 0 or 1 or 0,1
\ No newline at end of file
index 1b3b76b..34e5823 100644 (file)
@@ -1,23 +1,27 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-echo %1 | findstr %2 | findstr %3>NUL\r
-echo ERRORLEVEL=%ERRORLEVEL%\r
-IF ERRORLEVEL 1 goto findend\r
-for /f "tokens=1" %%a in (%1) do (  \r
-    echo kill %1\r
-       taskkill /F /pid %%a\r
-)\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+echo %1 | findstr %2 | findstr %3>NUL
+echo ERRORLEVEL=%ERRORLEVEL%
+IF ERRORLEVEL 1 goto findend
+for /f "tokens=1" %%a in (%1) do (  
+    echo kill %1
+       taskkill /F /pid %%a
+)
 :findend
\ No newline at end of file
 :findend
\ No newline at end of file
index 6e2362a..83a76cb 100644 (file)
@@ -1,11 +1,11 @@
 @REM
 @REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
-@REM         http://www.apache.org/licenses/LICENSE-2.0
+@REM     http://www.apache.org/licenses/LICENSE-2.0
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
 @echo off
 title apiroute-service
 
 @echo off
 title apiroute-service
 
index bd62668..7201c05 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/bash
 #
 #!/bin/bash
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
 
 #JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"
 
 
 #JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"
 
index 96e96a8..e37210a 100644 (file)
@@ -1,11 +1,11 @@
 @REM
 @REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
-@REM         http://www.apache.org/licenses/LICENSE-2.0
+@REM     http://www.apache.org/licenses/LICENSE-2.0
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
 @echo off
 title stopping apiroute-service
 
 @echo off
 title stopping apiroute-service
 
index 6d48003..9895070 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/bash
 #
 #!/bin/bash
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
 
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
index dfc9b1f..63e79a7 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
index e732e6d..ace200a 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
index a2b9a5c..cddca6b 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
index f7b3b24..2c80731 100644 (file)
@@ -1,34 +1,38 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title msb install services\r
-\r
-set RUNHOME=%~dp0\r
-\r
-echo ### install redis\r
-cd "%RUNHOME%\redis"\r
-redisService.exe install\r
-\r
-echo ### install apiroute\r
-cd "%RUNHOME%\apiroute"\r
-apirouteService.exe install\r
-\r
-echo ### install openresty\r
-cd "%RUNHOME%\openresty\nginx"\r
-openrestyService.exe install\r
-\r
-:finalend\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title msb install services
+
+set RUNHOME=%~dp0
+
+echo ### install redis
+cd "%RUNHOME%\redis"
+redisService.exe install
+
+echo ### install apiroute
+cd "%RUNHOME%\apiroute"
+apirouteService.exe install
+
+echo ### install openresty
+cd "%RUNHOME%\openresty\nginx"
+openrestyService.exe install
+
+:finalend
 cd "%RUNHOME%"
\ No newline at end of file
 cd "%RUNHOME%"
\ No newline at end of file
index 4b28af8..71f702f 100644 (file)
@@ -1,34 +1,38 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title msb restart services\r
-\r
-set RUNHOME=%~dp0\r
-\r
-echo ### restart redis\r
-cd "%RUNHOME%\redis"\r
-redisService.exe restart\r
-\r
-echo ### restart apiroute\r
-cd "%RUNHOME%\apiroute"\r
-apirouteService.exe restart\r
-\r
-echo ### restart openresty\r
-cd "%RUNHOME%\openresty\nginx"\r
-openrestyService.exe restart\r
-\r
-:finalend\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title msb restart services
+
+set RUNHOME=%~dp0
+
+echo ### restart redis
+cd "%RUNHOME%\redis"
+redisService.exe restart
+
+echo ### restart apiroute
+cd "%RUNHOME%\apiroute"
+apirouteService.exe restart
+
+echo ### restart openresty
+cd "%RUNHOME%\openresty\nginx"
+openrestyService.exe restart
+
+:finalend
 cd "%RUNHOME%"
\ No newline at end of file
 cd "%RUNHOME%"
\ No newline at end of file
index 138fd03..d143759 100644 (file)
@@ -1,34 +1,38 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title msb status services\r
-\r
-set RUNHOME=%~dp0\r
-\r
-echo ### status redis\r
-cd "%RUNHOME%\redis"\r
-redisService.exe status\r
-\r
-echo ### status apiroute\r
-cd "%RUNHOME%\apiroute"\r
-apirouteService.exe status\r
-\r
-echo ### status openresty\r
-cd "%RUNHOME%\openresty\nginx"\r
-openrestyService.exe status\r
-\r
-:finalend\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title msb status services
+
+set RUNHOME=%~dp0
+
+echo ### status redis
+cd "%RUNHOME%\redis"
+redisService.exe status
+
+echo ### status apiroute
+cd "%RUNHOME%\apiroute"
+apirouteService.exe status
+
+echo ### status openresty
+cd "%RUNHOME%\openresty\nginx"
+openrestyService.exe status
+
+:finalend
 cd "%RUNHOME%"
\ No newline at end of file
 cd "%RUNHOME%"
\ No newline at end of file
index b1cd76e..0f1a89e 100644 (file)
@@ -1,37 +1,41 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title msb uninstall services\r
-\r
-set RUNHOME=%~dp0\r
-\r
-echo ### uninstall redis\r
-cd "%RUNHOME%\redis"\r
-redisService.exe stop\r
-redisService.exe uninstall\r
-\r
-echo ### uninstall apiroute\r
-cd "%RUNHOME%\apiroute"\r
-apirouteService.exe stop\r
-apirouteService.exe uninstall\r
-\r
-echo ### uninstall openresty\r
-cd "%RUNHOME%\openresty\nginx"\r
-openrestyService.exe stop\r
-openrestyService.exe uninstall\r
-\r
-:finalend\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title msb uninstall services
+
+set RUNHOME=%~dp0
+
+echo ### uninstall redis
+cd "%RUNHOME%\redis"
+redisService.exe stop
+redisService.exe uninstall
+
+echo ### uninstall apiroute
+cd "%RUNHOME%\apiroute"
+apirouteService.exe stop
+apirouteService.exe uninstall
+
+echo ### uninstall openresty
+cd "%RUNHOME%\openresty\nginx"
+openrestyService.exe stop
+openrestyService.exe uninstall
+
+:finalend
 cd "%RUNHOME%"
\ No newline at end of file
 cd "%RUNHOME%"
\ No newline at end of file
index c304747..cdc98b8 100644 (file)
@@ -1,11 +1,11 @@
 @REM
 @REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
-@REM         http://www.apache.org/licenses/LICENSE-2.0
+@REM     http://www.apache.org/licenses/LICENSE-2.0
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
 @echo off
 title stopping msb
 
 @echo off
 title stopping msb
 
index 653eef4..2bb2a84 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 DIRNAME=`dirname $0`
 RUNHOME=`cd $DIRNAME/; pwd`
 echo @RUNHOME@ $RUNHOME
 DIRNAME=`dirname $0`
 RUNHOME=`cd $DIRNAME/; pwd`
 echo @RUNHOME@ $RUNHOME
index 7373d05..e7f8cf3 100644 (file)
@@ -1,11 +1,11 @@
 @REM
 @REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
 @REM
 @REM Licensed under the Apache License, Version 2.0 (the "License");
 @REM you may not use this file except in compliance with the License.
 @REM You may obtain a copy of the License at
 @REM
-@REM         http://www.apache.org/licenses/LICENSE-2.0
+@REM     http://www.apache.org/licenses/LICENSE-2.0
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM
 @REM Unless required by applicable law or agreed to in writing, software
 @REM distributed under the License is distributed on an "AS IS" BASIS,
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
 @REM See the License for the specific language governing permissions and
 @REM limitations under the License.
 @REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
 @echo off
 title msb
 
 @echo off
 title msb
 
index 1d785ce..bcc0865 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 DIRNAME=`dirname $0`
 RUNHOME=`cd $DIRNAME/; pwd`
 echo @RUNHOME@ $RUNHOME
 DIRNAME=`dirname $0`
 RUNHOME=`cd $DIRNAME/; pwd`
 echo @RUNHOME@ $RUNHOME
diff --git a/msb-core/distributions/standalone/src/assembly/resource/startup4docker.sh b/msb-core/distributions/standalone/src/assembly/resource/startup4docker.sh
deleted file mode 100644 (file)
index 134f1fe..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# Licensed 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.
-#
-DIRNAME=`dirname $0`
-RUNHOME=`cd $DIRNAME/; pwd`
-echo @RUNHOME@ $RUNHOME
-
-echo "### Starting redis...";
-cd ./redis
-./run.sh 
-cd $RUNHOME
-
-echo "\n\n### Starting openresty...";
-cd ./openresty
-./run.sh 
-cd $RUNHOME
-
-echo "\n\n### Starting apiroute..."
-cd ./apiroute
-./run.sh
diff --git a/msb-core/distributions/standalone/src/main/docker/Dockerfile b/msb-core/distributions/standalone/src/main/docker/Dockerfile
deleted file mode 100644 (file)
index 8023ff4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM java:8-alpine\r
-ADD msb-standalone-1.0.0-SNAPSHOT-linux64.tar.gz /opt/application\r
-WORKDIR /opt/application\r
-EXPOSE 10080\r
-ENTRYPOINT exec $PWD/startup4docker.sh
\ No newline at end of file
index 1db2516..09b6bca 100644 (file)
@@ -1,96 +1,98 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <parent>\r
-        <groupId>org.openo.common-services.microservice-bus</groupId>\r
-        <artifactId>msb-core-parent</artifactId>\r
-        <version>1.0.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <artifactId>openresty-ext</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-    <name>openo/msb/msb-core/openresty-ext</name>\r
-    <packaging>pom</packaging>\r
-\r
-    <properties>\r
-      <outputdir>target/assembly</outputdir>\r
-      <packageid>openresty-ext</packageid>\r
-    </properties>\r
-\r
-    <build>\r
-    <plugins>\r
-    <plugin>\r
-      <artifactId>maven-resources-plugin</artifactId>\r
-        <configuration>\r
-      <includeEmptyDirs>true</includeEmptyDirs>\r
-      </configuration>\r
-      <executions>\r
-        <execution>\r
-          <id>copy-resources</id>\r
-          <phase>process-resources</phase>\r
-          <goals>\r
-            <goal>copy-resources</goal>\r
-          </goals>\r
-          <configuration>\r
-            <outputDirectory>${outputdir}</outputDirectory>\r
-            <resources>\r
-                    <resource>\r
-                <directory>src/assembly/resources/</directory>\r
-                <filtering>false</filtering>\r
-                <includes>\r
-                  <include>**/*</include>\r
-                </includes>\r
-              </resource>\r
-            </resources>\r
-            <overwrite>true</overwrite>\r
-          </configuration>\r
-        </execution>\r
-      </executions>\r
-      </plugin>\r
-\r
-    <plugin>\r
-      <groupId>org.apache.maven.plugins</groupId>\r
-      <artifactId>maven-antrun-plugin</artifactId>\r
-      <executions>\r
-        <execution>\r
-            <id>distribution</id>\r
-            <phase>package</phase>\r
-            <goals>\r
-                <goal>run</goal>\r
-            </goals>\r
-            <configuration>\r
-                <target name="distribution">\r
-                    <zip destfile="target/${packageid}-${project.version}.zip" update="true">\r
-                      <zipfileset dir="target/assembly/" includes="**"/>\r
-                    </zip>\r
-                    <attachartifact file="target/${packageid}-${project.version}.zip" type="zip"/>\r
-                </target>\r
-            </configuration>\r
-        </execution>\r
-      </executions>\r
-    </plugin>\r
-\r
-    </plugins>\r
-    </build>\r
-\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.openo.common-services.microservice-bus</groupId>
+        <artifactId>msb-core-parent</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>openresty-ext</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>openo/msb/msb-core/openresty-ext</name>
+    <packaging>pom</packaging>
+
+    <properties>
+      <outputdir>target/assembly</outputdir>
+      <packageid>openresty-ext</packageid>
+    </properties>
+
+    <build>
+    <plugins>
+    <plugin>
+      <artifactId>maven-resources-plugin</artifactId>
+        <configuration>
+      <includeEmptyDirs>true</includeEmptyDirs>
+      </configuration>
+      <executions>
+        <execution>
+          <id>copy-resources</id>
+          <phase>process-resources</phase>
+          <goals>
+            <goal>copy-resources</goal>
+          </goals>
+          <configuration>
+            <outputDirectory>${outputdir}</outputDirectory>
+            <resources>
+                    <resource>
+                <directory>src/assembly/resources/</directory>
+                <filtering>false</filtering>
+                <includes>
+                  <include>**/*</include>
+                </includes>
+              </resource>
+            </resources>
+            <overwrite>true</overwrite>
+          </configuration>
+        </execution>
+      </executions>
+      </plugin>
+
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-antrun-plugin</artifactId>
+      <executions>
+        <execution>
+            <id>distribution</id>
+            <phase>package</phase>
+            <goals>
+                <goal>run</goal>
+            </goals>
+            <configuration>
+                <target name="distribution">
+                    <zip destfile="target/${packageid}-${project.version}.zip" update="true">
+                      <zipfileset dir="target/assembly/" includes="**"/>
+                    </zip>
+                    <attachartifact file="target/${packageid}-${project.version}.zip" type="zip"/>
+                </target>
+            </configuration>
+        </execution>
+      </executions>
+    </plugin>
+
+    </plugins>
+    </build>
+
+
+</project>
index 9a2db3f..c5dc770 100644 (file)
@@ -1,3 +1,22 @@
+#
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+#
+# Licensed 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.
+#
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 #user xfs xfs;
 worker_processes 1;
 
 #user xfs xfs;
 worker_processes 1;
 
@@ -9,64 +28,6 @@ events {
 }
 
 http {
 }
 
 http {
-       include mime.types;
-
-    upstream iui {
-        server 127.0.0.1:8202;
-    }  
-
-    upstream nsoc {
-        server 127.0.0.1:8203;
-    }
-
-    upstream roc {
-        server 127.0.0.1:8204;
-    }
-
-    upstream umc {
-        server 127.0.0.1:8205;
-    }
-
-    upstream ssh {
-        server 127.0.0.1:8209;
-    }
-       
-       upstream yamlparser {
-        server 127.0.0.1:8210;
-    }
-
-    upstream dac {
-        server 127.0.0.1:8206;
-    }
-
-    upstream cmcc {
-        server 127.0.0.1:8207;
-    }
-
-    upstream tacker {
-        server 127.0.0.1:8208;
-    }
-
-    upstream winery {
-        server 127.0.0.1:8080;
-    }
-       
-       upstream etsi {
-        server 127.0.0.1:8211;
-    }
-       
-       upstream openstackadapter {
-        server 127.0.0.1:8217;
-    }
-       
-       upstream vimadapter {
-        server 127.0.0.1:8218;
-    }
-
-    upstream odlsdn {
-        server 127.0.0.1:8216;
-    }
-       
     # Basic Settings
     default_type  application/octet-stream;   
     sendfile       on;
     # Basic Settings
     default_type  application/octet-stream;   
     sendfile       on;
@@ -84,144 +45,27 @@ http {
        proxy_send_timeout 120s;
        proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_send_timeout 120s;
        proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-    proxy_set_header Host $host:$server_port;
+    proxy_set_header Host $host;
     proxy_buffers 4 32k;
        
     #set the nginx_cache parameter
     proxy_buffers 4 32k;
        
     #set the nginx_cache parameter
-    #proxy_cache_path  temp/proxy_cache  levels=1:2   keys_zone=nginx_cache:10m inactive=1d max_size=100m;
+    proxy_cache_path  temp/proxy_cache  levels=1:2   keys_zone=nginx_cache:1024m inactive=1d max_size=10g;
        
     # Logging
     access_log off;
 
     # Lua settings
     lua_package_path "$prefix/../lualib/?.lua;;";
        
     # Logging
     access_log off;
 
     # Lua settings
     lua_package_path "$prefix/../lualib/?.lua;;";
-       lua_package_cpath "$prefix/../lualib/?.so;;";
 
     lua_shared_dict ceryx 10M;
     lua_code_cache on;
 
     lua_shared_dict ceryx 10M;
     lua_code_cache on;
-       
-    server {
-        listen       80;
-        default_type text/html;
-               
-               location = / {
-                       rewrite ^ /iui/framework redirect;
-               }
-
-               location = /openo {
-                       rewrite ^ /iui/framework redirect;
-               }
-
-               location = /iui/openo {
-                       rewrite ^ /iui/framework redirect;
-               }
-               
-               location = /iui/framework/login.html {
-                       access_by_lua_file luaext/iui_auth.lua;
-                       proxy_pass http://iui;
-               }
-
-               location = /api/uiframe/v1/login {
-                       rewrite ^ /api/umcsm/v1/login break;
-                       proxy_pass http://umc;
-                       header_filter_by_lua_file luaext/login.lua;
-               }
-               
-               location = /api/uiframe/v1/loginOut {
-                       access_by_lua_file luaext/logout.lua;
-                       rewrite ^ /api/umcsm/v1/loginOut break;
-                       proxy_pass http://umc;          
-               }               
-               
-               location = /api/hsif/v1/authentication {
-                       access_by_lua_file luaext/make_authed.lua;
-               }               
-
-               location /iui {
-                       access_by_lua_file luaext/iui_auth.lua;
-                       proxy_pass http://iui;
-               }
-
-               location ~ ^/api/(?:vim|nsoc)/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://nsoc;
-               }
-               
-               location = /api/nsoc/v1/vnfgrantinfo {
-                       rewrite ^ /api/vim/v1/vnfgrantinfo break;
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://nsoc;
-               }               
-               
-               location /api/nsocnotification/v1 {
-                       rewrite ^/api/nsocnotification/v1/(.*) /nsocnotification/v1/$1 break;
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://nsoc;
-               }               
-
-               location ~ ^/api/(?:roc|rocnotification)/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://roc;
-               }
-
-               location /api/uiframe/v1 {
-                       rewrite ^/api/uiframe/v1/(.*) /api/umcsm/v1/$1 break;
-                       access_by_lua_file luaext/iui_auth.lua;
-                       proxy_pass http://umc;
-               }
-        
-               location ~ ^/api/umc(?:pm|fm|drill|sm|monitor)/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://umc;
-               }
-
-               location ~ ^/api/ssh/v1 {
-                       proxy_pass http://ssh;
-               }
-               
-               location ~ ^/api/yamlparser/v1 {
-                       proxy_pass http://yamlparser;
-               }
-               
-               location ~ ^/api/(?:dac|dacnotification)/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://dac;
-               }
-
-               location /api/cmccia/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://cmcc;
-               }
-
-               location /api/tackeria/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://tacker;
-               }
 
 
-               location /winery {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://winery;
-               }
-               
-               location = /api/microservices/v1/apiRoute {
-                       access_by_lua_file luaext/auth.lua;
-                       content_by_lua_file luaext/serviceaccess.lua;
-               }
-               
-               location /api/umcswagger/v1 {
-                       rewrite ^/api/umcswagger/v1/(.*) /api/$1 break;
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://umc;
-               }
-               
-               location /api/etsiia/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://etsi;
-               }
+    # see https://github.com/openresty/lua-resty-core
+    #init_by_lua '
+    #    require "resty.core"
+    #';
 
 
-               location /api/odlsdnia/v1 {
-                       access_by_lua_file luaext/auth.lua;
-                       proxy_pass http://odlsdn;
-               }
-    }  
+    # Includes
+    include mime.types;
+    include ../sites-enabled/*.conf;
 }
 }
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/auth.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/auth.lua
deleted file mode 100644 (file)
index 067c277..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-local cache = ngx.shared.ceryx
-local client_ip = ngx.var.remote_addr
-local host = ngx.var.host
-if client_ip == '127.0.0.1' or client_ip == host or client_ip == ngx.var.server_addr then
-       return
-end    
-local succ, err, forcible = cache:replace(client_ip, "place_holder", 3600)
-if not succ then
-       if err == 'not found' then
-               ngx.log(ngx.WARN, "access record not found for "..client_ip)
-               ngx.exit(401)
-       else
-               ngx.log(ngx.WARN, err)
-       end     
-end
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/customrouter.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/customrouter.lua
new file mode 100644 (file)
index 0000000..d1f476a
--- /dev/null
@@ -0,0 +1,194 @@
+--[[
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+]]
+-- put red into the connection pool of size 100,
+-- with 10 seconds max idle time
+local function close_redis(red)
+       if not red then
+               return
+       end
+       --release connection to the pool
+       local pool_max_idle_time = 10000
+       local pool_size = 100
+       local ok, err = red:set_keepalive(pool_max_idle_time, pool_size)
+       if not ok then
+               ngx.log(ngx.ERR, "set keepalive error:", err)
+       end
+       return
+end
+
+local function query_ipurl_updatecache(red,key)
+       local keyprefix = "msb:routing:custom:"..key
+
+
+       local infokey=keyprefix..":info"
+       -- first of all check whether the status is 1(enabled)
+       local status = red:hget(infokey,"status")
+       if not (status=="1")  then
+               ngx.log(ngx.WARN, key.."is disabled.status=", status)
+               return nil
+       end
+
+       -- Try to get url for key
+       local url, err = red:hget(infokey,"url")
+       ngx.log(ngx.WARN, "==url:", url)
+       if not url or url == ngx.null then
+               return nil
+       end
+
+       -- Try to get ip:port for key
+       local serverkey=keyprefix..":lb:server1"
+       local server, err = red:hget(serverkey,"ip")..":"..red:hget(serverkey,"port")
+       ngx.log(ngx.WARN, "==server:", server)
+       if not server or server == ngx.null then
+               return nil
+       end
+
+       -- get the local cache
+       local cache = ngx.shared.ceryx
+       local uri = ngx.var.uri
+       -- Save found key to local cache for 5 seconds
+       cache:set("custom:key:"..uri,key,5)   
+       cache:set("custom:server:"..uri,server,5)
+       cache:set("custom:url:"..uri,url,5)
+
+       ngx.var.key = key
+       ngx.var.server = server
+       ngx.var.url = url
+       return true
+end
+
+local function query_allkeys_updatecache(red)
+       -- Try to get all keys start with "msb:routing:custom:"
+       local allkeys, err = red:keys("msb:routing:custom:*")
+       if not allkeys or allkeys == ngx.null then
+               ngx.log(ngx.ERR,err)
+               return ""
+       end
+       --把所有键值处理后放到集合中,去除重复
+       local key_set={}
+       for key, value in ipairs(allkeys) do
+               name = string.gsub(string.gsub(string.gsub(value,"msb:routing:custom:",""),":info",""),":lb:server1","")
+               key_set[name]=true                                                 
+       end
+       --取出所有的�?放到table中准备排�?
+       local key_table = {}
+       local index = 1
+       for key,_ in pairs(key_set) do
+               --为了避免效率问题,暂时不用table.insert()
+               --table.insert(key_table,key)
+               key_table[index] = key
+               index = index + 1
+       end
+       --对所有键进行倒序排序,用于实现最长前缀匹配
+       table.sort(key_table, function (a, b)
+                       return a > b
+               end)
+
+       local servicenames = ""
+       local delimiter = "<>"
+       for i=1,#key_table do
+               servicenames=servicenames..key_table[i]..delimiter
+       end
+
+       -- get the local cache
+       local cache = ngx.shared.ceryx
+       -- Save all keys to local cache for 30 seconds(0.5 minutes)
+       cache:set("customrouter:allkeys", servicenames, 30)
+       return servicenames;
+end
+
+local function query_router_info()
+       local uri = ngx.var.uri
+       ngx.log(ngx.WARN, "==uri:", uri)
+
+       -- Check if key exists in local cache
+       local cache = ngx.shared.ceryx
+       local key, flags = cache:get("custom:key:"..uri)   
+       local server, flags = cache:get("custom:server:"..uri)
+       local url, flags = cache:get("custom:url:"..uri)   
+       if key and server and url then
+               ngx.var.key = key
+               ngx.var.server = server
+               ngx.var.url = url
+               ngx.log(ngx.WARN, "==using custom cache:", key.."&&"..server.."&&"..url)
+               return
+       end
+
+       local redis = require "resty.redis"
+       local red = redis:new()
+       red:set_timeout(1000) -- 1000 ms
+       local redis_host = "127.0.0.1" 
+       local redis_port = 6379 
+       local res, err = red:connect(redis_host, redis_port)
+
+       -- Return if could not connect to Redis
+       if not res then
+               ngx.log(ngx.ERR, "connect to redis error:", err)
+               return
+       end
+
+       -- Check if all servicenames exists in local cache
+       local servicenames, flags = cache:get("customrouter:allkeys")
+       if servicenames then 
+               ngx.log(ngx.WARN,"==get all keys from cache:",servicenames)
+       else
+               servicenames = query_allkeys_updatecache(red)
+       end
+
+       local delimiter = "<>"
+       -- '.-' 表示最短匹�?
+       for key in string.gmatch(servicenames,"(.-)"..delimiter) do
+               ngx.log(ngx.WARN, "==key_table key:", key)
+               local from, to, err = ngx.re.find(uri, "^"..key.."(/(.*))?$", "jo")
+               --判断key是否为输入uri�?前缀"
+               if from then
+                       ngx.log(ngx.WARN,"Matched! start-end:",from,"-",to)
+                       local result = query_ipurl_updatecache(red,key)
+                       if result then
+                               break
+                       end
+               else
+                       ngx.log(ngx.WARN,"not Matched")
+                       if err then
+                               ngx.log(ngx.WARN,"ngx.re.find throw error: ",err)
+                               return
+                       end
+               end
+       end
+
+       return close_redis(red)
+end
+
+local function rewrite_router_url()
+       local server=ngx.var.server
+       if server=="fallback" then
+               ngx.status = ngx.HTTP_NOT_FOUND
+               ngx.exit(ngx.status)
+       end
+       local url=ngx.var.url
+       local key=ngx.var.key
+       local rewriteduri = ngx.re.sub(ngx.var.uri, "^"..key.."(.*)", url.."$1", "o")
+       ngx.log(ngx.WARN, "==rewrited uri:", rewriteduri)
+       ngx.req.set_uri(rewriteduri)
+end
+
+query_router_info()
+rewrite_router_url()
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/iui_auth.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/iui_auth.lua
deleted file mode 100644 (file)
index dd7b2ed..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-local cache = ngx.shared.ceryx
-local client_ip = ngx.var.remote_addr
-local uri = ngx.var.uri
-if uri == "/iui/framework/login.html" then
-       local value, flags = cache:get(client_ip)
-       if not value then
-               return
-       else
-               ngx.redirect("/iui/framework/main-page.html")
-       end
-end
-
-local referer =  ngx.var.http_referer
-local refererList = {
-       "/iui/framework/login.html",
-       "/iui/framework/css/login.css",
-       "/iui/component/thirdparty/font%-awesome/css/font%-awesome.min.css",
-       "/iui/framework/css/style%-custom.css"
-}      
-local function referer_matches(t, r)
-       for k,_ in pairs(t) do
-               if string.match(r, t[k]) then
-                       return true
-               end
-       end
-       return false
-end    
-
-if referer and referer_matches(refererList, referer) then
-       return
-end    
-
-local succ, err, forcible = cache:replace(client_ip, "place_holder", 3600)
-if not succ then
-       if err == 'not found' then
-               ngx.log(ngx.WARN, "access record not found for "..client_ip..",redirect to login page")
-               ngx.redirect("/iui/framework/login.html")
-       else
-               ngx.log(ngx.WARN, err)
-       end
-end
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/login.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/login.lua
deleted file mode 100644 (file)
index 7d6bfd8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-local h = ngx.resp.get_headers()
-if h["openoauth"] and h["openoauth"] == "true" then
-       local cache = ngx.shared.ceryx
-       local client_ip = ngx.var.remote_addr
-       local succ, err, forcible = cache:set(client_ip, "place_holder", 3600)
-       if not succ then
-               ngx.log(ngx.WARN, err)
-       end
-end    
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/logout.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/logout.lua
deleted file mode 100644 (file)
index e23f787..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-local cache = ngx.shared.ceryx
-local client_ip = ngx.var.remote_addr
-local succ, err, forcible = cache:delete(client_ip)
-if not succ then
-       ngx.log(ngx.WARN, err)
-end
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/make_authed.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/make_authed.lua
deleted file mode 100644 (file)
index c4c2d78..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-function ipValidator(ip)\r
-       local chunks = {ip:match("(%d+)%.(%d+)%.(%d+)%.(%d+)")}\r
-       if #chunks == 4 then\r
-               for _,v in pairs(chunks) do\r
-                       if tonumber(v) > 255 then return R.STRING end\r
-               end\r
-               return true\r
-       end\r
-       local chunks = {ip:match(("([a-fA-F0-9]*):"):rep(8):gsub(":$","$"))}\r
-       if #chunks == 8 then\r
-               for _,v in pairs(chunks) do\r
-                       if #v > 0 and tonumber(v, 16) > 65535 then return R.STRING end\r
-               end\r
-               return true\r
-       end\r
-       return false\r
-end    \r
-\r
-if ngx.req.get_method() == "POST" then\r
-       ngx.req.read_body()\r
-       local body = ngx.req.get_body_data()    \r
-       local json = require('cjson')\r
-       local tab = json.decode(body)\r
-       local ip = tab["passIp"]\r
-       if not ip then\r
-               ngx.log(ngx.WARN, "ip is nil.")\r
-               ngx.exit(500)\r
-       end\r
-       if ipValidator(ip) then\r
-               local cache = ngx.shared.ceryx\r
-               local succ, err, forcible = cache:set(ip, "place_holder", 3600)\r
-               if not succ then\r
-                       ngx.log(ngx.WARN, err)\r
-                       ngx.exit(500)\r
-               end\r
-       else\r
-               ngx.log(ngx.WARN, "not a valid ip.")\r
-               ngx.exit(500)\r
-       end             \r
-       ngx.exit(201)\r
-else\r
-       ngx.log(ngx.WARN, "not a POST request.")\r
-       ngx.exit(500)\r
-end
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoadminrouter.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoadminrouter.lua
new file mode 100644 (file)
index 0000000..d2f0895
--- /dev/null
@@ -0,0 +1,110 @@
+--[[
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+]]
+-- put red into the connection pool of size 100,
+-- with 10 seconds max idle time
+local function close_redis(red)
+       if not red then
+               return
+       end
+       --release connection to the pool
+       local pool_max_idle_time = 10000
+       local pool_size = 100
+       local ok, err = red:set_keepalive(pool_max_idle_time, pool_size)
+       if not ok then
+               ngx.log(ngx.ERR, "set keepalive error:", err)
+       end
+       return
+end
+
+local function rewrite_admin_url()
+       local apiserver=ngx.var.apiserver
+       if apiserver=="fallback" then
+               ngx.status = ngx.HTTP_NOT_FOUND
+               ngx.exit(ngx.status)
+       end
+       local adminurl=ngx.var.adminurl
+       local uri = ngx.re.sub(ngx.var.uri, "^/admin/([^/]+)(/[Vv][^/]*)?(.*)", adminurl.."$3", "o")
+       ngx.req.set_uri(uri)
+end
+
+local function query_admin_info()
+       local apiserver = ngx.var.apiserver
+       local apiname = ngx.var.apiname
+       local apiversion = ngx.var.apiversion
+       apiversion=string.sub(apiversion,2,string.len(apiversion))
+
+       -- Check if key exists in local cache
+       local cache = ngx.shared.ceryx
+       local server, flags = cache:get("server:admin:"..apiname..":"..apiversion)
+       local url, flags = cache:get("url:admin:"..apiname..":"..apiversion)
+       if server and url then
+               ngx.var.apiserver = server
+               ngx.var.adminurl = url
+               ngx.log(ngx.WARN, "==using admin cache:", server.."&&"..url)
+               return
+       end
+
+       local redis = require "resty.redis"
+       local red = redis:new()
+       red:set_timeout(1000) -- 1000 ms
+       local redis_host = "127.0.0.1" 
+       local redis_port = 6379 
+       local res, err = red:connect(redis_host, redis_port)
+
+       -- Return if could not connect to Redis
+       if not res then
+               ngx.log(ngx.ERR, "connect to redis error:", err)
+               return
+       end
+
+       -- Construct Redis key
+       local prefix = "msb"
+       local keyprefix = prefix..":routing:api:"..apiname..":"..apiversion
+
+
+       -- Try to get ip:port for apiname
+       local serverkey=keyprefix..":lb:server1"
+       local server, err = red:hget(serverkey,"ip")..":"..red:hget(serverkey,"port")
+       ngx.log(ngx.WARN, "==adminserver:", server)
+       if not server or server == ngx.null then
+               return close_redis(red) 
+       end
+
+       -- Try to get admin url for apiname
+       local infokey=keyprefix..":info"
+       local url, err = red:hget(infokey,"metricsUrl")
+       ngx.log(ngx.WARN, "==adminurl:", url)
+       if not url or url == ngx.null then
+               return close_redis(red) 
+       end
+
+       -- Save found key to local cache for 5 seconds
+       cache:set("server:admin:"..apiname..":"..apiversion, server, 5)
+       cache:set("url:admin:"..apiname..":"..apiversion, url, 5)
+
+       ngx.log(ngx.WARN, "==admin result:", server.."&&"..url)
+       ngx.var.apiserver = server
+       ngx.var.adminurl = url
+
+       return close_redis(red)
+end
+query_admin_info()
+rewrite_admin_url()
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoapijsonrouter.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoapijsonrouter.lua
new file mode 100644 (file)
index 0000000..1a061f0
--- /dev/null
@@ -0,0 +1,110 @@
+--[[
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+]]
+-- put red into the connection pool of size 100,
+-- with 10 seconds max idle time
+local function close_redis(red)
+       if not red then
+               return
+       end
+       --release connection to the pool
+       local pool_max_idle_time = 10000
+       local pool_size = 100
+       local ok, err = red:set_keepalive(pool_max_idle_time, pool_size)
+       if not ok then
+               ngx.log(ngx.ERR, "set keepalive error:", err)
+       end
+       return
+end
+
+local function rewrite_apijson_url()
+       local apiserver=ngx.var.apiserver
+       if apiserver=="fallback" then
+               ngx.status = ngx.HTTP_NOT_FOUND
+               ngx.exit(ngx.status)
+       end
+       local apijsonurl=ngx.var.apijsonurl
+       local uri = ngx.re.sub(ngx.var.uri, "^/apijson/([^/]+)(/[Vv][^/]*)?(.*)", apijsonurl.."$3", "o")
+       ngx.req.set_uri(uri)
+end
+
+local function query_apijson_info()
+       local apiserver = ngx.var.apiserver
+       local apiname = ngx.var.apiname
+       local apiversion = ngx.var.apiversion
+       apiversion=string.sub(apiversion,2,string.len(apiversion))
+
+       -- Check if key exists in local cache
+       local cache = ngx.shared.ceryx
+       local server, flags = cache:get("server:apijson:"..apiname..":"..apiversion)
+       local url, flags = cache:get("url:apijson:"..apiname..":"..apiversion)
+       if server and url then
+               ngx.var.apiserver = server
+               ngx.var.apijsonurl = url
+               ngx.log(ngx.WARN, "==using apijson cache:", server.."&&"..url)
+               return
+       end
+
+       local redis = require "resty.redis"
+       local red = redis:new()
+       red:set_timeout(1000) -- 1000 ms
+       local redis_host = "127.0.0.1" 
+       local redis_port = 6379 
+       local res, err = red:connect(redis_host, redis_port)
+
+       -- Return if could not connect to Redis
+       if not res then
+               ngx.log(ngx.ERR, "connect to redis error:", err)
+               return
+       end
+
+       -- Construct Redis key
+       local prefix = "msb"
+       local keyprefix = prefix..":routing:api:"..apiname..":"..apiversion
+
+
+       -- Try to get ip:port for apiname
+       local serverkey=keyprefix..":lb:server1"
+       local server, err = red:hget(serverkey,"ip")..":"..red:hget(serverkey,"port")
+       ngx.log(ngx.WARN, "==apijsonserver:", server)
+       if not server or server == ngx.null then
+               return close_redis(red) 
+       end
+
+       -- Try to get apijson url for apiname
+       local infokey=keyprefix..":info"
+       local url, err = red:hget(infokey,"apijson")
+       ngx.log(ngx.WARN, "==apijsonurl:", url)
+       if not url or url == ngx.null then
+               return close_redis(red) 
+       end
+
+       -- Save found key to local cache for 5 seconds
+       cache:set("server:apijson:"..apiname..":"..apiversion, server, 5)
+       cache:set("url:apijson:"..apiname..":"..apiversion, url, 5)
+
+       ngx.log(ngx.WARN, "==apijson result:", server.."&&"..url)
+       ngx.var.apiserver = server
+       ngx.var.apijsonurl = url
+
+       return close_redis(red)
+end
+query_apijson_info()
+rewrite_apijson_url()
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoapirouter.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openoapirouter.lua
new file mode 100644 (file)
index 0000000..9dec2a9
--- /dev/null
@@ -0,0 +1,117 @@
+--[[
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+]]
+-- put red into the connection pool of size 100,
+-- with 10 seconds max idle time
+local function close_redis(red)
+       if not red then
+               return
+       end
+       --release connection to the pool
+       local pool_max_idle_time = 10000
+       local pool_size = 100
+       local ok, err = red:set_keepalive(pool_max_idle_time, pool_size)
+       if not ok then
+               ngx.log(ngx.ERR, "set keepalive error:", err)
+       end
+       return
+end
+
+local function rewrite_api_url()
+       local apiserver=ngx.var.apiserver
+       if apiserver=="fallback" then
+               ngx.status = ngx.HTTP_NOT_FOUND
+               ngx.exit(ngx.status)
+       end
+       local apiurl=ngx.var.apiurl
+       local uri = ngx.re.sub(ngx.var.uri, "^/openoapi/([^/]+)(/[Vv][^/]*)?(.*)", apiurl.."$3", "o")
+       ngx.req.set_uri(uri)
+end
+
+local function query_api_info()
+       local apiserver = ngx.var.apiserver
+       local apiname = ngx.var.apiname
+       local apiversion = ngx.var.apiversion
+       apiversion=string.sub(apiversion,2,string.len(apiversion))
+
+       -- Check if key exists in local cache
+       local cache = ngx.shared.ceryx
+       local server, flags = cache:get("server:api:"..apiname..":"..apiversion)
+       local url, flags = cache:get("url:api:"..apiname..":"..apiversion)
+       if server and url then
+               ngx.var.apiserver = server
+               ngx.var.apiurl = url
+               ngx.log(ngx.WARN, "==using api cache:", server.."&&"..url)
+               return
+       end
+
+       local redis = require "resty.redis"
+       local red = redis:new()
+       red:set_timeout(1000) -- 1000 ms
+       local redis_host = "127.0.0.1" 
+       local redis_port = 6379 
+       local res, err = red:connect(redis_host, redis_port)
+
+       -- Return if could not connect to Redis
+       if not res then
+               ngx.log(ngx.ERR, "connect to redis error:", err)
+               return
+       end
+
+       -- Construct Redis key
+       local prefix =  "msb"
+       local keyprefix = prefix..":routing:api:"..apiname..":"..apiversion
+
+       local infokey=keyprefix..":info"
+       -- first of all check whether the status is 1(enabled)
+       local status = red:hget(infokey,"status")
+       if not (status=="1")  then
+               ngx.log(ngx.WARN, keyprefix.."is disabled.status=", status)
+               return close_redis(red)
+       end
+       
+       -- Try to get url for apiname
+       local url, err = red:hget(infokey,"url")
+       ngx.log(ngx.WARN, "==url:", url)
+       if not url or url == ngx.null then
+               return close_redis(red) 
+       end
+
+       -- Try to get ip:port for apiname
+       local serverkey=keyprefix..":lb:server1"
+       local server, err = red:hget(serverkey,"ip")..":"..red:hget(serverkey,"port")
+       ngx.log(ngx.WARN, "==server:", server)
+       if not server or server == ngx.null then
+               return close_redis(red) 
+       end
+
+
+       -- Save found key to local cache for 5 seconds
+       cache:set("server:api:"..apiname..":"..apiversion, server, 5)
+       cache:set("url:api:"..apiname..":"..apiversion, url, 5)
+
+       ngx.log(ngx.WARN, "==api result:", server.."&&"..url)
+       ngx.var.apiserver = server
+       ngx.var.apiurl = url
+
+       return close_redis(red)
+end
+query_api_info()
+rewrite_api_url()
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openouirouter.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/openouirouter.lua
new file mode 100644 (file)
index 0000000..736aacd
--- /dev/null
@@ -0,0 +1,115 @@
+--[[
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+]]
+-- put red into the connection pool of size 100,
+-- with 10 seconds max idle time
+local function close_redis(red)
+       if not red then
+               return
+       end
+       --release connection to the pool
+       local pool_max_idle_time = 10000
+       local pool_size = 100
+       local ok, err = red:set_keepalive(pool_max_idle_time, pool_size)
+       if not ok then
+               ngx.log(ngx.ERR, "set keepalive error:", err)
+       end
+       return
+end
+
+local function rewrite_iui_url()
+       local iuiserver=ngx.var.iuiserver
+       if iuiserver=="fallback" then
+               ngx.status = ngx.HTTP_NOT_FOUND
+               ngx.exit(ngx.status)
+       end
+       local iuiurl=ngx.var.iuiurl
+       local uri = ngx.re.sub(ngx.var.uri, "^/openoui/([^/]+)(.*)", iuiurl.."$2", "o")
+       ngx.req.set_uri(uri)
+end
+
+local function query_iui_info()
+       local iuiserver = ngx.var.iuiserver
+       local iuiname = ngx.var.iuiname
+
+       -- Check if key exists in local cache
+       local cache = ngx.shared.ceryx
+       local server, flags = cache:get("server:iui:"..iuiname)
+       local url, flags = cache:get("url:iui:"..iuiname)
+       if server and url then
+               ngx.var.iuiserver = server
+               ngx.var.iuiurl = url
+               ngx.log(ngx.WARN, "==using iui cache:", server.."&&"..url)
+               return
+       end
+
+       local redis = require "resty.redis"
+       local red = redis:new()
+       red:set_timeout(1000) -- 1000 ms
+       local redis_host = "127.0.0.1" 
+       local redis_port = 6379
+       local res, err = red:connect(redis_host, redis_port)
+
+       -- Return if could not connect to Redis
+       if not res then
+               ngx.log(ngx.ERR, "connect to redis error:", err)
+               return
+       end
+
+       -- Construct Redis key
+       local prefix = "msb" 
+       local keyprefix = prefix..":routing:iui:"..iuiname
+
+       local infokey=keyprefix..":info"
+       -- first of all check whether the status is 1(enabled)
+       local status = red:hget(infokey,"status")
+       if not (status=="1")  then
+               ngx.log(ngx.WARN, keyprefix.."is disabled.status=", status)
+               return close_redis(red)
+       end
+       
+       -- Try to get url for iuiname
+       local url, err = red:hget(infokey,"url")
+       ngx.log(ngx.WARN, "==url:", url)
+       if not url or url == ngx.null then
+               return close_redis(red) 
+       end
+
+       -- Try to get ip:port for iuiname
+       local serverkey=keyprefix..":lb:server1"
+       local server, err = red:hget(serverkey,"ip")..":"..red:hget(serverkey,"port")
+       ngx.log(ngx.WARN, "==server:", server)
+       if not server or server == ngx.null then
+               return close_redis(red) 
+       end
+
+
+       -- Save found key to local cache for 5 seconds
+       cache:set("server:iui:"..iuiname, server, 5)
+       cache:set("url:iui:"..iuiname, url, 5)
+
+       ngx.log(ngx.WARN, "==iui result:", server.."&&"..url)
+       ngx.var.iuiserver = server
+       ngx.var.iuiurl = url
+
+       return close_redis(red)
+end
+query_iui_info()
+rewrite_iui_url()
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/serviceaccess.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/serviceaccess.lua
deleted file mode 100644 (file)
index 1118341..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-if ngx.req.get_method() == "GET" then\r
-       local services = {\r
-               {serviceName="odlsdnia",apiJson="/api/odlsdnia/v1/swagger.json"},\r
-               {serviceName="roc",apiJson="/api/roc/v1/swagger.json"},\r
-               {serviceName="tackeria",apiJson="/api/tackeria/v1/swagger.json"},\r
-               {serviceName="etsi",apiJson="/api/etsiia/v1/swagger.json"}\r
-       }\r
-       local cjson = require "cjson"\r
-       local jsonData = cjson.encode(services)\r
-       jsonData = string.gsub(jsonData,"\\/","/")\r
-       ngx.print(jsonData)\r
-else\r
-       ngx.log(ngx.WARN, "not a GET request.")\r
-       ngx.exit(500)\r
-end
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/setnocacheflag.lua b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/luaext/setnocacheflag.lua
new file mode 100644 (file)
index 0000000..e8c75cd
--- /dev/null
@@ -0,0 +1,29 @@
+--[[
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+]]
+local from, to, err = ngx.re.find(ngx.var.uri, "\\.(gif|jpg|jpeg|png|bmp|ico)$", "jo")
+--Based on the request file type to determine whether to cache
+if from then
+    --use cache
+       return 0
+else
+       --do not use cache
+       return 1
+end
\ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/sites-enabled/openomsb.conf
new file mode 100644 (file)
index 0000000..b529d94
--- /dev/null
@@ -0,0 +1,150 @@
+#
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+#
+# Licensed 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.
+#
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
+server {
+   listen 80;
+   default_type text/html;
+   add_header X-Cache-Status $upstream_cache_status;
+       
+   location = /openoui/microservices {
+      rewrite /openoui/microservices /openoui/microservices/index.html redirect;
+   }
+  
+   location / {
+          set $server "fallback";
+                 set $url "";
+                 set $key "";
+                 
+                 # Lua files
+          rewrite_by_lua_file luaext/customrouter.lua;
+                 
+                 proxy_pass http://$server;
+   }
+    location ~ ^/api/(.*) {
+               rewrite ^/api/(.*) /openoapi/$1 last;
+    }
+    location ~ ^/iui/(.*) {
+               rewrite ^/iui/(.*) /openoui/$1 last;
+       }
+   location ~ ^/openoapi/([^/]+)(/[Vv][^/]*)?(.*) {
+          set $apiname $1;
+                 set $apiversion $2;
+          set $apiserver "fallback";
+                 set $apiurl "";
+
+          # Lua files
+          rewrite_by_lua_file luaext/openoapirouter.lua;
+                 
+          proxy_pass http://$apiserver;
+   }
+
+   location ~ ^/openoui/([^/]+)(.*) {
+          location ~* ^/iui/([^/]+)(.*)\.(?:png|jpg|jpeg|js|css|html|gif|ico|bmp|woff)$ {
+                  set $iuiname $1;
+                         set $iuiparam $2;
+                  set $iuiserver "fallback";
+                         set $iuiurl "";
+                 
+                         # Lua files
+                                 rewrite_by_lua_file luaext/openouirouter.lua;
+
+                                 proxy_cache nginx_cache;
+                                 proxy_cache_key $host$uri$is_args$args;
+                                 proxy_cache_valid 200 304 12h ;
+                                 proxy_cache_valid 301 302 1m ;
+                                 proxy_cache_valid any 1m ;
+                                 expires 12h;
+                                 
+                                 proxy_pass http://$iuiserver;           
+                 }  
+                 set $iuiname $1;
+                 set $iuiparam $2;
+          set $iuiserver "fallback";
+                 set $iuiurl "";
+
+          # Lua files
+          rewrite_by_lua_file luaext/openouirouter.lua;
+                 
+                 proxy_pass http://$iuiserver;
+   }
+
+   location ~ ^/admin/([^/]+)(/[Vv][^/]*)?(.*) {
+          set $apiname $1;
+             set $apiversion $2;
+          set $apiserver "fallback";
+                 set $adminurl "";
+                 
+                 # Lua files
+          rewrite_by_lua_file luaext/openoadminrouter.lua;
+                 
+                 proxy_pass http://$apiserver;
+   }
+   
+   location ~ ^/apijson/([^/]+)(/[Vv][^/]*)?(.*) {
+          location ~* ^/apijson/([^/]+)(/[v][^/]*)?(.*)\.(?:png|jpg|jpeg|js|css|html|gif|ico|bmp|woff)$ {
+                  set $apiname $1;
+                         set $apiversion $2;
+                  set $apiserver "fallback";
+                         set $apijsonurl "";             
+                                 
+                         # Lua files
+                                 rewrite_by_lua_file luaext/openoapijsonrouter.lua;
+
+                                 proxy_cache nginx_cache;
+                                 proxy_cache_key $host$uri$is_args$args;
+                                 proxy_cache_valid 200 304 12h ;
+                                 proxy_cache_valid 301 302 1m ;
+                                 proxy_cache_valid any 1m ;
+                                 expires 12h;
+                                 
+                                 proxy_pass http://$apiserver;           
+                 }   
+          set $apiname $1;
+             set $apiversion $2;
+          set $apiserver "fallback";
+                 set $apijsonurl "";
+                 
+                 # Lua files
+          rewrite_by_lua_file luaext/openoapijsonrouter.lua;
+                 
+                 proxy_pass http://$apiserver;
+   }
+
+   location ~* \.(?:png|jpg|jpeg|js|css|html|gif|ico|bmp|woff)$ {
+           set $server "fallback";
+                  set $url "";
+           set $key "";
+                 
+                  # Lua files
+                  rewrite_by_lua_file luaext/customrouter.lua;
+
+                  proxy_cache nginx_cache;
+                  proxy_cache_key $host$uri$is_args$args;
+                  proxy_cache_valid 200 304 12h ;
+                  proxy_cache_valid 301 302 1m ;
+                  proxy_cache_valid any 1m ;
+                  expires 12h;
+                                 
+                  proxy_pass http://$server;             
+   }
+        
+   location = /favicon.ico {
+        log_not_found off;
+   }
+}
\ No newline at end of file
index 240b4b0..644f057 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
 
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/nginx; pwd`
 
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/nginx; pwd`
index 151cad7..17302ce 100644 (file)
@@ -1,52 +1,55 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-@echo off\r
-title openresty-server\r
-@if not "%ECHO%" == ""  echo %ECHO%\r
-@if "%OS%" == "Windows_NT"  setlocal\r
-\r
-set DIRNAME=.\r
-\r
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%\r
-\r
-set ARGS=\r
-:loop\r
-if [%1] == [] goto endloop\r
-        set ARGS=%ARGS% %1\r
-        shift\r
-        goto loop\r
-:endloop\r
-\r
-set HOME=%DIRNAME%nginx\r
-set _NGINXCMD=%HOME%\nginx.exe\r
-\r
-echo =========== openresty config info  ============================================\r
-echo HOME=%HOME%\r
-echo _NGINXCMD=%_NGINXCMD%\r
-echo ===============================================================================\r
-\r
-cd /d "%HOME%"\r
-echo @WORK_DIR@%HOME%\r
-echo @C_CMD@ "%_NGINXCMD%"\r
-%_NGINXCMD%\r
-IF ERRORLEVEL 1 goto showerror\r
-exit\r
-:showerror\r
-echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!\r
-echo After checking, press any key to close \r
-pause\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title openresty-server
+@if not "%ECHO%" == ""  echo %ECHO%
+@if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.
+
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+
+set ARGS=
+:loop
+if [%1] == [] goto endloop
+        set ARGS=%ARGS% %1
+        shift
+        goto loop
+:endloop
+
+set HOME=%DIRNAME%nginx
+set _NGINXCMD=%HOME%\nginx.exe
+
+echo =========== openresty config info  ============================================
+echo HOME=%HOME%
+echo _NGINXCMD=%_NGINXCMD%
+echo ===============================================================================
+
+cd /d "%HOME%"
+echo @WORK_DIR@%HOME%
+echo @C_CMD@ "%_NGINXCMD%"
+%_NGINXCMD%
+IF ERRORLEVEL 1 goto showerror
+exit
+:showerror
+echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
+echo After checking, press any key to close 
+pause
 exit
\ No newline at end of file
 exit
\ No newline at end of file
index 7ac3128..5c7dbc8 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
 
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/nginx; pwd`
 
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/nginx; pwd`
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/run4docker.sh b/msb-core/openresty-ext/src/assembly/resources/openresty/run4docker.sh
deleted file mode 100644 (file)
index 329dabc..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# Licensed 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.
-#
-DIRNAME=`dirname $0`
-HOME=`cd $DIRNAME/nginx; pwd`
-_NGINXCMD="$HOME/sbin/nginx"
-
-echo =========== create symbolic link for libluajit-5.1.so.2  ========================================
-LUAJIT_HOME=`cd $DIRNAME/luajit; pwd`
-LUAJIT_FILENAME="$LUAJIT_HOME/lib/libluajit-5.1.so.2"
-LN_TARGET_FILE='/lib/libluajit-5.1.so.2'
-LN_TARGET_FILE64='/lib64/libluajit-5.1.so.2'
-ln -s -f $LUAJIT_FILENAME $LN_TARGET_FILE
-ln -s -f $LUAJIT_FILENAME $LN_TARGET_FILE64
-echo ===============================================================================
-
-echo =========== openresty config info  =============================================
-echo HOME=$HOME
-echo _NGINXCMD=$_NGINXCMD
-echo ===============================================================================
-cd $HOME; pwd
-
-echo @WORK_DIR@ $HOME
-echo @C_CMD@ $_NGINXCMD -p $HOME/
-$_NGINXCMD -p $HOME/ -g "daemon off;"
-
index e5ea581..9fa6522 100644 (file)
@@ -1,51 +1,54 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-@echo off\r
-title close openresty-server\r
-@if not "%ECHO%" == ""  echo %ECHO%\r
-@if "%OS%" == "Windows_NT"  setlocal\r
-\r
-set DIRNAME=.\r
-\r
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%\r
-\r
-set ARGS=\r
-:loop\r
-if [%1] == [] goto endloop\r
-        set ARGS=%ARGS% %1\r
-        shift\r
-        goto loop\r
-:endloop\r
-\r
-set HOME=%DIRNAME%nginx\r
-set _NGINXCMD=%HOME%\nginx.exe\r
-\r
-\r
-echo =========== openresty config info  ============================================\r
-echo HOME=%HOME%\r
-echo _NGINXCMD=%_NGINXCMD%\r
-echo ===============================================================================\r
-\r
-\r
-cd /d "%HOME%"\r
-echo @WORK_DIR@%HOME%\r
-echo @C_CMD@ "%_NGINXCMD% -s stop"\r
-\r
-%_NGINXCMD% -s stop\r
-echo closing signal has been sent,stopping in background,WAIT...\r
-timeout /t 5 /nobreak > nul\r
-exit\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title close openresty-server
+@if not "%ECHO%" == ""  echo %ECHO%
+@if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.
+
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+
+set ARGS=
+:loop
+if [%1] == [] goto endloop
+        set ARGS=%ARGS% %1
+        shift
+        goto loop
+:endloop
+
+set HOME=%DIRNAME%nginx
+set _NGINXCMD=%HOME%\nginx.exe
+
+
+echo =========== openresty config info  ============================================
+echo HOME=%HOME%
+echo _NGINXCMD=%_NGINXCMD%
+echo ===============================================================================
+
+
+cd /d "%HOME%"
+echo @WORK_DIR@%HOME%
+echo @C_CMD@ "%_NGINXCMD% -s stop"
+
+%_NGINXCMD% -s stop
+echo closing signal has been sent,stopping in background,WAIT...
+timeout /t 5 /nobreak > nul
+exit
index 343bff4..c5d0f19 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/bash
 #
 #!/bin/bash
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/nginx; pwd`
 _NGINXCMD="$HOME/sbin/nginx"
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/nginx; pwd`
 _NGINXCMD="$HOME/sbin/nginx"
index 550ee33..7ecbfd1 100644 (file)
@@ -1,81 +1,83 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <parent>\r
-        <groupId>org.openo.common-services.microservice-bus</groupId>\r
-        <artifactId>msb-core-parent</artifactId>\r
-        <version>1.0.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <artifactId>openresty</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-    <name>openo/msb/msb-core/openresty</name>\r
-    <packaging>pom</packaging>\r
-\r
-    <properties>\r
-        <openresty.linux64.version>openresty-1.9.15.1-linux64</openresty.linux64.version>\r
-        <openresty.win64.version>openresty-1.9.14.1001-win64</openresty.win64.version>\r
-    </properties>\r
-    <build>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>build-helper-maven-plugin</artifactId>\r
-                <executions>\r
-                    <execution>\r
-                        <id>attach-artifacts-linux64</id>\r
-                        <phase>package</phase>\r
-                        <goals>\r
-                            <goal>attach-artifact</goal>\r
-                        </goals>\r
-                        <configuration>\r
-                            <artifacts>\r
-                                <artifact>\r
-                                    <file>src/assembly/resources/${openresty.linux64.version}.tar.gz</file>\r
-                                    <classifier>linux64</classifier>\r
-                                    <type>tar.gz</type>\r
-                                </artifact>\r
-                            </artifacts>\r
-                        </configuration>\r
-                    </execution>\r
-                    <execution>\r
-                        <id>attach-artifacts-win64</id>\r
-                        <phase>package</phase>\r
-                        <goals>\r
-                            <goal>attach-artifact</goal>\r
-                        </goals>\r
-                        <configuration>\r
-                            <artifacts>\r
-                                <artifact>\r
-                                    <file>src/assembly/resources/${openresty.win64.version}.zip</file>\r
-                                    <classifier>win64</classifier>\r
-                                    <type>zip</type>\r
-                                </artifact>\r
-                            </artifacts>\r
-                        </configuration>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.openo.common-services.microservice-bus</groupId>
+        <artifactId>msb-core-parent</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>openresty</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>openo/msb/msb-core/openresty</name>
+    <packaging>pom</packaging>
+
+    <properties>
+        <openresty.linux64.version>openresty-1.9.15.1-linux64</openresty.linux64.version>
+        <openresty.win64.version>openresty-1.9.14.1001-win64</openresty.win64.version>
+    </properties>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts-linux64</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>src/assembly/resources/${openresty.linux64.version}.tar.gz</file>
+                                    <classifier>linux64</classifier>
+                                    <type>tar.gz</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>attach-artifacts-win64</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>src/assembly/resources/${openresty.win64.version}.zip</file>
+                                    <classifier>win64</classifier>
+                                    <type>zip</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
index 7bf0168..71f4192 100644 (file)
@@ -1,40 +1,41 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <parent>\r
-    <groupId>org.openo.common-services.microservice-bus</groupId>\r
-    <artifactId>msb-core-root</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <artifactId>msb-core-parent</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-    <name>openo/msb/msb-core-parent</name>\r
-    <packaging>pom</packaging>\r
-    <modules>\r
-        <module>openresty</module>\r
-        <module>openresty-ext</module>\r
-        <module>redis</module>\r
-        <module>redis-ext</module>\r
-        <module>apiroute</module>\r
-        <module>distributions</module>\r
-    </modules>\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.openo.common-services.microservice-bus</groupId>
+        <artifactId>msb-core-root</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>msb-core-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>openo/msb/msb-core-parent</name>
+    <packaging>pom</packaging>
+    <modules>
+        <module>openresty</module>
+        <module>openresty-ext</module>
+        <module>redis</module>
+        <module>redis-ext</module>
+        <module>apiroute</module>
+        <module>distributions</module>
+    </modules>
+</project>
index 96bf309..465203c 100644 (file)
@@ -1,96 +1,98 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <parent>\r
-        <groupId>org.openo.common-services.microservice-bus</groupId>\r
-        <artifactId>msb-core-parent</artifactId>\r
-        <version>1.0.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <artifactId>redis-ext</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-    <name>openo/msb/msb-core/redis-ext</name>\r
-    <packaging>pom</packaging>\r
-\r
-    <properties>\r
-      <outputdir>target/assembly</outputdir>\r
-      <packageid>redis-ext</packageid>\r
-    </properties>\r
-\r
-    <build>\r
-    <plugins>\r
-    <plugin>\r
-      <artifactId>maven-resources-plugin</artifactId>\r
-        <configuration>\r
-      <includeEmptyDirs>true</includeEmptyDirs>\r
-      </configuration>\r
-      <executions>\r
-        <execution>\r
-          <id>copy-resources</id>\r
-          <phase>process-resources</phase>\r
-          <goals>\r
-            <goal>copy-resources</goal>\r
-          </goals>\r
-          <configuration>\r
-            <outputDirectory>${outputdir}</outputDirectory>\r
-            <resources>\r
-                    <resource>\r
-                <directory>src/assembly/resources/</directory>\r
-                <filtering>false</filtering>\r
-                <includes>\r
-                  <include>**/*</include>\r
-                </includes>\r
-              </resource>\r
-            </resources>\r
-            <overwrite>true</overwrite>\r
-          </configuration>\r
-        </execution>\r
-      </executions>\r
-      </plugin>\r
-\r
-    <plugin>\r
-      <groupId>org.apache.maven.plugins</groupId>\r
-      <artifactId>maven-antrun-plugin</artifactId>\r
-      <executions>\r
-        <execution>\r
-            <id>distribution</id>\r
-            <phase>package</phase>\r
-            <goals>\r
-                <goal>run</goal>\r
-            </goals>\r
-            <configuration>\r
-                <target name="distribution">\r
-                    <zip destfile="target/${packageid}-${project.version}.zip" update="true">\r
-                      <zipfileset dir="target/assembly/" includes="**"/>\r
-                    </zip>\r
-                    <attachartifact file="target/${packageid}-${project.version}.zip" type="zip"/>\r
-                </target>\r
-            </configuration>\r
-        </execution>\r
-      </executions>\r
-    </plugin>\r
-\r
-    </plugins>\r
-    </build>\r
-\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.openo.common-services.microservice-bus</groupId>
+        <artifactId>msb-core-parent</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>redis-ext</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>openo/msb/msb-core/redis-ext</name>
+    <packaging>pom</packaging>
+
+    <properties>
+      <outputdir>target/assembly</outputdir>
+      <packageid>redis-ext</packageid>
+    </properties>
+
+    <build>
+    <plugins>
+    <plugin>
+      <artifactId>maven-resources-plugin</artifactId>
+        <configuration>
+      <includeEmptyDirs>true</includeEmptyDirs>
+      </configuration>
+      <executions>
+        <execution>
+          <id>copy-resources</id>
+          <phase>process-resources</phase>
+          <goals>
+            <goal>copy-resources</goal>
+          </goals>
+          <configuration>
+            <outputDirectory>${outputdir}</outputDirectory>
+            <resources>
+                    <resource>
+                <directory>src/assembly/resources/</directory>
+                <filtering>false</filtering>
+                <includes>
+                  <include>**/*</include>
+                </includes>
+              </resource>
+            </resources>
+            <overwrite>true</overwrite>
+          </configuration>
+        </execution>
+      </executions>
+      </plugin>
+
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-antrun-plugin</artifactId>
+      <executions>
+        <execution>
+            <id>distribution</id>
+            <phase>package</phase>
+            <goals>
+                <goal>run</goal>
+            </goals>
+            <configuration>
+                <target name="distribution">
+                    <zip destfile="target/${packageid}-${project.version}.zip" update="true">
+                      <zipfileset dir="target/assembly/" includes="**"/>
+                    </zip>
+                    <attachartifact file="target/${packageid}-${project.version}.zip" type="zip"/>
+                </target>
+            </configuration>
+        </execution>
+      </executions>
+    </plugin>
+
+    </plugins>
+    </build>
+
+
+</project>
index b391f28..718d756 100644 (file)
@@ -1,41 +1,45 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title close redis-server\r
-@if not "%ECHO%" == ""  echo %ECHO%\r
-@if "%OS%" == "Windows_NT"  setlocal\r
-\r
-set DIRNAME=.\r
-\r
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%\r
-\r
-set HOME=%DIRNAME%\r
-set _REDISCLIENT=%DIRNAME%redis-cli.exe\r
-\r
-\r
-echo ================Redis config info =============================================\r
-echo Redis_HOME=$HOME\r
-echo TIP:This shell script rewrite the AOF file in the background!\r
-echo ===============================================================================\r
-\r
-\r
-cd /d "%HOME%"\r
-echo @WORK_DIR@%HOME%\r
-echo @C_CMD@ "%_REDISCLIENT%  -p 6379 BGREWRITEAOF"\r
-%_REDISCLIENT%  -p 6379 BGREWRITEAOF\r
-echo closing signal has been sent,stopping in background,WAIT...\r
-timeout /t 2 /nobreak > nul  \r
-exit\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title close redis-server
+@if not "%ECHO%" == ""  echo %ECHO%
+@if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.
+
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+
+set HOME=%DIRNAME%
+set _REDISCLIENT=%DIRNAME%redis-cli.exe
+
+
+echo ================Redis config info =============================================
+echo Redis_HOME=$HOME
+echo TIP:This shell script rewrite the AOF file in the background!
+echo ===============================================================================
+
+
+cd /d "%HOME%"
+echo @WORK_DIR@%HOME%
+echo @C_CMD@ "%_REDISCLIENT%  -p 6379 BGREWRITEAOF"
+%_REDISCLIENT%  -p 6379 BGREWRITEAOF
+echo closing signal has been sent,stopping in background,WAIT...
+timeout /t 2 /nobreak > nul  
+exit
index e401021..3b92d26 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 _REDISCLIENT="$HOME/redis-cli"
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 _REDISCLIENT="$HOME/redis-cli"
index 2083a69..cd85369 100644 (file)
@@ -1,13 +1,33 @@
-<service>\r
-  <id>msb_redis</id>\r
-  <name>msb_redis</name>\r
-  <description>This service runs redis.</description>\r
-  <workingdirectory>%BASE%</workingdirectory>\r
-  <env name="RUNHOME" value="%BASE%"/>\r
-  <executable>redis-server.exe</executable>\r
-  <arguments>redis.conf</arguments>\r
-  <stopexecutable>redis-cli.exe</stopexecutable>\r
-  <stopargument>shutdown</stopargument>\r
-  <logmode>rotate</logmode>\r
-  <!-- stopparentprocessfirst>true</stopparentprocessfirst -->\r
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<service>
+  <id>msb_redis</id>
+  <name>msb_redis</name>
+  <description>This service runs redis.</description>
+  <workingdirectory>%BASE%</workingdirectory>
+  <env name="RUNHOME" value="%BASE%"/>
+  <executable>redis-server.exe</executable>
+  <arguments>redis.conf</arguments>
+  <stopexecutable>redis-cli.exe</stopexecutable>
+  <stopargument>shutdown</stopargument>
+  <logmode>rotate</logmode>
+  <!-- stopparentprocessfirst>true</stopparentprocessfirst -->
 </service>
\ No newline at end of file
 </service>
\ No newline at end of file
index ad443ed..f62f110 100644 (file)
@@ -1,47 +1,51 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title redis-server\r
-@if not "%ECHO%" == ""  echo %ECHO%\r
-@if "%OS%" == "Windows_NT"  setlocal\r
-\r
-set DIRNAME=.\r
-\r
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%\r
-\r
-set HOME=%DIRNAME%\r
-set _REDISCMD=%DIRNAME%redis-server.exe\r
-set _REDISCONF=%DIRNAME%redis.conf\r
-\r
-\r
-echo ================Redis config info =============================================\r
-echo Redis_HOME=%HOME%\r
-echo config file=$_REDISCONF\r
-echo Help:use $_REDISCMD --help for help\r
-echo ===============================================================================\r
-\r
-\r
-cd /d "%HOME%"\r
-echo @WORK_DIR@%HOME%\r
-echo @C_CMD@ "%_REDISCMD% %_REDISCONF%"\r
-%_REDISCMD% %_REDISCONF%\r
-IF ERRORLEVEL 1 goto showerror\r
-exit\r
-:showerror\r
-echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!\r
-echo After checking, press any key to close \r
-pause\r
-exit\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title redis-server
+@if not "%ECHO%" == ""  echo %ECHO%
+@if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.
+
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+
+set HOME=%DIRNAME%
+set _REDISCMD=%DIRNAME%redis-server.exe
+set _REDISCONF=%DIRNAME%redis.conf
+
+
+echo ================Redis config info =============================================
+echo Redis_HOME=%HOME%
+echo config file=$_REDISCONF
+echo Help:use $_REDISCMD --help for help
+echo ===============================================================================
+
+
+cd /d "%HOME%"
+echo @WORK_DIR@%HOME%
+echo @C_CMD@ "%_REDISCMD% %_REDISCONF%"
+%_REDISCMD% %_REDISCONF%
+IF ERRORLEVEL 1 goto showerror
+exit
+:showerror
+echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
+echo After checking, press any key to close 
+pause
+exit
index c20798d..09bfddc 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 _REDISCMD="$HOME/redis-server"
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 _REDISCMD="$HOME/redis-server"
diff --git a/msb-core/redis-ext/src/assembly/resources/redis/run4docker.sh b/msb-core/redis-ext/src/assembly/resources/redis/run4docker.sh
deleted file mode 100644 (file)
index 5640a62..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# Licensed 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.
-#
-DIRNAME=`dirname $0`
-HOME=`cd $DIRNAME/; pwd`
-_REDISCMD="$HOME/redis-server"
-_REDISCONF="$HOME/redis.conf"
-
-echo =========== Redis config info  =============================================
-echo Redis_HOME=$HOME
-echo config file=$_REDISCONF
-echo  Help:use $_REDISCMD --help for help
-echo ===============================================================================
-cd $HOME; pwd
-
-echo @C_CMD@ $_REDISCMD $_REDISCONF --daemonize no
-$_REDISCMD $_REDISCONF --daemonize no
index de4db69..32da2f0 100644 (file)
@@ -1,41 +1,45 @@
-@REM\r
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM         http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-@echo off\r
-title close redis-server\r
-@if not "%ECHO%" == ""  echo %ECHO%\r
-@if "%OS%" == "Windows_NT"  setlocal\r
-\r
-set DIRNAME=.\r
-\r
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%\r
-\r
-set HOME=%DIRNAME%\r
-set _REDISCLIENT=%DIRNAME%redis-cli.exe\r
-\r
-\r
-echo ================Redis config info =============================================\r
-echo Redis_HOME=$HOME\r
-echo TIP:This shell script close the Redis instance listening on 6379!\r
-echo ===============================================================================\r
-\r
-\r
-cd /d "%HOME%"\r
-echo @WORK_DIR@%HOME%\r
-echo @C_CMD@ "%_REDISCLIENT%  -p 6379 shutdown"\r
-%_REDISCLIENT%  -p 6379 shutdown\r
-echo closing signal has been sent,stopping in background,WAIT...\r
-timeout /t 2 /nobreak > nul  \r
-exit\r
+@REM
+@REM Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM     http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+@REM     Author: Zhaoxing Meng
+@REM     email: meng.zhaoxing1@zte.com.cn
+@REM
+
+@echo off
+title close redis-server
+@if not "%ECHO%" == ""  echo %ECHO%
+@if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.
+
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+
+set HOME=%DIRNAME%
+set _REDISCLIENT=%DIRNAME%redis-cli.exe
+
+
+echo ================Redis config info =============================================
+echo Redis_HOME=$HOME
+echo TIP:This shell script close the Redis instance listening on 6379!
+echo ===============================================================================
+
+
+cd /d "%HOME%"
+echo @WORK_DIR@%HOME%
+echo @C_CMD@ "%_REDISCLIENT%  -p 6379 shutdown"
+%_REDISCLIENT%  -p 6379 shutdown
+echo closing signal has been sent,stopping in background,WAIT...
+timeout /t 2 /nobreak > nul  
+exit
index 4100b04..7ae204c 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
 #!/bin/sh
 #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 #
 # Licensed 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
 #
 #
 # Licensed 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
+#     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,
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#     Author: Zhaoxing Meng
+#     email: meng.zhaoxing1@zte.com.cn
+#
+
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 _REDISCLIENT="$HOME/redis-cli"
 DIRNAME=`dirname $0`
 HOME=`cd $DIRNAME/; pwd`
 _REDISCLIENT="$HOME/redis-cli"
index d6d3959..dd271d9 100644 (file)
@@ -1,81 +1,83 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-\r
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-    <parent>\r
-        <groupId>org.openo.common-services.microservice-bus</groupId>\r
-        <artifactId>msb-core-parent</artifactId>\r
-        <version>1.0.0-SNAPSHOT</version>\r
-    </parent>\r
-\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-    <artifactId>redis</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-    <name>openo/msb/msb-core/redis</name>\r
-    <packaging>pom</packaging>\r
-\r
-    <properties>\r
-        <redis.linux64.version>redis-3.2.1-linux64</redis.linux64.version>\r
-        <redis.win64.version>redis-3.2.100-win64</redis.win64.version>\r
-    </properties>\r
-    <build>\r
-        <plugins>\r
-            <plugin>\r
-                <groupId>org.codehaus.mojo</groupId>\r
-                <artifactId>build-helper-maven-plugin</artifactId>\r
-                <executions>\r
-                    <execution>\r
-                        <id>attach-artifacts-linux64</id>\r
-                        <phase>package</phase>\r
-                        <goals>\r
-                            <goal>attach-artifact</goal>\r
-                        </goals>\r
-                        <configuration>\r
-                            <artifacts>\r
-                                <artifact>\r
-                                    <file>src/assembly/resources/${redis.linux64.version}.tar.gz</file>\r
-                                    <classifier>linux64</classifier>\r
-                                    <type>tar.gz</type>\r
-                                </artifact>\r
-                            </artifacts>\r
-                        </configuration>\r
-                    </execution>\r
-                    <execution>\r
-                        <id>attach-artifacts-win64</id>\r
-                        <phase>package</phase>\r
-                        <goals>\r
-                            <goal>attach-artifact</goal>\r
-                        </goals>\r
-                        <configuration>\r
-                            <artifacts>\r
-                                <artifact>\r
-                                    <file>src/assembly/resources/${redis.win64.version}.zip</file>\r
-                                    <classifier>win64</classifier>\r
-                                    <type>zip</type>\r
-                                </artifact>\r
-                            </artifacts>\r
-                        </configuration>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-        </plugins>\r
-    </build>\r
-\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.openo.common-services.microservice-bus</groupId>
+        <artifactId>msb-core-parent</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>redis</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>openo/msb/msb-core/redis</name>
+    <packaging>pom</packaging>
+
+    <properties>
+        <redis.linux64.version>redis-3.2.1-linux64</redis.linux64.version>
+        <redis.win64.version>redis-3.2.100-win64</redis.win64.version>
+    </properties>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts-linux64</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>src/assembly/resources/${redis.linux64.version}.tar.gz</file>
+                                    <classifier>linux64</classifier>
+                                    <type>tar.gz</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>attach-artifacts-win64</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>src/assembly/resources/${redis.win64.version}.zip</file>
+                                    <classifier>win64</classifier>
+                                    <type>zip</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
index 2ef8e06..700d593 100644 (file)
@@ -1,17 +1,17 @@
-modeldesign-parent\r
-============\r
-\r
-Root Pom of Project modeldesign\r
-\r
-**modeldesignparent-lite is descripe the maven repo and maven plugin .**\r
-\r
-**modeldesignparent is the parent pom of the this project ,which descripe the dependency Management of the thirdparty Supporting Libraries**\r
-\r
-you can use the following section to reference it .\r
-\r
-~~~\r
-  <groupId>org.openo.orchestrator.modeldesignparent</groupId>\r
-  <artifactId>modeldesignparent</artifactId>\r
-  <version>1.0.0</version>\r
-~~~\r
-\r
+modeldesign-parent
+============
+
+Root Pom of Project modeldesign
+
+**modeldesignparent-lite is descripe the maven repo and maven plugin .**
+
+**modeldesignparent is the parent pom of the this project ,which descripe the dependency Management of the thirdparty Supporting Libraries**
+
+you can use the following section to reference it .
+
+~~~
+  <groupId>org.openo.orchestrator.modeldesignparent</groupId>
+  <artifactId>modeldesignparent</artifactId>
+  <version>1.0.0</version>
+~~~
+
index 7d16422..128fdb7 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
         </plugin>
         <plugin>
           <artifactId>maven-failsafe-plugin</artifactId>
         </plugin>
         <plugin>
           <artifactId>maven-failsafe-plugin</artifactId>
-          <version>${failsafe.version}</version>
+          <version>2.19.1</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
index 61e0079..397aad5 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
           <targetJdk>1.8</targetJdk>
         </configuration>
       </plugin>
           <targetJdk>1.8</targetJdk>
         </configuration>
       </plugin>
-
-      <plugin>
-        <groupId>com.mycila</groupId>
-        <artifactId>license-maven-plugin</artifactId>
-        <version>2.3</version>
-        <configuration>
-          <includes>
-            <include>**\*.java</include>
-          </includes>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 
     </plugins>
   </build>
 
index e07c915..1d70b8c 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
 
     Licensed 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
 
 
     Licensed 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
+        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,
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,6 +15,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
     See the License for the specific language governing permissions and
     limitations under the License.
 
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index 1a804b2..d9dadb1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,41 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-    Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
-    Licensed under the Apache License, Version 2.0 (the "License");\r
-    you may not use this file except in compliance with the License.\r
-    You may obtain a copy of the License at\r
-\r
-            http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-    Unless required by applicable law or agreed to in writing, software\r
-    distributed under the License is distributed on an "AS IS" BASIS,\r
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-    See the License for the specific language governing permissions and\r
-    limitations under the License.\r
-\r
--->\r
-\r
-  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-\r
-    <modelVersion>4.0.0</modelVersion>\r
-\r
-    <parent>\r
-      <groupId>org.openo.common-services.microservice-bus</groupId>\r
-      <artifactId>msbparent</artifactId>\r
-      <version>1.0.0-SNAPSHOT</version>\r
-      <relativePath>msb-parent/msbparent</relativePath>\r
-    </parent>\r
-\r
-\r
-    <artifactId>msb-core-root</artifactId>\r
-    <version>1.0.0-SNAPSHOT</version>\r
-       <name>openo/msb/msb-core-root</name>\r
-    <packaging>pom</packaging>\r
-\r
-    <modules>\r
-      <module>msb-parent</module>\r
-      <module>msb-core</module>\r
-    </modules>\r
-\r
-  </project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
+
+    Licensed 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.
+
+        Author: Zhaoxing Meng
+        email: meng.zhaoxing1@zte.com.cn
+
+-->
+  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+      <groupId>org.openo.common-services.microservice-bus</groupId>
+      <artifactId>msbparent</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+      <relativePath>msb-parent/msbparent</relativePath>
+    </parent>
+
+
+    <artifactId>msb-core-root</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+       <name>openo/msb/msb-core-root</name>
+    <packaging>pom</packaging>
+
+    <modules>
+      <module>msb-parent</module>
+      <module>msb-core</module>
+    </modules>
+
+  </project>