Skip to content

Commit

Permalink
Merge branch 'develop' into feature_naming_group
Browse files Browse the repository at this point in the history
# Conflicts:
#	api/pom.xml
#	client/pom.xml
#	cmdb/pom.xml
#	common/pom.xml
#	config/pom.xml
#	console/pom.xml
#	core/pom.xml
#	distribution/pom.xml
#	example/pom.xml
#	naming/pom.xml
#	naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftCore.java
#	naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java
#	pom.xml
#	test/pom.xml
  • Loading branch information
nkorange committed Mar 25, 2019
2 parents 7303ea7 + cf8a3c7 commit a745423
Show file tree
Hide file tree
Showing 34 changed files with 753 additions and 84 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.0.0-RC2(Mar 22, 2019)
* [#923] Nacos 1.0.0 compatible with nacos-client 0.6.2
* [#938] Client beat processor task lost
* [#946] Change default server mode to AP



## 1.0.0-RC1(Mar 15, 2019)

* [#870] About Nacos's namespace and tenant design
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,26 @@ These are only part of the companies using Nacos, for reference only. If you are
![云帐房](http://www.yunzhangfang.com/yzf-pc/img/logo.png)
![知氏教育](https://www.chyeth.com/622e88980a5d091eaa6449f82d48ca43.png)
![中化信息](http://www.sinochem.com/Portals/0/xinlogo.png)
![一点车](https://img.alicdn.com/tfs/TB1DXerNgDqK1RjSZSyXXaxEVXa-333-103.png)
![明传无线](https://img.alicdn.com/tfs/TB1VfOANgHqK1RjSZFPXXcwapXa-313-40.png)
![妙优车](https://img.alicdn.com/tfs/TB1lvCyNhTpK1RjSZFMXXbG_VXa-130-60.png)
![蜂巢](https://img.alicdn.com/tfs/TB1kY9qNgTqK1RjSZPhXXXfOFXa-120-50.png)
![华存数据](https://img.alicdn.com/tfs/TB1G.GBNbrpK1RjSZTEXXcWAVXa-234-65.png)
![数云](https://img.alicdn.com/tfs/TB1qsurNgDqK1RjSZSyXXaxEVXa-300-90.png)
![广通软件](https://img.alicdn.com/tfs/TB13aywNhTpK1RjSZR0XXbEwXXa-98-38.png)
![菜菜](https://img.alicdn.com/tfs/TB1xqmBNjTpK1RjSZKPXXa3UpXa-162-70.png)
![科蓝公司](https://img.alicdn.com/tfs/TB18DmINcfpK1RjSZFOXXa6nFXa-200-200.png)
![浩鲸](https://img.alicdn.com/tfs/TB15uqANXzqK1RjSZFoXXbfcXXa-188-86.png)
![未名天日语](https://img.alicdn.com/tfs/TB1mvmyNkvoK1RjSZPfXXXPKFXa-238-46.png)
![金联创](https://img.alicdn.com/tfs/TB1PSWsNmrqK1RjSZK9XXXyypXa-195-130.jpg)
![同窗链](https://img.alicdn.com/tfs/TB1k1qzNbvpK1RjSZFqXXcXUVXa-160-69.png)
![顺能](https://img.alicdn.com/tfs/TB1HdyvNmzqK1RjSZFLXXcn2XXa-143-143.jpg)
![百世快递](https://img.alicdn.com/tfs/TB1UdaGNgHqK1RjSZJnXXbNLpXa-277-62.png)
![汽车之家](https://img.alicdn.com/tfs/TB17OqENbrpK1RjSZTEXXcWAVXa-240-113.jpg)
![鲸打卡](https://img.alicdn.com/tfs/TB1q71ANkvoK1RjSZPfXXXPKFXa-257-104.png)
![时代光华](https://img.alicdn.com/tfs/TB1UzuyNhTpK1RjSZR0XXbEwXXa-201-86.jpg)
![康美](https://img.alicdn.com/tfs/TB19RCANgHqK1RjSZFPXXcwapXa-180-180.jpg)
![环球易购](https://img.alicdn.com/tfs/TB1iCGyNb2pK1RjSZFsXXaNlXXa-143-143.jpg)
![海格管家](https://img.alicdn.com/tfs/TB1FNq4EwHqK1RjSZFgXXa7JXXa-232-232.jpg)
![Nepxion](https://avatars0.githubusercontent.com/u/16344119?s=200&v=4)
![东莞最佳拍档](https://img.alicdn.com/tfs/TB11ugsDzTpK1RjSZKPXXa3UpXa-300-300.png)
Expand All @@ -152,3 +172,4 @@ These are only part of the companies using Nacos, for reference only. If you are
![联合永道](https://img.alicdn.com/tfs/TB1CRAxDxYaK1RjSZFnXXa80pXa-190-190.jpg)
![明源云](https://img.alicdn.com/tfs/TB1.q14ErrpK1RjSZTEXXcWAVXa-219-219.jpg)


12 changes: 6 additions & 6 deletions client/src/main/resources/nacos-logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<appender name="CONFIG_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.logging.path}/config.log</file>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${nacos.logging.path}/config.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxHistory>${JM.LOG.RETAIN.COUNT:-7}</maxHistory>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${nacos.logging.path}/config.log.%i</fileNamePattern>
<maxIndex>${JM.LOG.RETAIN.COUNT:-7}</maxIndex>
</rollingPolicy>

<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
Expand All @@ -22,9 +22,9 @@
<appender name="NAMING_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${nacos.logging.path}/naming.log</file>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${nacos.logging.path}/naming.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxHistory>${JM.LOG.RETAIN.COUNT:-7}</maxHistory>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${nacos.logging.path}/naming.log.%i</fileNamePattern>
<maxIndex>${JM.LOG.RETAIN.COUNT:-7}</maxIndex>
</rollingPolicy>

<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
Expand Down
12 changes: 6 additions & 6 deletions config/src/main/resources/META-INF/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE TABLE config_info (
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
Expand All @@ -31,7 +31,7 @@ CREATE TABLE his_config_info (
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
Expand All @@ -51,7 +51,7 @@ CREATE TABLE config_info_beta (
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
beta_ips varchar(1024),
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
Expand All @@ -68,7 +68,7 @@ CREATE TABLE config_info_tag (
tenant_id varchar(128) default '',
tag_id varchar(128) NOT NULL,
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
Expand All @@ -84,7 +84,7 @@ CREATE TABLE config_info_aggr (
tenant_id varchar(128) default '',
datum_id varchar(255) NOT NULL,
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
constraint configinfoaggr_id_key PRIMARY KEY (id),
constraint uk_configinfoaggr_datagrouptenantdatum UNIQUE (data_id,group_id,tenant_id,datum_id));
Expand Down Expand Up @@ -158,7 +158,7 @@ CREATE TABLE tenant_capacity (
gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
constraint tenant_capacity_id_key PRIMARY KEY (id),
constraint uk_tenant_id UNIQUE (tenant_id));

CREATE TABLE tenant_info (
id bigint NOT NULL generated by default as identity,
kp varchar(128) NOT NULL,
Expand Down
10 changes: 5 additions & 5 deletions console/src/main/resources/META-INF/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE TABLE config_info (
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
Expand All @@ -31,7 +31,7 @@ CREATE TABLE his_config_info (
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
Expand All @@ -51,7 +51,7 @@ CREATE TABLE config_info_beta (
group_id varchar(128) NOT NULL,
tenant_id varchar(128) default '',
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
beta_ips varchar(1024),
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
Expand All @@ -68,7 +68,7 @@ CREATE TABLE config_info_tag (
tenant_id varchar(128) default '',
tag_id varchar(128) NOT NULL,
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
md5 varchar(32) DEFAULT NULL,
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
Expand All @@ -84,7 +84,7 @@ CREATE TABLE config_info_aggr (
tenant_id varchar(128) default '',
datum_id varchar(255) NOT NULL,
app_name varchar(128),
content LONG VARCHAR NOT NULL,
content CLOB,
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
constraint configinfoaggr_id_key PRIMARY KEY (id),
constraint uk_configinfoaggr_datagrouptenantdatum UNIQUE (data_id,group_id,tenant_id,datum_id));
Expand Down
5 changes: 5 additions & 0 deletions console/src/main/resources/static/console-fe/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@
# misc
.DS_Store
npm-debug.log*

# test
test/uirecorder.log
test/reports
test/screenshots/*
36 changes: 0 additions & 36 deletions console/src/main/resources/static/console-fe/.vscode/settings.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ class MainLayout extends React.Component {

refreshNav() {
const { navList } = this.state;
const { functionMode } = this.props;
const { location, history, functionMode } = this.props;
const [configUrl, serviceUrl] = ['/configurationManagement', '/serviceManagement'];
this.setState(
{
navList: navList.map(item => {
Expand All @@ -411,6 +412,12 @@ class MainLayout extends React.Component {
},
() => this.setState({ navRow: this.nacosGetNav(navList) }, () => this.renderNav())
);
if (functionMode === 'config' && location.pathname === serviceUrl) {
history.push(configUrl);
}
if (functionMode === 'naming' && location.pathname === configUrl) {
history.push(serviceUrl);
}
}

componentWillReceiveProps() {
Expand Down Expand Up @@ -440,7 +447,7 @@ class MainLayout extends React.Component {
) : (
<div
style={{ textIndent: 0, display: !version ? 'none' : 'block' }}
className={'product-nav-title'}
className="product-nav-title"
title={nacosName}
>
<span>{nacosName}</span>
Expand Down Expand Up @@ -483,7 +490,12 @@ class MainLayout extends React.Component {
<div>{this.props.children}</div>
) : (
<div
style={{ height: 300, lineHeight: '300px', textAlign: 'center', fontSize: '18px' }}
style={{
height: 300,
lineHeight: 300,
textAlign: 'center',
fontSize: 18,
}}
>
{doesNotExist}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class ServiceList extends React.Component {
setTimeout(() => this.queryServiceList());
};

deleteService(serviceName) {
deleteService(service) {
const { locale = {} } = this.props;
const { prompt, promptDelete } = locale;
Dialog.confirm({
Expand All @@ -113,7 +113,7 @@ class ServiceList extends React.Component {
onOk: () => {
request({
method: 'DELETE',
url: `v1/ns/service?serviceName=${serviceName}`,
url: `v1/ns/service?serviceName=${service.name}&groupName=${service.groupName}`,
dataType: 'text',
beforeSend: () => this.openLoading(),
success: res => {
Expand Down Expand Up @@ -241,7 +241,7 @@ class ServiceList extends React.Component {
<Button
style={{ marginLeft: 12 }}
type="normal"
onClick={() => this.deleteService(record.name)}
onClick={() => this.deleteService(record)}
>
{deleteAction}
</Button>
Expand Down
17 changes: 17 additions & 0 deletions console/src/main/resources/static/console-fe/test/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

# Apply for all files
[*]

charset = utf-8

indent_style = space
indent_size = 4

end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
9 changes: 9 additions & 0 deletions console/src/main/resources/static/console-fe/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
.idea
node_modules
npm-debug.log
uirecorder.log
reports
screenshots/**/*.png
screenshots/**/*.html
screenshots/**/*.json
40 changes: 40 additions & 0 deletions console/src/main/resources/static/console-fe/test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## 使用说明

### 安装依赖
```sh
npm install uirecorder mocha -g
npm install
```

### 安装chrome浏览器插件
```sh
npm run installdriver
```

### 开始录制测试用例
```sh
// xxx.spec.js 为你的测试用例文件名称
uirecorder sample/xxx.spec.js
```

### 回归测试
#### 启动服务
```sh
npm run server
```

#### 单个文件测试
```sh
// xxx.spec.js 为你的测试用例文件名称
npm run singletest sample/xxx.spec.js
```

#### 并发测试
```sh
npm run paralleltest
```

### 查看报告
```sh
open reports/index.html
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please save common test case here.
14 changes: 14 additions & 0 deletions console/src/main/resources/static/console-fe/test/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"webdriver": {
"host": "127.0.0.1",
"port": "4444",
"browsers": "chrome"
},
"vars": {},
"recorder": {
"pathAttrs": "data-id,data-name,type,data-type,role,data-role,data-value",
"attrValueBlack": "",
"classValueBlack": "",
"hideBeforeExpect": ""
}
}
Empty file.
4 changes: 4 additions & 0 deletions console/src/main/resources/static/console-fe/test/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ls ~/nvm || git clone https://github.com/creationix/nvm.git ~/nvm
source ~/nvm/nvm.sh
nvm install v7.10.0
npm install
Loading

0 comments on commit a745423

Please sign in to comment.