8000 Release 0.8 by yanlinly · Pull Request #683 · alibaba/nacos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release 0.8 #683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
938666c
remove useless semicolon
Jan 17, 2019
e589b29
fix JwtAuthenticationTokenFilter NPE bug
Jan 17, 2019
606bd1d
Merge pull request #641 from wuyoushan/remove_useless_semicolon
hxy1991 Jan 18, 2019
ed4c41f
Merge pull request #642 from wuyoushan/fix_jwtAuth_npe
hxy1991 Jan 18, 2019
a889642
Fix CMDB JVM option error in JDK 9
nkorange Jan 18, 2019
47b7423
Merge branch 'develop' into feature_multi_tenant
nkorange Jan 18, 2019
780bd18
Merge pull request #647 from alibaba/feature_multi_tenant
Jan 18, 2019
def3c19
add url
Jan 18, 2019
80bf971
add url
Jan 18, 2019
04f067b
Merge pull request #652 from alibaba/feature_metrics
TsingLiang Jan 18, 2019
6963301
Merge pull request #2 from alibaba/develop
paderlol Jan 19, 2019
25e4b86
Fix update instance info NPE #663
paderlol Jan 20, 2019
ad4f63e
Merge pull request #664 from paderlol/develop
Jan 20, 2019
bd063d2
fix the style
wfnuser Jan 21, 2019
a639109
Merge pull request #666 from wfnuser/enhancement/login-ui-enhancement
yanlinly Jan 21, 2019
3f6c56f
Fix #668
nkorange Jan 21, 2019
95c3458
Merge pull request #669 from alibaba/feature_multi_tenant
Jan 21, 2019
aafd30e
fix: newconfig style
loadchange Jan 17, 2019
fdd4521
fix: Menu status
loadchange Jan 17, 2019
59fd26a
Update fe build
loadchange Jan 17, 2019
73c98d3
fix: closes #640, #648
loadchange Jan 18, 2019
79874b2
Update fe build
loadchange Jan 18, 2019
308bae5
hotfix_672
Jan 22, 2019
9947e85
change default user/password to nacos/nacos
yanlinly Jan 22, 2019
e6f07b2
Fix #381 add encode password tool
yanlinly Jan 22, 2019
25ad3ff
Fix #339 Project language problem identified in github
yanlinly Jan 22, 2019
1e9d9e2
Fix HTTP method value error
nkorange Jan 22, 2019
21c157f
Merge pull request #673 from ankeway/hotfix_672
yanlinly Jan 22, 2019
d37228c
fix: new config width
loadchange Jan 22, 2019
fc5db21
Fix #639 fix namespace desc problem
yanlinly Jan 22, 2019
55178a6
#498 Fix bug
nkorange Jan 22, 2019
54d4dce
Close #678
nkorange Jan 22, 2019
742d1d7
Merge pull request #679 from alibaba/feature_compatible_for_old_dns_c…
Jan 22, 2019
cee4614
#498 fix bug
nkorange Jan 22, 2019
d850cee
#498 fix bug
nkorange Jan 22, 2019
b213be7
fix: protectThreshold validator
loadchange Jan 22, 2019
f29209b
release 0.8
yanlinly Jan 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.js linguist-language=java
*.css linguist-language=java
*.html linguist-language=java
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public class NacosException extends Exception {
public NacosException() {
}

;

public NacosException(int errCode, String errMsg) {
this.errCode = errCode;
this.errMsg = errMsg;
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion cmdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>nacos-all</artifactId>
<groupId>com.alibaba.nacos</groupId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class HttpMethod {

public static final String DELETE = "DELETE";

public static final String OPTIONS = "PATCH";
public static final String OPTIONS = "OPTIONS";

public static final String TRACE = "TRACE";
}
2 changes: 1 addition & 1 deletion config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class ConfigKey implements Serializable {
public ConfigKey() {
}

;

public ConfigKey(String appName, String dataId, String group) {
this.appName = appName;
this.dataId = dataId;
Expand Down
4 changes: 2 additions & 2 deletions config/src/main/resources/META-INF/nacos-db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ CREATE TABLE roles (
role varchar(50) NOT NULL
);

INSERT INTO users (username, password, enabled) VALUES ('admin', '$2a$10$HxtJtd59imujvbux.i55zOGewhnJiLVXX8D9AETDMV.XtBLDGOXtW', TRUE);
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);

INSERT INTO roles (username, role) VALUES ('admin', 'ROLE_ADMIN');
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
4 changes: 2 additions & 2 deletions config/src/main/ 3D11 resources/META-INF/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,6 @@ CREATE TABLE roles (
role varchar(50) NOT NULL
);

INSERT INTO users (username, password, enabled) VALUES ('admin', '$2a$10$HxtJtd59imujvbux.i55zOGewhnJiLVXX8D9AETDMV.XtBLDGOXtW', TRUE);
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);

INSERT INTO roles (username, role) VALUES ('admin', 'ROLE_ADMIN');
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
2 changes: 1 addition & 1 deletion console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.8.0</version>
</parent>
<artifactId>nacos-console</artifactId>
<!--<packaging>war</packaging>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public JwtAuthenticationTokenFilter(JwtTokenUtils tokenProvider) {
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
String jwt = resolveToken(request);

if (!StringUtils.isEmpty(jwt.trim()) && SecurityContextHolder.getContext().getAuthentication() == null) {
if (jwt != null && !"".equals(jwt.trim()) && SecurityContextHolder.getContext().getAuthentication() == null) {
if (this.tokenProvider.validateToken(jwt)) {
/**
* get auth info
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.nacos.console.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
* Password encoder tool
*
* @author nacos
*/
public class PasswordEncoderUtil {

public static void main(String[] args) {
System.out.println(new BCryptPasswordEncoder().encode("nacos"));
}
}
4 changes: 3 additions & 1 deletion console/src/main/resources/META-INF/nacos-default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ nacos.cmdb.eventTaskInterval=10
nacos.cmdb.labelTaskInterval=300
nacos.cmdb.loadDataAtStart=false

#management.endpoints.web.exposure.include=*

db.num=2
db.url.0=jdbc:mysql://11.162.196.161:3306/diamond_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.url.1=jdbc:mysql://11.163.152.91:3306/diamond_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
Expand All @@ -45,4 +47,4 @@ db.password=4b9622f3f70c7677835ac5a6719e7caf
#management.security=false
#security.basic.enabled=false
#nacos.security.ignore.urls=/**
nacos.security.ignore.urls=/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/login,/v1/console/health,/v1/cs/**,/v1/ns/**,/v1/cmdb/**
nacos.security.ignore.urls=/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/login,/v1/console/health,/v1/cs/**,/v1/ns/**,/v1/cmdb/**,/actuator/**
4 changes: 2 additions & 2 deletions console/src/main/resources/META-INF/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,6 @@ CREATE TABLE roles (
role varchar(50) NOT NULL
);

INSERT INTO users (username, password, enabled) VALUES ('admin', '$2a$10$HxtJtd59imujvbux.i55zOGewhnJiLVXX8D9AETDMV.XtBLDGOXtW', TRUE);
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);

INSERT INTO roles (username, role) VALUES ('admin', 'ROLE_ADMIN');
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
3 changes: 2 additions & 1 deletion console/src/main/resources/static/console-fe/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"no-template-curly-in-string": "off",
"no-unused-vars": "off",
"no-tabs": "off",
"no-param-reassign": "off",
"react/no-string-refs": "off",
"react/no-unused-state": "off",
"no-return-assign": "off",
Expand All @@ -29,6 +30,6 @@
"generator-star-spacing": "off",
"wrap-iife": "off",
"arrow-parens": "off",
"indent": "off",
"indent": "off"
}
}
2 changes: 1 addition & 1 deletion console/src/main/resources/static/console-fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"webpack-dev-server": "^3.1.13"
},
"dependencies": {
"@alifd/next": "^1.11.5",
"@alifd/next": "^1.11.10",
"axios": "^0.18.0",
"jquery": "^3.3.1",
"moment": "^2.23.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}

a {
Expand Down Expan 10000 d Up @@ -7122,4 +7121,4 @@ td.visible-print {
td.hidden-print {
display: none !important;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Nacos</title>
<link rel="shortcut icon" href="//www.aliyun.com/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/console1412.css">
<!-- 第三方css开始 -->
<link rel="stylesheet" type="text/css" href="css/codemirror.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class EditorNameSpace extends React.Component {
<Input
{...this.field.init('namespaceDesc', {
rules: [
{ required: true, message: locale.namespace },
{ required: true, message: locale.namespaceDesc },
{ validator: this.validateChart.bind(this) },
],
})}
Expand Down
Original file line number Diff line number Diff line change
E 629A xpand Up @@ -213,7 +213,7 @@ class NewNameSpace extends React.Component {
rules: [
{
required: true,
message: locale.namespacenotnull,
message: locale.namespacedescnotnull,
},
{ validator: this.validateChart.bind(this) },
],
Expand Down
1 change: 0 additions & 1 deletion console/src/main/resources/static/console-fe/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class App extends React.Component {
<HashRouter>
<Switch>
<Route path="/login" component={Login} />

<Layout navList={_menu.data}>
{MENU.map(item => (
<Route key={item.path} {...item} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Header extends React.Component {

static propTypes = {
locale: PropTypes.object,
history: PropTypes.object,
location: PropTypes.object,
language: PropTypes.string,
changeLanguage: PropTypes.func,
};
Expand All @@ -53,7 +55,6 @@ class Header extends React.Component {
const base64Url = token.split('.')[1];
const base64 = base64Url.replace('-', '+').replace('_', '/');
const parsedToken = JSON.parse(window.atob(base64));
console.log(parsedToken);
return parsedToken.sub;
}
return '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import $ from 'jquery';
import { setParams } from '../globalLib';
import { connect } from 'react-redux';

import './index.scss';

@withRouter
@connect(state => ({ ...state.locale }))
@ConfigProvider.config
Expand All @@ -29,6 +31,7 @@ class MainLayout extends React.Component {
static propTypes = {
navList: PropTypes.array,
history: PropTypes.object,
location: PropTypes.object,
locale: PropTypes.object,
children: PropTypes.any,
};
Expand Down Expand Up @@ -72,6 +75,11 @@ class MainLayout extends React.Component {
iconClass.className = tmpClassName;
}

/**
* Click the back button
* TODO: this.props.history.goBack(); ???
* @param url
*/
nacosGoBack(url) {
const params = window.location.hash.split('?')[1];
const urlArr = params.split('&') || [];
Expand All @@ -91,6 +99,9 @@ class MainLayout extends React.Component {
}
}
}
if (localStorage.getItem('namespace')) {
queryParams.push(`namespace=${localStorage.getItem('namespace')}`);
}
this.props.history.push(`/${url}?${queryParams.join('&')}`);
}

Expand Down Expand Up @@ -201,7 +212,8 @@ class MainLayout extends React.Component {
}

nacosLoopNav(data, _index = 0, parent) {
const { locale = {} } = this.props;
const { locale = {}, location = {} } = this.props;
const { pathname } = location;
let index = _index;
// 遍历导航,只显示2级
const self = this;
Expand Down Expand Up @@ -238,6 +250,7 @@ class MainLayout extends React.Component {
} else {
return (
<li
className={pathname === `/${item.serviceName}` ? 'selected' : ''}
key={`${item.serviceName}`}
data-spm-click={`gostr=/aliyun;locaid=${item.serviceName}`}
`/${item.serviceName}`)}
Expand All @@ -256,6 +269,7 @@ class MainLayout extends React.Component {
}
return (
<li
className={pathname === `/${item.serviceName}` ? 'selected' : ''}
key={`${item.serviceName}`}
data-spm-click={`gostr=/aliyun;locaid=${item.serviceName}`}
`/${item.serviceName}`)}
Expand Down Expand Up @@ -396,7 +410,6 @@ class MainLayout extends React.Component {
<span style={{ marginLeft: 5 }}>{nacosVersion}</span>
</div>
)}

<div
className="product-nav-list"
style={{ position: 'relative', top: 0, height: '100%' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1394,3 +1394,7 @@ h6 {
padding-right: 20px;
}
}

.product-nav-list li.selected a {
background-color: #F4F6F8;
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ const I18N_CONF = {
healthCheckPatternService: 'Service',
healthCheckPatternClient: 'Client',
healthCheckPatternNone: 'None',
serviceNameRequired: 'Please enter a service name',
protectThresholdRequired: 'Please enter a protect threshold',
healthCheckModeRequired: 'Please select health check pattern',
},
InstanceTable: {
operation: 'Operation',
Expand Down Expand Up @@ -312,6 +315,7 @@ const I18N_CONF = {
editNamespace: 'Loading...',
load: 'Namespace:',
namespace: 'Namespace cannot be empty',
namespaceDesc: 'Namespace description cannot be empty',
description: 'Description:',
},
ExportDialog: {
Expand Down Expand Up @@ -366,6 +370,7 @@ const I18N_CONF = {
loading: 'Loading...',
name: 'Namespace:',
namespacenotnull: 'Namespace cannot be empty',
namespacedescnotnull: 'Namespace description cannot be empty',
description: 'Description:',
},
NameSpaceList: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ const I18N_CONF = {
healthCheckPatternService: '服务端',
healthCheckPatternClient: '客户端',
healthCheckPatternNone: '禁止',
serviceNameRequired: '请输入服务名',
protectThresholdRequired: '请输入保护阈值',
healthCheckModeRequired: '请选择健康检查模式',
},
InstanceTable: {
operation: '操作',
Expand Down Expand Up @@ -311,6 +314,7 @@ const I18N_CONF = {
editNamespace: '加载中...',
load: '命名空间名:',
namespace: '命名空间不能为空',
namespaceDesc: '命名空间描述不能为空',
description: '描述:',
},
ExportDialog: {
Expand Down Expand Up @@ -365,6 +369,7 @@ const I18N_CONF = {
loading: '加载中...',
name: '命名空间名:',
namespacenotnull: '命名空间不能为空',
namespacedescnotnull: '命名空间描述不能为空',
description: '描述:',
},
NameSpaceList: {
Expand Down
Loading
0