Giter Club home page Giter Club logo

devops-flask-vue's People

Contributors

lifei825 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

devops-flask-vue's Issues

初始化登陆用户后,无法登陆问题

在解决了导入初始化用户的数据库问题后,尝试登陆,报错如图:
qq 20171206175947
在服务器内使用curl命令也做了测试:

[root@localhost devops-flask-vue]# curl -i -X POST -H "Content-Type: application/json" -d '{"username":"lifei","password":"123"}' http://127.0.0.1:8082/api/v1/login
HTTP/1.0 451 UNAVAILABLE FOR LEGAL REASONS
Content-Type: application/json
Content-Length: 507
Access-Control-Allow-Origin: *
Server: Werkzeug/0.12.2 Python/3.5.1
Date: Wed, 06 Dec 2017 11:51:48 GMT

{
    "state": "Invalid credentials",
    "result": {
        "permission": {
            "1": [
                "view",
                "View"
            ],
            "2": [
                "editor",
                "Editor"
            ],
            "4": [
                "op",
                "Operator"
            ],
            "255": [
                "admin",
                "administrator"
            ]
        },
        "username": null,
        "exp": null,
        "token": null
    }
}

从curl结果看,view.py的对应Auth路由里只有permission是正常工作的,username,exp,token都没有返回数据,所以导致登陆失败。

数据库初始化后,数据库表没有对应的初始用户数据插入

系统:centos 7.2
数据库:mysql 5.6

已执行操作:

[root@localhost devops-flask-vue]# rm -rf migrations
[root@localhost devops-flask-vue]# python manage.py db init
  Creating directory /export/projects/devops-flask-vue/migrations ... done
  Creating directory /export/projects/devops-flask-vue/migrations/versions ... done
  Generating /export/projects/devops-flask-vue/migrations/script.py.mako ... done
  Generating /export/projects/devops-flask-vue/migrations/README ... done
  Generating /export/projects/devops-flask-vue/migrations/env.py ... done
  Generating /export/projects/devops-flask-vue/migrations/alembic.ini ... done
  Please edit configuration/connection/logging settings in '/export/projects/devops-flask-vue/migrations/alembic.ini' before proceeding.
[root@localhost devops-flask-vue]# python manage.py db migrate
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.env] No changes in schema detected.
[root@localhost devops-flask-vue]# python manage.py db upgrade
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.

打开后台,用默认的用户名(lifei)密码登陆无果
qq 20171205162346

于是检查了下数据库里面对应用户管理的role,roles_users,user表,里面都没有数据:
qq 20171205162505

vue-init安装异常

系统环境:centos 7.2
安装后端环境,数据库,正常部署,但进入vue-init目录进行前端初始化过程则遇到异常;

在成功执行npm intall后,
执行npm run dev

[root@localhost vue-init]# npm run dev

> [email protected] dev /export/projects/devops-flask-vue/vue-init
> node build/dev-server.js

> Starting dev server...


 ERROR  Failed to compile with 1 errors                                                           11:25:54

This dependency was not found:

* Highcharts/highstock in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0&bustCache!./src/components/chart/chart_highcharts.vue

To install it, you can run: npm install --save Highcharts/highstock
> Listening at http://0.0.0.0:8080

(node:18819) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Exited with code 3
(node:18819) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

反复研究过这个npm(Highcharts/highstock)包,也通过多种方式尝试安装,最后通过改变npm源方式也成功下载了,但执行dev后依然报错如上。

原因猜想:

这里没有执行过vue-cli的脚手架部署,不知道楼主这个项目的vue脚手架是自己搭建还是使用的官方版本,本人是新手vue,还不够系统,此问题一晚上无果,望得到反馈,非常希望用上这个系统,感谢!

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.