diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..c607b546c
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+# editorconfig.org
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[{package.json,.travis.yml}]
+indent_size = 2
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4bee36e01..ca639f871 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,89 @@
+## 0.6.0(Dec, 2018)
+
+[#388] Cluster name should be provided in the Instance
+[#377] Clean up messy code in Naming module
+[#369] Support instance list persisted on disk
+[#366] findbugs-maven-plugin version
+[#362] The metadata will lost when online or offline instance through web ui
+[#352] Refactoring internationalization Nacos console
+[#278] Nacos docker img
+[#243] optimize the efficiency of integration testing, it’s taking too long now
+
+## 0.5.0(Nov, 2018)
+
+[#148] Naming write performace.
+[#175] Support deregistering instance automatically.
+[#176] Naming client query instance method should bypass local cache at client start.
+[#177] Console supports registering new empty service and delete empty service.
+[#181] NPE when adding a instance if no leader in the raft cluster.
+[#193] Configure host domain name cause nacos server cluster is unavailable.
+[#209] Disable service and cluster level customization in client registerInstance method.
+[#214] Please support Java 11.
+[#222] print more nacos server start status info in start.log.
+[#231] Refactoring: Parsing the Nacos home directory and the cluster.conf file.
+[#246] "mvn -B clean apache-rat:check findbugs:findbugs" did not work as expected.
+[#251] Console Editor Optimization.
+[#254] DataId and group are required in historical version and listener query.
+[#256] Whether the service discovery data needs to add a newline link symbol.
+[#257] Listening query switching query dimension data is not refreshed.
+[#258] Remove the Balloon of DataId/Group.
+[#259] Listening query paging size problem.
+[#272] "#it is ip" is also parsed into an instance IP.
+[#275] nacos coredns plugin to support DNS.
+[#281] We should lint the console code.
+[#302] Maven build project supports java 11.
+[#316] In stand alone mode, Nacos still checks the cluster.conf.
+
+## 0.4.0(Nov 7, 2018)
+
+[#216] Fix tenant dir problem
+[#197] Service update ignored some properties
+[#190] Client beat lose weight info and metadata info
+[#188] Console delete data cannot be updated in time
+[#179] Listening query fail when namespace is not blank
+[#157] Lack information in readme.md to describe the related project repositories for Nacos echosystem
+[#144] There have a error and something are not clear
+[#106] Snapshot file create error
+[#92] Eliminate warnings, refactor code, show start.log detail
+
+
+## 0.3.0(Oct 26, 2018)
+
+[#171] UI debug errors
+[#156] Web UI 404 problem
+[#155] use local resource
+[#145] nacos-example not found :org.apache.logging.log4j.core.Logger
+[#142] UI console show Group
+[#149] Fix naming client beat process failed bug.
+[#150] Fix naming service registration hangs bug.
+
+## 0.3.0-RC1(Oct 19, 2018)
+
+[#33] Support console for config management.
+[#51] Support console for naming service.
+[#121] Fix get instance method hanging bug.
+[#138] Add a flag to indicate if instance is offline.
+[#130] Fix health check disabled if machine has one CPU core bug.
+[#139] Fix still get instance with zero weight bug.
+[#128] Fix console layout bug.
+
+
+
+## 0.2.1-release(Sept 28, 2018)
+
+* FIx deregister last instance failed error.
+* Fix url pattern error.
+* Fully integrate with and seamlessly support Spring framework, Spring Boot and Spring Cloud
+* Separate nacos-api from nacos client implementation
+* Support high available cluster mode
+* Fix cluster node health check abnormality
+* Fix stand-alone mode gets the change history list exception
+* Fix Pulling does not exist configuration print io exception
+* Optimized log framework
+* Service Discovery: Client support getting server status.
+* Service Discovery: Client support get all service names of server.
+* Service Discovery: Client support get all subscribed services.
+
## 0.2.0 (Sept 17, 2018)
#### FEATURES:
diff --git a/README.md b/README.md
index 3e0abaff9..a91e959a9 100644
--- a/README.md
+++ b/README.md
@@ -40,9 +40,9 @@ It is super easy to get started with your first project.
You can download the package from the [latest stable release](https://github.com/alibaba/nacos/releases).
-Take release nacos-server-0.5.0.zip for example.
+Take release nacos-server-0.6.0.zip for example.
```
-unzip nacos-server-0.5.0.zip
+unzip nacos-server-0.6.0.zip
cd nacos/bin
```
diff --git a/api/pom.xml b/api/pom.xml
index fef8a3c4e..eb5a663dc 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -12,55 +12,55 @@
limitations under the License.
-->
-
- com.alibaba.nacos
- nacos-all
- 0.5.0
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ com.alibaba.nacos
+ nacos-all
+ 0.6.0
+
- 4.0.0
+ 4.0.0
- nacos-api
- jar
+ nacos-api
+ jar
- nacos-api ${project.version}
- http://maven.apache.org
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- 7
-
-
-
-
+ nacos-api ${project.version}
+ http://maven.apache.org
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 7
+
+
+
+
-
- UTF-8
-
+
+ UTF-8
+
-
-
- com.alibaba
- fastjson
-
-
- org.apache.commons
- commons-lang3
-
-
- junit
- junit
- test
-
-
- org.springframework
- spring-test
- test
-
-
+
+
+ com.alibaba
+ fastjson
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ junit
+ junit
+ test
+
+
+ org.springframework
+ spring-test
+ test
+
+
diff --git a/client/pom.xml b/client/pom.xml
index a32b70d60..53b1959cd 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -16,7 +16,7 @@
com.alibaba.nacos
nacos-all
- 0.5.0
+ 0.6.0
../pom.xml
diff --git a/client/src/main/java/com/alibaba/nacos/client/logger/json/parser/ParseException.java b/client/src/main/java/com/alibaba/nacos/client/logger/json/parser/ParseException.java
index d094a645c..10430345d 100644
--- a/client/src/main/java/com/alibaba/nacos/client/logger/json/parser/ParseException.java
+++ b/client/src/main/java/com/alibaba/nacos/client/logger/json/parser/ParseException.java
@@ -66,8 +66,8 @@ public class ParseException extends Exception {
}
/**
- * @return One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character
- * ERROR_UNEXPECTED_TOKEN com.alibaba.nacos.client.logger.jsonparser.Yytoken ERROR_UNEXPECTED_EXCEPTION
+ * @return One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character
+ * ERROR_UNEXPECTED_TOKEN com.alibaba.nacos.client.logger.jsonparser.Yytoken ERROR_UNEXPECTED_EXCEPTION
* java.lang.Exception
* @see com.alibaba.nacos.client.logger.json.parser.Yytoken
*/
diff --git a/common/pom.xml b/common/pom.xml
index 037644879..7cdf938d9 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -18,7 +18,7 @@
com.alibaba.nacos
nacos-all
- 0.5.0
+ 0.6.0
../pom.xml
4.0.0
diff --git a/config/pom.xml b/config/pom.xml
index 52afa2881..0dadee126 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -12,175 +12,175 @@
limitations under the License.
-->
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- com.alibaba.nacos
- nacos-all
- 0.5.0
-
+
+ com.alibaba.nacos
+ nacos-all
+ 0.6.0
+
- 4.0.0
+ 4.0.0
- nacos-config
- jar
+ nacos-config
+ jar
- nacos-config ${project.version}
- http://maven.apache.org
+ nacos-config ${project.version}
+ http://maven.apache.org
-
- UTF-8
-
+
+ UTF-8
+
-
-
- junit
- junit
- test
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- ${project.groupId}
- nacos-core
-
-
- com.google.guava
- guava
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-jdbc
-
-
- commons-io
- commons-io
-
-
- commons-lang
- commons-lang
- 2.6
-
-
- mysql
- mysql-connector-java
-
-
- commons-dbcp
- commons-dbcp
-
-
- org.apache.derby
- derby
-
-
- ch.qos.logback
- logback-classic
-
+
+
+ junit
+ junit
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ ${project.groupId}
+ nacos-core
+
+
+ com.google.guava
+ guava
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+ commons-io
+ commons-io
+
+
+ commons-lang
+ commons-lang
+ 2.6
+
+
+ mysql
+ mysql-connector-java
+
+
+ commons-dbcp
+ commons-dbcp
+
+
+ org.apache.derby
+ derby
+
+
+ ch.qos.logback
+ logback-classic
+
-
-
- org.aspectj
- aspectjrt
-
-
- cglib
- cglib-nodep
-
-
- org.apache.httpcomponents
- httpasyncclient
-
-
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.codehaus.jackson
- jackson-mapper-lgpl
-
-
- net.jcip
- jcip-annotations
- true
-
-
- com.github.spotbugs
- spotbugs-annotations
-
-
- org.mockito
- mockito-core
- test
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- true
- -Dnacos.standalone=true
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
-
-
-
- com.alibaba.nacos.config.server.Config
-
-
-
- jar-with-dependencies
-
-
-
-
-
-
-
-
- springboot
-
-
- com.alibaba.nacos
- nacos-core
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
- com.alibaba.nacos.config.server.Config
-
-
-
- nacos-config
-
-
-
+
+
+ org.aspectj
+ aspectjrt
+
+
+ cglib
+ cglib-nodep
+
+
+ org.apache.httpcomponents
+ httpasyncclient
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+ org.codehaus.jackson
+ jackson-mapper-lgpl
+
+
+ net.jcip
+ jcip-annotations
+ true
+
+
+ com.github.spotbugs
+ spotbugs-annotations
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+ -Dnacos.standalone=true
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+
+ com.alibaba.nacos.config.server.Config
+
+
+
+ jar-with-dependencies
+
+
+
+
+
+
+
+
+ springboot
+
+
+ com.alibaba.nacos
+ nacos-core
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ com.alibaba.nacos.config.server.Config
+
+
+
+ nacos-config
+
+
+
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/utils/RunningConfigUtils.java b/config/src/main/java/com/alibaba/nacos/config/server/utils/RunningConfigUtils.java
index f16a1289c..4dcb10d52 100644
--- a/config/src/main/java/com/alibaba/nacos/config/server/utils/RunningConfigUtils.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/utils/RunningConfigUtils.java
@@ -24,6 +24,7 @@ import javax.servlet.ServletContext;
/**
* Running config
+ *
* @author nkorange
*/
@Component
@@ -32,18 +33,18 @@ public class RunningConfigUtils implements ApplicationListener
+
+
- ${user.home}/nacos/logs/config-dump.log
+ ${LOG_HOME}/config-dump.log
true
- ${user.home}/nacos/logs/config-dump.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-dump.log.%d{yyyy-MM-dd}.%i
2GB
15
7GB
@@ -13,15 +15,15 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-pull.log
+ ${LOG_HOME}/config-pull.log
true
- ${user.home}/nacos/logs/config-pull.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-pull.log.%d{yyyy-MM-dd}.%i
20MB
15
128MB
@@ -29,15 +31,15 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-fatal.log
+ ${LOG_HOME}/config-fatal.log
true
- ${user.home}/nacos/logs/config-fatal.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-fatal.log.%d{yyyy-MM-dd}.%i
20MB
15
128MB
@@ -45,15 +47,15 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-memory.log
+ ${LOG_HOME}/config-memory.log
true
- ${user.home}/nacos/logs/config-memory.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-memory.log.%d{yyyy-MM-dd}.%i
20MB
15
128MB
@@ -61,15 +63,15 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-pull-check.log
+ ${LOG_HOME}/config-pull-check.log
true
- ${user.home}/nacos/logs/config-pull-check.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-pull-check.log.%d{yyyy-MM-dd}.%i
1GB
15
3GB
@@ -77,16 +79,16 @@
%msg%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-acl.log
+ ${LOG_HOME}/config-acl.log
true
- ${user.home}/nacos/logs/config-acl.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-acl.log.%d{yyyy-MM-dd}.%i
50MB
15
512MB
@@ -94,16 +96,16 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-client-request.log
+ ${LOG_HOME}/config-client-request.log
true
- ${user.home}/nacos/logs/config-client-request.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-client-request.log.%d{yyyy-MM-dd}.%i
2GB
15
7GB
@@ -111,16 +113,16 @@
%date|%msg%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-sdk-request.log
+ ${LOG_HOME}/config-sdk-request.log
true
- ${user.home}/nacos/logs/config-sdk-request.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-sdk-request.log.%d{yyyy-MM-dd}.%i
1GB
15
3GB
@@ -128,16 +130,16 @@
%date|%msg%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-trace.log
+ ${LOG_HOME}/config-trace.log
true
- ${user.home}/nacos/logs/config-trace.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-trace.log.%d{yyyy-MM-dd}.%i
2GB
15
7GB
@@ -145,16 +147,16 @@
%date|%msg%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-notify.log
+ ${LOG_HOME}/config-notify.log
true
- ${user.home}/nacos/logs/config-notify.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-notify.log.%d{yyyy-MM-dd}.%i
1GB
15
3GB
@@ -162,16 +164,16 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-app.log
+ ${LOG_HOME}/config-app.log
true
- ${user.home}/nacos/logs/config-app.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-app.log.%d{yyyy-MM-dd}.%i
20MB
15
128MB
@@ -179,16 +181,16 @@
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/nacos/logs/config-server.log
+ ${LOG_HOME}/config-server.log
true
- ${user.home}/nacos/logs/config-server.log.%d{yyyy-MM-dd}.%i
+ ${LOG_HOME}/config-server.log.%d{yyyy-MM-dd}.%i
50MB
15
512MB
@@ -196,7 +198,7 @@
%date %level %msg%n%n
- GBK
+ UTF-8
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerUnitTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerUnitTest.java
index a31fb5310..c8cf6930b 100644
--- a/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerUnitTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerUnitTest.java
@@ -41,27 +41,27 @@ import com.alibaba.nacos.config.server.service.DataSourceService;
@ContextConfiguration(classes = MockServletContext.class)
@WebAppConfiguration
public class HealthControllerUnitTest {
-
- @InjectMocks
- HealthController healthController;
+ @InjectMocks
+ HealthController healthController;
- @Mock
- DataSourceService dataSourceService;
+ @Mock
+ DataSourceService dataSourceService;
+
+ private MockMvc mockmvc;
- private MockMvc mockmvc;
@Before
public void setUp() throws Exception {
- mockmvc = MockMvcBuilders.standaloneSetup(healthController).build();
+ mockmvc = MockMvcBuilders.standaloneSetup(healthController).build();
}
@Test
- public void testGetHealth() throws Exception{
+ public void testGetHealth() throws Exception {
+
+ Mockito.when(dataSourceService.getHealth()).thenReturn("UP");
+ MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH);
+ String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString();
+ Assert.assertEquals("UP", actualValue);
- Mockito.when(dataSourceService.getHealth()).thenReturn("UP");
- MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH);
- String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString();
- Assert.assertEquals("UP", actualValue);
-
}
}
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java
index fa1420be5..6853998ab 100644
--- a/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java
@@ -15,30 +15,28 @@
*/
package com.alibaba.nacos.config.server.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
-import com.alibaba.nacos.config.server.service.AggrWhitelist;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class AggrWhitelistTest {
AggrWhitelist service;
-
+
@Before
public void before() throws Exception {
service = new AggrWhitelist();
}
-
+
@Test
public void testIsAggrDataId() {
List list = new ArrayList();
@@ -46,12 +44,12 @@ public class AggrWhitelistTest {
list.add("NS_NACOS_SUBSCRIPTION_TOPIC_*");
list.add("com.taobao.tae.AppListOnGrid-*");
service.compile(list);
-
+
assertEquals(false, service.isAggrDataId("com.abc"));
assertEquals(false, service.isAggrDataId("com.taobao.jiuren"));
assertEquals(false, service.isAggrDataId("com.taobao.jiurenABC"));
assertEquals(true, service.isAggrDataId("com.taobao.jiuren.abc"));
assertEquals(true, service.isAggrDataId("NS_NACOS_SUBSCRIPTION_TOPIC_abc"));
assertEquals(true, service.isAggrDataId("com.taobao.tae.AppListOnGrid-abc"));
- }
+ }
}
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java
index e792df201..c5ec39dac 100644
--- a/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java
@@ -15,19 +15,14 @@
*/
package com.alibaba.nacos.config.server.service;
+import com.alibaba.nacos.config.server.utils.GroupKey2;
import org.junit.Assert;
-
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
-import com.alibaba.nacos.config.server.service.ClientTrackService;
-import com.alibaba.nacos.config.server.service.ConfigService;
-import com.alibaba.nacos.config.server.utils.GroupKey2;
-
-
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class ClientTrackServiceTest {
@@ -44,7 +39,7 @@ public class ClientTrackServiceTest {
String group = "online";
String groupKey = GroupKey2.getKey(dataId, group);
String md5 = "xxxxxxxxxxxxx";
-
+
ConfigService.updateMd5(groupKey, md5, System.currentTimeMillis());
ClientTrackService.trackClientMd5(clientIp, groupKey, md5);
@@ -53,7 +48,7 @@ public class ClientTrackServiceTest {
Assert.assertEquals(true, ClientTrackService.isClientUptodate(clientIp).get(groupKey));
Assert.assertEquals(1, ClientTrackService.subscribeClientCount());
Assert.assertEquals(1, ClientTrackService.subscriberCount());
-
+
//服务端数据更新
ConfigService.updateMd5(groupKey, md5 + "111", System.currentTimeMillis());
Assert.assertEquals(false, ClientTrackService.isClientUptodate(clientIp).get(groupKey));
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java
index 93382ec8f..6863ed5e9 100755
--- a/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java
@@ -17,50 +17,46 @@ package com.alibaba.nacos.config.server.service;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
-import com.alibaba.nacos.config.server.service.DiskUtil;
-
import javax.servlet.ServletContext;
-
-import static org.junit.Assert.assertEquals;
-
import java.io.File;
import java.io.IOException;
+import static org.junit.Assert.assertEquals;
+
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class DiskServiceUnitTest {
- private DiskUtil diskService;
+ private DiskUtil diskService;
- private ServletContext servletContext;
+ private ServletContext servletContext;
- private File tempFile;
+ private File tempFile;
- private String path;
+ private String path;
- @Before
- public void setUp() throws IOException {
- this.tempFile = File.createTempFile("diskServiceTest", "tmp");
- this.path = tempFile.getParent();
- this.diskService = new DiskUtil();
- }
+ @Before
+ public void setUp() throws IOException {
+ this.tempFile = File.createTempFile("diskServiceTest", "tmp");
+ this.path = tempFile.getParent();
+ this.diskService = new DiskUtil();
+ }
- @Test
- public void testCreateConfig() throws IOException {
- diskService.saveToDisk("testDataId", "testGroup", "testTenant", "testContent");
- String content = diskService.getConfig("testDataId", "testGroup", "testTenant");
- assertEquals(content, "testContent");
+ @Test
+ public void testCreateConfig() throws IOException {
+ diskService.saveToDisk("testDataId", "testGroup", "testTenant", "testContent");
+ String content = diskService.getConfig("testDataId", "testGroup", "testTenant");
+ assertEquals(content, "testContent");
- }
+ }
- @After
- public void tearDown() throws IOException {
- tempFile.delete();
- }
+ @After
+ public void tearDown() throws IOException {
+ tempFile.delete();
+ }
}
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java
index 412d1074a..56077cc2e 100644
--- a/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java
@@ -50,7 +50,7 @@ public class GroupKeyTest {
} catch (IllegalArgumentException e) {
System.out.println(e.toString());
}
-
+
key = "11111%2b+222";
try {
GroupKey2.parseKey(key);
@@ -58,7 +58,6 @@ public class GroupKeyTest {
} catch (IllegalArgumentException e) {
System.out.println(e.toString());
}
-
key = "11111%25+222";
String[] pair = GroupKey2.parseKey(key);
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java
index 9c15a2c72..591c2ba1d 100644
--- a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java
@@ -24,7 +24,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.utils.SimpleReadWriteLock;
-
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class SimpleReadWriteLockTest {
@@ -34,44 +33,44 @@ public class SimpleReadWriteLockTest {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock());
assertEquals(true, lock.tryReadLock());
-
+
lock.releaseReadLock();
lock.releaseReadLock();
-
+
assertEquals(true, lock.tryWriteLock());
}
-
+
@Test
public void test_加写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryWriteLock());
lock.releaseWriteLock();
}
-
+
@Test
public void test_双重写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
-
+
assertEquals(true, lock.tryWriteLock());
assertEquals(false, lock.tryWriteLock());
}
-
+
@Test
public void test_先读锁后写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
-
+
assertEquals(true, lock.tryReadLock());
assertEquals(false, lock.tryWriteLock());
}
-
+
@Test
public void test_双重读锁_释放一个_加写锁失败() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock());
assertEquals(true, lock.tryReadLock());
-
+
lock.releaseReadLock();
-
+
assertEquals(false, lock.tryWriteLock());
}
}
diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/event/EventDispatcherTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/event/EventDispatcherTest.java
index c451e33fc..660f002e7 100755
--- a/config/src/test/java/com/alibaba/nacos/config/server/utils/event/EventDispatcherTest.java
+++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/event/EventDispatcherTest.java
@@ -32,7 +32,6 @@ import java.util.concurrent.CountDownLatch;
import static org.junit.Assert.assertEquals;
-
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class EventDispatcherTest {
@@ -46,10 +45,10 @@ public class EventDispatcherTest {
@Test
public void testAddListener() throws Exception {
final AbstractEventListener listener = new MockListener();
-
+
int vusers = 1000;
final CountDownLatch latch = new CountDownLatch(vusers);
-
+
for (int i = 0; i < vusers; ++i) {
new Thread(new Runnable() {
public void run() {
@@ -58,33 +57,32 @@ public class EventDispatcherTest {
}
}).start();
}
-
+
latch.await();
assertEquals(1, EventDispatcher.LISTENER_HUB.size());
}
-
+
@Test
public void testFireEvent() {
EventDispatcher.fireEvent(new MockEvent());
assertEquals(0, MockListener.count);
-
+
EventDispatcher.addEventListener(new MockListener());
-
+
EventDispatcher.fireEvent(new MockEvent());
assertEquals(1, MockListener.count);
-
+
EventDispatcher.fireEvent(new MockEvent());
assertEquals(2, MockListener.count);
}
}
-
-class MockEvent implements Event {
+class MockEvent implements Event {
}
class MockListener extends AbstractEventListener {
static int count = 0;
-
+
@Override
public List> interest() {
List> types = new ArrayList>();
diff --git a/console/pom.xml b/console/pom.xml
index ee482ec26..67bf8ce13 100644
--- a/console/pom.xml
+++ b/console/pom.xml
@@ -12,37 +12,37 @@
limitations under the License.
-->
- 4.0.0
-
- com.alibaba.nacos
- nacos-all
- 0.5.0
-
- nacos-console
-
- jar
- nacos-console ${project.version}
- http://maven.apache.org
-
- UTF-8
-
-
+ 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">
+ 4.0.0
+
+ com.alibaba.nacos
+ nacos-all
+ 0.6.0
+
+ nacos-console
+
+ jar
+ nacos-console ${project.version}
+ http://maven.apache.org
+
+ UTF-8
+
+
-
- ${project.groupId}
- nacos-config
-
-
- org.apache.tomcat.embed
- tomcat-embed-jasper
- 7.0.59
-
-
- ${project.groupId}
- nacos-naming
-
+
+ ${project.groupId}
+ nacos-config
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-jasper
+ 7.0.59
+
+
+ ${project.groupId}
+ nacos-naming
+
@@ -59,42 +59,30 @@
org.slf4j
jul-to-slf4j
-
-
- org.mockito
- mockito-core
- test
-
-
-
- nacos-server
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
- com.alibaba.nacos.Nacos
-
-
-
-
- repackage
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
+ nacos-server
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ com.alibaba.nacos.Nacos
+
+
+
+
+ repackage
+
+
+
+
+
+
diff --git a/console/src/main/resources/diamond-server-logback.xml b/console/src/main/resources/diamond-server-logback.xml
index 19ef3e7bb..3e356b30c 100755
--- a/console/src/main/resources/diamond-server-logback.xml
+++ b/console/src/main/resources/diamond-server-logback.xml
@@ -1,205 +1,208 @@
+
+
+
- ${user.home}/diamond/logs/dump.log
+ ${LOG_HOME}/dump.log
true
- ${user.home}/diamond/logs/dump.log.%d{yyyy-MM-dd}.%i
- 2GB
+ ${LOG_HOME}/dump.log.%d{yyyy-MM-dd}.%i
+ 2GB
15
7GB
true
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/pull.log
+ ${LOG_HOME}/pull.log
true
- ${user.home}/diamond/logs/pull.log.%d{yyyy-MM-dd}.%i
- 20MB
+ ${LOG_HOME}/pull.log.%d{yyyy-MM-dd}.%i
+ 20MB
15
128MB
true
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/fatal.log
+ ${LOG_HOME}/fatal.log
true
- ${user.home}/diamond/logs/fatal.log.%d{yyyy-MM-dd}.%i
- 20MB
+ ${LOG_HOME}/fatal.log.%d{yyyy-MM-dd}.%i
+ 20MB
15
128MB
true
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/memory.log
+ ${LOG_HOME}/memory.log
true
- ${user.home}/diamond/logs/memory.log.%d{yyyy-MM-dd}.%i
- 20MB
+ ${LOG_HOME}/memory.log.%d{yyyy-MM-dd}.%i
+ 20MB
15
128MB
true
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/pull-check.log
+ ${LOG_HOME}/pull-check.log
true
- ${user.home}/diamond/logs/pull-check.log.%d{yyyy-MM-dd}.%i
- 1GB
+ ${LOG_HOME}/pull-check.log.%d{yyyy-MM-dd}.%i
+ 1GB
15
3GB
true
%msg%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/acl.log
+ ${LOG_HOME}/acl.log
true
- ${user.home}/diamond/logs/acl.log.%d{yyyy-MM-dd}.%i
- 50MB
+ ${LOG_HOME}/acl.log.%d{yyyy-MM-dd}.%i
+ 50MB
15
512MB
true
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/client-request.log
+ ${LOG_HOME}/client-request.log
true
- ${user.home}/diamond/logs/client-request.log.%d{yyyy-MM-dd}.%i
- 2GB
+ ${LOG_HOME}/client-request.log.%d{yyyy-MM-dd}.%i
+ 2GB
15
7GB
true
%date|%msg%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/sdk-request.log
+ ${LOG_HOME}/sdk-request.log
true
- ${user.home}/diamond/logs/sdk-request.log.%d{yyyy-MM-dd}.%i
- 1GB
+ ${LOG_HOME}/sdk-request.log.%d{yyyy-MM-dd}.%i
+ 1GB
15
3GB
true
%date|%msg%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/trace.log
+ ${LOG_HOME}/trace.log
true
- ${user.home}/diamond/logs/trace.log.%d{yyyy-MM-dd}.%i
- 2GB
+ ${LOG_HOME}/trace.log.%d{yyyy-MM-dd}.%i
+ 2GB
15
7GB
true
%date|%msg%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/notify.log
+ ${LOG_HOME}/notify.log
true
- ${user.home}/diamond/logs/notify.log.%d{yyyy-MM-dd}.%i
- 1GB
+ ${LOG_HOME}/notify.log.%d{yyyy-MM-dd}.%i
+ 1GB
15
3GB
true
%date %level %msg%n%n
- GBK
+ UTF-8
- ${user.home}/diamond/logs/app.log
+ ${LOG_HOME}/app.log
true
- ${user.home}/diamond/logs/app.log.%d{yyyy-MM-dd}.%i
- 20MB
+ ${LOG_HOME}/app.log.%d{yyyy-MM-dd}.%i
+ 20MB
15
128MB
true
%date %level %msg%n%n
- GBK
+ UTF-8
-
+
- ${user.home}/diamond/logs/diamondServer.log
+ ${LOG_HOME}/diamondServer.log
true
- ${user.home}/diamond/logs/diamondServer.log.%d{yyyy-MM-dd}.%i
- 50MB
+ ${LOG_HOME}/diamondServer.log.%d{yyyy-MM-dd}.%i
+ 50MB
15
512MB
true
%date %level %msg%n%n
- GBK
+ UTF-8
@@ -253,7 +256,7 @@
-
+
diff --git a/console/src/main/resources/static/console-fe/src/i18ndoc.js b/console/src/main/resources/static/console-fe/src/i18ndoc.js
index 8c20956c4..44516d164 100644
--- a/console/src/main/resources/static/console-fe/src/i18ndoc.js
+++ b/console/src/main/resources/static/console-fe/src/i18ndoc.js
@@ -545,7 +545,7 @@ module.exports = {
'com.alibaba.nacos.page.serviceDetail.edit_service': '编辑服务',
'com.alibaba.nacos.page.serviceDetail.back': '返回',
'com.alibaba.nacos.page.serviceDetail.service_name': '服务名',
- 'com.alibaba.nacos.page.serviceDetail.protect_threshold': '保护阀值',
+ 'com.alibaba.nacos.page.serviceDetail.protect_threshold': '保护阈值',
'com.alibaba.nacos.page.serviceDetail.health_check_pattern': '健康检查模式',
'com.alibaba.nacos.page.serviceDetail.health_check_pattern.service': '服务端',
'com.alibaba.nacos.page.serviceDetail.health_check_pattern.client': '客户端',
diff --git a/console/src/main/resources/static/console-fe/src/lib.js b/console/src/main/resources/static/console-fe/src/lib.js
index 75e2bce3f..c20d9ca88 100644
--- a/console/src/main/resources/static/console-fe/src/lib.js
+++ b/console/src/main/resources/static/console-fe/src/lib.js
@@ -95,7 +95,7 @@ request.middleWare((_config = {}) => {
* 配置 monaco
*/
window.require.config({
- paths: { vs: 'js/vs' },
+ paths: { vs: process.env.NODE_ENV === 'production' ? 'console-fe/public/js/vs' : 'js/vs' },
});
window.require.config({
'vs/nls': {
diff --git a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js
index bca7b585a..221ca8523 100644
--- a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js
+++ b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js
@@ -95,7 +95,7 @@ const I18N_CONF = {
cluster: '集群',
metadata: '元数据',
healthCheckPattern: '健康检查模式',
- protectThreshold: '保护阀值',
+ protectThreshold: '保护阈值',
serviceName: '服务名',
editService: '编辑服务',
},
@@ -104,7 +104,7 @@ const I18N_CONF = {
updateService: '更新服务',
serviceName: '服务名',
metadata: '元数据',
- protectThreshold: '保护阀值',
+ protectThreshold: '保护阈值',
healthCheckPattern: '健康检查模式',
healthCheckPatternService: '服务端',
healthCheckPatternClient: '客户端',
diff --git a/console/src/main/resources/static/console-fe/src/pages/ServiceManagement/ServiceList/ServiceList.js b/console/src/main/resources/static/console-fe/src/pages/ServiceManagement/ServiceList/ServiceList.js
index 571491320..818b2e72c 100644
--- a/console/src/main/resources/static/console-fe/src/pages/ServiceManagement/ServiceList/ServiceList.js
+++ b/console/src/main/resources/static/console-fe/src/pages/ServiceManagement/ServiceList/ServiceList.js
@@ -62,7 +62,9 @@ class ServiceList extends React.Component {
}
openEditServiceDialog() {
- this.editServiceDialog.current.show(this.state.service);
+ try {
+ this.editServiceDialog.current.getInstance().show(this.state.service);
+ } catch (error) {}
}
queryServiceList() {
diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js
index 348defb9e..9f15a7bd9 100644
--- a/console/src/main/resources/static/js/main.js
+++ b/console/src/main/resources/static/js/main.js
@@ -47,12 +47,12 @@
*
* Date: 2016-08-08
*/
-function(n){var e,p,b,r,o,h,d,m,M,l,u,w,k,i,S,g,s,c,y,T="sizzle"+1*new Date,_=n.document,C=0,a=0,f=ie(),v=ie(),x=ie(),L=function(e,t){return e===t&&(u=!0),0},E={}.hasOwnProperty,t=[],D=t.pop,O=t.push,N=t.push,Y=t.slice,j=function(e,t){for(var n=0,a=e.length;n+~]|"+I+")"+I+"*"),K=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),U=new RegExp(H),B=new RegExp("^"+A+"$"),q={ID:new RegExp("^#("+A+")"),CLASS:new RegExp("^\\.("+A+")"),TAG:new RegExp("^("+A+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){w()},oe=_e(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{N.apply(t=Y.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){O.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function re(e,t,n,a){var o,r,i,s,l,u,c,d=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!a&&((t?t.ownerDocument||t:_)!==k&&w(t),t=t||k,S)){if(11!==f&&(l=Q.exec(e)))if(o=l[1]){if(9===f){if(!(i=t.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&y(t,i)&&i.id===o)return n.push(i),n}else{if(l[2])return N.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return N.apply(n,t.getElementsByClassName(o)),n}if(p.qsa&&!x[e+" "]&&(!g||!g.test(e))){if(1!==f)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=T),r=(u=h(e)).length;r--;)u[r]="#"+s+" "+ye(u[r]);c=u.join(","),d=X.test(e)&&me(t.parentNode)||t}if(c)try{return N.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return m(e.replace(F,"$1"),t,n,a)}function ie(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function se(e){return e[T]=!0,e}function le(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function ce(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function fe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&oe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(i){return se(function(r){return r=+r,se(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=re.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(i=(k=a).documentElement,S=!o(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),p.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=le(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=$.test(k.getElementsByClassName),p.getById=le(function(e){return i.appendChild(e).id=T,!k.getElementsByName||!k.getElementsByName(T).length}),p.getById?(b.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,a,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),a=0;r=o[a++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),b.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,a=[],o=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;n=r[o++];)1===n.nodeType&&a.push(n);return a},b.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],g=[],(p.qsa=$.test(k.querySelectorAll))&&(le(function(e){i.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+I+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=k.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(p.matchesSelector=$.test(c=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&le(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",H)}),g=g.length&&new RegExp(g.join("|")),s=s.length&&new RegExp(s.join("|")),t=$.test(i.compareDocumentPosition),y=t||$.test(i.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,a=t&&t.parentNode;return e===a||!(!a||1!==a.nodeType||!(n.contains?n.contains(a):e.compareDocumentPosition&&16&e.compareDocumentPosition(a)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return u=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===k||e.ownerDocument===_&&y(_,e)?-1:t===k||t.ownerDocument===_&&y(_,t)?1:l?j(l,e)-j(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,a=0,o=e.parentNode,r=t.parentNode,i=[e],s=[t];if(!o||!r)return e===k?-1:t===k?1:o?-1:r?1:l?j(l,e)-j(l,t):0;if(o===r)return ce(e,t);for(n=e;n=n.parentNode;)i.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;i[a]===s[a];)a++;return a?ce(i[a],s[a]):i[a]===_?-1:s[a]===_?1:0}),k},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==k&&w(e),t=t.replace(K,"='$1']"),p.matchesSelector&&S&&!x[t+" "]&&(!s||!s.test(t))&&(!g||!g.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=f[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&f(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,a,o){return function(e){var t=re.attr(e,n);return null==t?"!="===a:!a||(t+="","="===a?t===o:"!="===a?t!==o:"^="===a?o&&0===t.indexOf(o):"*="===a?o&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,n,a){return _(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==a}):n.nodeType?T.grep(e,function(e){return e===n!==a}):"string"!=typeof n?T.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var a,o;if(!e)return this;if(n=n||D,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(a="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:O.exec(e))||!a[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(a[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(a[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),L.test(a[1])&&T.isPlainObject(t))for(a in t)_(this[a])?this[a](t[a]):this.attr(a,t[a]);return this}return(o=S.getElementById(a[2]))&&(this[0]=o,this.length=1),this}).prototype=T.fn,D=T(S);var N=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,ce=/^$|^module$|\/(?:java|ecma)script/i,de={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function fe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&x(e,t)?T.merge([e],n):n}function pe(e,t){for(var n=0,a=e.length;nx",y.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue;var _e=S.documentElement,ve=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Me=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function ke(){return!1}function Se(){try{return S.activeElement}catch(e){}}function Te(e,t,n,a,o,r){var i,s;if("object"==typeof t){for(s in"string"!=typeof n&&(a=a||n,n=void 0),t)Te(e,s,n,a,t[s],r);return e}if(null==a&&null==o?(o=n,a=n=void 0):null==o&&("string"==typeof n?(o=a,a=void 0):(o=a,a=n,n=void 0)),!1===o)o=ke;else if(!o)return e;return 1===r&&(i=o,(o=function(e){return T().off(e),i.apply(this,arguments)}).guid=i.guid||(i.guid=T.guid++)),e.each(function(){T.event.add(this,t,o,a,n)})}T.event={global:{},add:function(t,e,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&T.find.matchesSelector(_e,o),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(i=g.handle)||(i=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(P)||[""]).length;u--;)p=m=(s=Me.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=T.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=T.event.special[p]||{},c=T.extend({type:p,origType:m,data:a,handler:n,guid:n.guid,selector:o,needsContext:o&&T.expr.match.needsContext.test(o),namespace:h.join(".")},r),(f=l[p])||((f=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,a,h,i)||t.addEventListener&&t.addEventListener(p,i)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[p]=!0)},remove:function(e,t,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.hasData(e)&&J.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(P)||[""]).length;u--;)if(p=m=(s=Me.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=T.event.special[p]||{},f=l[p=(a?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=r=f.length;r--;)c=f[r],!o&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||a&&a!==c.selector&&("**"!==a||!c.selector)||(f.splice(r,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));i&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||T.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)T.event.remove(e,p+t[u],n,a,!0);T.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,a,o,r,i,s=T.event.fix(e),l=new Array(arguments.length),u=(J.get(this,"events")||{})[s.type]||[],c=T.event.special[s.type]||{};for(l[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,xe=/