Skip to content

Commit

Permalink
Merge pull request #99 from FederatedAI/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
forgivedengkai authored Feb 5, 2021
2 parents 750ec1f + d1c7cb7 commit f3c0c1f
Show file tree
Hide file tree
Showing 71 changed files with 1,021 additions and 242 deletions.
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ __pycache__
*.prefs

# excluded paths
/fate-serving/federatedml/target/
/fate-serving/serving-server/target/
/fate-serving/target/
/fate-serving/fate-serving-core/target/
.idea/*
.vscode/*
/*/target/
/fate-serving-admin-ui/node/
/conf/
/logs/
/.fate/
/fate-serving-admin/src/main/resources/public/
/fate-serving-server/logs/
25 changes: 18 additions & 7 deletions bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,29 @@ start() {
getpid
if [[ ! -n ${pid} ]]; then
mklogsdir
if [[ ! -e "fate-${module}.jar" ]]; then
ln -s fate-${module}-${module_version}.jar fate-${module}.jar

if [[ -e "fate-${module}.jar" ]]; then
rm fate-${module}.jar
fi
ln -s fate-${module}-${module_version}.jar fate-${module}.jar

if [ ${module} = "serving-server" ]; then
java -Dspring.config.location=${configpath}/serving-server.properties -cp "conf/:lib/*:extension/*:fate-${module}.jar" ${main_class} >>logs/console.log 2>>logs/error.log &
elif [ ${module} = "serving-proxy" ]; then
java -Dspring.config.location=${configpath}/application.properties -cp "conf/:lib/*:fate-${module}.jar" ${main_class} >>logs/console.log 2>>logs/error.log &
elif [ ${module} = "serving-admin" ]; then
java -Dspring.config.location=${configpath}/application.properties -cp "conf/:lib/*:fate-${module}.jar" ${main_class} >>logs/console.log 2>>logs/error.log &
JAVA_OPT="${JAVA_OPT} -Dspring.config.location=${configpath}/serving-server.properties"
JAVA_OPT="${JAVA_OPT} -cp conf/:lib/*:extension/*:fate-${module}.jar"
elif [ ${module} = "serving-proxy" ] || [ ${module} = "serving-admin" ]; then
JAVA_OPT="${JAVA_OPT} -Dspring.config.location=${configpath}/application.properties"
JAVA_OPT="${JAVA_OPT} -cp conf/:lib/*:fate-${module}.jar"
else
echo "usage: ${module} {serving-server|serving-proxy|serving-admin}"
fi

JAVA_OPT="${JAVA_OPT} ${main_class}"
if [[ $1 == "front" ]]; then
exec java ${JAVA_OPT}
else
java ${JAVA_OPT} >logs/console.log 2>logs/error.log &
fi

#sleep 5
#id=$(ps -p $! | awk '{print $1}' | sed -n '2p')
inspect_pid 5 $!
Expand Down
Binary file removed fate-serving-admin-ui/node/node
Binary file not shown.
93 changes: 53 additions & 40 deletions fate-serving-admin-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions fate-serving-admin-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "FATE-Serving",
"version": "2.0.0",
"version": "2.0.4",
"private": true,
"author": "FATE Serving",
"scripts": {
Expand All @@ -14,7 +14,7 @@
"dll": "webpack -p --progress --config ./webpack.dll.conf.js"
},
"dependencies": {
"axios": "^0.19.0",
"axios": "^0.21.1",
"core-js": "^2.6.5",
"echarts": "^4.8.0",
"element-ui": "^2.12.0",
Expand Down Expand Up @@ -46,7 +46,7 @@
"sass-loader": "^7.1.0",
"svg-sprite-loader": "^3.9.2",
"vue-template-compiler": "^2.6.10",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.2.3"
}
}
2 changes: 1 addition & 1 deletion fate-serving-admin-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>fate-serving</artifactId>
<groupId>com.webank.ai.fate</groupId>
<version>2.0.0</version>
<version>2.0.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
27 changes: 17 additions & 10 deletions fate-serving-admin-ui/src/api/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@
*
**/
import request from '@/utils/request'

let url = window.location.href
let arr = url.split('/')
let pram
if (arr[3] === '#' || arr[3] === '') {
pram = ''
} else {
pram = '/' + arr[3]
}
export function getCluster(params) {
return request({
url: '/api/component/list',
url: `${pram}/api/component/list`,
method: 'get',
params
})
Expand All @@ -27,7 +34,7 @@ export function getCluster(params) {
// 节点配置列表
export function getlistProps(params) {
return request({
url: '/api/component/listProps',
url: `${pram}/api/component/listProps`,
method: 'get',
params
})
Expand All @@ -36,15 +43,15 @@ export function getlistProps(params) {
// /api/model/query
export function getmodellist(params) {
return request({
url: '/api/model/query',
url: `${pram}/api/model/query`,
method: 'get',
params
})
}
// /api/model/unload 模型卸载
export function modelUnload(data) {
return request({
url: '/api/model/unload',
url: `${pram}/api/model/unload`,
method: 'post',
data
})
Expand All @@ -53,7 +60,7 @@ export function modelUnload(data) {
// /api/model/unbind 模型解绑
export function modelUnbind(data) {
return request({
url: '/api/model/unbind',
url: `${pram}/api/model/unbind`,
method: 'post',
data
})
Expand All @@ -62,7 +69,7 @@ export function modelUnbind(data) {
// /api/monitor/queryModel
export function queryModel(params) {
return request({
url: '/api/monitor/queryModel',
url: `${pram}/api/monitor/queryModel`,
method: 'get',
params
})
Expand All @@ -71,7 +78,7 @@ export function queryModel(params) {
// /api/monitor/query
export function queryMonitor(params) {
return request({
url: '/api/monitor/query',
url: `${pram}/api/monitor/query`,
method: 'get',
params
})
Expand All @@ -80,7 +87,7 @@ export function queryMonitor(params) {
// /api/monitor/queryJvm
export function queryJvm(params) {
return request({
url: '/api/monitor/queryJvm',
url: `${pram}/api/monitor/queryJvm`,
method: 'get',
params
})
Expand All @@ -89,7 +96,7 @@ export function queryJvm(params) {
// /api/service/updateFlowRule
export function updateFlowRule(data) {
return request({
url: '/api/service/updateFlowRule',
url: `${pram}/api/service/updateFlowRule`,
method: 'post',
data
})
Expand Down
14 changes: 11 additions & 3 deletions fate-serving-admin-ui/src/api/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@
*
**/
import request from '@/utils/request'
let url = window.location.href
let arr = url.split('/')
let pram
if (arr[3] === '#' || arr[3] === '') {
pram = ''
} else {
pram = '/' + arr[3]
}
// 获取service 列表
export function getserviceList(params) {
return request({
url: '/api/service/list',
url: `${pram}/api/service/list`,
method: 'get',
params
})
Expand All @@ -27,15 +35,15 @@ export function getserviceList(params) {
// 更新服务
export function serviceUpdate(data) {
return request({
url: '/api/service/update',
url: `${pram}/api/service/update`,
method: 'post',
data
})
}
// 更新服务
export function validate(data, name) {
return request({
url: '/api/validate/' + name,
url: `${pram}/api/validate/` + name,
method: 'post',
data
})
Expand Down
Loading

0 comments on commit f3c0c1f

Please sign in to comment.