Giter Site home page Giter Site logo

lianjiatech / fee Goto Github PK

View Code? Open in Web Editor NEW
874.0 874.0 201.0 28.15 MB

灯塔开源文档地址

Home Page: https://aa978563552.github.io/FEE-doc/

License: MIT License

JavaScript 69.28% HTML 0.05% Vue 28.89% CSS 0.43% Shell 0.17% Less 1.18% EJS 0.01%
javascript monitor nodejs

fee's People

Contributors

aa978563552 avatar alphawq avatar chenchenjoke avatar dependabot[bot] avatar diandian18 avatar linjing005 avatar tinys avatar yaozeyuan 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fee's Issues

/api/project/item/update

server/src/routes/api/project/item/index.js 中的路由/api/project/item/update。
客户端请求时候 'displayName','projectName','cDesc'都是驼峰命名,但是数据库中用的是下划线命名,应该在真正更新数据前,应该相应的把驼峰的值转一下给display_name等。

/api/project/item/delete

server/src/routes/api/project/item/index.js 中路由/api/project/item/delete 请求方式最好是post或者delete

有个问题

window.addEventListener('error', function(e) {
console.log(e);
}, true)

会调用两次,也就是说会打印两次错误,这是为什么呢

data-fns module没有导入

按照文档启动项目后,进行注册和登录,抛出以下异常

[2019-07-19 17:35:21.619]-[runtime] info信息不是标准json
[2019-07-19 17:35:21.658]-[runtime] error.massage =>Cannot read property 'getUnixTime' of undefined

error.stack =>TypeError: Cannot read property 'getUnixTime' of undefined
at Object. (/home/alain/Developer/web/fee/server/dist/model/project/user.js:95:34)
at Generator.next ()
at asyncGeneratorStep (/home/alain/Developer/web/fee/server/dist/model/project/user.js:20:103)
at _next (/home/alain/Developer/web/fee/server/dist/model/project/user.js:22:194)
at /home/alain/Developer/web/fee/server/dist/model/project/user.js:22:364
at new Promise ()
at Object. (/home/alain/Developer/web/fee/server/dist/model/project/user.js:22:97)
at Object._register (/home/alain/Developer/web/fee/server/dist/model/project/user.js:143:20)
at Object.register (/home/alain/Developer/web/fee/server/dist/model/project/user.js:60:20)
at /home/alain/Developer/web/fee/server/dist/routes/api/user/index.js:227:45
at Generator.next ()
at asyncGeneratorStep (/home/alain/Developer/web/fee/server/dist/routes/api/user/index.js:32:103)
at _next (/home/alain/Developer/web/fee/server/dist/routes/api/user/index.js:34:194)
at /home/alain/Developer/web/fee/server/dist/routes/api/user/index.js:34:364
at new Promise ()
at /home/alain/Developer/web/fee/server/dist/routes/api/user/index.js:34:97 => {"method":"func.catch.e","path":"/home/alain/Developer/web/fee/server/dist/library/utils/modules/router_config_builder.js","line":"33","pos":"25","file":"router_config_builder.js"}

node版本: 8.14.0
系统:ubuntu 16.04 LTS
访问浏览器: Mozilla Firefox for Ubuntu 1.0 & Chromium Version 74

Screenshot from 2019-07-19 17-50-52

Bug - 你卖书就卖书,搞个跑不起来的阉割版demo代码,是想干啥呢?

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

/api/user/register

server/src/routes/api/user/index.js 中 /api/user/register 路由:
129行,判断此账号是否存在,let rawUser = MUser.getByAccount(account),应该加await,不然直接走“账号已存在”

/api/project/item/detail

server/src/routes/api/project/item/index.js 中的路由/api/project/item/detail.
项目id:${id}不存在的情况除了包括_.isEmpty(project), 应该还包括project.is_delete == 1。建议优化

Bug - Chinese characters encode error

Describe the bug

Chinese characters encode error

To Reproduce
Steps to reproduce the behavior:

  1. Click the below link and See the error

https://github.com/LianjiaTech/fee/tree/master/client#%E9%A1%B9%E7%9B%AE%E5%8A%9F%E8%83%BD

Expected behavior

encode UTF-8

Screenshots
If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • OS: [macOS 10.15.7]
  • Browser [Google Chrome]
  • Version [87.0.4280.88 (x86_64)]

Additional context
Add any other context about the problem here.

https://github.com/LianjiaTech/fee/tree/master/client

自动注册routes的时候中间件的时机错误

server/src/routes/index.js中

// 注册路由中间件, 需要在注册路由地址之前使用
loginRouter.use(PrivilegeChecker.checkLogin)
loginProjectRouter.use(PrivilegeChecker.checkPrivilege)

注册中间件在注册路由地址之前使用,的确会提前检测login和privilege,但是对于应该返回404的路由,就无法正常通过了。

建议优化: 注册中间件的时机,应该注册路由地址之后,加入URL进行过滤。
代码如下:

for (let url of Object.keys(routerConfigMap)) {
    let routerConfig = routerConfigMap[url];
    if (routerConfig.needLogin) {
        // 需要登录
        loginRouter.use(url, PrivilegeChecker.checkLogin);
        if (routerConfig.needProjectId) {
            // 需要校验项目权限
            loginProjectRouter.use(url, PrivilegeChecker.checkPrivilege);
            Logger.log(`需要登录,也需要检验项目权限(Method: ${routerConfig.methodType}) =>`, url);
            registerRouterByMethod(loginProjectRouter, routerConfig, url)
        } else {
            // 不需要校验项目权限
            Logger.log(`需要登录,但不需要检验项目权限(Method: ${routerConfig.methodType}) =>`, url)
            registerRouterByMethod(loginCommonRouter, routerConfig, url)
        }
    } else {
        Logger.log(`不需要登录(Method: ${routerConfig.methodType}) =>`, url)
        // 不需要登录
        registerRouterByMethod(withoutLoginRouter, routerConfig, url)
    }
}

项目启动报错

按照文档指引,启动项目后,在clinet端会报找不到文件的错误,然后去查看了一下view下确实缺少device-detail/mobileview.vue。将这部分相关的代码注释掉后项目成功启动

Commands:parseNginxLog自动清理旧Stream有问题

parseNginxLog里面由于在分析83行,定期清理stream:
jsonWriteStreamPool.size > 100 || rawLogWriteStreamPool.size > 100 ,由于jsonWriteStreamPool和rawLogWriteStreamPool都是NginxParseLog子类中定义的Map,没有对相关map进行set处理,所以,size应该永远是0,这个判断应该去base中获取jsonWriteStreamPool的size。

在save_log/base中,63行,autoCloseOldStream循环:
首先是10分钟之内,startAt = nowAt - 60 * 100,finishAt = nowAt - 60 * 100,那不是startAt===finishAt了么? 其次,循环中 let survivalAtLogUri = LKafka.getAbsoluteLogUriByType(nowAt, LKafka.LOG_TYPE_JSON) 使用nowAt去获取文件路径,按照目前的逻辑,只有nowAt这一刻的stream可以幸免被关闭。原本设计的应该是获取10分钟内需要被避免关闭的stream,然后关闭其他。所以这边应该是LKafka.getAbsoluteLogUriByType(survivalAt, LKafka.LOG_TYPE_JSON)

关于parseNginxLog的一点小问题

我看到task的manage启动任务在启动parseNginx的时候是按定时任务,每分钟执行一次parseNginxLog。如果每个nginx的日志里面的内容很多。而这一分钟没有处理完这些数据,那么这些定时任务开启的node进程是不是越来越多呢。这样内存是不是会占满,fee是如何处理这个问题的呢,还是我的理解有问题,能不能说下呢。
在parseNginxLog文件的每行数据接收回调函数onDataIn中,我看到有每当处理好的数据文件写入流个数大于100就会删除老的流,那样老的数据是不是就不再处理了。还是有哪里处理了呢。

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.