Coder Social home page Coder Social logo

easyswoole_panel's Introduction

V3版本更名Panel

V3 Introduction

核心 📌 可视化管理一切

  • ✨ 插件市场,提供插件的安装和管理,是panel的核心内置组件
  • 🐌 EasySwoole服务在线管理,重载、关闭服务(调试不再那么痛苦)
  • 🔨 IP限流器(可视化配置,总限流、分组限流、账号token限流等)
  • 🖐️ CURD在线生成,解放你的双手
  • 开发中 ✏️ 数据库备份管理
  • 开发中 🧱 fast-cache面板,一键开启数据落地(无需再像以前一样写上百行代码了),在线查看管理数据
  • 开发中 🧮 连接池使用率 如ORM REDIS 等连接池 可以实时看到状态、分析使用情况
  • 开发中 📖 基于注解的API文档 在线生成查看

安装教程

1.下载源码,可以是clone也可以是下载打了tag的源码
2.安装composer依赖 composer install或composer update
3.安装easyswoole ./vendor/bin/easyswoole install
4.编辑数据库配置 dev.php
5.运行数据库迁移 ./vendor/bin/phinx migrate
6.编辑前端public/nepadmin/config.js搜索 requestUrl 请求url换成你自己的es服务地址 IP:Port
7.打开后台查看是否正常
8.进入插件市场安装插件

插件安装原理

有使用过微擎相关的用户应该比较容易理解以下逻辑

插件源码使用composer管理,也可以像微擎一样放在Addons目录中。

composer方式

1.composer require 插件包
2.重启服务
3.在插件市场刷新列表 查看是否引入正常
4.点击安装插件(此处的安装是执行插件内部的安装逻辑,比如创建数据表、迁移数据文件等)

Addons目录

此处是为了兼容开发流程、第三方插件包。后续会提供插件开发规范文档

简单来说就是把插件包 解压放入Addons目录,需要注意的是,需要在packlist.php数组中 增加插件包名 才能扫描到

然后接下来的步骤就跟composer方式一样,在后台查看和安装

旧版本部署教程

v1版本使用mysqli组件+pool

v2版本使用orm组件 建议

下载地址:https://github.com/xuanyanwow/easyswoole_admin/tags

下载源码压缩包

① 上传源码,并执行 composer install

② es安装 php vendor/easyswoole/easyswoole/bin/easyswoole install 所有提示都输入n 回车

③ 修改dev.php mysql配置 导入mysql结构数据(在public目录下的sql文件)

④ public/nepadmin/config.js搜索 requestUrl 请求url换成你自己的es服务地址 IP:Port

⑤ 访问 IP:Port 自动进入index.html页面

⑥ 管理员账号 1001 123456 测试账号 100083 123456 可以看到测试账号的菜单只有权限管理,点击查看缓存、清除缓存会提示没有权限 (页面权限和接口权限是两回事)

⑦ layui调试模式开关 在public/index.html

// version: Date.parse(new Date()),
debug: false

作者

Siam - 宣言 - QQ 59419979

可以在easyswoole 1群、2群(管理员)找到俺

截图演示

Image text Image text Image text

权限控制dom

在权限页面有三个按钮

<button class="layui-btn" data-siam-auth="!testtets">没有testtets权限则显示</button>
<button class="layui-btn" data-siam-auth="/api/*">有/api/*权限则显示</button>
<button class="layui-btn" data-siam-auth="/admin/*">有/admin/*权限则显示</button>

在dom中使用 data-siam-auth='规则名' 视图显示时候则可自动移除没权限的dom

也可以手动调用验证

// 手动调用验证权限
if ( layui.siam.vifAuth('/api/system/clearCache')){
    layer.msg('有/api/system/clearCache的权限');
}else{
    layer.msg('没有/api/system/clearCache的权限');
}

easyswoole_panel's People

Contributors

chrisleeareemm avatar lienze741 avatar xuanyanwow avatar yanjiaoguang 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

easyswoole_panel's Issues

Problem 1

Problem 1
- Installation request for tioncico/curd-automatic-generation dev-master -> satisfiable by tioncico/curd-automatic-generation[dev-master].
- tioncico/curd-automatic-generation dev-master requires easyswoole/easyswoole 3.x-dev -> satisfiable by easyswoole/easyswoole[3.x-dev] but these conflict with your requirements or minimum-stability.

Class 'Co\Scheduler' not found

PHP Fatal error: Uncaught Error: Class 'Co\Scheduler' not found in /www/ladmin/easyswoole_panel/EasySwooleEvent.php:3

大兄弟,这个是什么原因?

[Swoole\Server::start(): failed to start server. Error: swServer_start_check: onTask event callback must be set at file:easyswoole_admin/vendor/easyswoole/easyswoole/src/ServerManager.php line:120]

php版本:
PHP 7.2.21 (cli) (built: Aug 27 2019 10:29:30) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

swoole版本

Author | Swoole Team [email protected]
Version | 4.4.4
Built | Aug 27 2019 10:39:29

最新版easyswoole疑问点

1,权限没办法删除和修改。
2,"easyswoole/code-generation": "^2.0",这个估计和哪里冲突了,我composer里面删除了,才可以composer install成功,不然会报以下错误:
Problem 1 - easyswoole/code-generation[2.0.1, ..., 2.0.2] require easyswoole/http-annotation ^1.4 -> satisfiable by easyswoole/http-annotation[1.4.0, ..., 1.5.0]. - You can only install one version of a package, so only one of these can be installed: easyswoole/http-annotation[1.4.0, ..., 1.5.0, 2.0.0]. - easyswoole/easyswoole 3.x-dev requires easyswoole/http-annotation ^2.0 -> satisfiable by easyswoole/http-annotation[2.0.0]. - Root composer.json requires easyswoole/easyswoole 3.x-dev -> satisfiable by easyswoole/easyswoole[3.x-dev]. - Root composer.json requires easyswoole/code-generation ^2.0 -> satisfiable by easyswoole/code-generation[2.0.1, 2.0.2].

更新composer源,使用Aliyun

install 时发现还是laravel,可以使用aliyun的,不然需要输入账号密码

"repositories": { "packagist": { "type": "composer", "url": "https://mirrors.aliyun.com/composer/" } }

跑项目报错

PHP Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /www/wwwroot/swoole.****.cn/vendor/bin/easyswoole on line 13

Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /www/wwwroot/swoole.****.cn/vendor/bin/easyswoole on line 13

包依赖错误

  1. tioncico/curd-automatic-generation 的dev-master分支似乎已被移除,只剩下2.x版本
  2. 默认没有家在easyswoole/mysqli-pool包,但却在启动时候注册了,并且该包与项目用的easyswoole/component=^2.0存在依赖关系冲突

综上,我第一次启动以失败告终。。。

后台用户名设置中文乱码

siam.js 19行得 var json = decodeURIComponent(escape(window.atob(decodeURIComponent(token)))); 双层decodeURIComponent,否则中文乱码

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.