mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Use kevinlebron/colors.php in monitor pane
This commit is contained in:
+16
-16
@@ -509,16 +509,16 @@ class TmuxOutput extends Tmux
|
||||
);
|
||||
|
||||
$pieces = explode(' ', $this->pdo->getAttribute(\PDO::ATTR_SERVER_INFO));
|
||||
$buffer .= ColorCLI::primaryOver("\nThreads = ").
|
||||
ColorCLI::headerOver($pieces[4]).
|
||||
ColorCLI::primaryOver(', Opens = ').
|
||||
ColorCLI::headerOver($pieces[14]).
|
||||
ColorCLI::primaryOver(', Tables = ').
|
||||
ColorCLI::headerOver($pieces[22]).
|
||||
ColorCLI::primaryOver(', Slow = ').
|
||||
ColorCLI::headerOver($pieces[11]).
|
||||
ColorCLI::primaryOver(', QPS = ').
|
||||
ColorCLI::header($pieces[28]);
|
||||
$buffer .= color("\nThreads = ")->green.
|
||||
color($pieces[4])->yellow.
|
||||
color(', Opens = ')->green.
|
||||
color($pieces[14])->yellow.
|
||||
color(', Tables = ')->green.
|
||||
color($pieces[22])->yellow.
|
||||
color(', Slow = ')->green.
|
||||
color($pieces[11])->yellow.
|
||||
color(', QPS = ')->green.
|
||||
color($pieces[28])->yellow.PHP_EOL;
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
@@ -555,11 +555,11 @@ class TmuxOutput extends Tmux
|
||||
|
||||
protected function _setColourMasks(): void
|
||||
{
|
||||
$this->_colourMasks[1] = ColorCLI::headerOver('%-18s').' '.ColorCLI::tmuxOrange('%-48.48s');
|
||||
$this->_colourMasks['2.0'] = ColorCLI::alternateOver('%-20s').' '.ColorCLI::tmuxOrange('%-33.33s');
|
||||
$this->_colourMasks['2.1'] = ColorCLI::headerOver('%-20s').' '.ColorCLI::tmuxOrange('%-33.33s');
|
||||
$this->_colourMasks[3] = ColorCLI::header('%-16.16s %25.25s %25.25s');
|
||||
$this->_colourMasks[4] = ColorCLI::primaryOver('%-16.16s').' '.ColorCLI::tmuxOrange('%25.25s %25.25s');
|
||||
$this->_colourMasks[5] = ColorCLI::tmuxOrange('%-16.16s %25.25s %25.25s');
|
||||
$this->_colourMasks[1] = color('%-18s')->yellow.' '.color('%-48.48s')->yellow->dark;
|
||||
$this->_colourMasks['2.0'] = color('%-20s')->magenta->dark.' '.color('%-33.33s')->yellow->dark.PHP_EOL;
|
||||
$this->_colourMasks['2.1'] = color('%-20s')->yellow.' '.color('%-33.33s')->yellow->dark.PHP_EOL;
|
||||
$this->_colourMasks[3] = color('%-16.16s %25.25s %25.25s')->yellow.PHP_EOL;
|
||||
$this->_colourMasks[4] = color('%-16.16s')->green.' '.color('%25.25s %25.25s')->yellow->dark;
|
||||
$this->_colourMasks[5] = color('%-16.16s %25.25s %25.25s')->yellow->dark;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
2018-10-19 DariusIII
|
||||
* Chg: Use kevinlebron/colors.php in monitor pane
|
||||
* Chg: Use league/climate in ColorCLI class
|
||||
* Chg: Check for empty filename before processing filename matching
|
||||
* Chg: Increase matching percentage for matchPreDbFiles function
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Blacklight\XXX;
|
||||
use Colors\Color;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Cookie\SetCookie;
|
||||
@@ -181,6 +182,18 @@ if (! function_exists('makeFieldLinks')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('color')) {
|
||||
/**
|
||||
* @param string $string
|
||||
*
|
||||
* @return \Colors\Color
|
||||
*/
|
||||
function color($string = ''): Color
|
||||
{
|
||||
return new Color($string);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('human_filesize')) {
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
"james-heinrich/getid3": "1.9.*",
|
||||
"joshpinkney/tv-maze-php-api": "dev-master",
|
||||
"jrean/laravel-user-verification": "^7.0",
|
||||
"kevinlebrun/colors.php": "^1.0",
|
||||
"laravel/framework": "5.7.*",
|
||||
"laravel/scout": "^5.0",
|
||||
"laravel/tinker": "~1.0",
|
||||
|
||||
Generated
+52
-1
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "b654a0021e4b09d9f556cda27ede76b8",
|
||||
"content-hash": "fd5f689ffbd7233972d5253585e5f549",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aharen/omdbapi",
|
||||
@@ -3694,6 +3694,57 @@
|
||||
],
|
||||
"time": "2018-09-13T10:21:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kevinlebrun/colors.php",
|
||||
"version": "1.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kevinlebrun/colors.php.git",
|
||||
"reference": "cdda5eee41314b87cd5a8bb91b1ffc7c0210e673"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kevinlebrun/colors.php/zipball/cdda5eee41314b87cd5a8bb91b1ffc7c0210e673",
|
||||
"reference": "cdda5eee41314b87cd5a8bb91b1ffc7c0210e673",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"satooshi/php-coveralls": "1.0.*",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Colors": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kevin Le Brun",
|
||||
"email": "lebrun.k@gmail.com",
|
||||
"homepage": "http://kevinlebrun.fr",
|
||||
"role": "developer"
|
||||
}
|
||||
],
|
||||
"description": "Colors for PHP CLI scripts",
|
||||
"homepage": "https://github.com/kevinlebrun/colors.php",
|
||||
"keywords": [
|
||||
"cli",
|
||||
"color",
|
||||
"colors",
|
||||
"console",
|
||||
"shell"
|
||||
],
|
||||
"time": "2018-05-30T08:34:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kevinrob/guzzle-cache-middleware",
|
||||
"version": "v2.1.1",
|
||||
|
||||
Reference in New Issue
Block a user