Giter Site home page Giter Site logo

tarscloud / tarsweb Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 99.0 43.2 MB

TARS Projects Dashboard

License: BSD 3-Clause "New" or "Revised" License

JavaScript 58.63% Shell 0.24% HTML 0.58% Vue 36.59% CSS 3.89% Dockerfile 0.07%
dashboard maintenance tars tars-foundation tars-web

tarsweb's People

Contributors

airycanon avatar bartdong avatar beyondwuxf avatar chengangyangyw avatar chenjianghua666 avatar cyruszhou-cn avatar dependabot[bot] avatar dpp2009 avatar du-ki avatar etzhangsx avatar jarod avatar jerrylucky avatar jiaminzou888 avatar jintengtech avatar jsfiend avatar katharineozil avatar lanhy avatar marklightning avatar merrillfan996 avatar nmshuishui avatar ruanshudong avatar sandyskies avatar shevqko avatar tarscloudbot avatar toby1991 avatar wincsb avatar wjx82850707 avatar ziyang314 avatar zouchengzhuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tarsweb's Issues

tarscloud/framework:v2.4.12 /api/upload_and_publish (upload and patch err:TypeError)

环境:
CentOS 7.5.1804
tarscloud/framework:v2.4.12
TarsGo v1.1.1

通过命令《上传并发布》,上传成功,发布失败(Invalid date)。但是通过web可以发布成功。
curl /api/upload_and_publish
命令返回错误:
upload and patch err:TypeError: Cannot read property 'map' of undefinedresult=0

另外说明一下
tarscloud/framework:v2.4.7
没有这个问题

接口测试报错

struct TA
{
0 optional string extra = "{}"; // 附加参数
1 optional string create_at = "1001-01-01 00:00:00"; // 订阅时间
};
接口测试上传tars文件时,如果字段设置了默认值,会报错,去掉默认值就ok了,麻烦看下~

A Issue for Dependent Libraries Collection

If you find any dependent libraries in code but never display its open source license in the License file, please comment on this issue, We will update the License file ASAP.
You also can pull request to the License file and remember to describe in detail ; )

Welcome to contribute!

MOUNT_DATA=true tarsweb起不来报错

使用docker版的tars镜像,在linux下开启挂载数据后web起不来
看web日志一直打印下面信息
Mon, 25 Mar 2019 09:09:14 GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at node_modules/sequelize/lib/sequelize.js:242:13 { Error: EINVAL: invalid argument, mkdir '/usr/local/app/patchs/tars.upload' at Object.fs.mkdirSync (fs.js:885:18) at Function.sync (/usr/local/tarsweb/node_modules/mkdirp/index.js:71:13) at new DiskStorage (/usr/local/tarsweb/node_modules/multer/storage/disk.js:21:12) at module.exports (/usr/local/tarsweb/node_modules/multer/storage/disk.js:65:10) at new Multer (/usr/local/tarsweb/node_modules/multer/index.js:15:20) at multer (/usr/local/tarsweb/node_modules/multer/index.js:95:12) at multer (/usr/local/tarsweb/node_modules/koa-multer/index.js:17:13) at Object.<anonymous> (/usr/local/tarsweb/app.js:36:16) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function._load (/root/.nvm/versions/node/v8.15.1/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:172:43) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object.<anonymous> (/usr/local/tarsweb/bin/www:2:13) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) errno: -22, code: 'EINVAL', syscall: 'mkdir', path: '/usr/local/app/patchs/tars.upload' }

jenkins 调用 api/upload_patch_package 返回 需要登录

参考例子: https://github.com/TarsCloud/TarsDocs/blob/master/kai-fa/tarsphp/yu-laravel-jie-he-shi-yong.md

执行到:

echo "上传build包"
def packageDeploy = sh(script: "head -n 1 tmp.log", returnStdout: true).trim()
sh "curl -H 'Host:172.18.0.3:3000' -F 'suse=@./${packageDeploy}' -F 'application=${APP_NAME}' -F 'module_name=${SERVER_NAME}' -F 'comment=${env.TAG_DESC}' http://172.18.0.3:3000/pages/server/api/upload_patch_package > curl.log"
(Host:172.18.0.3:3000 我已经改为自己的 tars 服务器地址)

读取 curl.log 返回

  • cat curl.log
    {"ret_code":500,"err_msg":"您还没有登录","data":{}}

请问如何添加登录信息?

api任务管理接口无法调用 pages/server/api/add_task

api任务管理接口无法调用 pages/server/api/add_task

tars版本1.6.0
api.md文档格式重启应用,请求数据如下:
{
"serial": "true",
"items": [{
"server_id": "upiao.configSvr_10.105.232.120",
"command": "restart",
"parameters": {}
}]
}

返回如下报错:
{
"data": {},
"ret_code": 500,
"err_msg": "系统内部错误"
}

如何修改重定向登录页面的域名?

我是通过文档的docker-compose.yml在服务器上面进行部署的,但是当我访问首页的时候,例如:

tars-web.dev.com

会重定向到登录页面:

127.0.0.1:3001

我希望重定向到:

tars-web.dev.com:3001

扩容时报错

我在扩容时启用了set,set_group有做修改,之后扩容有报错。这样做是不允许的吗?
be740c3e0906a29a7b000a3a5c19d23
66cf48e14e3a4f54d664217432e8b73

模板管理无法显示,需要修改TemplateDao.js

问题现象:tarsweb在点击“运维管理”---》“模板管理”的情况下,会弹出系统错误对话框,模板管理无法显示。经定位发现是: /TarsWeb/app/dao文件件下TemplateDao.js需要修改,具体修改之后的文件见如下:

[root@VM_0_13_centos dao]# cat TemplateDao.js
/**

  • Tencent is pleased to support the open source community by making Tars available.
  • Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
  • Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at
  • https://opensource.org/licenses/BSD-3-Clause
  • 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.
    */

const {tProfileTemplate} = require('./db').db_tars;
const Sequelize = require('sequelize');

const TemplateDao = {};

TemplateDao.addTemplate = async (params) => {
return await tProfileTemplate.create({
template_name: params.templateName,
parents_name: params.parentsName,
profile: params.profile,
posttime: params.posttime,
lastuser: params.lastUser
});
};

TemplateDao.deleteTemplate = async (id) => {
return await tProfileTemplate.destroy({
where: {
id: id
}
});
};

TemplateDao.updateTemplate = async (params) => {
return await tProfileTemplate.update({
template_name: params.template_name,
parents_name: params.parents_name,
profile: params.profile,
posttime: params.posttime,
}, {
where: {
id: params.id
}
});
};

TemplateDao.getTemplateById = async (id) => {
return await tProfileTemplate.findOne({
where: {
id
}
});
};

TemplateDao.getTemplateByName = async (templateName) => {
return await tProfileTemplate.findOne({
where: {
template_name: templateName
}
});
};

TemplateDao.getTemplateList = async (templateName, parentsName) => {
const Op=Sequelize.Op;
return await tProfileTemplate.findAll({
where: {
template_name: {
// $like: '%' + templateName + '%'
[Op.like]: %${templateName}%
},
parents_name: {
// $like: '%' + parentsName + '%'
[Op.like]: %${parentsName}%
}
}
});
};

module.exports = TemplateDao;
[root@VM_0_13_centos dao]#

扩容失败

将一个服务扩容到另一台机器上后,将这个服务下线,然后再扩容到同一台机器上就会报错,请问怎么解决

tarsweb protobuf debug support

Since tars supports protobuf, should interface debugging on the web side support protobuf debugging? I do n’t know how to make it more convenient

安装tarsweb必须还要装TarsFramework吗?

我尝试仅创建了所需的数据库,并通过npm安装了tarsWeb管理系统,然后发布tars-go写的应用,出现报错。

[TARS][EndpointManager doEndpoints, exception ,return: -13001 ,objname: tars.tarsAdminRegistry.AdminRegObj ,setname:

上传文件忽略了验证登录

源码中把上传包的api 做了登录忽略,这是为什么? 文档中有地方写到用curl 上传包的时候需要在system 平台获取一个token, 这不是多此一举了吗?

下面是源码中的一段代码:

//上传文件不需要登录
if(WebConf.webConf.uploadLogin || process.env.TARS_WEB_UPLOAD == 'true') {
loginConf.ignore.push('/pages/server/api/upload_patch_package');
loginConf.ignore.push('/api/upload_patch_package');
loginConf.ignore.push('/pages/server/api/upload_and_publish');
loginConf.ignore.push('/api/upload_and_publish');
}

另外还有一个奇怪的地方就是, curl 命令上传包成功,但返回的信息包含了一个 "Method NOT Allowed" !!!
tar cvfz boxserver.tgz ...

  • Trying 172.25.0.1...
  • TCP_NODELAY set
  • Connected to 172.25.0.1 (172.25.0.1) port 3000 (#0)

POST /api/upload_and_publish?ticket=cde57eeb8b1e9138c38f23eaebe5aebf9ff56fe0111 HTTP/1.1
Host: 172.25.0.1:3000
User-Agent: curl/7.58.0
Accept: /
Content-Length: 11824338
Content-Type: multipart/form-data; boundary=------------------------f8e7df31d8cfb4dd
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4998
< X-RateLimit-Reset: 1595390400
< X-DNS-Prefetch-Control: off
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=15552000; includeSubDomains
< X-Download-Options: noopen
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Content-Type: text/plain; charset=utf-8
< Content-Length: 285
< Surrogate-Control: no-store
< Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
< Expires: 0
< Set-Cookie: dcache=true; path=/
< Date: Wed, 22 Jul 2020 03:59:50 GMT
< Connection: keep-alive
<
Method Not Allowed
patch serverId: 108, node_name: 172.25.0.5

task no: [33fd1e8440ba4d5bb19213ab44432e2b]

172.25.0.5 EM_I_SUCCESS startServer [quwanyun.boxserver] from 172.25.0.3 :server is activating, please check:

  • Connection #0 to host 172.25.0.1 left intact

table db_tars_web.t_patch_task' doesn't exist

centos 7.4
mysql 5.6.42
单个节点部署
web项目报错:
Table 'db_tars_web.t_patch_task' doesn't exist\n at Query.formatError
SequelizeDatabaseError: Table 'db_tars_web.t_tars_files' doesn't exist

解决方案:
cd TarsWeb/sql
mysql -uroot -p${mysql_passwork} db_tars_web < db_tars_web.sql

cacheWeb的问题

上传ProxyServer和RouteServer时,会在tars.upload目录下生成对应的ProxyServer和RouteServer目录,而且这两个目录名称应该是默认的,无法修改。
在发布的时候,tarspatch搜索的路径是application/server/下,这里的server是自定义的名称,如果与上传的那个名称不一致(即ProxyServer和RouteServer)就会发布失败:
2019-05-10 16:51:00|31183|DEBUG|PatchImp::preparePatchFile upfile:/usr/local/app/patchs/tars.upload/DCache/DCacheAppRouterServer/DCache.RouterServer_suse_1557459459210.tgz|dstfile:/usr/local/app/patchs/tars/TARSBatchPatching/DCache/DCacheAppRouterServer/DCache.DCacheAppRouterServer.tgz
2019-05-10 16:51:00|31183|ERROR|PatchImp::preparePatchFile isFileExist file:/usr/local/app/patchs/tars.upload/DCache/DCacheAppRouterServer/DCache.RouterServer_suse_1557459459210.tgz|not exist!

这是bug吗?

SequelizeConnectionError: Unknown or incorrect time zone: '+5.5:00'

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| +05:30             | +05:30              |
+--------------------+---------------------+
1 row in set (0.01 sec)
SequelizeConnectionError: Unknown or incorrect time zone: '+5.5:00'
    at /usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:133:19
    at tryCatcher (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

按文档进行部署报caching_sha2_password.so not found

[TC_Mysql::connect]: mysql_real_connect: Authentication plugin 'caching_sha2_password' cannot be loaded: /opt/tafSource/TarsFramework/build/src/mysql/lib/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
2020-03-27 17:13:53 check mysql is not alive: /usr/local/tars/cpp/deploy/mysql-tool --host=localhost --user=root --pass=R36_xtyOeIdj --port=3306 --check
tars-install.sh error

创建DCache应用时,提示“Where paramter id has invalid undefined value"

TarsWeb有个报错:
{"level":"error","message":"controller.js:392|[saveRouterProxy]: Error: WHERE parameter "id" has invalid "undefined" value\n at MySQLQueryGenerator.whereItemQuery (/usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2184:13)\n at /usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2173:25\n at Array.forEach ()\n at MySQLQueryGenerator.whereItemsQuery (/usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2171:35)\n at MySQLQueryGenerator.whereQuery (/usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2144:24)\n at MySQLQueryGenerator.updateQuery (/usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/dialects/abstract/query-generator.js:435:116)\n at QueryInterface.bulkUpdate (/usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/query-interface.js:1043:37)\n at /usr/local/tars/cpp/deploy/web/node_modules/sequelize/lib/model.js:3226:34\n at tryCatcher (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:547:31)\n at Promise._settlePromise (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:604:18)\n at Promise._settlePromise0 (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:649:10)\n at Promise._settlePromises (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/promise.js:729:18)\n at _drainQueueStep (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:93:12)\n at _drainQueue (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:86:9)\n at Async._drainQueues (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:102:5)\n at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/tars/cpp/deploy/web/node_modules/bluebird/js/release/async.js:15:14)\n at processImmediate (internal/timers.js:439:21) ","timestamp":"2020-08-25 16:47:20.505"}

创建弹窗
应用配置出错

能否提供SET区域级批量发布功能?

举个例子一个app:testapp
对用户进行了set划分:
hubei.wuhan.1,hubei.wuhan.2,……,hubei.wuhan.30
shanghai.minhang.1,shanghai.minhang.2,……,shanghai.minhang.30
每个set下面都有一个Server:testServer


每次发布testServer的时候,都得点入对应的set名下的Server进行发布,一共发布30+30=60次,能否提供直接在SET区域(例子中的wuhan,minhang)层级的批量发布功能?

upload_patch_package 接口有一定几率返回 Empty Response?

我在使用 curl 调用 upload_patch_package 接口上传包时经常出现包上传不上去的问题, 这种情况下看 curl 的退出码是 52, 查了下是 Empty Response. 偶尔能上传的时候一切正常.

以下是我在脚本中使用 curl 时所用的参数:

curl -s --connect-timeout 120 -F suse=@/path/to/module.tgz -F application=app -F module_name=module -F 'comment=常规发布' -F md5=$module_file_md5 http://$tarsweb_url/pages/server/api/upload_patch_package

会是因为提供的 md5 校验值跟实际收到的包校验值不符吗?
不过即便是这样也不应该完全不响应吧.

更早之前在用 Python requests 完成上传动作时也出现过这样的问题, 当时没分析出什么原因就不了了之了, 现在切换到 curl 来还是这样.

服务监控切页优化

期望增加如下特性:
服务监控切页,展示表格时,支持按耗时、超时率等维度排序
服务监控切页,展示表格时,支持点击日期显示曲线

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.