mothership-ec/cog-mothership-cp
最新稳定版本:3.5.5
Composer 安装命令:
composer require mothership-ec/cog-mothership-cp
包简介
Cog module for the Mothership Control Panel
README 文档
README
Main menu building
Group markup
This is the markup required for groups of content, repeatable groups and dual column groups.
<!-- Normal group -->
<section class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</section>
<!-- Group grid layout -->
<section class="group-grid">
<div class="row">
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
</div>
</section>
<!-- Repeatable group -->
<section class="repeatable-group">
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
<div class="group">
<h2 class="title">Group title</h2>
<div class="content">
...
</div>
</div>
</section>
<!-- Dual column -->
<section class="dual-column">
<h2 class="title">Test title</h2>
<div class="content">
<div class="column">
...
</div>
<div class="column">
...
</div>
</div>
</section>
Dashboards and Statistics
Datasets
Register new dataset
$services->extend('statistics', function($statistics, $c) { // Simple value counter $statistics->add(new MyDataset($c['db.query'], $c['statistics.counter'], $c['statistics.range.date'])); // Key based counter $statistics->add(new MyKeyDataset($c['db.query'], $c['statistics.counter.key'], $c['statistics.range.date'])); });
class MyDataset extends AbstractDataset { public function getName() { return 'my.dataset'; } public function getPeriodLength() { return static::DAILY; } public function rebuild() { // add rebuilding sql to transaction and commit if not overridden } }
Get a dataset
$dataset = $this->get('statistics')->get('my.dataset');
Push a value
$dataset->counter->push($value);
Set a value by key
$dataset->counter->set($key, $value);
Get the current counter
$dataset->counter->get(); $dataset->counter->get($key);
Increment / decrement
$dataset->counter->increment(); $dataset->counter->decrement($step); $dataset->counter->decrement($key); $dataset->counter->increment($key, $step);
Get a range of values
// From the beginning of time $values = $dataset->range->getValues(0); // From a week ago $values = $dataset->range->getValues( $dataset->range->getWeekAgo() ); // Previous month $values = $dataset->range->getValues( $dataset->range->getMonthAgo(1), $dataset->range->getMonthAgo() );
Get a range of values with keys
$data = $dataset->range->getKeyValues(0);
Get average of values
$monthAverage = $dataset->range->getAverage( $dataset->range->getMonthAgo() );
Get total of values
$yearToDate = $dataset->range->getTotal( $dataset->range->getYearAgo() );
mothership-ec/cog-mothership-cp 适用场景与选型建议
mothership-ec/cog-mothership-cp 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 2.71k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「admin」 「control panel」 「CP」 「cog」 「mothership」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mothership-ec/cog-mothership-cp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mothership-ec/cog-mothership-cp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mothership-ec/cog-mothership-cp 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
Provide a way to secure accesses to all routes of an symfony application.
Analysis module for finding problematical shop data.
Yii2 panel widget
A Laravel Admin Package for The Control Group to make your life easier and steer your project in the right direction
Yii2 prettyPhoto image galary widget uses Lightbox view control jquery.prettyphoto.js
统计信息
- 总下载量: 2.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 16
- 依赖项目数: 8
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2015-02-24