vinevax/laravel-dashboard-uptime-robot-tile 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vinevax/laravel-dashboard-uptime-robot-tile

最新稳定版本:3.0.0

Composer 安装命令:

composer require vinevax/laravel-dashboard-uptime-robot-tile

包简介

A tile for Laravel Dashboard that displays Uptime Robot monitors.

README 文档

README

Latest Version on Packagist Total Downloads

This tile can be used on the Laravel Dashboard.

Original view...

img

Alternative view for many monitors...

img

Installation

You can install the package via composer:

composer require vinevax/laravel-dashboard-uptime-robot-tile

⚠️ Important if you want to use the alternative view

In order to use the alternative view, you need to update the included Alpine.js script from version 2 to 3. To do this, remove the old script in your dashboard.php config file and add the following script https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js

Usage

In the dashboard config file, you must add this configuration in the tiles key.

// in config/dashboard.php

return [
    // ...
    'tiles' => [
        /* Monitors should be an array with ids of your monitors you want to display */
        'uptimerobot' => [
            'key' => env('UPTIMEROBOT_KEY'),
            'blade' => 'multiple', // Or `multiple` for alternative tile
            'monitors' => [],
            'monitor_types' => [
                1 => 'URL',
                2 => 'Keyword',
                3 => 'Ping',
                4 => 'Port',
                5 => 'Heartbeat'
            ],
            'uptime' => 1 // Set to 0 if fetching from Uptime Robot API lags
        ]   
    ]   
];

In app/Console/Kernel.php you should schedule the VineVax\UptimeRobotTile\Commands\FetchUptimeRobotDataCommand to run every x minutes.

    // in app/console/Kernel.php
  
        protected function schedule(Schedule $schedule)
        {
            $schedule->command(\VineVax\UptimeRobotTile\Commands\FetchUptimeRobotDataCommand::class)->everyFiveMinutes();
        }

In your dashboard view you use the livewire:uptime-robot-tile component.

<x-dashboard>
    <livewire:uptime-robot-tile position="b1" />
</x-dashboard>

Customizing the view

If you want to customize the view used to render this tile, run this command:

php artisan vendor:publish --provider="VineVax\UptimeRobotTile\UptimeRobotTileServiceProvider" --tag="dashboard-uptime-robot-tile-views"

Please note that if you have published the view and then wish to switch between 'original' and 'multiple' options for the blade file in dashboard.php you will need to remove tile.blade.php from /resources/views/vendor/dashboard-uptime-robot-tile and then run the publish command again.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固