From 8eed4ed9ee50bb8cfc0026cf4ee24d324ab954cc Mon Sep 17 00:00:00 2001 From: Joost Faassen Date: Sat, 22 Aug 2020 07:33:45 +0100 Subject: [PATCH] feat: misc enhancements * properly support host.status * add Service resource type * extend label examples * use labels in generated docs * refactor html generation * enhance generated doc nav (only link to supported types) * bump linkorb/graph to 1.2.1 for bugfix on missing labels --- composer.lock | 1254 +++++++++++++---- .../github.com__linkorb__infra.yaml | 12 +- .../github.com__linkorb__schemata.yaml | 9 +- example/resources/Host/app1.yaml | 6 + example/resources/Host/app2.yaml | 4 + example/resources/Host/db1m.yaml | 4 + example/resources/Host/db1s.yaml | 4 + .../resources/Host/docker-engine-host1.yaml | 4 + example/resources/HostGroup/prod.yaml | 2 +- example/resources/Service/mysql1.yaml | 10 + scripts/doc/html | 79 +- src/Infra.php | 3 +- src/Resource/DnsDomainResource.php | 4 + src/Resource/DockerEngineResource.php | 4 + src/Resource/FirewallRuleResource.php | 4 + src/Resource/GitRepositoryResource.php | 5 +- src/Resource/HostGroupResource.php | 4 + src/Resource/HostResource.php | 30 + src/Resource/MonitoringCheckResource.php | 6 +- src/Resource/OsReleaseResource.php | 6 +- src/Resource/ServiceResource.php | 56 + src/Resource/UserResource.php | 4 + src/Service/HtmlGeneratorService.php | 55 +- templates/base.html.twig | 49 +- templates/chunk-labels.html.twig | 8 + templates/docker-engine.html.twig | 2 + templates/domain.html.twig | 2 + templates/firewall-rule.html.twig | 3 + templates/host-group.html.twig | 10 +- templates/host-groups.html.twig | 12 +- templates/host.html.twig | 27 +- templates/hosts.html.twig | 34 +- templates/index.html.twig | 16 +- templates/os-release.html.twig | 2 + templates/repositories.html.twig | 15 +- templates/repository.html.twig | 15 +- templates/service.html.twig | 24 + templates/services.html.twig | 36 + templates/user.html.twig | 4 +- templates/users.html.twig | 4 - 40 files changed, 1462 insertions(+), 370 deletions(-) create mode 100644 example/resources/Service/mysql1.yaml create mode 100644 src/Resource/ServiceResource.php create mode 100644 templates/chunk-labels.html.twig create mode 100644 templates/service.html.twig create mode 100644 templates/services.html.twig diff --git a/composer.lock b/composer.lock index c4db477..5baf9c9 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "badcow/dns", - "version": "v2.3.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/Badcow/DNS.git", - "reference": "d551dc624065372fc9c75986665e9983bfd0358f" + "reference": "f849b0ab6dc2d6048f4354540e8c1ccece4636b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Badcow/DNS/zipball/d551dc624065372fc9c75986665e9983bfd0358f", - "reference": "d551dc624065372fc9c75986665e9983bfd0358f", + "url": "https://api.github.com/repos/Badcow/DNS/zipball/f849b0ab6dc2d6048f4354540e8c1ccece4636b6", + "reference": "f849b0ab6dc2d6048f4354540e8c1ccece4636b6", "shasum": "" }, "require": { @@ -26,6 +26,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.1", + "phpstan/phpstan": "^0.11.6", "phpunit/phpunit": "~7.5" }, "type": "library", @@ -35,6 +36,9 @@ } }, "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], "authors": [ { "name": "Sam Williams", @@ -42,7 +46,7 @@ } ], "description": "A PHP library for creating DNS zone files based on RFC1035", - "time": "2019-05-06T00:45:01+00:00" + "time": "2019-10-09T11:09:20+00:00" }, { "name": "clue/stream-filter", @@ -98,16 +102,16 @@ }, { "name": "docopt/docopt", - "version": "1.0.2", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/docopt/docopt.php.git", - "reference": "d2ee65c2fe4be78f945a48edd02be45843b39423" + "reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/docopt/docopt.php/zipball/d2ee65c2fe4be78f945a48edd02be45843b39423", - "reference": "d2ee65c2fe4be78f945a48edd02be45843b39423", + "url": "https://api.github.com/repos/docopt/docopt.php/zipball/bf3683a16e09fa1665e493eb4d5a29469e132a4f", + "reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f", "shasum": "" }, "require": { @@ -134,43 +138,48 @@ "role": "Developer" } ], - "description": "Port of Python's docopt for PHP 5.3", + "description": "Port of Python's docopt for PHP >=5.3", "homepage": "http://github.com/docopt/docopt.php", "keywords": [ "cli", "docs" ], - "time": "2015-10-30T03:21:23+00:00" + "time": "2019-12-03T02:48:46+00:00" }, { "name": "doctrine/inflector", - "version": "v1.3.0", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + "reference": "4650c8b30c753a76bf44fb2ed00117d6f367490c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4650c8b30c753a76bf44fb2ed00117d6f367490c", + "reference": "4650c8b30c753a76bf44fb2ed00117d6f367490c", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -178,6 +187,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -186,10 +199,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -199,15 +208,35 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } ], - "time": "2018-01-09T20:05:19+00:00" + "time": "2020-05-29T07:19:59+00:00" }, { "name": "geekdevs/cli-highlighter", @@ -307,27 +336,29 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { + "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" + "psr/log": "^1.1" }, "suggest": { "psr/log": "Required for using the Log middleware" @@ -335,16 +366,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "6.5-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" - } + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -368,7 +399,7 @@ "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", @@ -423,33 +454,37 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.5.2", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "9f83dded91781a01c63574e387eaa769be769115" + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", - "reference": "9f83dded91781a01c63574e387eaa769be769115", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", "shasum": "" }, "require": { "php": ">=5.4.0", "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5" + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { + "ext-zlib": "*", "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -486,7 +521,7 @@ "uri", "url" ], - "time": "2018-12-04T20:46:45+00:00" + "time": "2019-07-01T23:21:34+00:00" }, { "name": "hiddeco/transip", @@ -538,39 +573,41 @@ }, { "name": "knplabs/github-api", - "version": "2.11.0", + "version": "v2.15.0", "source": { "type": "git", "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "7e67b4ccf9ef62fbd6321a314c61d3202c07b855" + "reference": "03445f26843ec44319fe1f3c2a8ef6fcd545a154" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/7e67b4ccf9ef62fbd6321a314c61d3202c07b855", - "reference": "7e67b4ccf9ef62fbd6321a314c61d3202c07b855", + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/03445f26843ec44319fe1f3c2a8ef6fcd545a154", + "reference": "03445f26843ec44319fe1f3c2a8ef6fcd545a154", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", + "php": "^7.1", "php-http/cache-plugin": "^1.4", - "php-http/client-common": "^1.6", + "php-http/client-common": "^1.6 || ^2.0", "php-http/client-implementation": "^1.0", "php-http/discovery": "^1.0", - "php-http/httplug": "^1.1", + "php-http/httplug": "^1.1 || ^2.0", "psr/cache": "^1.0", "psr/http-message": "^1.0" }, "require-dev": { "cache/array-adapter": "^0.4", "guzzlehttp/psr7": "^1.2", - "php-http/guzzle6-adapter": "^1.0", - "php-http/mock-client": "^1.0", - "phpunit/phpunit": "^5.5 || ^6.0" + "php-http/guzzle6-adapter": "^1.0 || ^2.0", + "php-http/mock-client": "^1.2", + "phpstan/phpstan": "^0.12.23", + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.11.x-dev" + "dev-2.x": "2.15.x-dev", + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -583,14 +620,14 @@ "MIT" ], "authors": [ + { + "name": "KnpLabs Team", + "homepage": "http://knplabs.com" + }, { "name": "Thibault Duplessis", "email": "thibault.duplessis@gmail.com", "homepage": "http://ornicar.github.com" - }, - { - "name": "KnpLabs Team", - "homepage": "http://knplabs.com" } ], "description": "GitHub API v3 client", @@ -601,7 +638,13 @@ "gist", "github" ], - "time": "2019-01-28T19:31:35+00:00" + "funding": [ + { + "url": "https://github.com/acrobat", + "type": "github" + } + ], + "time": "2020-07-11T16:45:45+00:00" }, { "name": "linkorb/dnsx", @@ -653,16 +696,16 @@ }, { "name": "linkorb/graph", - "version": "v1.0.0", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/linkorb/graph.git", - "reference": "8b4e4f223406ad4fca7fd07f02bc6e203e47329d" + "reference": "ef4098e9e5828f5d3aded7bd4982692f88889f97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/linkorb/graph/zipball/8b4e4f223406ad4fca7fd07f02bc6e203e47329d", - "reference": "8b4e4f223406ad4fca7fd07f02bc6e203e47329d", + "url": "https://api.github.com/repos/linkorb/graph/zipball/ef4098e9e5828f5d3aded7bd4982692f88889f97", + "reference": "ef4098e9e5828f5d3aded7bd4982692f88889f97", "shasum": "" }, "require": { @@ -699,20 +742,20 @@ "linkorb", "php" ], - "time": "2019-06-23T13:09:26+00:00" + "time": "2020-08-22T06:25:46+00:00" }, { "name": "linkorb/infra-sdk", - "version": "v1.0.1", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/linkorb/infra-sdk-php.git", - "reference": "85058e926da82acd82fedb640d68268ec5c1c99b" + "reference": "b6ba02dbe32b5421aa03aceb16e2882be62147fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/linkorb/infra-sdk-php/zipball/85058e926da82acd82fedb640d68268ec5c1c99b", - "reference": "85058e926da82acd82fedb640d68268ec5c1c99b", + "url": "https://api.github.com/repos/linkorb/infra-sdk-php/zipball/b6ba02dbe32b5421aa03aceb16e2882be62147fc", + "reference": "b6ba02dbe32b5421aa03aceb16e2882be62147fc", "shasum": "" }, "require": { @@ -748,7 +791,7 @@ "linkorb", "php" ], - "time": "2019-03-19T09:13:16+00:00" + "time": "2020-01-03T16:43:29+00:00" }, { "name": "linkorb/scripter", @@ -797,30 +840,74 @@ ], "time": "2019-07-01T13:26:31+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, { "name": "php-http/cache-plugin", - "version": "1.6.0", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/php-http/cache-plugin.git", - "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8" + "reference": "a1cb3e2a4f095f820e0a0e078f3dfd2d9c83a0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/8e2505d2090316fac7cce637b39b6bbb5249c5a8", - "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8", + "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/a1cb3e2a4f095f820e0a0e078f3dfd2d9c83a0f7", + "reference": "a1cb3e2a4f095f820e0a0e078f3dfd2d9c83a0f7", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", + "php": "^7.1 || ^8.0", "php-http/client-common": "^1.9 || ^2.0", "php-http/message-factory": "^1.0", "psr/cache": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.5" + "phpspec/phpspec": "^5.1 || ^6.0" }, "type": "library", "extra": { @@ -851,20 +938,20 @@ "httplug", "plugin" ], - "time": "2019-01-23T16:51:58+00:00" + "time": "2020-07-13T10:55:38+00:00" }, { "name": "php-http/client-common", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48" + "reference": "c0390ae3c8f2ae9d50901feef0127fb9e396f6b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/0e156a12cc3e46f590c73bf57592a2252fc3dc48", - "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48", + "url": "https://api.github.com/repos/php-http/client-common/zipball/c0390ae3c8f2ae9d50901feef0127fb9e396f6b4", + "reference": "c0390ae3c8f2ae9d50901feef0127fb9e396f6b4", "shasum": "" }, "require": { @@ -872,7 +959,7 @@ "php-http/httplug": "^1.1", "php-http/message": "^1.6", "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { "guzzlehttp/psr7": "^1.4", @@ -886,7 +973,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -912,32 +999,33 @@ "http", "httplug" ], - "time": "2019-02-02T07:03:15+00:00" + "time": "2019-11-18T08:54:36+00:00" }, { "name": "php-http/discovery", - "version": "1.6.1", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "684855f2c2e9d0a61868b8f8d6bd0295c8a4b651" + "reference": "64a18cc891957e05d91910b3c717d6bd11fbede9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/684855f2c2e9d0a61868b8f8d6bd0295c8a4b651", - "reference": "684855f2c2e9d0a61868b8f8d6bd0295c8a4b651", + "url": "https://api.github.com/repos/php-http/discovery/zipball/64a18cc891957e05d91910b3c717d6bd11fbede9", + "reference": "64a18cc891957e05d91910b3c717d6bd11fbede9", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^7.1 || ^8.0" }, "conflict": { "nyholm/psr7": "<1.0" }, "require-dev": { + "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^2.4", + "phpspec/phpspec": "^5.1 || ^6.1", "puli/composer-plugin": "1.0.0-beta10" }, "suggest": { @@ -947,7 +1035,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -976,7 +1064,7 @@ "message", "psr7" ], - "time": "2019-02-23T07:42:53+00:00" + "time": "2020-07-13T15:44:45+00:00" }, { "name": "php-http/guzzle6-adapter", @@ -1096,21 +1184,21 @@ }, { "name": "php-http/message", - "version": "1.7.2", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1" + "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/b159ffe570dffd335e22ef0b91a946eacb182fa1", - "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1", + "url": "https://api.github.com/repos/php-http/message/zipball/ce8f43ac1e294b54aabf5808515c3554a19c1e1c", + "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c", "shasum": "" }, "require": { "clue/stream-filter": "^1.4", - "php": "^5.4 || ^7.0", + "php": "^7.1", "php-http/message-factory": "^1.0.2", "psr/http-message": "^1.0" }, @@ -1136,7 +1224,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1164,7 +1252,7 @@ "message", "psr-7" ], - "time": "2018-11-01T09:32:41+00:00" + "time": "2019-08-05T06:55:08+00:00" }, { "name": "php-http/message-factory", @@ -1218,21 +1306,24 @@ }, { "name": "php-http/promise", - "version": "v1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", + "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", "shasum": "" }, + "require": { + "php": "^7.1 || ^8.0" + }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", + "phpspec/phpspec": "^5.1.2 || ^6.2" }, "type": "library", "extra": { @@ -1250,13 +1341,13 @@ "MIT" ], "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, { "name": "Joel Wurtz", "email": "joel.wurtz@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" } ], "description": "Promise used for asynchronous HTTP requests", @@ -1264,7 +1355,7 @@ "keywords": [ "promise" ], - "time": "2016-01-26T13:27:02+00:00" + "time": "2020-07-07T09:29:14+00:00" }, { "name": "psr/cache", @@ -1413,24 +1504,24 @@ }, { "name": "ralouphie/getallheaders", - "version": "2.0.5", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { - "php": ">=5.3" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" }, "type": "library", "autoload": { @@ -1449,7 +1540,7 @@ } ], "description": "A polyfill for getallheaders.", - "time": "2016-02-11T07:05:27+00:00" + "time": "2019-03-08T08:55:37+00:00" }, { "name": "rlanvin/php-ip", @@ -1523,27 +1614,29 @@ }, { "name": "symfony/console", - "version": "v4.3.1", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64" + "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d50bbeeb0e17e6dd4124ea391eff235e932cbf64", - "reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64", + "url": "https://api.github.com/repos/symfony/console/zipball/55d07021da933dd0d633ffdab6f45d5b230c7e02", + "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2" }, "conflict": { "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3", + "symfony/event-dispatcher": "<4.3|>=5", + "symfony/lock": "<4.4", "symfony/process": "<3.3" }, "provide": { @@ -1551,12 +1644,12 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", "symfony/event-dispatcher": "^4.3", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/var-dumper": "^4.3" + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1567,7 +1660,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1594,32 +1687,110 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-06-05T13:25:51+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:18:39+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.1.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-06T08:49:21+00:00" }, { "name": "symfony/dotenv", - "version": "v4.3.1", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "efd677abff68ea6fcfd9c60dbdacb96d0d97b382" + "reference": "a9eb95c87c2965d0e7dfda9c5e87e4fb590d1f4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/efd677abff68ea6fcfd9c60dbdacb96d0d97b382", - "reference": "efd677abff68ea6fcfd9c60dbdacb96d0d97b382", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/a9eb95c87c2965d0e7dfda9c5e87e4fb590d1f4e", + "reference": "a9eb95c87c2965d0e7dfda9c5e87e4fb590d1f4e", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "require-dev": { - "symfony/process": "~3.4|~4.0" + "symfony/process": "^3.4.2|^4.0|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1651,29 +1822,45 @@ "env", "environment" ], - "time": "2019-05-07T09:02:05+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-05T09:39:30+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.3.1", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "914e0edcb7cd0c9f494bc023b1d47534f4542332" + "reference": "9ff59517938f88d90b6e65311fef08faa640f681" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/914e0edcb7cd0c9f494bc023b1d47534f4542332", - "reference": "914e0edcb7cd0c9f494bc023b1d47534f4542332", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681", + "reference": "9ff59517938f88d90b6e65311fef08faa640f681", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1705,20 +1892,34 @@ "configuration", "options" ], - "time": "2019-05-10T05:38:46+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-12T12:58:00+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.11.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "82ebae02209c21113908c229e9883c419720738a" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", - "reference": "82ebae02209c21113908c229e9883c419720738a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1730,7 +1931,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1746,13 +1951,13 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, { "name": "Gert de Pagter", "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for ctype functions", @@ -1763,37 +1968,58 @@ "polyfill", "portable" ], - "time": "2019-02-06T07:57:58+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.11.0", + "name": "symfony/polyfill-intl-idn", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", + "symfony/polyfill-php72": "^1.10" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Idn\\": "" }, "files": [ "bootstrap.php" @@ -1805,51 +2031,77 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "idn", + "intl", "polyfill", "portable", "shim" ], - "time": "2019-02-06T07:57:58+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-08-04T06:02:08+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.11.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", - "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "files": [ "bootstrap.php" @@ -1872,45 +2124,68 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], - "time": "2019-02-06T07:57:58+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/process", - "version": "v3.4.28", + "name": "symfony/polyfill-mbstring", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "afe411c2a6084f25cff55a01d0d4e1474c97ff13" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/afe411c2a6084f25cff55a01d0d4e1474c97ff13", - "reference": "afe411c2a6084f25cff55a01d0d4e1474c97ff13", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Mbstring\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1919,62 +2194,454 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", - "time": "2019-05-22T12:54:11+00:00" + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/serializer", - "version": "v4.3.1", + "name": "symfony/polyfill-php70", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/serializer.git", - "reference": "7a05742647711bc371e9fa1d71206561b88d093a" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/7a05742647711bc371e9fa1d71206561b88d093a", - "reference": "7a05742647711bc371e9fa1d71206561b88d093a", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" }, - "conflict": { - "phpdocumentor/type-resolver": "<0.2.1", - "symfony/dependency-injection": "<3.4", - "symfony/property-access": "<3.4", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "639447d008615574653fb3bc60d1986d7172eaae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/process", + "version": "v3.4.43", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "af8d812d75fcdf2eae30928b42396fe17df137e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/af8d812d75fcdf2eae30928b42396fe17df137e4", + "reference": "af8d812d75fcdf2eae30928b42396fe17df137e4", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-16T09:41:49+00:00" + }, + { + "name": "symfony/serializer", + "version": "v4.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/serializer.git", + "reference": "0fe47b7aa55ff28b1b781e380120c0731e2d36c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/serializer/zipball/0fe47b7aa55ff28b1b781e380120c0731e2d36c7", + "reference": "0fe47b7aa55ff28b1b781e380120c0731e2d36c7", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "phpdocumentor/type-resolver": "<0.2.1", + "symfony/dependency-injection": "<3.4", + "symfony/property-access": "<3.4", "symfony/property-info": "<3.4", "symfony/yaml": "<3.4" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0", - "symfony/cache": "~3.4|~4.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/property-access": "~3.4|~4.0", - "symfony/property-info": "^3.4.13|~4.0", - "symfony/validator": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" + "phpdocumentor/reflection-docblock": "^3.2|^4.0", + "symfony/cache": "^3.4|^4.0|^5.0", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/mime": "^4.4|^5.0", + "symfony/property-access": "^3.4|^4.0|^5.0", + "symfony/property-info": "^3.4.13|~4.0|^5.0", + "symfony/validator": "^3.4|^4.0|^5.0", + "symfony/yaml": "^3.4|^4.0|^5.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", "doctrine/cache": "For using the default cached annotation reader and metadata cache.", "psr/cache-implementation": "For using the metadata cache.", "symfony/config": "For using the XML mapping loader.", - "symfony/http-foundation": "To use the DataUriNormalizer.", + "symfony/http-foundation": "For using a MIME type guesser within the DataUriNormalizer.", "symfony/property-access": "For using the ObjectNormalizer.", "symfony/property-info": "To deserialize relations.", "symfony/yaml": "For using the default YAML mapping loader." @@ -1982,7 +2649,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2009,24 +2676,38 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "time": "2019-06-05T13:25:51+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-21T15:17:25+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.5", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d" + "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", - "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442", + "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -2035,7 +2716,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2067,31 +2752,45 @@ "interoperability", "standards" ], - "time": "2019-06-13T11:15:36+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:23:11+00:00" }, { "name": "symfony/yaml", - "version": "v4.3.1", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99" + "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c60ecf5ba842324433b46f58dc7afc4487dbab99", - "reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", + "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~3.4|~4.0" + "symfony/console": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -2099,7 +2798,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2126,35 +2825,48 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-04-06T14:04:46+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T08:37:50+00:00" }, { "name": "twig/twig", - "version": "v1.42.2", + "version": "v1.43.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "21707d6ebd05476854805e4f91b836531941bcd4" + "reference": "2311602f6a208715252febe682fa7c38e56a3373" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/21707d6ebd05476854805e4f91b836531941bcd4", - "reference": "21707d6ebd05476854805e4f91b836531941bcd4", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/2311602f6a208715252febe682fa7c38e56a3373", + "reference": "2311602f6a208715252febe682fa7c38e56a3373", "shasum": "" }, "require": { - "php": ">=5.4.0", + "php": ">=7.1.3", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", - "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8|^5.0" + "symfony/phpunit-bridge": "^4.4.9|^5.0.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.42-dev" + "dev-master": "1.43-dev" } }, "autoload": { @@ -2176,15 +2888,14 @@ "homepage": "http://fabien.potencier.org", "role": "Lead Developer" }, + { + "name": "Twig Team", + "role": "Contributors" + }, { "name": "Armin Ronacher", "email": "armin.ronacher@active-4.com", "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", - "role": "Contributors" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", @@ -2192,20 +2903,30 @@ "keywords": [ "templating" ], - "time": "2019-06-18T15:35:16+00:00" + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2020-08-05T15:05:05+00:00" }, { "name": "webonyx/graphql-php", - "version": "v0.13.5", + "version": "v0.13.9", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "cdcf5b44737ee743358f5ed25b19a39ad7daf777" + "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/cdcf5b44737ee743358f5ed25b19a39ad7daf777", - "reference": "cdcf5b44737ee743358f5ed25b19a39ad7daf777", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3", + "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3", "shasum": "" }, "require": { @@ -2244,7 +2965,13 @@ "api", "graphql" ], - "time": "2019-06-12T07:16:37+00:00" + "funding": [ + { + "url": "https://opencollective.com/webonyx-graphql-php", + "type": "open_collective" + } + ], + "time": "2020-07-02T05:49:25+00:00" } ], "packages-dev": [ @@ -2303,5 +3030,6 @@ "platform": { "php": ">=5.3.0" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/example/resources/GitRepository/github.com__linkorb__infra.yaml b/example/resources/GitRepository/github.com__linkorb__infra.yaml index ae9aade..35b4e21 100644 --- a/example/resources/GitRepository/github.com__linkorb__infra.yaml +++ b/example/resources/GitRepository/github.com__linkorb__infra.yaml @@ -1,10 +1,10 @@ --- kind: GitRepository metadata: - name: github.com__linkorb__infra - description: "INFRA: your infrastructure as a GraphQL service" - labels: - "infra.linkorb.com/code/license": "MIT" - "infra.linkorb.com/code/language": "php" + name: github.com__linkorb__infra + description: "INFRA: your infrastructure as a GraphQL service" + labels: + infra.linkorb.com/code/license: MIT + infra.linkorb.com/code/language: php spec: - url: "git@github.com:linkorb/infra.git" + url: "git@github.com:linkorb/infra.git" diff --git a/example/resources/GitRepository/github.com__linkorb__schemata.yaml b/example/resources/GitRepository/github.com__linkorb__schemata.yaml index 856d8b5..344564e 100644 --- a/example/resources/GitRepository/github.com__linkorb__schemata.yaml +++ b/example/resources/GitRepository/github.com__linkorb__schemata.yaml @@ -1,7 +1,10 @@ --- kind: GitRepository metadata: - name: github.com__linkorb__schemata - description: 'Schemata: database schema powertools' + name: github.com__linkorb__schemata + description: 'Schemata: database schema powertools' + labels: + "infra.linkorb.com/code/license": "MIT" + "infra.linkorb.com/code/language": "php" spec: - url: 'git@github.com:linkorb/schemata.git' + url: 'git@github.com:linkorb/schemata.git' diff --git a/example/resources/Host/app1.yaml b/example/resources/Host/app1.yaml index a337991..b576a9a 100644 --- a/example/resources/Host/app1.yaml +++ b/example/resources/Host/app1.yaml @@ -3,8 +3,14 @@ kind: Host metadata: name: app1 description: First cool application server + labels: + provider: aws + costPrice: $40 + costFrequency: monthly + spec: os: xenial publicIp: 192.168.1.1 privateIp: 10.0.1.1 hostGroups: prod-west, app + status: active diff --git a/example/resources/Host/app2.yaml b/example/resources/Host/app2.yaml index d54b170..c15b979 100644 --- a/example/resources/Host/app2.yaml +++ b/example/resources/Host/app2.yaml @@ -3,6 +3,10 @@ kind: Host metadata: name: app2 description: Second cool application server + labels: + provider: aws + costPrice: $40 + costFrequency: monthly spec: os: xenial publicIp: 192.168.1.2 diff --git a/example/resources/Host/db1m.yaml b/example/resources/Host/db1m.yaml index c6969ae..01f7585 100644 --- a/example/resources/Host/db1m.yaml +++ b/example/resources/Host/db1m.yaml @@ -3,6 +3,10 @@ kind: Host metadata: name: db1m description: Database master in the db1 cluster + labels: + provider: digital-ocean + costPrice: $80 + costFrequency: monthly spec: os: xenial publicIp: 192.168.2.1 diff --git a/example/resources/Host/db1s.yaml b/example/resources/Host/db1s.yaml index c85c1fe..82ab654 100644 --- a/example/resources/Host/db1s.yaml +++ b/example/resources/Host/db1s.yaml @@ -3,6 +3,10 @@ kind: Host metadata: name: db1s description: Database slave in the db1 cluster + labels: + provider: digital-ocean + costPrice: $80 + costFrequency: monthly spec: os: xenial publicIp: 192.168.2.2 diff --git a/example/resources/Host/docker-engine-host1.yaml b/example/resources/Host/docker-engine-host1.yaml index c736755..6c3d605 100644 --- a/example/resources/Host/docker-engine-host1.yaml +++ b/example/resources/Host/docker-engine-host1.yaml @@ -3,6 +3,10 @@ kind: Host metadata: name: docker-engine-host1 description: Docker Engine One + labels: + provider: google-cloud + costPrice: $75 + costFrequency: monthly spec: os: xenial publicIp: 192.168.1.2 diff --git a/example/resources/HostGroup/prod.yaml b/example/resources/HostGroup/prod.yaml index e6ceff3..0a01c60 100644 --- a/example/resources/HostGroup/prod.yaml +++ b/example/resources/HostGroup/prod.yaml @@ -5,4 +5,4 @@ metadata: description: All hosts in the production environment labels: color: green -spec: [] \ No newline at end of file +spec: [] diff --git a/example/resources/Service/mysql1.yaml b/example/resources/Service/mysql1.yaml new file mode 100644 index 0000000..5d57265 --- /dev/null +++ b/example/resources/Service/mysql1.yaml @@ -0,0 +1,10 @@ +--- +kind: Service +metadata: + name: mysql1 + description: Main mysql service + labels: + environment: staging +spec: + hosts: db1m, db1s + # hostGroups: prod-west, app diff --git a/scripts/doc/html b/scripts/doc/html index 070c4e7..8dd8022 100755 --- a/scripts/doc/html +++ b/scripts/doc/html @@ -16,39 +16,57 @@ $generator->checkDirectory(); $generator->deleteObsoleteFiles(); $generator->generateIndex(); +echo "Hosts\n"; $hosts = getHosts(); $generator->generateHosts($hosts); +echo "HostGroups\n"; $hostGroups = getHostGroups(); $generator->generateHostGroups($hostGroups); +echo "Services\n"; +$services = getServices(); +$generator->generateServices($services); + +echo "OsReleases\n"; $osReleases = getOsReleases(); $generator->generateOsReleases($osReleases); +echo "FirewallRules\n"; $firewallRules = getFirewallRules(); $generator->generateFirewallRules($firewallRules); +echo "Repositories\n"; $repositories = getRepositories(); $generator->generateRepositories($repositories); +echo "Users\n"; $users = getUsers(); $generator->generateUsers($users); +echo "DnsDomains\n"; $domains = getDnsDomains(); $generator->generateDnsDomains($domains); +echo "MonitoringChecks\n"; $monitoringChecks = getMonitoringChecks(); $generator->generateMonitoringChecks($monitoringChecks); +echo "DockerEngines\n"; $dockerEngines = getDockerEngines(); $generator->generateDockerEngines($dockerEngines); + function getHosts() { $query = <<registerType(Resource\DockerAppResource::class); $graph->registerType(Resource\QueryResource::class); $graph->registerType(Resource\BackupRuleResource::class); + $graph->registerType(Resource\ServiceResource::class); $graph->init($this); } @@ -151,5 +152,5 @@ public function copyTemplate(HostResource $host, $template, $destination) unlink($tmpfile); } - + } diff --git a/src/Resource/DnsDomainResource.php b/src/Resource/DnsDomainResource.php index aee36b7..71eb1c0 100644 --- a/src/Resource/DnsDomainResource.php +++ b/src/Resource/DnsDomainResource.php @@ -36,6 +36,10 @@ public static function getConfig(Graph $graph): array 'fields' => function () use (&$graph) { return [ 'name' => Type::id(), + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'dnsAccount' => [ 'type' => Type::string(), 'description' => 'DNS account', diff --git a/src/Resource/DockerEngineResource.php b/src/Resource/DockerEngineResource.php index 10e8a06..7db3ef4 100644 --- a/src/Resource/DockerEngineResource.php +++ b/src/Resource/DockerEngineResource.php @@ -42,6 +42,10 @@ public static function getConfig(Graph $graph): array 'type' => Type::string(), 'description' => 'Description', ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'address' => [ 'type' => Type::string(), 'description' => 'Docker Engine IP address', diff --git a/src/Resource/FirewallRuleResource.php b/src/Resource/FirewallRuleResource.php index 21282a1..8bc1006 100644 --- a/src/Resource/FirewallRuleResource.php +++ b/src/Resource/FirewallRuleResource.php @@ -51,6 +51,10 @@ public static function getConfig(Graph $graph) 'type' => Type::string(), 'description' => 'Description', ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'template' => [ 'type' => Type::string(), 'description' => 'iptables template', diff --git a/src/Resource/GitRepositoryResource.php b/src/Resource/GitRepositoryResource.php index 00dc115..fbb0e41 100644 --- a/src/Resource/GitRepositoryResource.php +++ b/src/Resource/GitRepositoryResource.php @@ -70,7 +70,10 @@ public static function getConfig(Graph $graph) 'sshUrl' => Type::string(), 'httpUrl' => Type::string(), 'viewUrl' => Type::string(), - + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], ], ]; } diff --git a/src/Resource/HostGroupResource.php b/src/Resource/HostGroupResource.php index 6e06b5f..d4e9659 100644 --- a/src/Resource/HostGroupResource.php +++ b/src/Resource/HostGroupResource.php @@ -72,6 +72,10 @@ public static function getConfig(Graph $graph) 'type' => Type::string(), 'description' => 'Description', ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'parentHostGroup' => [ 'type' => $graph->getType('HostGroup'), 'description' => 'Parent host group', diff --git a/src/Resource/HostResource.php b/src/Resource/HostResource.php index 888c4b4..1191ecd 100644 --- a/src/Resource/HostResource.php +++ b/src/Resource/HostResource.php @@ -25,6 +25,11 @@ public function getPrivateIp() return $this->spec['privateIp'] ?? null; } + public function getStatus() + { + return $this->spec['status'] ?? null; + } + public function getSshAddress() { return $this->getPublicIp(); @@ -91,6 +96,23 @@ public function getLocalHostGroups() return $res; } + + public function getServices() + { + $services = $this->graph->getResourcesByType('Service'); + + $res = []; + foreach ($services as $service) { + foreach ($service->getHosts() as $host) { + if ($host->getName() == $this->getName()) { + $res[$service->getName()] = $service; + } + } + } + + return $res; + } + public function getHostGroups() { $hostGroups = $this->getLocalHostGroups(); @@ -151,6 +173,10 @@ public static function getConfig(Graph $graph) 'type' => $graph->getType('OsRelease'), 'description' => 'Operating system', ], + 'status' => [ + 'type' => Type::string(), + 'description' => 'Status', + ], 'publicIp' => [ 'type' => Type::string(), 'description' => 'Public IPv4 address', @@ -175,6 +201,10 @@ public static function getConfig(Graph $graph) 'type' => Type::string(), 'description' => 'Fully Qualified Domain Name', ], + 'services' => [ + 'type' => Type::listOf($graph->getType('Service')), + 'description' => 'Returns all services on this host', + ], 'hostGroups' => [ 'type' => Type::listOf($graph->getType('HostGroup')), 'description' => 'Returns all hostgroups (recursively)', diff --git a/src/Resource/MonitoringCheckResource.php b/src/Resource/MonitoringCheckResource.php index 08ee499..326195f 100644 --- a/src/Resource/MonitoringCheckResource.php +++ b/src/Resource/MonitoringCheckResource.php @@ -22,7 +22,7 @@ public function getHostsAsString() } return $hosts; } - + public function getCommand() { return $this->spec['command'] ?? null; @@ -63,6 +63,10 @@ public static function getConfig(Graph $graph) 'type' => Type::string(), 'description' => 'Description', ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'command' => [ 'type' => Type::string(), 'description' => 'Command', diff --git a/src/Resource/OsReleaseResource.php b/src/Resource/OsReleaseResource.php index 80275cd..d886376 100644 --- a/src/Resource/OsReleaseResource.php +++ b/src/Resource/OsReleaseResource.php @@ -15,7 +15,7 @@ public function getDisplayName() public function getHosts(): array { /** @var HostResource[] $hosts */ - $hosts = $this->infra->getResourcesByType('Host'); + $hosts = $this->graph->getResourcesByType('Host'); $res = []; foreach ($hosts as $host) { if ($host->hasOsReleaseName($this->getName())) { @@ -36,6 +36,10 @@ public static function getConfig(Graph $graph): array 'type' => Type::string(), 'description' => 'Description', ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'displayName' => [ 'type' => Type::string(), 'description' => 'OS Display Name', diff --git a/src/Resource/ServiceResource.php b/src/Resource/ServiceResource.php new file mode 100644 index 0000000..dc8147f --- /dev/null +++ b/src/Resource/ServiceResource.php @@ -0,0 +1,56 @@ +spec['publicIp'] ?? null; + } + + public function getFqsn() + { + return $this->getName() . '.service.example.com'; + } + + public function getHosts() + { + return $this->infra->getHosts($this->spec['hosts'] ?? []); + } + + public static function getConfig(Graph $graph) + { + return [ + 'name' => 'Service', + 'fields' => function () use (&$graph) { + return [ + 'name' => Type::id(), + 'description' => [ + 'type' => Type::string(), + 'description' => 'Description', + ], + 'fqsn' => [ + 'type' => Type::string(), + 'description' => 'Fully Qualified Service Name', + ], + 'hosts' => [ + 'type' => Type::listOf($graph->getType('Host')), + 'description' => 'Returns all hosts', + ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], + ]; + }, + ]; + } + +} diff --git a/src/Resource/UserResource.php b/src/Resource/UserResource.php index 5847e19..a416def 100644 --- a/src/Resource/UserResource.php +++ b/src/Resource/UserResource.php @@ -47,6 +47,10 @@ public static function getConfig(Graph $graph): array 'type' => Type::string(), 'description' => 'Description', ], + 'labels' => [ + 'type' => Type::listOf($graph->getType('Label')), + 'description' => 'Returns all labels', + ], 'githubUsername' => [ 'type' => Type::string(), 'description' => 'Github Username', diff --git a/src/Service/HtmlGeneratorService.php b/src/Service/HtmlGeneratorService.php index 8057314..97d57fd 100644 --- a/src/Service/HtmlGeneratorService.php +++ b/src/Service/HtmlGeneratorService.php @@ -52,50 +52,50 @@ public function generateIndex(): void ); } - public function generateHosts($hosts): void + public function generateHosts($resources): void { file_put_contents( $this->pathOutput . '/hosts.html', $this->twig->render( 'hosts.html.twig', [ - 'hosts' => $hosts, + 'resources' => $resources, ] ) ); - foreach ($hosts as $host) { + foreach ($resources as $resource) { file_put_contents( - $this->pathOutput . '/hosts:' . $host['name'] . '.html', + $this->pathOutput . '/hosts:' . $resource['name'] . '.html', $this->twig->render( 'host.html.twig', [ - 'host' => $host, + 'resource' => $resource, ] ) ); } } - public function generateHostGroups($hostGroups): void + public function generateHostGroups($resources): void { file_put_contents( $this->pathOutput . '/host-groups.html', $this->twig->render( 'host-groups.html.twig', [ - 'records' => $hostGroups, + 'resources' => $resources, ] ) ); - foreach ($hostGroups as $group) { + foreach ($resources as $resource) { file_put_contents( - $this->pathOutput . '/host-groups:' . $group['name'] . '.html', + $this->pathOutput . '/host-groups:' . $resource['name'] . '.html', $this->twig->render( 'host-group.html.twig', [ - 'record' => $group, + 'resource' => $resource, ] ) ); @@ -152,25 +152,25 @@ public function generateFirewallRules($firewallRules): void } } - public function generateRepositories($repositories): void + public function generateRepositories($resources): void { file_put_contents( $this->pathOutput . '/repositories.html', $this->twig->render( 'repositories.html.twig', [ - 'records' => $repositories, + 'resources' => $resources, ] ) ); - foreach ($repositories as $repository) { + foreach ($resources as $resource) { file_put_contents( - $this->pathOutput . '/repositories:' . $repository['owner'] . ':' . $repository['name'] . '.html', + $this->pathOutput . '/repositories:' . $resource['name'] . '.html', $this->twig->render( 'repository.html.twig', [ - 'record' => $repository, + 'resource' => $resource, ] ) ); @@ -276,4 +276,29 @@ public function generateDockerEngines($dockerEngines): void ); } } + + public function generateServices(array $resources): void + { + file_put_contents( + $this->pathOutput . '/services.html', + $this->twig->render( + 'services.html.twig', + [ + 'resources' => $resources, + ] + ) + ); + + foreach ($resources as $resource) { + file_put_contents( + $this->pathOutput . '/services:' . $resource['name'] . '.html', + $this->twig->render( + 'service.html.twig', + [ + 'resource' => $resource, + ] + ) + ); + } + } } diff --git a/templates/base.html.twig b/templates/base.html.twig index 329076f..9378e95 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -58,7 +58,7 @@ -
+
-