Commit eb583153 authored by 胡斌's avatar 胡斌

过滤规则维护修改规则 删除规则完成

parent fd3c5562
...@@ -2,5 +2,21 @@ ...@@ -2,5 +2,21 @@
<profile version="1.0"> <profile version="1.0">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="Duplicates" enabled="false" level="WEAK WARNING" enabled_by_default="false" /> <inspection_tool class="Duplicates" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="7">
<item index="0" class="java.lang.String" itemvalue="nobr" />
<item index="1" class="java.lang.String" itemvalue="noembed" />
<item index="2" class="java.lang.String" itemvalue="comment" />
<item index="3" class="java.lang.String" itemvalue="noscript" />
<item index="4" class="java.lang.String" itemvalue="embed" />
<item index="5" class="java.lang.String" itemvalue="script" />
<item index="6" class="java.lang.String" itemvalue="input" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
</profile> </profile>
</component> </component>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
#linux server ip address
linux_server_ip=localhost
#set system parameters for 4A by huach on 20140802 begin
4a.server.ip=172.16.8.121
4a.login.url=http://172.16.8.121:8080/venus4a/TicketloginAction.do?method=appLoginResult
4a.logout.url=http://172.16.8.121:8080/venus4a/TicketloginAction.do?method=appExit
4a.syslog.ip=172.16.8.117
4a.syslog.port=514
local.ip.prefix=192.168
#set system parameters for 4A by huach on 20140802 end
#vertica database setting
#jdbc.driver=com.vertica.jdbc.Driver
#vertica database ip address
jdbc.dbip=hg-computer
jdbc.dbport=5433
jdbc.database=ccolap
#jdbc.url=jdbc\:vertica\://16.162.242.79\:5433/ccolap
#jdbc.username=CCOLAP
#jdbc.password=ccolap-cmsz
#jdbc.driver=com.vertica.jdbc.Driver
#jdbc.driver=oracle.jdbc.driver.OracleDriver
#jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
#jdbc.username=szcm
#jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver
jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
jdbc.username=ccolap
jdbc.password=hg.2015
##test
#connection pool settings
jdbc.pool.initialSize=10
jdbc.pool.maxActive=100
jdbc.pool.maxIdle=50
jdbc.pool.minIdle=10
jdbc.pool.suspectTimeout=60
jdbc.pool.timeBetweenEvictionRunsMillis=30000
jdbc.pool.minEvictableIdleTimeMillis=60000
jdbc.pool.removeAbandoned=true
jdbc.pool.removeAbandonedTimeout=60
jdbc.pool.logAbandoned=true
#############
perl.location=/perl/xcd_variable_analysis.pl
insert.script.location=/perl/xcd_variable_analysis.txt
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"
default-lazy-init="true">
<description>Shiro\u5b89\u5168\u914d\u7f6e</description>
<!-- Shiro's main business-tier object for web-enabled applications -->
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="shiroDbRealm" />
<property name="cacheManager" ref="shiroEhcacheManager" />
</bean>
<!-- \u9805\u76ee\u81ea\u5b9a\u4e49\u7684Realm, \u6240\u6709accountService\u4f9d\u8d56\u7684dao\u90fd\u9700\u8981\u7528depends-on\u58f0\u660e -->
<bean id="shiroDbRealm" class="com.hp.cmsz.service.account.ShiroDbRealm" depends-on="systemFunctionDao,roleInfoDao,userInfoDao,systemParameterDao">
<!-- <property name="accountService" ref="accountService"/> -->
</bean>
<!-- Shiro Filter -->
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<!-- \u6307\u5b9a\u9879\u76ee\u7684\u9996\u9875 -->
<property name="loginUrl" value="/index" />
<property name="successUrl" value="/" />
<property name="filterChainDefinitions">
<value>
/index = authc
/AnalysisSupport/** = user
/AuthorityManage/** = user
/DataBackup/** = user
/DataManage/** = user
/error/** = user
/ModelManage/** = user
/MonitorOperation/** = user
/ParameterManage/** = user
/SelfMonitor/** = user
/SetupManage/** = user
/TaskManage/** = user
/static/** = anon
/tmp/** = anon
<!-- 4A\u5bf9\u5916\u53d1\u5e03\u7684\u63a5\u53e3 -->
<!-- Add by Hudson on 20140715 begin -->
/services = anon
<!-- Add by Hudson on 20140715 end -->
/LoginSwitchService?wsdl = anon
/DepartmentService?wsdl = anon
/GroupService?wsdl = anon
/LogoutService?wsdl = anon
/UserServices?wsdl = anon
/logout = logout
</value>
</property>
</bean>
<!-- \u7528\u6237\u6388\u6743\u4fe1\u606fCache, \u91c7\u7528EhCache -->
<bean id="shiroEhcacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">
<property name="cacheManagerConfigFile" value="classpath:ehcache/ehcache-shiro.xml"/>
</bean>
<!-- \u4fdd\u8bc1\u5b9e\u73b0\u4e86Shiro\u5185\u90e8lifecycle\u51fd\u6570\u7684bean\u6267\u884c -->
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd"
default-lazy-init="true">
<description>Spring\u516c\u5171\u914d\u7f6e </description>
<!-- \u4f7f\u7528annotation \u81ea\u52a8\u6ce8\u518cbean, \u5e76\u4fdd\u8bc1@Required\u3001@Autowired\u7684\u5c5e\u6027\u88ab\u6ce8\u5165 -->
<context:component-scan base-package="com.hp.cmsz">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
<context:exclude-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
</context:component-scan>
<!-- -->
<!-- <bean id="tagCacheManager" class="">
<property name="cacheManagerConfigFile" value=""/>
</bean> -->
<!-- \u7f13\u5b58\u914d\u7f6e -->
<!-- \u542f\u7528\u7f13\u5b58\u6ce8\u89e3\u529f\u80fd(\u8bf7\u5c06\u5176\u914d\u7f6e\u5728Spring\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e2d) -->
<!-- <cache:annotation-driven cache-manager="cacheManager"/> -->
<!-- Spring\u81ea\u5df1\u7684\u57fa\u4e8ejava.util.concurrent.ConcurrentHashMap\u5b9e\u73b0\u7684\u7f13\u5b58\u7ba1\u7406\u5668(\u8be5\u529f\u80fd\u662f\u4eceSpring3.1\u5f00\u59cb\u63d0\u4f9b\u7684) -->
<!--
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
<property name="caches">
<set>
<bean name="myCache" class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean"/>
</set>
</property>
</bean>
-->
<!-- \u82e5\u53ea\u60f3\u4f7f\u7528Spring\u81ea\u8eab\u63d0\u4f9b\u7684\u7f13\u5b58\u5668,\u5219\u6ce8\u91ca\u6389\u4e0b\u9762\u7684\u4e24\u4e2a\u5173\u4e8eEhcache\u914d\u7f6e\u7684bean,\u5e76\u542f\u7528\u4e0a\u9762\u7684SimpleCacheManager\u5373\u53ef -->
<!-- Spring\u63d0\u4f9b\u7684\u57fa\u4e8e\u7684Ehcache\u5b9e\u73b0\u7684\u7f13\u5b58\u7ba1\u7406\u5668 -->
<!-- <bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation" value="classpath:ehcache/ehcache.xml"/>
</bean>
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">
<property name="cacheManager" ref="cacheManagerFactory"/>
</bean>
-->
<!-- \u76d1\u89c6\u548c\u4f18\u5316sql -->
<bean id="dataSource" class="com.p6spy.engine.spy.P6DataSource" >
<constructor-arg>
<ref local="dataSourceTarget"/>
</constructor-arg>
</bean>
<!-- 4A\u76f8\u5173\u7684WebService-->
<!-- Amend by huach for webservice on 20140725 begin
<import resource="classpath:org/codehaus/xfire/spring/xfire.xml" />
<bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler" />-->
<!-- <bean id="LoginSwitchBean" class="com.cmsz.ws.impl.LoginSwitchServiceImpl"/>
<bean id="GroupBean" class="com.cmsz.ws.impl.GroupServiceImpl"/>
<bean id="LogoutBean" class="com.cmsz.ws.impl.LogoutServiceImpl"/> -->
<!-- <bean id="userService" class="com.cmsz.ws.impl.UserServiceImpl"/>
<bean name="UserService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="userServiceBean" />
<property name="serviceClass" value="com.cmsz.ws.UserService" />
<property name="inHandlers">
<list>
<ref bean="addressingHandler" />
</list>
</property>
</bean>
<bean id="userServiceBean" class="com.cmsz.ws.impl.UserServiceImpl" />
-->
<!-- <bean id="DepartmentBean" class="com.cmsz.ws.impl.DepartmentServiceImpl"/>
<bean name="DepartmentService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="departmentServiceBean" />
<property name="serviceClass"
value="com.cmsz.ws.DepartmentService" />
<property name="inHandlers">
<list>
<ref bean="addressingHandler" />
</list>
</property>
</bean>
<bean id="departmentServiceBean" class="com.cmsz.ws.impl.DepartmentServiceImpl" />
-->
<!-- Amend by huach for webservice on 20140725 end -->
<!-- \u8ba9springmvc\u652f\u6301\u6587\u4ef6\u4e0a\u4f20 -->
<!-- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxInMemorySize" value="2048"></property>
<property name="maxUploadSize" value="1000000000"/>
</bean> -->
<!-- Jpa Entity Manager \u914d\u7f6e -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter"/>
<property name="packagesToScan" value="com.hp.cmsz"/>
<property name="jpaProperties">
<props>
<!-- \u547d\u540d\u89c4\u5219 My_NAME->MyName -->
<prop key="hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop>
</props>
</property>
</bean>
<bean id="hibernateJpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="databasePlatform">
<bean factory-method="getDialect" class="org.springside.modules.persistence.Hibernates">
<constructor-arg ref="dataSource"/>
</bean>
</property>
</bean>
<!-- Spring Data Jpa\u914d\u7f6e -->
<jpa:repositories base-package="com.hp.cmsz" transaction-manager-ref="transactionManager" entity-manager-factory-ref="entityManagerFactory"/>
<!-- Jpa \u4e8b\u52a1\u914d\u7f6e -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<!-- \u4f7f\u7528annotation\u5b9a\u4e49\u4e8b\u52a1 -->
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" />
<!-- JSR303 Validator\u5b9a\u4e49 -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
<!-- production\u73af\u5883 -->
<beans profile="production">
<context:property-placeholder ignore-unresolvable="true"
location="classpath*:/application.properties" />
<!-- \u6570\u636e\u6e90\u914d\u7f6e, \u4f7f\u7528Tomcat JDBC\u8fde\u63a5\u6c60 -->
<bean id="dataSourceTarget" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close">
<!-- Connection Info -->
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<!-- Connection Pooling Info -->
<property name="maxActive" value="${jdbc.pool.maxActive}" />
<property name="maxIdle" value="${jdbc.pool.maxIdle}" />
<property name="defaultAutoCommit" value="false" />
<!-- \u8fde\u63a5Idle\u4e00\u4e2a\u5c0f\u65f6\u540e\u8d85\u65f6 -->
<property name="timeBetweenEvictionRunsMillis" value="3600000" />
<property name="minEvictableIdleTimeMillis" value="3600000" />
</bean>
<!-- \u6570\u636e\u6e90\u914d\u7f6e,\u4f7f\u7528\u5e94\u7528\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u8fde\u63a5\u6c60 -->
<!--<jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/ExampleDB" />-->
</beans>
<!-- local development\u73af\u5883 -->
<beans profile="development">
<context:property-placeholder ignore-resource-not-found="true"
location="classpath*:/application.properties" />
<!-- Tomcat JDBC\u8fde\u63a5\u6c60 -->
<bean id="dataSourceTarget" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="defaultAutoCommit" value="false" />
</bean>
</beans>
</beans>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false" name="shiroCache">
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
/>
<cache name="tagCache"
maxElementsOnDisk="20000"
maxElementsInMemory="2000"
eternal="true"
overflowToDisk="true"
diskPersistent="true"/>
<!-- \u767b\u5f55\u8bb0\u5f55\u7f13\u5b58 \u9501\u5b9a10\u5206\u949f -->
<cache name="passwordRetryCache" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="0" overflowToDisk="false"
statistics="true" maxBytesLocalHeap="10M">
</cache>
<cache name="authorizationCache" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="0" overflowToDisk="false"
statistics="true" maxBytesLocalHeap="10M">
</cache>
<cache name="authenticationCache" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="0" overflowToDisk="false"
statistics="true" maxBytesLocalHeap="10M">
</cache>
<cache name="shiro-activeSessionCache" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="0" overflowToDisk="false"
statistics="true" maxBytesLocalHeap="10M" >
</cache>
</ehcache>
<!-- 1)\u6700\u597d\u5728ehcache.xml\u4e2d\u58f0\u660e\u4e0d\u8fdb\u884cupdateCheck -->
<!-- 2)\u4e3a\u4e86\u914d\u5408BigMemory\u548cSize Limit,\u539f\u6765\u7684\u5c5e\u6027\u6700\u597d\u6539\u540d -->
<!-- maxElementsInMemory->maxEntriesLocalHeap -->
<!-- maxElementsOnDisk->maxEntriesLocalDisk -->
<ehcache>
<diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"/>
<cache name="tagCache"
maxElementsOnDisk="20000"
maxElementsInMemory="2000"
eternal="true"
overflowToDisk="true"
diskPersistent="true"/>
</ehcache>
<!--
<diskStore>==========\u5f53\u5185\u5b58\u7f13\u5b58\u4e2d\u5bf9\u8c61\u6570\u91cf\u8d85\u8fc7maxElementsInMemory\u65f6,\u5c06\u7f13\u5b58\u5bf9\u8c61\u5199\u5230\u78c1\u76d8\u7f13\u5b58\u4e2d(\u9700\u5bf9\u8c61\u5b9e\u73b0\u5e8f\u5217\u5316\u63a5\u53e3)
<diskStore path="">==\u7528\u6765\u914d\u7f6e\u78c1\u76d8\u7f13\u5b58\u4f7f\u7528\u7684\u7269\u7406\u8def\u5f84,Ehcache\u78c1\u76d8\u7f13\u5b58\u4f7f\u7528\u7684\u6587\u4ef6\u540e\u7f00\u540d\u662f*.data\u548c*.index
name=================\u7f13\u5b58\u540d\u79f0,cache\u7684\u552f\u4e00\u6807\u8bc6(ehcache\u4f1a\u628a\u8fd9\u4e2acache\u653e\u5230HashMap\u91cc)
maxElementsOnDisk====\u78c1\u76d8\u7f13\u5b58\u4e2d\u6700\u591a\u53ef\u4ee5\u5b58\u653e\u7684\u5143\u7d20\u6570\u91cf,0\u8868\u793a\u65e0\u7a77\u5927
maxElementsInMemory==\u5185\u5b58\u7f13\u5b58\u4e2d\u6700\u591a\u53ef\u4ee5\u5b58\u653e\u7684\u5143\u7d20\u6570\u91cf,\u82e5\u653e\u5165Cache\u4e2d\u7684\u5143\u7d20\u8d85\u8fc7\u8fd9\u4e2a\u6570\u503c,\u5219\u6709\u4ee5\u4e0b\u4e24\u79cd\u60c5\u51b5
1)\u82e5overflowToDisk=true,\u5219\u4f1a\u5c06Cache\u4e2d\u591a\u51fa\u7684\u5143\u7d20\u653e\u5165\u78c1\u76d8\u6587\u4ef6\u4e2d
2)\u82e5overflowToDisk=false,\u5219\u6839\u636ememoryStoreEvictionPolicy\u7b56\u7565\u66ff\u6362Cache\u4e2d\u539f\u6709\u7684\u5143\u7d20
eternal==============\u7f13\u5b58\u4e2d\u5bf9\u8c61\u662f\u5426\u6c38\u4e45\u6709\u6548,\u5373\u662f\u5426\u6c38\u9a7b\u5185\u5b58,true\u65f6\u5c06\u5ffd\u7565timeToIdleSeconds\u548ctimeToLiveSeconds
timeToIdleSeconds====\u7f13\u5b58\u6570\u636e\u5728\u5931\u6548\u524d\u7684\u5141\u8bb8\u95f2\u7f6e\u65f6\u95f4(\u5355\u4f4d:\u79d2),\u4ec5\u5f53eternal=false\u65f6\u4f7f\u7528,\u9ed8\u8ba4\u503c\u662f0\u8868\u793a\u53ef\u95f2\u7f6e\u65f6\u95f4\u65e0\u7a77\u5927,\u6b64\u4e3a\u53ef\u9009\u5c5e\u6027
\u5373\u8bbf\u95ee\u8fd9\u4e2acache\u4e2d\u5143\u7d20\u7684\u6700\u5927\u95f4\u9694\u65f6\u95f4,\u82e5\u8d85\u8fc7\u8fd9\u4e2a\u65f6\u95f4\u6ca1\u6709\u8bbf\u95ee\u6b64Cache\u4e2d\u7684\u67d0\u4e2a\u5143\u7d20,\u90a3\u4e48\u6b64\u5143\u7d20\u5c06\u88ab\u4eceCache\u4e2d\u6e05\u9664
timeToLiveSeconds====\u7f13\u5b58\u6570\u636e\u5728\u5931\u6548\u524d\u7684\u5141\u8bb8\u5b58\u6d3b\u65f6\u95f4(\u5355\u4f4d:\u79d2),\u4ec5\u5f53eternal=false\u65f6\u4f7f\u7528,\u9ed8\u8ba4\u503c\u662f0\u8868\u793a\u53ef\u5b58\u6d3b\u65f6\u95f4\u65e0\u7a77\u5927
\u5373Cache\u4e2d\u7684\u67d0\u5143\u7d20\u4ece\u521b\u5efa\u5230\u6e05\u695a\u7684\u751f\u5b58\u65f6\u95f4,\u4e5f\u5c31\u662f\u8bf4\u4ece\u521b\u5efa\u5f00\u59cb\u8ba1\u65f6,\u5f53\u8d85\u8fc7\u8fd9\u4e2a\u65f6\u95f4\u65f6,\u6b64\u5143\u7d20\u5c06\u4eceCache\u4e2d\u6e05\u9664
overflowToDisk=======\u5185\u5b58\u4e0d\u8db3\u65f6,\u662f\u5426\u542f\u7528\u78c1\u76d8\u7f13\u5b58(\u5373\u5185\u5b58\u4e2d\u5bf9\u8c61\u6570\u91cf\u8fbe\u5230maxElementsInMemory\u65f6,Ehcache\u4f1a\u5c06\u5bf9\u8c61\u5199\u5230\u78c1\u76d8\u4e2d)
\u4f1a\u6839\u636e\u6807\u7b7e\u4e2dpath\u503c\u67e5\u627e\u5bf9\u5e94\u7684\u5c5e\u6027\u503c,\u5199\u5165\u78c1\u76d8\u7684\u6587\u4ef6\u4f1a\u653e\u5728path\u6587\u4ef6\u5939\u4e0b,\u6587\u4ef6\u7684\u540d\u79f0\u662fcache\u7684\u540d\u79f0,\u540e\u7f00\u540d\u662fdata
diskPersistent=======\u662f\u5426\u6301\u4e45\u5316\u78c1\u76d8\u7f13\u5b58,\u5f53\u8fd9\u4e2a\u5c5e\u6027\u7684\u503c\u4e3atrue\u65f6,\u7cfb\u7edf\u5728\u521d\u59cb\u5316\u65f6\u4f1a\u5728\u78c1\u76d8\u4e2d\u67e5\u627e\u6587\u4ef6\u540d\u4e3acache\u540d\u79f0,\u540e\u7f00\u540d\u4e3aindex\u7684\u6587\u4ef6
\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u5b58\u653e\u4e86\u5df2\u7ecf\u6301\u4e45\u5316\u5728\u78c1\u76d8\u4e2d\u7684cache\u7684index,\u627e\u5230\u540e\u4f1a\u628acache\u52a0\u8f7d\u5230\u5185\u5b58
\u8981\u60f3\u628acache\u771f\u6b63\u6301\u4e45\u5316\u5230\u78c1\u76d8,\u5199\u7a0b\u5e8f\u65f6\u6ce8\u610f\u6267\u884cnet.sf.ehcache.Cache.put(Element element)\u540e\u8981\u8c03\u7528flush()\u65b9\u6cd5
diskExpiryThreadIntervalSeconds==\u78c1\u76d8\u7f13\u5b58\u7684\u6e05\u7406\u7ebf\u7a0b\u8fd0\u884c\u95f4\u9694,\u9ed8\u8ba4\u662f120\u79d2
diskSpoolBufferSizeMB============\u8bbe\u7f6eDiskStore\uff08\u78c1\u76d8\u7f13\u5b58\uff09\u7684\u7f13\u5b58\u533a\u5927\u5c0f,\u9ed8\u8ba4\u662f30MB
memoryStoreEvictionPolicy========\u5185\u5b58\u5b58\u50a8\u4e0e\u91ca\u653e\u7b56\u7565,\u5373\u8fbe\u5230maxElementsInMemory\u9650\u5236\u65f6,Ehcache\u4f1a\u6839\u636e\u6307\u5b9a\u7b56\u7565\u6e05\u7406\u5185\u5b58
\u5171\u6709\u4e09\u79cd\u7b56\u7565,\u5206\u522b\u4e3aLRU(\u6700\u8fd1\u6700\u5c11\u4f7f\u7528)\u3001LFU(\u6700\u5e38\u7528\u7684)\u3001FIFO(\u5148\u8fdb\u5148\u51fa)
-->
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator
#Optional parameters
#log4jdbc.debug.stack.prefix=^
#log4jdbc.sqltiming.warn.threshold=
#log4jdbc.dump.sql.select=false
#log4jdbc.dump.sql.insert=false
#log4jdbc.dump.sql.update=false
#log4jdbc.dump.sql.delete=false
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!-- \u914d\u7f6elog\u6587\u4ef6\u7684\u5b58\u653e\u76ee\u5f55 -->
<property name="logDir" value="../../logDir" />
<appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDir}/CmszMonitorAnalysis.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${logDir}/CmszMonitorAnalysis.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- \u4fdd\u755930\u5929\u7684\u65e5\u5fd7\u8bb0\u5f55 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="com.hp.cmsz" level="DEBUG" />
<!--log4jdbc -->
<logger name="jdbc.sqltiming" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="console" />
<appender-ref ref="rollingFile" />
</root>
</configuration>
#################################################################
# P6Spy Options File #
# See documentation for detailed instructions #
#################################################################
#################################################################
# MODULES #
# #
# Modules provide the P6Spy functionality. If a module, such #
# as module_log is commented out, that functionality will not #
# be available. If it is not commented out (if it is active), #
# the functionality will be active. #
# #
# Values set in Modules cannot be reloaded using the #
# reloadproperties variable. Once they are loaded, they remain #
# in memory until the application is restarted. #
# #
#################################################################
module.log=com.p6spy.engine.logging.P6LogFactory
#module.outage=com.p6spy.engine.outage.P6OutageFactory
#gen a databse log file every day
rollingDatePattern='.'yyyy-MM-dd
#################################################################
# REALDRIVER(s) #
# #
# In your application server configuration file you replace the #
# "real driver" name with com.p6spy.engine.P6SpyDriver. This is #
# where you put the name of your real driver P6Spy can find and #
# register your real driver to do the database work. #
# #
# If your application uses several drivers specify them in #
# realdriver2, realdriver3. See the documentation for more #
# details. #
# #
# Values set in REALDRIVER(s) cannot be reloaded using the #
# reloadproperties variable. Once they are loaded, they remain #
# in memory until the application is restarted. #
# #
#################################################################
# oracle driver
# realdriver=oracle.jdbc.driver.OracleDriver
# mysql Connector/J driver
# realdriver=com.mysql.jdbc.Driver
# informix driver
# realdriver=com.informix.jdbc.IfxDriver
# ibm db2 driver
# realdriver=COM.ibm.db2.jdbc.net.DB2Driver
# the mysql open source driver
#realdriver=org.gjt.mm.mysql.Driver
#specifies another driver to use
realdriver2=com.vertica.jdbc.Driver
#specifies a third driver to use
realdriver3=
#the DriverManager class sequentially tries every driver that is
#registered to find the right driver. In some instances, it's possible to
#load up the realdriver before the p6spy driver, in which case your connections
#will not get wrapped as the realdriver will "steal" the connection before
#p6spy sees it. Set the following property to "true" to cause p6spy to
#explicitily deregister the realdrivers
deregisterdrivers=true
################################################################
# P6LOG SPECIFIC PROPERTIES #
################################################################
# no properties currently available
################################################################
# EXECUTION THRESHOLD PROPERTIES #
################################################################
# This feature applies to the standard logging of P6Spy. #
# While the standard logging logs out every statement #
# regardless of its execution time, this feature puts a time #
# condition on that logging. Only statements that have taken #
# longer than the time specified (in milliseconds) will be #
# logged. This way it is possible to see only statements that #
# have exceeded some high water mark. #
# This time is reloadable. #
#
# executionthreshold=integer time (milliseconds)
#
executionthreshold=
################################################################
# P6OUTAGE SPECIFIC PROPERTIES #
################################################################
# Outage Detection
#
# This feature detects long-running statements that may be indicative of
# a database outage problem. If this feature is turned on, it will log any
# statement that surpasses the configurable time boundary during its execution.
# When this feature is enabled, no other statements are logged except the long
# running statements. The interval property is the boundary time set in seconds.
# For example, if this is set to 2, then any statement requiring at least 2
# seconds will be logged. Note that the same statement will continue to be logged
# for as long as it executes. So if the interval is set to 2, and the query takes
# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals).
#
# outagedetection=true|false
# outagedetectioninterval=integer time (seconds)
#
outagedetection=false
outagedetectioninterval=
################################################################
# COMMON PROPERTIES #
################################################################
# filter what is logged
filter=false
# comma separated list of tables to include when filtering
include =
# comma separated list of tables to exclude when filtering
exclude =
# sql expression to evaluate if using regex filtering
sqlexpression =
# turn on tracing
autoflush = true
# sets the date format using Java's SimpleDateFormat routine
dateformat=
#list of categories to explicitly include
includecategories=
#list of categories to exclude: error, info, batch, debug, statement,
#commit, rollback and result are valid values
excludecategories=info,debug,result,resultset,batch
#allows you to use a regex engine or your own matching engine to determine
#which statements to log
#
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher
stringmatcher=
# prints a stack trace for every statement logged
stacktrace=false
# if stacktrace=true, specifies the stack trace to print
stacktraceclass=
# determines if property file should be reloaded
reloadproperties=false
# determines how often should be reloaded in seconds
reloadpropertiesinterval=60
#if=true then url must be prefixed with p6spy:
useprefix=false
#specifies the appender to use for logging
#appender=com.p6spy.engine.logging.appender.Log4jLogger
appender=com.p6spy.engine.logging.appender.StdoutLogger
#appender=com.p6spy.engine.logging.appender.FileLogger
# name of logfile to use, note Windows users should make sure to use forward slashes in their pathname (e:/test/spy.log) (used for file logger only)
#logfile=../../logDir/db_backup
# append to the p6spy log file. if this is set to false the
# log file is truncated every time. (file logger only)
#append=true
#The following are for log4j logging only
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
#log4j.appender.CHAINSAW_CLIENT.Port=4445
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
log4j.logger.p6spy=INFO,STDOUT
#################################################################
# DataSource replacement #
# #
# Replace the real DataSource class in your application server #
# configuration with the name com.p6spy.engine.spy.P6DataSource,#
# then add the JNDI name and class name of the real #
# DataSource here #
# #
# Values set in this item cannot be reloaded using the #
# reloadproperties variable. Once it is loaded, it remains #
# in memory until the application is restarted. #
# #
#################################################################
#realdatasource=/RealMySqlDS
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
#################################################################
# DataSource properties #
# #
# If you are using the DataSource support to intercept calls #
# to a DataSource that requires properties for proper setup, #
# define those properties here. Use name value pairs, separate #
# the name and value with a semicolon, and separate the #
# pairs with commas. #
# #
# The example shown here is for mysql #
# #
#################################################################
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb
#################################################################
# JNDI DataSource lookup #
# #
# If you are using the DataSource support outside of an app #
# server, you will probably need to define the JNDI Context #
# environment. #
# #
# If the P6Spy code will be executing inside an app server then #
# do not use these properties, and the DataSource lookup will #
# use the naming context defined by the app server. #
# #
# The two standard elements of the naming environment are #
# jndicontextfactory and jndicontextproviderurl. If you need #
# additional elements, use the jndicontextcustom property. #
# You can define multiple properties in jndicontextcustom, #
# in name value pairs. Separate the name and value with a #
# semicolon, and separate the pairs with commas. #
# #
# The example shown here is for a standalone program running on #
# a machine that is also running JBoss, so the JDNI context #
# is configured for JBoss (3.0.4). #
# #
#################################################################
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory
#jndicontextproviderurl=localhost:1099
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory
#jndicontextproviderurl=iiop://localhost:900
...@@ -16,7 +16,7 @@ import java.util.List; ...@@ -16,7 +16,7 @@ import java.util.List;
public interface FilterRuleDao extends JpaSpecificationExecutor<FilterRule>, public interface FilterRuleDao extends JpaSpecificationExecutor<FilterRule>,
PagingAndSortingRepository<FilterRule, Long>{ PagingAndSortingRepository<FilterRule, Long>{
List<FilterRule> findAllBywarningFilteringRuleId(Long id); FilterRule findAllBywarningFilteringRuleId(Long id);
List<FilterRule> findAllByProvinceIdInAndKpiIdInAndIfRepeatIn(List<Long> province,List<Long> kpi,List<String> repeat); List<FilterRule> findAllByProvinceIdInAndKpiIdInAndIfRepeatIn(List<Long> province,List<Long> kpi,List<String> repeat);
} }
package com.hp.cmsz.web.analysissupport; package com.hp.cmsz.web.analysissupport;
import com.google.gson.Gson;
import com.hp.cmsz.entity.*;
import com.hp.cmsz.repository.*;
import com.hp.cmsz.service.BusinessService;
import com.hp.cmsz.service.analysissupport.FilterRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.*;
/** /**
* 质量规则维护的修改过滤规则控制类 * 质量规则维护的修改过滤规则控制类
...@@ -15,10 +30,133 @@ import com.hp.cmsz.web.PageURLController; ...@@ -15,10 +30,133 @@ import com.hp.cmsz.web.PageURLController;
@Controller @Controller
@RequestMapping(value="AnalysisSupport/FilterRuleConfiguration") @RequestMapping(value="AnalysisSupport/FilterRuleConfiguration")
public class FilterRuleConfigurationController { public class FilterRuleConfigurationController {
@Autowired
private ProvinceDao provinceDao;
@Autowired
private ChannelDao channelDao;
@Autowired
private ChannelDataSourceMapDao channelDataSourceMapDao;
@Autowired
private BusinessService businessService;
@Autowired
private BusinessDao businessDao;
@Autowired
private KpiDao kpiDao;
@Autowired
private DataTypeDao dataTypeDao;
@Autowired
private DataSourceDao dataSourceDao;
@Autowired
private FilterRuleDao filterRuleDao;
@Autowired
private FilterRuleService filterRuleService;
@RequestMapping("")
public String updateFilterRuleForm(String filterRuleId, Map<String, Object> model) {
FilterRule fr = filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(filterRuleId));;
//查询出所有的省份
List<Province> provinceList=(List<Province>)provinceDao.findProvince();
//查询出所有的渠道信息
List<Channel> channelList=(List<Channel>)channelDao.findChannel();
//查询出所有的指标
List<Kpi> kpiList=(List<Kpi>)kpiDao.findAllByIsActive("Y");
//查询出所有的业务
List<Business> businessList=businessDao.findAllBusiness();
//查询出所有的数据类型
List<DataType> dataTypeList= (List<DataType>)dataTypeDao.findAll();
//查询出所有的数据来源
List<DataSource> dataSourceList=(List<DataSource>)dataSourceDao.findAll();
List<Long> kid = new ArrayList<Long>();
kid.add(fr.getKpiId());
List<Business> blist = kpiDao.getBusinessByRuleId(kid);
List<DataSource> dlist = kpiDao.getDataSourceByRuleId(kid);
List<Channel> clist = kpiDao.getChannelByRuleId(kid);
Gson gson = new Gson();
model.put("provinceList", provinceList);
model.put("channelList", channelList);
model.put("kpiList", kpiList);
model.put("businessList", businessList);
model.put("dataTypeList", dataTypeList);
model.put("dataSourceList", dataSourceList);
model.put("filterRule", fr);
model.put("Business", blist.get(0));
model.put("DataSource", dlist.get(0));
model.put("Channel", clist.get(0));
@RequestMapping()
public String updateFilterRuleForm() {
return PageURLController.FilterConfiguration; return PageURLController.FilterConfiguration;
} }
@RequestMapping("/FilterDelete")
@ResponseBody
public Map<String, String> FilterDelete(String filterRuleId) {
Map<String, String> m = new HashMap<String,String>();
filterRuleDao.delete(Long.parseLong(filterRuleId));
m.put("status","success");
return m;
}
@RequestMapping(value = "/updateRule",method = RequestMethod.POST)
public void createRule(
@RequestParam(value="ruleId") String ruleId,
@RequestParam(value="filterStartTime") String filterStartTime,
@RequestParam(value="filterEndTime") String filterEndTime,
@RequestParam(value="ifRepeate") String ifRepeate,
@RequestParam(value="cycle", required=false) String cycle,
@RequestParam(value="cycleUnit", required=false) String cycleUnit,
@RequestParam(value="filterReason") String filterReason,
HttpServletRequest request, HttpServletResponse response){
ifRepeate = ifRepeate.equals("0")?"1":"0";
FilterRule filterRule = filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(ruleId));
filterRule.setFilteringEndTime(Timestamp.valueOf(filterEndTime));
filterRule.setFilteringStartTime(Timestamp.valueOf(filterStartTime));
filterRule.setIfRepeat(ifRepeate);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
filterRule.setRuleCrtTime(Timestamp.valueOf(df.format(new Date())));
filterRule.setRuleUpdateTime(Timestamp.valueOf(df.format(new Date())));
filterRule.setValidFlag("1");
filterRule.setFilteringReason(filterReason);
if("1".equals(ifRepeate)){
if ("0".equals(cycleUnit)) {
filterRule.setFrequency(cycle+"/1440");
}else if ("1".equals(cycleUnit)) {
filterRule.setFrequency(cycle+"/24");
}else if ("2".equals(cycleUnit)) {
filterRule.setFrequency(cycle);
}else if ("3".equals(cycleUnit)) {
filterRule.setFrequency("ADD_MONTH("+cycle+")");
}
}else{
filterRule.setFrequency(null);
}
filterRuleDao.save(filterRule);
}
} }
...@@ -149,7 +149,7 @@ public class FilterRuleMaintainController { ...@@ -149,7 +149,7 @@ public class FilterRuleMaintainController {
filterRules.add(filterRule); filterRules.add(filterRule);
} }
} }
// filterRuleService.insertIntoRule(filterRules); filterRuleService.insertIntoRule(filterRules);
} }
......
...@@ -109,8 +109,8 @@ public class FilterRuleResultController { ...@@ -109,8 +109,8 @@ public class FilterRuleResultController {
List<FilterRule> filterRuleList = null; List<FilterRule> filterRuleList = null;
if(StringUtils.isNotEmpty(ruleId)){ if(StringUtils.isNotEmpty(ruleId)){
filterRuleList = filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(ruleId)); FilterRule fr = filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(ruleId));
filterRuleList.add(fr);
}else{ }else{
List<Long> kpi = new ArrayList<Long>(); List<Long> kpi = new ArrayList<Long>();
List<Long> provinceList = new ArrayList<Long>(); List<Long> provinceList = new ArrayList<Long>();
......
...@@ -249,6 +249,10 @@ public class TaskManageController { ...@@ -249,6 +249,10 @@ public class TaskManageController {
runTask.setTaskRunStatus("2"); runTask.setTaskRunStatus("2");
runTask.setTaskStatus("1"); runTask.setTaskStatus("1");
System.out.println("getTaskRunStatus:"+runTask.getTaskRunStatus());
System.out.println("getTaskStatus:"+runTask.getTaskStatus());
runTaskService.saveRunTask(runTask); runTaskService.saveRunTask(runTask);
String tabName = "自定义任务"; String tabName = "自定义任务";
if (new Long(1).equals(runTask.getDefaultTaskType())) { if (new Long(1).equals(runTask.getDefaultTaskType())) {
...@@ -340,7 +344,7 @@ public class TaskManageController { ...@@ -340,7 +344,7 @@ public class TaskManageController {
String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue(); String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue();
RunTask rt = runTaskService.getRunTask(Long.parseLong(id)); RunTask rt = runTaskService.getRunTask(Long.parseLong(id));
String path =modelSavePath+rt.getDataModelView().getModelScriptName()+" "+id; String path =modelSavePath+"/"+rt.getDataModelView().getModelScriptName()+" "+id+" 1";
// String path ="d:\\rscript\\a.r"; // String path ="d:\\rscript\\a.r";
try { try {
Runtime run = Runtime.getRuntime();// 返回与当前 Java 应用程序相关的运行时对象 Runtime run = Runtime.getRuntime();// 返回与当前 Java 应用程序相关的运行时对象
...@@ -383,7 +387,7 @@ public class TaskManageController { ...@@ -383,7 +387,7 @@ public class TaskManageController {
// System.out.println("fileName:"+path); // System.out.println("fileName:"+path);
String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue(); String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue();
File file = new File(modelSavePath+"img"+path); File file = new File(modelSavePath+path);
// File file = new File("d:\\rscript\\al.jpg"); // File file = new File("d:\\rscript\\al.jpg");
FileInputStream fis; FileInputStream fis;
try { try {
......
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" <%@ page language="java" pageEncoding="UTF-8" %>
pageEncoding="ISO-8859-1"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title> <title>过滤规则维护</title>
<style type="text/css">
.table-null .table{
margin-bottom: 0px;
}
.table-null .table > tbody > tr > td, .table-null .table > thead > tr > th{
text-align: center;
width: 25%;
}
.table-null td:first-child{
text-align: right;
width: 36%;
}
.table-null tr td:last-child .form-control,.table-null tr td:last-child table{
width: 400px;
}
.file-box{ position:relative;}
.file{ position:absolute; top:0; height:30px; filter:alpha(opacity:0);opacity:0;width:470px;cursor: pointer; }
</style>
</head> </head>
<body> <body>
<div class="container">
<ol class="breadcrumb">
<li><a href="${ctx}/index">首页</a></li>
<li>数据质量核查</li>
<li>过滤规则维护</li>
<li class="active">规则修改</li>
</ol>
</div>
<div id="main-container main-tab-container">
<div id="content" class="container">
<div class="section">
<div class="tab-content">
<div class="tab-pane fade in active" id="home">
<div class="row">
<div class="col-xs-12">
<div class="table-header">过滤规则修改#${filterRule.warningFilteringRuleId}</div>
<form action="#" class="form-horizontal" id="filterMaintainForm" method="post" enctype="multipart/form-data">
<table id="filterMaintainTable" class="table-null">
<input type="hidden" name="ruleId" value="${filterRule.warningFilteringRuleId}"/>
<tr><td>省份:</td>
<td><div style="width: 50%">
<c:forEach var="province" items="${provinceList}">
<c:if test="${filterRule.provinceId == province.provinceId}">
<span>${province.provinceName}</span>
</c:if>
</c:forEach>
</div></td>
</tr>
<tr><td>数据来源:</td>
<td>
<c:forEach var="dataSource" items="${dataSourceList}">
<c:if test="${dataSource.dataSourceId == DataSource.dataSourceId}">
<span>${dataSource.dataSourceName}</span>
</c:if >
</c:forEach>
</td>
</tr>
<tr><td>渠道:</td>
<td>
<c:forEach var="channel" items="${channelList}">
<c:if test="${channel.channelId == Channel.channelId}">
<span>${channel.channelName}</span>
</c:if >
</c:forEach>
</td>
</tr>
<tr><td>业务:</td>
<td >
<c:forEach var="business" items="${businessList}">
<c:if test="${business.businessId == Business.businessId}">
<span>${Business.businessName}</span>
</c:if >
</c:forEach>
</td>
</tr>
<tr><td>指标:</td>
<td>
<c:forEach var="kpi" items="${kpiList}">
<c:if test="${kpi.kpiId == filterRule.kpiId}">
<span>${kpi.kpiName}</span>
</c:if >
</c:forEach>
</td>
</tr>
<tr><td>生效开始时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control timeSelect" id="filterStartTime" name="filterStartTime" onfocus="WdatePicker({onpicked:changeDate})" value="${filterRule.filteringStartTime}" /></td></tr>
<tr><td>生效结束时间(<font color="red">必填</font>):</td><td><input id="filterEndTime" name="filterEndTime" class="form-control timeSelect" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'filterStartTime\')}',onpicked:changeDate})" value="${filterRule.filteringEndTime}" /> </td></tr>
<tr><td>是否重复(<font color="red">必填</font>):</td><td>
<c:if test="${filterRule.ifRepeat eq '0'}">
</c:if>
<div><script type="">
var s = "${filterRule.ifRepeat}";
if(s == 1){
document.write("<input type='radio' class='ifRepeate' name='ifRepeate' value='0' checked/>是" +
" <input type='radio' class='ifRepeate' name='ifRepeate' value='1' />否")
}else{
document.write("<input type='radio' class='ifRepeate' name='ifRepeate' value='0' />是" +
" <input type='radio' class='ifRepeate' name='ifRepeate' value='1' checked/>否")
}
</script></div>
</td></tr>
<tr class="period"><td>过滤周期(<font color="red">必填</font>):</td>
<td>
<input type="text" style="width: 20%;float: left" class="form-control" name="cycle" id="cycle" />
<select style="width: 12%;float: left" class="form-control" name="cycleUnit" id="unit" >
</select>
</td>
</tr>
<tr><td>过滤原因(<font color="red">必填</font>):</td><td>
<input type='text' name='filterReason' id='filterReason' class="form-control" value="${filterRule.filteringReason}" style="display: inline;"/>
</td></tr>
<tr><td></td><td><button type="button" id="ruleSubmit" class="btn btn-primary">确定</button>
<button type="reset" class="btn btn-warning" id="ruleBack" >返回</button>
</td></tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function isRepeat(){
var selectValue = $("input:radio[name='ifRepeate']:checked").val();
if (selectValue == 0){
var alertMsg=[];
var filterStartTime = $("#filterStartTime").val();
if(filterStartTime ===""){
alertMsg.push("您没有选择生效开始时间,请先选择生效开始时间和结束时间")
}
var filterEndTime = $("#filterEndTime").val();
if(filterEndTime ===""){
alertMsg.push("您没有选择生效结束时间,请先选择生效开始时间和结束时间")
}
if(alertMsg.length ===0){
var timeDifference = new Date(filterEndTime).getTime() - new Date(filterStartTime).getTime();
var $unit = $("#unit");
$unit.empty();
if(timeDifference<(1000*60*60*24)){
$unit.append(new Option("分钟",0));
$unit.append(new Option("小时",1))
}
$unit.append(new Option("天",2));
$unit.append(new Option("月",3))
}else{
var msg ="";
alertMsg.forEach(function (t,i) {
msg+="<span style='color: red'>"+(i+1)+"."+t+"</span><br />"
});
$.dialog({
title: "提醒",
content:msg,
ok: function(){
},
okValue:"确定",
lock:true
});
}
$(".period").show();
}
if (selectValue == 1){
$(".period").hide();
}
}
isRepeat();
$(".ifRepeate").change(isRepeat);
if("${filterRule.ifRepeat}" == 1){
var cycle = "${filterRule.frequency}";
var $unit = $("#unit");
if(cycle.indexOf("/")){
var type = cycle.split("/")[1];
if(type==="1440"){
$unit.val(0);
}else{
$unit.val(1);
}
var value = cycle.split("/")[0];
}
else{
if(cycle.indexOf("ADD")){
$unit.val(3);
value = cycle.substring(cycle.indexOf("("),cycle.length-1);
}else{
$unit.val(2);
value = cycle;
}
}
$("#cycle").val(value)
};
$('#ruleSubmit').click(function () {
var alertMsg = [];
var filterStartTime = $("#filterStartTime").val();
if(filterStartTime ===""){
alertMsg.push("您没有选择生效开始时间,请选择生效开始时间")
}
var filterEndTime = $("#filterEndTime").val();
if(filterEndTime ===""){
alertMsg.push("您没有选择生效结束时间,请选择生效结束时间")
}
var filterReason = $("#filterReason").val();
if(filterReason ===""){
alertMsg.push("您没有填写过滤原因,请填写过滤原因")
}
var ifRepeate = $("input:radio[name='ifRepeate']:checked").val();
var cycle = $("#cycle").val();
if(ifRepeate ===0 && cycle===""){
alertMsg.push("您选择了重复,请填写重复周期")
}
if(alertMsg.length ===0){
$.dialog({
title: "提醒",
content:"确定修改该规则吗?",
ok: function(){
$.ajax({
cache: true,
type : "POST",
async: false,
dataType : "json",
url: "${ctx}/AnalysisSupport/FilterRuleConfiguration/updateRule",
data:$("#filterMaintainForm").serialize(),
success: function(data){
window.location.href="${ctx}/AnalysisSupport/FilterRuleResult";
}
})
},
okValue:"确定",
cancel: function(){},
cancelValue:"返回",
lock:true
});
}
else{
var msg="";
alertMsg.forEach(function (t,i) {
msg+="<span style='color: red'>"+(i+1)+"."+t+"</span><br />"
});
$.dialog({
title: "提醒",
content:msg,
ok: function(){
},
okValue:"确定",
lock:true
});
}
})
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<title>质量规则维护</title> <title>过滤规则维护</title>
<style> <style>
.table-null .table{ .table-null .table{
margin-bottom: 0px; margin-bottom: 0px;
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
</div> </div>
</div> </div>
</div> </div>
</body>
<script type="text/javascript"> <script type="text/javascript">
$("#ruleBack").click(function(){ $("#ruleBack").click(function(){
location.href="${ctx}/AnalysisSupport/FilterRuleResult"; location.href="${ctx}/AnalysisSupport/FilterRuleResult";
...@@ -170,13 +171,6 @@ $(".ifRepeate").change(function (){ ...@@ -170,13 +171,6 @@ $(".ifRepeate").change(function (){
$(".period").hide(); $(".period").hide();
} }
}); });
function changeDate() { function changeDate() {
$("input[name='ifRepeate']:eq(1)").attr("checked",'checked'); $("input[name='ifRepeate']:eq(1)").attr("checked",'checked');
...@@ -359,10 +353,6 @@ $('#ruleSubmit').click(function () { ...@@ -359,10 +353,6 @@ $('#ruleSubmit').click(function () {
if(ifRepeate ===0 && cycle===""){ if(ifRepeate ===0 && cycle===""){
alertMsg.push("您选择了重复,请填写重复周期") alertMsg.push("您选择了重复,请填写重复周期")
} }
if(alertMsg.length ===0){ if(alertMsg.length ===0){
$.dialog({ $.dialog({
title: "提醒", title: "提醒",
...@@ -402,19 +392,6 @@ $('#ruleSubmit').click(function () { ...@@ -402,19 +392,6 @@ $('#ruleSubmit').click(function () {
lock:true lock:true
}); });
} }
}) })
......
...@@ -202,24 +202,40 @@ ...@@ -202,24 +202,40 @@
}); });
$("#updateFilter").click(function(){ $("#updateFilter").click(function(){
var pageNum = $("#goPageNo").val(); var filterRuleId = $("input[name='update']:checked").val();
$.dialog({ $.dialog({
title: "提醒", title: "提醒",
content:"确定修改过滤规则?", content:"确定修改过滤规则?",
ok: function(){location.href="${ctx}/AnalysisSupport/FilterConfiguration?qualityRuleId="+qualityRuleId;}, ok: function(){location.href="${ctx}/AnalysisSupport/FilterRuleConfiguration?filterRuleId="+filterRuleId;},
okValue:"确定", okValue:"确定",
cancel: function(){}, cancel: function(){},
cancelValue:"取消", cancelValue:"取消",
lock:true lock:true
}); });
}); });
$("#deleteFilter").click(function(){ $("#deleteFilter").click(function(){
var pageNum = $("#goPageNo").val(); var filterRuleId = $("input[name='update']:checked").val();
$.dialog({ $.dialog({
title: "提醒", title: "提醒",
content:"确定删除过滤规则?", content:"确定删除过滤规则?<span style='color: red'>(该操作不可逆)</span>",
ok: function(){location.href="${ctx}/AnalysisSupport/FilterDelete?qualityRuleId="+qualityRuleId;}, ok: function(){
var url = "${ctx}/AnalysisSupport/FilterRuleConfiguration/FilterDelete?filterRuleId="+filterRuleId;
$.ajax({
url:url,
cache: true,
type : "GET",
async: false,
dataType : "json",
success: function(data){
console.log(data)
if(data.status === "success"){
location.href = "${ctx}/AnalysisSupport/FilterRuleResult"
}
}
})
},
okValue:"确定", okValue:"确定",
cancel: function(){}, cancel: function(){},
cancelValue:"取消", cancelValue:"取消",
......
...@@ -126,8 +126,8 @@ function filterResultDetailTable(){ ...@@ -126,8 +126,8 @@ function filterResultDetailTable(){
jsonData=document.getElementById('filterRuleView').value; jsonData=document.getElementById('filterRuleView').value;
var header = new Array(); var header = new Array();
header[0] = ["","<input type='radio' name='update'id='update' onclick='javascript:radioChoose(this);'/>","1%",""]; header[0] = ["","radio","1%",""];
header[1] = ["过滤规则ID","warningFilteringRuleId","7%","15"]; header[1] = ["过滤规则ID","warningFilteringRuleId","7%","15"];
header[2] = ["省份","provinceId","7%","15"]; header[2] = ["省份","provinceId","7%","15"];
header[3] = ["渠道","channel","7%","15"]; header[3] = ["渠道","channel","7%","15"];
header[4] = ["业务","business","7%","15"]; header[4] = ["业务","business","7%","15"];
...@@ -333,14 +333,19 @@ table_pagging.prototype = { ...@@ -333,14 +333,19 @@ table_pagging.prototype = {
unit="天" unit="天"
} }
} }
tdContext = value+unit; if(value==="&nbsp;"){
tdContext = "&nbsp;";
}else{
tdContext = value+unit;
}
} }
} }
} else { } else {
tdContext=this.header[k][1]+"<span style='display:none'>"+i+"</span>";
// tdContext=this.header[k][1]; tdContext="<input type='radio' name='update' onclick='radioChoose(this)' value='"+this.getData(this.objectlist[i],'warningFilteringRuleId')+"'/>"+"<span style='display:none'>"+i+"</span>";
} }
} else { } else {
tdContext = "&nbsp;"; tdContext = "&nbsp;";
...@@ -619,13 +624,12 @@ table_pagging.prototype = { ...@@ -619,13 +624,12 @@ table_pagging.prototype = {
} }
function radioChoose(clickObj){ function radioChoose(clickObj){
var obj = eval("(" + jsonData + ")");
//alert(obj);
if(clickObj.checked){ if(clickObj.checked){
//alert(clickObj); $("#updateFilter").attr("disabled", false);
//alert(clickObj.nextSibling.innerHTML); $("#deleteFilter").attr("disabled", false);
$("#updateModel").attr("disabled", false);
modelId=parseInt(obj[parseInt(clickObj.nextSibling.innerHTML)].dataModelId); }else{
$("#updateFilter").attr("disabled", false);
$("#deleteFilter").attr("disabled", false);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment