lifei825 / devops-flask-vue Goto Github PK
View Code? Open in Web Editor NEW基于flask+vue的运维平台
Home Page: http://devops.feifeiwd.com:8080
基于flask+vue的运维平台
Home Page: http://devops.feifeiwd.com:8080
在解决了导入初始化用户的数据库问题后,尝试登陆,报错如图:
在服务器内使用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.
系统环境: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,还不够系统,此问题一晚上无果,望得到反馈,非常希望用上这个系统,感谢!
您好!请问下部署好项目有资产管理、发布项目功能吗?demo不能测试啊
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.