├── requirements.txt ├── img └── preview1.png ├── release-notes.md ├── README.md ├── db.example.conf ├── templates ├── home.html ├── base.html └── new.html ├── .gitignore ├── app.py └── LICENSE /requirements.txt: -------------------------------------------------------------------------------- 1 | flask -------------------------------------------------------------------------------- /img/preview1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NUAA-Open-Source/A2OS-Dashboard/master/img/preview1.png -------------------------------------------------------------------------------- /release-notes.md: -------------------------------------------------------------------------------- 1 | # Relase Notes 2 | 3 | ## 1.0.0 4 | 5 | - 简单的查询语句绘制图表 6 | 目前仅支持一张图表二维表示,如查询最近 7 天的总事件数 7 | ```sql 8 | SELECT DATE_FORMAT(DATE(created_at), "%Y-%m-%d"), COUNT(*) FROM events WHERE DATE(created_at) BETWEEN DATE(NOW())-6 AND DATE(now()) GROUP BY DATE(created_at); 9 | ``` 10 | - 创建新查询时图表预览和提交 11 | - 保存历史创建图表于首页 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A2OS Dashboard 2 | 3 | ## 项目介绍 4 | 5 | 该项目旨在为 SafeU 开发过程中引入的数据埋点服务 `behavior` 提供数据可视化服务 6 | 7 | ## 项目技术栈 8 | 9 | - Flask 10 | - ECharts 11 | 12 | ## Release Notes 13 | 14 | [Release Notes](./release-notes.md) 15 | 16 | ## 效果预览 17 | 18 |  19 | 20 | ## Notice 21 | 22 | 本项目使用的数据库配置存放在 `db.conf` 中,可自行根据 `db.example.conf` 的示例进行创建 23 | -------------------------------------------------------------------------------- /db.example.conf: -------------------------------------------------------------------------------- 1 | # Copyright 2019 SafeU Dev Team 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | [behavior_db] 15 | behavior_db = your_db 16 | behavior_db_host = your_db_host 17 | behavior_db_port = your_db_port 18 | behavior_db_user = your_db_user 19 | behavior_db_password = your_db_password 20 | behavior_db_charset = your_db_charset 21 | 22 | [a2os_dashboard_db] 23 | a2os_dashboard_db = your_db 24 | a2os_dashboard_db_host = your_db_host 25 | a2os_dashboard_db_port = your_db_port 26 | a2os_dashboard_db_user = your_db_user 27 | a2os_dashboard_db_password = your_db_password 28 | a2os_dashboard_db_charset = your_db_charset -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | {% extends "base.html" %} 17 | {% block body %} 18 |