mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-20 04:23:01 +08:00
https://github.com/chatopera/cskefu/issues/704 shift chatbot code as a plugin, set it as base codes directly
This commit is contained in:
parent
1259b90727
commit
7ac4b59029
4
contact-center/app/.gitignore
vendored
4
contact-center/app/.gitignore
vendored
@ -7,9 +7,7 @@ src/main/resources/templates/admin/channel/*
|
||||
|
||||
# ignore app views within plugins
|
||||
src/main/resources/templates/apps/callout
|
||||
src/main/resources/templates/apps/chatbot
|
||||
src/main/resources/templates/apps/callcenter
|
||||
|
||||
# ignore system views for chatbot
|
||||
src/main/resources/templates/admin/system/chatbot
|
||||
# ignore logs
|
||||
logs/
|
||||
|
3
contact-center/app/src/main/java/com/chatopera/cc/.gitignore
vendored
Normal file
3
contact-center/app/src/main/java/com/chatopera/cc/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
plugins/*
|
||||
!plugins/chatbot
|
||||
!plugins/README.md
|
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
@ -31,6 +31,7 @@ cd plugins/PLUGIN
|
||||
```
|
||||
|
||||
## 应用打包
|
||||
|
||||
安装插件后,插件开发过程同[春松客服开发环境搭建](https://docs.chatopera.com/products/cskefu/osc/engineering.html)。
|
||||
|
||||
如果需要部署到系统测试、生产环境等,首先打包为 WAR 应用,方式如下:
|
||||
@ -41,8 +42,3 @@ cd contact-center
|
||||
```
|
||||
|
||||
春松客服的发布形式为 Docker 镜像,如果在更改源码后,也可以使用春松客服的 Docker 镜像构建脚本发布,参考[构建脚本](https://github.com/chatopera/cskefu/blob/osc/contact-center/admin/build.sh)。
|
||||
|
||||
## 机器人客服
|
||||
|
||||
- [源码和安装说明](./chatbot)
|
||||
- [使用介绍](https://docs.chatopera.com/products/cskefu/work-chatbot/index.html)
|
||||
|
@ -1,28 +0,0 @@
|
||||
# 春松客服智能机器人插件
|
||||
|
||||
## 使用介绍
|
||||
|
||||
[春松客服机器人客服文档](https://docs.chatopera.com/products/cskefu/work-chatbot.html)
|
||||
|
||||
## 安装插件
|
||||
|
||||
```
|
||||
./scripts/install.sh
|
||||
```
|
||||
|
||||
## 卸载插件
|
||||
|
||||
```
|
||||
./scripts/uninstall.sh
|
||||
```
|
||||
|
||||
## 开源许可协议
|
||||
|
||||
Copyright (2018-2019) <a href="https://www.chatopera.com/" target="_blank">北京华夏春松科技有限公司</a>
|
||||
|
||||
[Apache License Version 2.0](https://github.com/chatopera/cosin/blob/master/LICENSE)
|
||||
|
||||
[![chatoper banner][co-banner-image]][co-url]
|
||||
|
||||
[co-banner-image]: https://user-images.githubusercontent.com/3538629/42383104-da925942-8168-11e8-8195-868d5fcec170.png
|
||||
[co-url]: https://www.chatopera.com
|
@ -1,91 +0,0 @@
|
||||
#! /bin/bash
|
||||
###########################################
|
||||
# Install Plugin
|
||||
# Copyright (2019-2020) 北京华夏春松科技有限公司
|
||||
###########################################
|
||||
|
||||
# constants
|
||||
## for windows platform
|
||||
export MSYS=winsymlinks:nativestrict
|
||||
|
||||
baseDir=$(cd `dirname "$0"`;pwd)
|
||||
rootDir=$(cd -P $baseDir/..;pwd)
|
||||
upperDir=$(cd -P $rootDir/..;pwd)
|
||||
CSKEFU_ROOT=$(cd -P $upperDir/../..;pwd)
|
||||
pluginName=$(basename $rootDir)
|
||||
|
||||
# functions
|
||||
|
||||
# main
|
||||
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
||||
cd $rootDir/..
|
||||
echo "[plugins] path" `pwd`
|
||||
|
||||
if [ -d $CSKEFU_ROOT ]; then
|
||||
PLUGINS_DIR=$CSKEFU_ROOT/contact-center/app/src/main/java/com/chatopera/cc/plugins
|
||||
echo "[plugin] link" $rootDir "as" $pluginName "..."
|
||||
if [ ! -d $PLUGINS_DIR ]; then
|
||||
mkdir -p $PLUGINS_DIR
|
||||
fi
|
||||
|
||||
cd $PLUGINS_DIR
|
||||
pwd
|
||||
if [ -e $pluginName ]; then
|
||||
rm -rf $pluginName
|
||||
fi
|
||||
|
||||
echo "[plugin] link source codes"
|
||||
ln -s $rootDir/classes $pluginName
|
||||
|
||||
# Install channel views
|
||||
if [ -d $rootDir/views/channel/$pluginName ]; then
|
||||
echo "[plugin] unlink views for channel"
|
||||
VIEW_ADMIN_CHANNEL=$CSKEFU_ROOT/contact-center/app/src/main/resources/templates/admin/channel
|
||||
|
||||
if [ -d $VIEW_ADMIN_CHANNEL/$pluginName ]; then
|
||||
rm -rf $VIEW_ADMIN_CHANNEL/$pluginName
|
||||
fi
|
||||
|
||||
cd $VIEW_ADMIN_CHANNEL
|
||||
ln -s $rootDir/views/channel/$pluginName .
|
||||
else
|
||||
echo "[plugin] channel views not present"
|
||||
fi
|
||||
|
||||
# Install apps view
|
||||
if [ -d $rootDir/views/apps/$pluginName ]; then
|
||||
echo "[plugin] unlink views for apps"
|
||||
VIEW_ADMIN_APPS=$CSKEFU_ROOT/contact-center/app/src/main/resources/templates/apps
|
||||
|
||||
if [ -d $VIEW_ADMIN_APPS/$pluginName ]; then
|
||||
rm -rf $VIEW_ADMIN_APPS/$pluginName
|
||||
fi
|
||||
|
||||
cd $VIEW_ADMIN_APPS
|
||||
ln -s $rootDir/views/apps/$pluginName .
|
||||
else
|
||||
echo "[plugin] apps views not present"
|
||||
fi
|
||||
|
||||
# Install admin/system view
|
||||
if [ -d $rootDir/views/system/$pluginName ]; then
|
||||
echo "[plugin] unlink views for system"
|
||||
VIEW_ADMIN_SYSTEM=$CSKEFU_ROOT/contact-center/app/src/main/resources/templates/admin/system
|
||||
|
||||
if [ -d $VIEW_ADMIN_SYSTEM/$pluginName ]; then
|
||||
rm -rf $VIEW_ADMIN_SYSTEM/$pluginName
|
||||
fi
|
||||
|
||||
cd $VIEW_ADMIN_SYSTEM
|
||||
ln -s $rootDir/views/system/$pluginName .
|
||||
echo "[note] remember to ignore src/main/resources/templates/admin/system/chatbot in contact-center/app/.gitignore"
|
||||
else
|
||||
echo "[plugin] system views not present"
|
||||
fi
|
||||
|
||||
|
||||
echo "[plugin] install done."
|
||||
else
|
||||
echo "[error] not found cosinee dir."
|
||||
exit 2
|
||||
fi
|
@ -1,59 +0,0 @@
|
||||
#! /bin/bash
|
||||
###########################################
|
||||
# Uninstall Plugin
|
||||
# Copyright (2019) 北京华夏春松科技有限公司
|
||||
###########################################
|
||||
|
||||
# constants
|
||||
## for windows platform
|
||||
export MSYS=winsymlinks:nativestrict
|
||||
|
||||
baseDir=$(cd `dirname "$0"`;pwd)
|
||||
rootDir=$(cd -P $baseDir/..;pwd)
|
||||
upperDir=$(cd -P $rootDir/..;pwd)
|
||||
COSINEE_BASEDIR=$(cd -P $upperDir/../..;pwd)
|
||||
pluginName=$(basename $rootDir)
|
||||
|
||||
# functions
|
||||
|
||||
# main
|
||||
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
||||
cd $rootDir/..
|
||||
echo "[plugins] path" `pwd`
|
||||
|
||||
if [ -d $COSINEE_BASEDIR ]; then
|
||||
PLUGINS_DIR=$COSINEE_BASEDIR/contact-center/app/src/main/java/com/chatopera/cc/plugins
|
||||
echo "[plugin] unlink" $pluginName "..."
|
||||
if [ ! -d $PLUGINS_DIR ]; then
|
||||
mkdir -p $PLUGINS_DIR
|
||||
fi
|
||||
|
||||
cd $PLUGINS_DIR
|
||||
if [ -L $pluginName ]; then
|
||||
rm -rf $pluginName
|
||||
fi
|
||||
|
||||
if [ -d $rootDir/views/channel/$pluginName ]; then
|
||||
echo "[plugin] unlink views for channel"
|
||||
VIEW_ADMIN_CHANNEL=$COSINEE_BASEDIR/contact-center/app/src/main/resources/templates/admin/channel
|
||||
|
||||
if [ -L $VIEW_ADMIN_CHANNEL/$pluginName ]; then
|
||||
rm -rf $VIEW_ADMIN_CHANNEL/$pluginName
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install apps view
|
||||
if [ -d $rootDir/views/apps/$pluginName ]; then
|
||||
echo "[plugin] unlink views for apps"
|
||||
VIEW_ADMIN_APPS=$COSINEE_BASEDIR/contact-center/app/src/main/resources/templates/apps
|
||||
|
||||
if [ -L $VIEW_ADMIN_APPS/$pluginName ]; then
|
||||
rm -rf $VIEW_ADMIN_APPS/$pluginName
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[plugin] uninstall done."
|
||||
else
|
||||
echo "[error] not found cosinee dir."
|
||||
exit 2
|
||||
fi
|
@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
###########################################
|
||||
# Install All public plugins
|
||||
# Copyright (2019) 北京华夏春松科技有限公司
|
||||
# Copyright (2019-2022) 北京华夏春松科技有限公司
|
||||
###########################################
|
||||
|
||||
# constants
|
||||
@ -24,7 +24,7 @@ function install_plugin(){
|
||||
cd $baseDir/..
|
||||
echo "Inspect plugins -->" `pwd`
|
||||
for x in `ls .`; do
|
||||
if [ $x != "scripts" ] && [ -d ./$x ]; then
|
||||
if [ $x != "scripts" ] && [ $x != "tmp" ] && [ -d ./$x ]; then
|
||||
install_plugin $x
|
||||
echo -e "\n"
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
###########################################
|
||||
# Uninstall all public plugins
|
||||
# Copyright (2019) 北京华夏春松科技有限公司
|
||||
# Copyright (2019-2022) 北京华夏春松科技有限公司
|
||||
###########################################
|
||||
|
||||
# constants
|
||||
|
Loading…
x
Reference in New Issue
Block a user