diff --git a/.changelog b/.changelog deleted file mode 100644 index c0369488..00000000 --- a/.changelog +++ /dev/null @@ -1,54 +0,0 @@ - getcwd(), - 'path' => 'CHANGELOG.md', - 'headerTitle' => 'Changelog', - 'headerDescription' => 'All notable changes to this project will be documented in this file.', - 'sortBy' => 'subject', - 'preset' => [ - // Breaking changes section - 'breaking_changes' => ['label' => '⚠ BREAKING CHANGES', 'description' => 'Code changes that potentially causes other components to fail'], - // Types section - 'feat' => ['label' => 'Features', 'description' => 'New features'], - 'perf' => ['label' => 'Performance Improvements', 'description' => 'Code changes that improves performance'], - 'fix' => ['label' => 'Bug Fixes', 'description' => 'Bugs and issues resolution'], - 'refactor' => ['label' => 'Code Refactoring', 'description' => 'A code change that neither fixes a bug nor adds a feature'], - 'style' => ['label' => 'Styles', 'description' => 'Changes that do not affect the meaning of the code'], - 'test' => ['label' => 'Tests', 'description' => 'Adding missing tests or correcting existing tests'], - 'build' => ['label' => 'Builds', 'description' => 'Changes that affect the build system or external dependencies '], - 'ci' => ['label' => 'Continuous Integrations', 'description' => 'Changes to CI configuration files and scripts'], - 'docs' => ['label' => 'Documentation', 'description' => 'Documentation changes'], - 'chore' => ['label' => 'Chores', 'description' => "Other changes that don't modify the source code or test files"], - 'revert' => ['label' => 'Reverts', 'description' => 'Reverts a previous commit'], - ], - 'types' => [], - 'packageBump' => true, - 'packageBumps' => [], - 'packageLockCommit' => true, - 'ignoreTypes' => ['build', 'chore', 'ci', 'docs', 'perf', 'refactor', 'revert', 'style', 'test'], - 'ignorePatterns' => ['/^chore\(release\):/i'], - 'tagPrefix' => '', - 'tagSuffix' => '', - 'skipBump' => false, - 'skipTag' => false, - 'skipVerify' => false, - 'disableLinks' => false, - 'hiddenHash' => false, - 'hiddenAuthor' => true, - 'hiddenMentions' => false, - 'hiddenReferences' => false, - 'prettyScope' => true, - 'urlProtocol' => 'https', - 'dateFormat' => 'Y-m-d', - 'changelogVersionFormat' => '## {{version}} ({{date}})', - 'commitUrlFormat' => '{{host}}/{{owner}}/{{repository}}/commit/{{hash}}', - 'compareUrlFormat' => '{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}', - 'issueUrlFormat' => '{{host}}/{{owner}}/{{repository}}/issues/{{id}}', - 'userUrlFormat' => '{{host}}/{{user}}', - 'releaseCommitMessageFormat' => 'chore(release): {{currentTag}}', - 'hiddenVersionSeparator' => false, - 'preRun' => null, - 'postRun' => null, - 'merged' => false, -]; diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f9287cf9..248d455c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -4,8 +4,8 @@ on: push: branches: - "main" + - "develop" - "support/*" - - "feature/code_quality_rector" tags: - "*" pull_request: diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..1ba95f81 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,64 @@ +. + * + * ------------------------------------------------------------------------- + */ + +$finder = (new Finder()) + ->in(__DIR__) + ->exclude([ + '.git/', + 'node_modules/', + 'tests/config/', + 'tests/files/', + 'vendor/', + ]) +; + +return (new Config()) + ->setUnsupportedPhpVersionAllowed(true) // allow upcoming PHP versions + ->setParallelConfig(ParallelConfigFactory::detect()) + ->setCacheFile('files/_cache/php-cs-fixer/php-cs-fixer.cache') + ->setRules([ + '@PER-CS3.0' => true, + '@PHP84Migration' => true, + 'fully_qualified_strict_types' => ['import_symbols' => true], + 'ordered_imports' => ['imports_order' => ['class', 'const', 'function']], + 'no_unused_imports' => true, + 'heredoc_indentation' => false, // This rule is mandatory due to a bug in `xgettext`, see https://savannah.gnu.org/bugs/?func=detailitem&item_id=62158 + 'new_expression_parentheses' => false, // breaks compatibility with PHP < 8.4 + 'phpdoc_scalar' => true, // Normalize scalar types identifiers in PHPDoc + 'phpdoc_types' => true, // Fixes types case in PHPDoc + ]) + ->setFinder($finder) +; diff --git a/.phpcs.xml b/.phpcs.xml deleted file mode 100644 index 45e13a32..00000000 --- a/.phpcs.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - . - /.git/ - ^node_modules/ - ^vendor/ - - - - - - - - - - - - - - diff --git a/.twig_cs.dist.php b/.twig_cs.dist.php index 772ee42b..589b7390 100644 --- a/.twig_cs.dist.php +++ b/.twig_cs.dist.php @@ -2,15 +2,17 @@ declare(strict_types=1); -use FriendsOfTwig\Twigcs; +use FriendsOfTwig\Twigcs\Finder\TemplateFinder; +use FriendsOfTwig\Twigcs\Config\Config; +use Glpi\Tools\GlpiTwigRuleset; -$finder = Twigcs\Finder\TemplateFinder::create() +$finder = TemplateFinder::create() ->in(__DIR__ . '/templates') ->depth('>= 0') ->name('*.html.twig') ->ignoreVCSIgnored(true); -return Twigcs\Config\Config::create() +return Config::create() ->setFinder($finder) - ->setRuleSet(\Glpi\Tools\GlpiTwigRuleset::class) + ->setRuleSet(GlpiTwigRuleset::class) ; diff --git a/.tx/config b/.tx/config index 91276546..63e9c40a 100755 --- a/.tx/config +++ b/.tx/config @@ -1,9 +1,9 @@ [main] host = https://www.transifex.com -[o:teclib:p:glpi-plugin-carbon:r:1_0_0] +[o:teclib:p:glpi-plugin-carbon:r:1_2_0] file_filter = locales/.po source_file = locales/carbon.pot type = PO minimum_perc = 1 -resource_name = 1.0.0 +resource_name = 1.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index effa35be..9a92580e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,110 +4,453 @@ All notable changes to this project will be documented in this file. -## [1.1.1](https://github.com/pluginsGLPI/carbon/compare/1.1.0...1.1.1) (2025-10-29) +## [1.2.0](https://github.com/pluginsGLPI/carbon/compare/1.2.0-beta.2...1.2.0) (2026-04-30) ### Features -* Better distinctin between legend and completion indicators ([d67c1c](https://github.com/pluginsGLPI/carbon/commit/d67c1c3ff1a4bf00b17f7d654d06a946fdc06ec1)) -* Show diagnosis about carbon intensity data sources ([bbde25](https://github.com/pluginsGLPI/carbon/commit/bbde25b29adc3bb3a67b3b066abc3360d85f50bb)) +* Show state of decommission_date in history diagnosis ([e7bede](https://github.com/pluginsGLPI/carbon/commit/e7bede83afd2faa76ca1353a526697f59ad6dcfb)) + +##### Carbon Emission + +* Show total carbon emission of an individual asset ([3426fb](https://github.com/pluginsGLPI/carbon/commit/3426fb3cb6d6fb457ad9b23c4ac6e2c06a09a3fd)) + +### Bug Fixes + + +##### Dashboard\ Provider + +* Embodied + usage count of impact criteria ([79a5c1](https://github.com/pluginsGLPI/carbon/commit/79a5c13556a22bf1f4e4c331636c556775bf614a)) + +##### Impact\ Type + +* Wrong unit for photochemical ozone formation ([81a9a5](https://github.com/pluginsGLPI/carbon/commit/81a9a54564264dea9200d6432a244e8040c340c6)) + + +--- + +## [1.2.0-beta.2](https://github.com/pluginsGLPI/carbon/compare/1.2.0-beta.1...1.2.0-beta.2) (2026-04-17) + +### Bug Fixes + + +##### Install + +* Dashboard card not properly set ([6e861b](https://github.com/pluginsGLPI/carbon/commit/6e861b158f44642f7a79d7b364f3deca1f96d70a)) + + +--- + +## [1.2.0-beta.1](https://github.com/pluginsGLPI/carbon/compare/1.1.1...1.2.0-beta.1) (2026-04-10) + +### Features + +* Asset lifespan for usage impact computation ([c80932](https://github.com/pluginsGLPI/carbon/commit/c8093238acbddf8739bb739556f4ca258cbb2135)) +* Better distinctin between legend and completion indicators ([6cdb3d](https://github.com/pluginsGLPI/carbon/commit/6cdb3d81dfb020117671d7f5f6227a3a875786cc), [d67c1c](https://github.com/pluginsGLPI/carbon/commit/d67c1c3ff1a4bf00b17f7d654d06a946fdc06ec1)) +* Exclude assets from embodied impact calculation ([b9f00a](https://github.com/pluginsGLPI/carbon/commit/b9f00a233cfc158509f6a7d78806685ac36cc8be)) +* Mass deletion of environmental impact results ([3c89de](https://github.com/pluginsGLPI/carbon/commit/3c89de51d500417248c047cdd4e53161daa8cb4e)) +* Remove relation from zone to source for carbon inensity ([1791e1](https://github.com/pluginsGLPI/carbon/commit/1791e1167736733d7fea1a75a106e7a673053328)) +* Require GLPI timezone enabled ([c0f397](https://github.com/pluginsGLPI/carbon/commit/c0f397a3303d76f3a3936dca21d5ed0403071250)) +* Show all individual impacts ([783bed](https://github.com/pluginsGLPI/carbon/commit/783bed5f661fc066547a8be2749e3c376fb928b9)) +* Show diagnosis about carbon intensity data sources ([bbde25](https://github.com/pluginsGLPI/carbon/commit/bbde25b29adc3bb3a67b3b066abc3360d85f50bb), [ac9a4c](https://github.com/pluginsGLPI/carbon/commit/ac9a4cd71446f3d19b0d621f5b6b41b5953de986)) +* Update and reorganize search options ([9daed0](https://github.com/pluginsGLPI/carbon/commit/9daed09f1bcd802f9f28c4ac0e3276e4d9250068)) + +##### Abstract Model + +* Add new criteria to models ([64b428](https://github.com/pluginsGLPI/carbon/commit/64b428fac93c10aefcdf1c4b1f39c7d506b59fb8)) +* Add search options ([1c5dc7](https://github.com/pluginsGLPI/carbon/commit/1c5dc7d4f0fcf970a50a03107c477650e4e23353)) +* Add warning about units ([8b4e07](https://github.com/pluginsGLPI/carbon/commit/8b4e07a5b43df83080e9bfae99130ccd3d8a679c)) +* Support for more impact criteria ([011d3b](https://github.com/pluginsGLPI/carbon/commit/011d3b8afe1de8e390e5193c40ef8d84ecc63e18)) ##### Abstract Type -* Show icon along name in tab ([ae16c3](https://github.com/pluginsGLPI/carbon/commit/ae16c3d3372d33c1d51fab3aa60637d6101a4dbf)) +* Show icon along name in tab ([d1165a](https://github.com/pluginsGLPI/carbon/commit/d1165ac2d59ba05e481fdd672cb5e390a2eb2a01), [ae16c3](https://github.com/pluginsGLPI/carbon/commit/ae16c3d3372d33c1d51fab3aa60637d6101a4dbf)) + +##### Carbon Intensity + +* Report gaps in cron tasks of each client ([074cf4](https://github.com/pluginsGLPI/carbon/commit/074cf45b5627dec967f3695d01838fbfa2649a38)) + +##### Computer Model, Monitor Model, Network Equipment Model + +* User input for enbodied impacts ([662ff6](https://github.com/pluginsGLPI/carbon/commit/662ff658ca2132badb4e59d81963e0a0c62a4266)) + +##### Computer Model, Monitor Model, Network Equipmentodel + +* Explicitly describe the scope of expected values ([ea4e37](https://github.com/pluginsGLPI/carbon/commit/ea4e37b234c0a285761192bbb3ca622b7a7b3610)) + +##### Computer Type, Monitor Type, Network Equipement Type + +* Ignore types of assets ([210841](https://github.com/pluginsGLPI/carbon/commit/2108419f2402c4be2353f08059f2fd9d9d5a3297)) + +##### Config, Data Source\ Boaviztapi + +* Setup url from env var ([5595fe](https://github.com/pluginsGLPI/carbon/commit/5595fe27b9a58166c73540ba093fb43764ca8ff2)) + +##### Dashboad\ Provider + +* Class aliases, emissions per type, add test ([0e9860](https://github.com/pluginsGLPI/carbon/commit/0e98609dc56d178e67f27fcd9dc279e13b616941)) + +##### Dashboard\ Demo Provider + +* Update ([1497d4](https://github.com/pluginsGLPI/carbon/commit/1497d413ef9cb22efa436f2adbdb7c41119072ea)) + +##### Dashboard\ Grid + +* Add all usage impact cards ([677305](https://github.com/pluginsGLPI/carbon/commit/677305aeeb188e6ed46f426e22fa32cd762caaf7)) +* Extend usage and total widgets to all criteria ([781545](https://github.com/pluginsGLPI/carbon/commit/781545911b7d9163fe381f329d882690cb9885f1)) + +##### Data Source/ Abstract Cron Task + +* Enforce interface and common code ([c2c71a](https://github.com/pluginsGLPI/carbon/commit/c2c71aa99e59212330508a983de6fdcf272f0958)) + +##### Data Source\ Carbon Intensity + +* Response caching ([9bd951](https://github.com/pluginsGLPI/carbon/commit/9bd951735c9b7a560d07587bcad06ef2afab989f)) + +##### Embodied Impact + +* Add search options ([be0a93](https://github.com/pluginsGLPI/carbon/commit/be0a93aa427b25fb243ca3c7ab5d296c3180003d)) + +##### Embodied\ Impact + +* Add widgets for new impacts ([e4bed7](https://github.com/pluginsGLPI/carbon/commit/e4bed7be7e7929a56c564bc775f3c832251b1a6c)) +* Cards for all embodied impacts ([f2d7ce](https://github.com/pluginsGLPI/carbon/commit/f2d7cecc8a81c61cedfc4b1b1e77ef27f56eecec)) +* Support for all criterias of Boaviztapi ([a6390a](https://github.com/pluginsGLPI/carbon/commit/a6390a0f826647cd23104b266f207dc06e6c13a7)) + +##### Impact\ Embodied + +* Handle recalculate flag ([3b5ab4](https://github.com/pluginsGLPI/carbon/commit/3b5ab46c1f6f740249aec5b822880a5c70e545f6)) + +##### Impact\ Usage\ Boavizta + +* Support all impact criteria ([864ca8](https://github.com/pluginsGLPI/carbon/commit/864ca8e7e6c86fadbbd342ca728a4e004c697d23)) + +##### Install + +* Add new criterias for usage impact ([fb411e](https://github.com/pluginsGLPI/carbon/commit/fb411ee5bff096df32be9a00abcee92d55b7ae21)) +* CLI progress bar when adding fallback carbon intensity ([71c4c2](https://github.com/pluginsGLPI/carbon/commit/71c4c2c36ab4b78abdae0051f4a667576ccf55b9), [419411](https://github.com/pluginsGLPI/carbon/commit/41941184364e40614dce4394c839fe7728740e1a)) +* Migrate location / zone relation ([1df029](https://github.com/pluginsGLPI/carbon/commit/1df0297c391382d77352fa7c9734b761ed6fece9)) +* Protect against upgrades on too recent database ([bb6b62](https://github.com/pluginsGLPI/carbon/commit/bb6b62372679415db348c57353c0d0fbd32f2ad4)) +* Remove upgrade from previous dev versions ([8dc040](https://github.com/pluginsGLPI/carbon/commit/8dc040b1dd7c622949271eb42f35e6cc30b226fb), [3fe870](https://github.com/pluginsGLPI/carbon/commit/3fe87014989d23d333b0b862ebeafd5948fb8026)) + +##### Location + +* Allow selection of sources of fallback level 2 ([e05a5a](https://github.com/pluginsGLPI/carbon/commit/e05a5abaf3ce23e373525ce26e15006eed065108)) +* Associate location to a carbon intensity zone ([4c26e4](https://github.com/pluginsGLPI/carbon/commit/4c26e4f02a946682e1cc312ba3c6f3c323c0df20), [ea9388](https://github.com/pluginsGLPI/carbon/commit/ea938815db6e4894ad5cb09202d5d188b1bd630f)) +* Massive action, set source_zone ([f1bf2a](https://github.com/pluginsGLPI/carbon/commit/f1bf2a07008880c4974382ca8412cf80c6c27f1e)) +* Move plugin specific field for location to a tab ([a09901](https://github.com/pluginsGLPI/carbon/commit/a09901eef440ef996991b6630ad98d67c8313d3a)) +* Remove location / carbon intensity relation based on country or state ([018ebd](https://github.com/pluginsGLPI/carbon/commit/018ebd2a6f41cb775cef88712109830fe2b51c4f)) +* Update data completion diagnosis ([77e6e3](https://github.com/pluginsGLPI/carbon/commit/77e6e38cbbe8587f0e0ae7039a8102fa91f96cfd)) + +##### Search Option + +* Update search option for historizable status ([f7011c](https://github.com/pluginsGLPI/carbon/commit/f7011ce3efbe8999e25b06981774bac5b1b7c5b2)) + +##### Source + +* Change fallback bool into integer ([a4e7c1](https://github.com/pluginsGLPI/carbon/commit/a4e7c1bb8b11522d06c9035795c156be24ce9ba0)) + +##### Source Zone + +* Better gaps presentation ([3695e4](https://github.com/pluginsGLPI/carbon/commit/3695e499afa9e7f52554908b0bd23bee2c5ff418)) + +##### Zone + +* Update algorithms to find zone from location or asset ([d6f5c2](https://github.com/pluginsGLPI/carbon/commit/d6f5c2abdc5339bc45931e6360847e186f424cd4)) ### Bug Fixes +* Add resources files ([180dd7](https://github.com/pluginsGLPI/carbon/commit/180dd76d137d413d6a1df10967a590c6f4fcb6b9), [47ce8a](https://github.com/pluginsGLPI/carbon/commit/47ce8ac5f78e6860d4921fd518e65bd7d6505b94)) +* Code lint ([448775](https://github.com/pluginsGLPI/carbon/commit/448775123607609146d8c94ae916004b165f950e)) +* CSS not available in expected path ([40ece2](https://github.com/pluginsGLPI/carbon/commit/40ece2074ad7b703eae40344787677af539bcbd4), [f0d36c](https://github.com/pluginsGLPI/carbon/commit/f0d36cc43534cd3ee29383a53eae4cd8dbc48adc)) +* Harmonize appearance of reset button with GLPI ([9016fd](https://github.com/pluginsGLPI/carbon/commit/9016fd21d16e1f5aca3a6fe3b5e46c1681d1d20b)) +* Images path ([3ebc4d](https://github.com/pluginsGLPI/carbon/commit/3ebc4d4eadf8616eebd6393ae227f4cdcb513bec), [d13d72](https://github.com/pluginsGLPI/carbon/commit/d13d72cc69385a0afb17bf02963668334c3513b5)) * Invalid homepage URL in xml file ([5b501d](https://github.com/pluginsGLPI/carbon/commit/5b501dff2677600c97bb4833c40d9a1066c4b837)) +* Prevent recalculate of impacts ([42b04c](https://github.com/pluginsGLPI/carbon/commit/42b04c4beebcaa734f4ac096af20dba88ac214eb)) +* Remove duplicated usage impact ([a7535c](https://github.com/pluginsGLPI/carbon/commit/a7535c93ba9aa30e8a2cffdcc94f6401d6e08a0a)) +* Templates code style ([9be209](https://github.com/pluginsGLPI/carbon/commit/9be20906bb2e35f623c436e24f18c6e5173a62df), [d43769](https://github.com/pluginsGLPI/carbon/commit/d4376923a20ae5b683b7a319bd7b78a43f5b4fb9), [743dd5](https://github.com/pluginsGLPI/carbon/commit/743dd52c08b8dee2a16cc3f9f1b802447ca4e6df)) +* Twig code style ([e2ed46](https://github.com/pluginsGLPI/carbon/commit/e2ed46ad517cc5a1e65b6178bd4bc5f239150744)) + +##### Abstract Model + +* Trim data sources before save ([a89615](https://github.com/pluginsGLPI/carbon/commit/a896158c8daa3e6d0de98dbf5f3ef6a0dd4feecc)) + +##### Abstract Type, Abstract Model + +* Fix type name, for tab display ([9961c9](https://github.com/pluginsGLPI/carbon/commit/9961c92f7f32da5d96def49f32758a2b2368e7d6)) + +##### Carbon Emission, Computer Type, Monitor Type, Network Equipment Type + +* Delete data for purged assets ([9f9245](https://github.com/pluginsGLPI/carbon/commit/9f924567e60db13c67d9105093449e0e816bf67c), [ba96d2](https://github.com/pluginsGLPI/carbon/commit/ba96d2d3561f55ed7638dc7d16c351919cbb00de)) + +##### Carbon Intensity + +* Bad return value" ([00bd1f](https://github.com/pluginsGLPI/carbon/commit/00bd1f86cf078b56a0eb55de17d12dd7def7f18c)) +* Html tags visible in unit of values ([b4f5ee](https://github.com/pluginsGLPI/carbon/commit/b4f5eed812e0310bb371cdf488de23c5a394e895)) +* Statement exception is not a RuntimeException ([9b9361](https://github.com/pluginsGLPI/carbon/commit/9b9361abf6f6a9098a45c8ddef87f032a1cce220)) ##### Carbon Intensity Source Zone -* Method return type ([218965](https://github.com/pluginsGLPI/carbon/commit/218965653b1b2e019fddc80ec1c8e5409d8437f3)) +* Method return type ([218965](https://github.com/pluginsGLPI/carbon/commit/218965653b1b2e019fddc80ec1c8e5409d8437f3), [3b8c14](https://github.com/pluginsGLPI/carbon/commit/3b8c14d1597c80d02487a4ac5b59140fe05f5d08)) +* Update ajax link for GLPI 11 ([b39d06](https://github.com/pluginsGLPI/carbon/commit/b39d06dac34b7fa722a26048be1e7e4d1fc6e690), [2aefdb](https://github.com/pluginsGLPI/carbon/commit/2aefdb3418b4acde2b03c55cdfe8169a9cd9ebd2)) + +##### Collect Carbon Intensity Command + +* Cannot specify zone if only one available ([c554a2](https://github.com/pluginsGLPI/carbon/commit/c554a264910473682d557d28eca2944ae472e4d7)) + +##### Command\ Collect Carbon Intensity Command + +* Unicity violation error ([382598](https://github.com/pluginsGLPI/carbon/commit/382598d75062872747025ee3872a6bf03ad671de)) + +##### Computer Type + +* Fix deprecated array key null ([a988e5](https://github.com/pluginsGLPI/carbon/commit/a988e5b71b62431753c6a2d0e469a1f8f7a78969)) + +##### Computer Type, Monitor Type + +* More conststent right checks ([925e09](https://github.com/pluginsGLPI/carbon/commit/925e09f89bb2bb8bb90860ccaae3f93e14265a36)) + +##### Computer Usage Profile + +* Cannot edit time start and time stop ([bb1cb9](https://github.com/pluginsGLPI/carbon/commit/bb1cb926cef68a4a2939fd6da5ccfec31c64ac11)) +* Deprecated null argument in explode() ([28c075](https://github.com/pluginsGLPI/carbon/commit/28c07567706bc69032836f946cf27edba57160c5), [706999](https://github.com/pluginsGLPI/carbon/commit/706999691dfb00927f35ef99eef30e8b9889c3b4)) +* Use native time dropdown field ([68c239](https://github.com/pluginsGLPI/carbon/commit/68c239b81a28e5098aaa3230803754f29a7794f7), [48dced](https://github.com/pluginsGLPI/carbon/commit/48dceda344ea0bfb30ab956a9a37c54242e8dd24)) ##### Computer, Monitor, Metwork Equipment -* Properly show status of asset type in diagnosis view ([f0006d](https://github.com/pluginsGLPI/carbon/commit/f0006d2cdb37fc32e6e94196ada4f3df0ea1105e)) +* Properly show status of asset type in diagnosis view ([f0006d](https://github.com/pluginsGLPI/carbon/commit/f0006d2cdb37fc32e6e94196ada4f3df0ea1105e), [08b32a](https://github.com/pluginsGLPI/carbon/commit/08b32ad8cd7a0981aaed8441f3f29095c9f06850)) + +##### Config + +* Geocoding checkbox description ([127f44](https://github.com/pluginsGLPI/carbon/commit/127f445cb765ae51733e2473dbc28d665315f1da)) + +##### Cron Task + +* Typo in description string ([431fbb](https://github.com/pluginsGLPI/carbon/commit/431fbb6dcd53ffacfa9dea24e2ae5600553c6c83)) +* Typo in label string ([70390c](https://github.com/pluginsGLPI/carbon/commit/70390c04d25130eb3ab940966f370bc3f9ca292d)) ##### Dashboard\ Grid -* Loss of other plugins cards for dashboard ([0bd618](https://github.com/pluginsGLPI/carbon/commit/0bd6187cbae7fa55dd42cdcc4367d1e2503969fe)) +* Loss of other plugins cards for dashboard ([8954bb](https://github.com/pluginsGLPI/carbon/commit/8954bbe39d9d6cc3eece992bcf78624aa21be877)) + +##### Dashboard\ Provider + +* Arra merge may produce incorrect merged criterias ([dfa0db](https://github.com/pluginsGLPI/carbon/commit/dfa0db51e5a4c625d9d15a25113599e8dd2d5b36), [6dc200](https://github.com/pluginsGLPI/carbon/commit/6dc2000834756721d600f607f330b602b1a5e1fe)) ##### Dashboard\ Widget -* Fix bad argument when computing Y scale ([f2fa87](https://github.com/pluginsGLPI/carbon/commit/f2fa87272385947e55fa3b1294ff49f6f6f356c2)) +* Fix bad argument when computing Y scale ([135919](https://github.com/pluginsGLPI/carbon/commit/135919e53d56b3b49732f7e4f8740f25abe8a29e), [f2fa87](https://github.com/pluginsGLPI/carbon/commit/f2fa87272385947e55fa3b1294ff49f6f6f356c2)) +* GLPI 11 requires image key specification ([2ae40f](https://github.com/pluginsGLPI/carbon/commit/2ae40f558867c6cd1fb2d2adbcabd0aeeeb8b450), [b7bdee](https://github.com/pluginsGLPI/carbon/commit/b7bdee60e988181e6e54e665dda66634375bb947)) + +##### Data Source\ Carbon Intensity\ Abstract Source + +* Exception handling, null tolerance ([8bc18d](https://github.com/pluginsGLPI/carbon/commit/8bc18dd38e3b64ee6032d5ffccb02fae06653386)) + +##### Data Source\ Carbon Intensity\ Rte\ Cron Task + +* Cron info factorization ([b57275](https://github.com/pluginsGLPI/carbon/commit/b5727530dda10f21ec0882311a753ce938a0dacd)) + +##### Datasource\ Carbon Intensity\ Electricity Maps + +* Factorize and fix date management ([59b5cf](https://github.com/pluginsGLPI/carbon/commit/59b5cf868a8a6de6aa98a24a81a46c4ac2796815)) + +##### Datasource\ Carbon Intensity\ Electricity Maps\ Client + +* Allow paid API key ([7d7ac0](https://github.com/pluginsGLPI/carbon/commit/7d7ac09b7458a4be22ba66b58c885e90f356cce2)) + +##### Datasource\ Carbon Intensity\RTE + +* Improve samples count check and caching file computation ([6adbbf](https://github.com/pluginsGLPI/carbon/commit/6adbbfa709fc0e8b0bbedcec47ad79a5884b2ed8)) + +##### Docs + +* Icon path in metadata ([3d6956](https://github.com/pluginsGLPI/carbon/commit/3d6956e946b439e42f177974da686e165d4bb2ad), [25592c](https://github.com/pluginsGLPI/carbon/commit/25592c1e48590c50b7bd8fc96d671c528a41e789)) + +##### Embodied Impact + +* Bah criteria handling ([217140](https://github.com/pluginsGLPI/carbon/commit/2171404e40cbfa37c0ec0c0f453c8839fba8fd8c)) + +##### Engine\V1 + +* Fix fallback selection ([6b98d4](https://github.com/pluginsGLPI/carbon/commit/6b98d4bdcf88246ae05b3277f533baf9e61ee537)) ##### Engine\V1\ Abstract Asset -* Fallback carbon intensity may be picked from wrong source ([d54028](https://github.com/pluginsGLPI/carbon/commit/d54028c5ed51d8209e2205b87c24f4203c1ffbb3)) +* Fallback carbon intensity may be picked from wrong source ([381800](https://github.com/pluginsGLPI/carbon/commit/38180008f05316db6dfd7b3af2310a4b65a99a5d), [d54028](https://github.com/pluginsGLPI/carbon/commit/d54028c5ed51d8209e2205b87c24f4203c1ffbb3)) + +##### Impact + +* Engine and version of calculations ([ba37e7](https://github.com/pluginsGLPI/carbon/commit/ba37e774d1420ab49fd198b75811a29f40763b33)) + +##### Impact/ Embodied/ Boavizta/ Computer + +* PHP warning, ambiguous instruction ([b818c5](https://github.com/pluginsGLPI/carbon/commit/b818c5ae6101d5f5479a92ef83c669c36bdca7c6)) + +##### Impact/ Usage/ Abstract Usage Impact + +* Useless argument in method call ([085f52](https://github.com/pluginsGLPI/carbon/commit/085f5252e8029a336c4cb2257661092259599835)) + +##### Impact\ Embodied + +* Assets should not be recalculated ([d49b79](https://github.com/pluginsGLPI/carbon/commit/d49b79cb585312d6dfccc25e0c901dcda76cd3aa)) + +##### Impact\ Embodied\ Abstract Embodied Impact + +* Change rule to ignore a value ([e00772](https://github.com/pluginsGLPI/carbon/commit/e00772f8f2bde31d77330c72cab010e4753af6bc)) +* Disable check ([18ee3d](https://github.com/pluginsGLPI/carbon/commit/18ee3dcf8c031fa5a5876db1173c06963101663e)) +* Typo in error message ([aaf98c](https://github.com/pluginsGLPI/carbon/commit/aaf98c2da31d35a60ba84302537d0afd5b7c1c26)) +* Use manual input data if available, instead of Boavizta ([518737](https://github.com/pluginsGLPI/carbon/commit/518737a0d65125e99e12b969cbcdc1df5e314ec0)) + +##### Impact\ Embodied\ Boavizta + +* Improve RAM and HDD description prior query ([9d2496](https://github.com/pluginsGLPI/carbon/commit/9d24960f8309341f10cc0fac2cb7cf43735552b1)) +* Service version not saved in DB ([a49430](https://github.com/pluginsGLPI/carbon/commit/a4943099d31246c0e37c31d993e651b26e41d383)) + +##### Impact\ Embodied\ Boavizta\ Computer + +* Ignore removable mass storage [#153](https://github.com/pluginsGLPI/carbon/issues/153) ([c75930](https://github.com/pluginsGLPI/carbon/commit/c75930c8a0d8eeb870b7c6a068860ed9ab992a8a)) +* Ignore unidentified manufacturer ([937951](https://github.com/pluginsGLPI/carbon/commit/9379517478f07535f6f6c9f1dbcb36a5c156b4e0)) + +##### Impact\ Embodied\ Engine, Impact\ Embodied\ Usage + +* Bad argument ([0972fd](https://github.com/pluginsGLPI/carbon/commit/0972fd8f8ab3fc77925751699277a3e4b197be36)) + +##### Impact\ Embodied\ Internal + +* Bad object to compute embodied impact from user data ([3a702d](https://github.com/pluginsGLPI/carbon/commit/3a702dc6f63ce10188a0d5e6c03eef6dbc65a749)) + +##### Impact\ History\ Abstract Asset + +* Test memory before calculating a carbon emission ([c57a52](https://github.com/pluginsGLPI/carbon/commit/c57a5258cd794fe672347bc2115cb54497facdc9)) + +##### Impact\ Type + +* Better unit notation ([3c6a12](https://github.com/pluginsGLPI/carbon/commit/3c6a12b3039bfca285ec57d996f0a44b47a224e5)) ##### Impact\ Usage\ Computer -* SQL error due to bad relation expression ([e56c02](https://github.com/pluginsGLPI/carbon/commit/e56c0226f012e9248c21c4ef8535dbaf5bad1043)) +* SQL error due to bad relation expression ([e56c02](https://github.com/pluginsGLPI/carbon/commit/e56c0226f012e9248c21c4ef8535dbaf5bad1043), [93164b](https://github.com/pluginsGLPI/carbon/commit/93164b439932a16217c2ce9fe410243771b9d45b)) + +##### Impat\ Embodied\ Engine + +* Do not use internal engine when asset model is empty ([56b9cc](https://github.com/pluginsGLPI/carbon/commit/56b9cccf3b1c86688c9f820258f3450faa94f598)) ##### Install -* Bad relation between Quebec and Hydro Quebec ([fdee8a](https://github.com/pluginsGLPI/carbon/commit/fdee8aaef063842cbea95eb908f773f9de048f36)) -* Port of fix #76 ([361093](https://github.com/pluginsGLPI/carbon/commit/361093c887814deff88eb7fb22031fa157b33c79)) -* Remove exception handling on install / upgrade ([826ee3](https://github.com/pluginsGLPI/carbon/commit/826ee32293fd53a08ed2cf7b41da5f303088d29c)) +* Avoid use of non-existing classes in migration code ([9c5c94](https://github.com/pluginsGLPI/carbon/commit/9c5c943dd994c6c96d5d06957c3edae5a3757227)) +* Bad relation between Quebec and Hydro Quebec ([0ecbf0](https://github.com/pluginsGLPI/carbon/commit/0ecbf0f588f9cf8f4424cf8a38f11fbcd60aa144), [fdee8a](https://github.com/pluginsGLPI/carbon/commit/fdee8aaef063842cbea95eb908f773f9de048f36)) +* Follow stricter lint checks ([81c71e](https://github.com/pluginsGLPI/carbon/commit/81c71e9b849f7a6f14607d14150ab1f38be77bcc)) +* Make upgrade process repeatable ([dad61e](https://github.com/pluginsGLPI/carbon/commit/dad61eeaea64f714aa09b3e0d91a728b3fadaa32)) +* Method always return true ([5e7095](https://github.com/pluginsGLPI/carbon/commit/5e709525bc6505f224fe282db4e057542a0b8cd2)) +* More robust inserts in DB ([adc785](https://github.com/pluginsGLPI/carbon/commit/adc7852317a81f1ffbcd2f4eb495e95097917c34), [930107](https://github.com/pluginsGLPI/carbon/commit/930107b65da2523c6ab213d9b1a7e1bdd5836952), [79bbd8](https://github.com/pluginsGLPI/carbon/commit/79bbd8fd35cac200bedaf251dc59fa760746ab25), [50b91b](https://github.com/pluginsGLPI/carbon/commit/50b91bb8aa11d767a3c25d4b1bf4b76e242dfe37)) +* Optimize upgrade process and fix not reported error in CLI ([ab4f54](https://github.com/pluginsGLPI/carbon/commit/ab4f5463aafb2743b54e7d83a310c9d23e36dd92)) +* Port of fix #76 ([361093](https://github.com/pluginsGLPI/carbon/commit/361093c887814deff88eb7fb22031fa157b33c79), [ece7e2](https://github.com/pluginsGLPI/carbon/commit/ece7e2169a27a65e886e1b88eac098891988fbc8)) +* Remove exception handling on install / upgrade ([06a513](https://github.com/pluginsGLPI/carbon/commit/06a513376de5022e4296d90f753f823930030832), [826ee3](https://github.com/pluginsGLPI/carbon/commit/826ee32293fd53a08ed2cf7b41da5f303088d29c)) +* Reoder upgrade steps ([8802fe](https://github.com/pluginsGLPI/carbon/commit/8802fe8095ccc9c1a21e532419a532dc08453b4a)) +* Show an error on install or upgrade failure ([00c198](https://github.com/pluginsGLPI/carbon/commit/00c198d1573fb077f4cdaf371f1d2cc78ec683ea)) + +##### Install, Computer Usage Profile + +* Upgrade from 1.0.x to 1.1.x must change the time format of usage profiles ([62b5f4](https://github.com/pluginsGLPI/carbon/commit/62b5f4030eb7b1adf69ecf2a36dbce6c15fa2809)) + +##### Location + +* Bad fallback carbon intensity detection ([9b4287](https://github.com/pluginsGLPI/carbon/commit/9b4287936015a172d997db93faf091cdc60a6507)) +* Cannot reset a source_zone ([13589a](https://github.com/pluginsGLPI/carbon/commit/13589a54aa5d2582e5492d13e27af5bd9ce0d4b0)) +* Check field name in getSpecificValueToSelect ([5a07aa](https://github.com/pluginsGLPI/carbon/commit/5a07aa874372940b5603e9e49f63f54afae0f95f)) +* Detect fallback source for carbon intensity ([3deee2](https://github.com/pluginsGLPI/carbon/commit/3deee2b2d5470a1eb4d96a3605404ab5162e9fcc)) +* Find source zone when showing Location form ([6ee28e](https://github.com/pluginsGLPI/carbon/commit/6ee28e3cd9f822d8931d8aa499d9b843ad6c9028)) +* Reset source_zone again ([48ddb7](https://github.com/pluginsGLPI/carbon/commit/48ddb77494cddb1d506df2ddd03b7191d2c4f776)) + +##### Search Options + +* Simplify SQL, no filter on is_ignored type ([d7077a](https://github.com/pluginsGLPI/carbon/commit/d7077a583838db1c909fc0a6ef11d013ca84d150)) + +##### Source Zone + +* Fail to find a fallback carbon intensity source ([a278d1](https://github.com/pluginsGLPI/carbon/commit/a278d1a5babb4a9281a0a13962114a01eea7065e)) +* Typo ([a357bb](https://github.com/pluginsGLPI/carbon/commit/a357bb8c656e04c7d1f26efec140a06ba26a0684)) + +##### Toolbox + +* Filter false gaps ([ff4d22](https://github.com/pluginsGLPI/carbon/commit/ff4d224ccf2a3a69c36168cbc2ad4498efb5d735)) +* Remove redundant WHERE criterias ([3a6990](https://github.com/pluginsGLPI/carbon/commit/3a6990f93724be500e0d962a93ac260d39c7eb05)) + +##### Type + +* Search option construction ([d7506e](https://github.com/pluginsGLPI/carbon/commit/d7506e661f986815591d8a9791c1630a63e692e9)) + +##### Usage Info + +* Hide form when nothing to view or edit ([773c72](https://github.com/pluginsGLPI/carbon/commit/773c7245b6a60534177bed4d83355a6878af7491)) + +##### Widget + +* Better choice for energy scale min value ([0b3e86](https://github.com/pluginsGLPI/carbon/commit/0b3e86406672e8276377547e81ce718519951158)) + +##### Zone + +* Bad seach option ([55771d](https://github.com/pluginsGLPI/carbon/commit/55771d16ea1c3c0df730971d1e4c08be6169fdb1)) +* Remove obsolete file ([7230a0](https://github.com/pluginsGLPI/carbon/commit/7230a0ff41fdf7a022d89b08d44a2909f3f66b21), [540515](https://github.com/pluginsGLPI/carbon/commit/5405155f5f61afc4326a00749b6d93d783b0ca90)) --- -## [1.0.1](https://github.com/pluginsGLPI/carbon/compare/1.0.0...1.0.1) (2025-10-28) +## [1.1.1](https://github.com/pluginsGLPI/carbon/compare/1.1.1...1.1.1) (2026-04-10) ### Features -* Better distinctin between legend and completion indicators ([c6e4d4](https://github.com/pluginsGLPI/carbon/commit/c6e4d4935ae8f8f6f91824a476a1dd5c9fd78758)) -* Show diagnosis about carbon intensity data sources ([f922e9](https://github.com/pluginsGLPI/carbon/commit/f922e9d405ff75cb8169a7b18ab6c8407a1ddd6e)) +* Better distinctin between legend and completion indicators ([d67c1c](https://github.com/pluginsGLPI/carbon/commit/d67c1c3ff1a4bf00b17f7d654d06a946fdc06ec1)) +* Show diagnosis about carbon intensity data sources ([bbde25](https://github.com/pluginsGLPI/carbon/commit/bbde25b29adc3bb3a67b3b066abc3360d85f50bb)) ##### Abstract Type -* Show icon along name in tab ([087bee](https://github.com/pluginsGLPI/carbon/commit/087bee7d9a0009285900bf3b97ba40c7d484f1c4)) +* Show icon along name in tab ([ae16c3](https://github.com/pluginsGLPI/carbon/commit/ae16c3d3372d33c1d51fab3aa60637d6101a4dbf)) ### Bug Fixes -* Invalid homepage URL in xml file ([6c92b3](https://github.com/pluginsGLPI/carbon/commit/6c92b301e223da9a120c57750161b4ae9ed7f42d)) +* Invalid homepage URL in xml file ([5b501d](https://github.com/pluginsGLPI/carbon/commit/5b501dff2677600c97bb4833c40d9a1066c4b837)) ##### Carbon Intensity Source Zone -* Method return type ([1d15a4](https://github.com/pluginsGLPI/carbon/commit/1d15a41581d566eb11e13adf11fa86d1be4e50f9)) +* Method return type ([218965](https://github.com/pluginsGLPI/carbon/commit/218965653b1b2e019fddc80ec1c8e5409d8437f3)) ##### Computer, Monitor, Metwork Equipment -* Properly show status of asset type in diagnosis view ([92fda3](https://github.com/pluginsGLPI/carbon/commit/92fda398b341211b81fdfc7c07e15d9f5f5d9c95)) +* Properly show status of asset type in diagnosis view ([f0006d](https://github.com/pluginsGLPI/carbon/commit/f0006d2cdb37fc32e6e94196ada4f3df0ea1105e)) ##### Dashboard\ Grid -* Loss of other plugins cards for dashboard ([1f6c50](https://github.com/pluginsGLPI/carbon/commit/1f6c5085aab31b7db191865f83eebfaa16c3da42)) +* Loss of other plugins cards for dashboard ([8954bb](https://github.com/pluginsGLPI/carbon/commit/8954bbe39d9d6cc3eece992bcf78624aa21be877)) ##### Dashboard\ Widget -* Fix bad argument when computing Y scale ([e0ee08](https://github.com/pluginsGLPI/carbon/commit/e0ee0822ff0499e1fe4d8698c3d4c9fdbf8d0fbc)) - -##### Docs - -* Icon path in metadata ([2bae7e](https://github.com/pluginsGLPI/carbon/commit/2bae7ed0fbc17a084f1ed046dc6efedbf398d278)) +* Fix bad argument when computing Y scale ([f2fa87](https://github.com/pluginsGLPI/carbon/commit/f2fa87272385947e55fa3b1294ff49f6f6f356c2)) -##### Impact\ Embodied\ Boavizta +##### Engine\V1\ Abstract Asset -* Improve RAM and HDD description prior query ([9d2496](https://github.com/pluginsGLPI/carbon/commit/9d24960f8309341f10cc0fac2cb7cf43735552b1)) +* Fallback carbon intensity may be picked from wrong source ([d54028](https://github.com/pluginsGLPI/carbon/commit/d54028c5ed51d8209e2205b87c24f4203c1ffbb3)) ##### Impact\ Usage\ Computer -* SQL error due to bad relation expression ([6de1c6](https://github.com/pluginsGLPI/carbon/commit/6de1c64266cc24c5ee8f21c2fd7dde75f59b50ba)) +* SQL error due to bad relation expression ([e56c02](https://github.com/pluginsGLPI/carbon/commit/e56c0226f012e9248c21c4ef8535dbaf5bad1043)) ##### Install -* Bad relation between Quebec and Hydro Quebec ([9ab010](https://github.com/pluginsGLPI/carbon/commit/9ab01058d5d65527b798c2a1024d32d9e5e23c2e)) +* Bad relation between Quebec and Hydro Quebec ([fdee8a](https://github.com/pluginsGLPI/carbon/commit/fdee8aaef063842cbea95eb908f773f9de048f36)) +* Port of fix #76 ([361093](https://github.com/pluginsGLPI/carbon/commit/361093c887814deff88eb7fb22031fa157b33c79)) +* Remove exception handling on install / upgrade ([826ee3](https://github.com/pluginsGLPI/carbon/commit/826ee32293fd53a08ed2cf7b41da5f303088d29c)) -##### Widget -* Better choice for energy scale min value ([15864b](https://github.com/pluginsGLPI/carbon/commit/15864b4fcaceaf67518d74d0f77e910f385d2208)) -* Unset variable ([3cfd01](https://github.com/pluginsGLPI/carbon/commit/3cfd01b567a7ee1c722e2aac3ff1b2eb2af8f3b8)) +--- + +## [1.1.0](https://github.com/pluginsGLPI/carbon/compare/1.1.1...1.1.0) (2026-04-10) + +This version is like 1.1.0 but targets GLPI 11, whereas version 1.0.0 targets GLPI 10. --- -## [1.0.0](https://github.com/pluginsGLPI/carbon/compare/1.0.0-beta.3...1.0.0) (2025-10-28) +## [1.0.0](https://github.com/pluginsGLPI/carbon/compare/1.1.1...1.0.0) (2026-04-10) ### Features @@ -201,6 +544,7 @@ All notable changes to this project will be documented in this file. * Allow reset if only gwp was calculated ([4e771c](https://github.com/pluginsGLPI/carbon/commit/4e771ca3c6c7422f1d02ef5b2f37e97084a6d5ee)) + --- ## [1.0.0-beta.3](https://github.com/pluginsGLPI/carbon/compare/668e7b68956c8fe6decff7563bc64b8057eaa25e...v1.0.0-beta.3) (2025-07-22) diff --git a/ajax/dropdownZone.php b/ajax/dropdownZone.php new file mode 100644 index 00000000..9eb932c8 --- /dev/null +++ b/ajax/dropdownZone.php @@ -0,0 +1,51 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use GlpiPlugin\Carbon\Source_Zone; +use GlpiPlugin\Carbon\Zone; + +include(__DIR__ . '/../../../inc/includes.php'); + +// Check if plugin is activated... +if (!Plugin::isPluginActive('carbon')) { + http_response_code(404); + die(); +} + +$source_zone_table = Source_Zone::getTable(); +$zone_table = Zone::getTable(); +$source_id = (int) $_POST['plugin_carbon_sources_id']; +Zone::dropdown([ + 'rand' => (int) $_POST['dom_id'], + 'condition' => Zone::getRestrictBySourceCondition($source_id), + 'specific_tags' => ($source_id === 0 ? ['disabled' => 'disabled'] : []), +]); diff --git a/ajax/toggleZoneDownload.php b/ajax/toggleZoneDownload.php index 581a2a8c..feba5601 100644 --- a/ajax/toggleZoneDownload.php +++ b/ajax/toggleZoneDownload.php @@ -30,8 +30,8 @@ * ------------------------------------------------------------------------- */ -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; include(__DIR__ . '/../../../inc/includes.php'); @@ -41,7 +41,7 @@ die(); } -if (!CarbonIntensitySource::canView()) { +if (!Source::canView()) { // Will die http_response_code(403); die(); @@ -52,7 +52,7 @@ die(); } -$source_zone = new CarbonIntensitySource_Zone(); +$source_zone = new Source_Zone(); if (!$source_zone->getFromDB($_GET['id'])) { http_response_code(403); die(); diff --git a/composer.json b/composer.json index 894c221b..520e1303 100644 --- a/composer.json +++ b/composer.json @@ -8,17 +8,8 @@ "php-http/message-factory": "^1.1" }, "require-dev": { - "friendsoftwig/twigcs": "^6.1", "glpi-project/tools": "^0.8.1", - "marcocesarato/php-conventional-changelog": "^1.17", - "php-parallel-lint/php-parallel-lint": "^1.3", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-deprecation-rules": "^2.0", - "phpunit/phpunit": "^11.5", - "rector/rector": "^2", - "squizlabs/php_codesniffer": "^3.7", - "symfony/dom-crawler": "^5.4" + "marcocesarato/php-conventional-changelog": "^1.17" }, "config": { "optimize-autoloader": true, @@ -38,11 +29,11 @@ } }, "scripts": { - "php-lint": "vendor/bin/parallel-lint --colors --exclude vendor .; vendor/bin/phpstan; vendor/bin/rector process --dry-run --ansi", + "php-lint": "../../vendor/bin/parallel-lint --colors --exclude vendor .; ../../vendor/bin/phpstan --memory-limit=256M; ../../vendor/bin/rector process --dry-run --ansi", "css-lint": "node_modules/.bin/stylelint --color --formatter verbose '**/*.css' '**/*.scss'", "js-lint": "node_modules/.bin/eslint --color .", "license-headers": "vendor/bin/licence-headers-check --ansi --no-interaction", "build-schema": "tools/build-db-schema.php carbon | plantuml -p -tpng > docs/db-schema.png" }, - "version": "1.1.1" + "version": "1.2.0" } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 1e30da31..770a9b24 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "47ff8abcf7030073fba59f906715c521", + "content-hash": "582acaaf04fd64bdb899923a4d66240a", "packages": [ { "name": "clue/stream-filter", @@ -252,16 +252,16 @@ }, { "name": "league/iso3166", - "version": "4.3.3", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/alcohol/iso3166.git", - "reference": "3f692113a1c07859ec69303a0127b43da8a66768" + "reference": "928ac7ecc569db9123a83ef5b1c6efc279e7cb49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alcohol/iso3166/zipball/3f692113a1c07859ec69303a0127b43da8a66768", - "reference": "3f692113a1c07859ec69303a0127b43da8a66768", + "url": "https://api.github.com/repos/alcohol/iso3166/zipball/928ac7ecc569db9123a83ef5b1c6efc279e7cb49", + "reference": "928ac7ecc569db9123a83ef5b1c6efc279e7cb49", "shasum": "" }, "require": { @@ -315,7 +315,7 @@ "type": "github" } ], - "time": "2025-06-05T08:06:30+00:00" + "time": "2026-01-02T09:49:36+00:00" }, { "name": "php-http/discovery", @@ -637,73 +637,18 @@ } ], "packages-dev": [ - { - "name": "friendsoftwig/twigcs", - "version": "6.5.0", - "source": { - "type": "git", - "url": "https://github.com/friendsoftwig/twigcs.git", - "reference": "aaa3ba112bf4fcee7b51a00d9b45b13bc2cc23bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/aaa3ba112bf4fcee7b51a00d9b45b13bc2cc23bc", - "reference": "aaa3ba112bf4fcee7b51a00d9b45b13bc2cc23bc", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-hash": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", - "symfony/console": "^4.4 || ^5.3 || ^6.0 || ^7.0", - "symfony/filesystem": "^4.4 || ^5.3 || ^6.0 || ^7.0", - "symfony/finder": "^4.4 || ^5.3 || ^6.0 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.6.19", - "symfony/phpunit-bridge": "^7.1.4" - }, - "bin": [ - "bin/twigcs" - ], - "type": "library", - "autoload": { - "psr-4": { - "FriendsOfTwig\\Twigcs\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tristan Maindron", - "email": "tmaindron@gmail.com" - } - ], - "description": "Checkstyle automation for Twig", - "support": { - "issues": "https://github.com/friendsoftwig/twigcs/issues", - "source": "https://github.com/friendsoftwig/twigcs/tree/6.5.0" - }, - "time": "2024-11-27T21:59:24+00:00" - }, { "name": "glpi-project/tools", - "version": "0.8.1", + "version": "0.8.3", "source": { "type": "git", "url": "https://github.com/glpi-project/tools.git", - "reference": "cf182b1a6bd1a73c5c6469dbbd0edabf7cb5857e" + "reference": "8ea2a7d4702a858f4b0360ba7d4f1841a5e77026" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/cf182b1a6bd1a73c5c6469dbbd0edabf7cb5857e", - "reference": "cf182b1a6bd1a73c5c6469dbbd0edabf7cb5857e", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/8ea2a7d4702a858f4b0360ba7d4f1841a5e77026", + "reference": "8ea2a7d4702a858f4b0360ba7d4f1841a5e77026", "shasum": "" }, "require": { @@ -746,27 +691,27 @@ "issues": "https://github.com/glpi-project/tools/issues", "source": "https://github.com/glpi-project/tools" }, - "time": "2025-09-08T09:45:41+00:00" + "time": "2025-10-14T10:26:06+00:00" }, { "name": "marcocesarato/php-conventional-changelog", - "version": "1.17.2", + "version": "1.17.3", "source": { "type": "git", "url": "https://github.com/marcocesarato/php-conventional-changelog.git", - "reference": "2a153727bab28c85d54184975292a468fac269f7" + "reference": "c49b4a69ddf9ecbf055e8029c65e54a956d7ffa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/marcocesarato/php-conventional-changelog/zipball/2a153727bab28c85d54184975292a468fac269f7", - "reference": "2a153727bab28c85d54184975292a468fac269f7", + "url": "https://api.github.com/repos/marcocesarato/php-conventional-changelog/zipball/c49b4a69ddf9ecbf055e8029c65e54a956d7ffa2", + "reference": "c49b4a69ddf9ecbf055e8029c65e54a956d7ffa2", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "php": ">=7.1.3", - "symfony/console": "^4 || ^5 || ^6 || ^7" + "symfony/console": "^4 || ^5 || ^6 || ^7 || ^8" }, "require-dev": { "brainmaestro/composer-git-hooks": "^2.8", @@ -812,2341 +757,47 @@ "conventional-changelog-preset", "conventional-commit", "conventional-commits", - "conventionalcommits", - "generation", - "git", - "history", - "php", - "readme", - "tag" - ], - "support": { - "issues": "https://github.com/marcocesarato/php-conventional-changelog/issues", - "source": "https://github.com/marcocesarato/php-conventional-changelog/tree/v1.17.2" - }, - "time": "2024-05-19T14:35:27+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.13.4", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2025-08-01T08:46:24+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" - }, - "time": "2025-08-13T20:13:15+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6db563514f27e19595a19f45a4bf757b6401194e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", - "reference": "6db563514f27e19595a19f45a4bf757b6401194e", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=5.3.0" - }, - "replace": { - "grogy/php-parallel-lint": "*", - "jakub-onderka/php-parallel-lint": "*" - }, - "require-dev": { - "nette/tester": "^1.3 || ^2.0", - "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "suggest": { - "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" - }, - "bin": [ - "parallel-lint" - ], - "type": "library", - "autoload": { - "classmap": [ - "./src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "ahoj@jakubonderka.cz" - } - ], - "description": "This tool checks the syntax of PHP files about 20x faster than serial check.", - "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", - "keywords": [ - "lint", - "static analysis" - ], - "support": { - "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0" - }, - "time": "2024-03-27T12:14:49+00:00" - }, - { - "name": "phpstan/extension-installer", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/extension-installer.git", - "reference": "85e90b3942d06b2326fba0403ec24fe912372936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", - "reference": "85e90b3942d06b2326fba0403ec24fe912372936", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0 || ^2.0" - }, - "require-dev": { - "composer/composer": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PHPStan\\ExtensionInstaller\\Plugin" - }, - "autoload": { - "psr-4": { - "PHPStan\\ExtensionInstaller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Composer plugin for automatic installation of PHPStan extensions", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" - }, - "time": "2024-09-04T20:21:43+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "2.1.22", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4", - "shasum": "" - }, - "require": { - "php": "^7.4|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - } - ], - "time": "2025-08-04T19:17:37+00:00" - }, - { - "name": "phpstan/phpstan-deprecation-rules", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "468e02c9176891cc901143da118f09dc9505fc2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/468e02c9176891cc901143da118f09dc9505fc2f", - "reference": "468e02c9176891cc901143da118f09dc9505fc2f", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.1.15" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^9.6" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "support": { - "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.3" - }, - "time": "2025-05-14T10:56:57+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "11.0.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4f7722aa9a7b76aa775e2d9d4e95d1ea16eeeef4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4f7722aa9a7b76aa775e2d9d4e95d1ea16eeeef4", - "reference": "4f7722aa9a7b76aa775e2d9d4e95d1ea16eeeef4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^5.4.0", - "php": ">=8.2", - "phpunit/php-file-iterator": "^5.1.0", - "phpunit/php-text-template": "^4.0.1", - "sebastian/code-unit-reverse-lookup": "^4.0.1", - "sebastian/complexity": "^4.0.1", - "sebastian/environment": "^7.2.0", - "sebastian/lines-of-code": "^3.0.1", - "sebastian/version": "^5.0.2", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^11.5.2" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "11.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.11" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", - "type": "tidelift" - } - ], - "time": "2025-08-27T14:37:49+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", - "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-08-27T05:02:59+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "5.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", - "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^11.0" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T05:07:44+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "4.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", - "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T05:08:43+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "7.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", - "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T05:09:35+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "11.5.36", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "264a87c7ef68b1ab9af7172357740dc266df5957" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/264a87c7ef68b1ab9af7172357740dc266df5957", - "reference": "264a87c7ef68b1ab9af7172357740dc266df5957", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.4", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.11", - "phpunit/php-file-iterator": "^5.1.0", - "phpunit/php-invoker": "^5.0.1", - "phpunit/php-text-template": "^4.0.1", - "phpunit/php-timer": "^7.0.1", - "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.3", - "sebastian/comparator": "^6.3.2", - "sebastian/diff": "^6.0.2", - "sebastian/environment": "^7.2.1", - "sebastian/exporter": "^6.3.0", - "sebastian/global-state": "^7.0.2", - "sebastian/object-enumerator": "^6.0.1", - "sebastian/type": "^5.1.3", - "sebastian/version": "^5.0.2", - "staabm/side-effects-detector": "^1.0.5" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "11.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.36" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2025-09-03T06:24:17+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "rector/rector", - "version": "2.1.6", - "source": { - "type": "git", - "url": "https://github.com/rectorphp/rector.git", - "reference": "729aabc0ec66e700ef164e26454a1357f222a2f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/729aabc0ec66e700ef164e26454a1357f222a2f3", - "reference": "729aabc0ec66e700ef164e26454a1357f222a2f3", - "shasum": "" - }, - "require": { - "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.18" - }, - "conflict": { - "rector/rector-doctrine": "*", - "rector/rector-downgrade-php": "*", - "rector/rector-phpunit": "*", - "rector/rector-symfony": "*" - }, - "suggest": { - "ext-dom": "To manipulate phpunit.xml via the custom-rule command" - }, - "bin": [ - "bin/rector" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Instant Upgrade and Automated Refactoring of any PHP code", - "homepage": "https://getrector.com/", - "keywords": [ - "automation", - "dev", - "migration", - "refactoring" - ], - "support": { - "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.1.6" - }, - "funding": [ - { - "url": "https://github.com/tomasvotruba", - "type": "github" - } - ], - "time": "2025-09-05T15:43:08+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", - "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T04:41:36+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", - "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-03-19T07:56:08+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "4.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "183a9b2632194febd219bb9246eee421dad8d45e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", - "reference": "183a9b2632194febd219bb9246eee421dad8d45e", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T04:45:54+00:00" - }, - { - "name": "sebastian/comparator", - "version": "6.3.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "85c77556683e6eee4323e4c5468641ca0237e2e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85c77556683e6eee4323e4c5468641ca0237e2e8", - "reference": "85c77556683e6eee4323e4c5468641ca0237e2e8", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=8.2", - "sebastian/diff": "^6.0", - "sebastian/exporter": "^6.0" - }, - "require-dev": { - "phpunit/phpunit": "^11.4" - }, - "suggest": { - "ext-bcmath": "For comparing BcMath\\Number objects" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", - "type": "tidelift" - } - ], - "time": "2025-08-10T08:07:46+00:00" - }, - { - "name": "sebastian/complexity", - "version": "4.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", - "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T04:49:50+00:00" - }, - { - "name": "sebastian/diff", - "version": "6.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", - "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T04:53:05+00:00" - }, - { - "name": "sebastian/environment", - "version": "7.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", - "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "https://github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", - "type": "tidelift" - } - ], - "time": "2025-05-21T11:55:47+00:00" - }, - { - "name": "sebastian/exporter", - "version": "6.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", - "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=8.2", - "sebastian/recursion-context": "^6.0" - }, - "require-dev": { - "phpunit/phpunit": "^11.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-12-05T09:17:50+00:00" - }, - { - "name": "sebastian/global-state", - "version": "7.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "3be331570a721f9a4b5917f4209773de17f747d7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", - "reference": "3be331570a721f9a4b5917f4209773de17f747d7", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "sebastian/object-reflector": "^4.0", - "sebastian/recursion-context": "^6.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "https://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T04:57:36+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", - "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T04:58:38+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "6.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "f5b498e631a74204185071eb41f33f38d64608aa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", - "reference": "f5b498e631a74204185071eb41f33f38d64608aa", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "sebastian/object-reflector": "^4.0", - "sebastian/recursion-context": "^6.0" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T05:00:13+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "4.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", - "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-07-03T05:01:32+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "6.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc", - "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", - "type": "tidelift" - } - ], - "time": "2025-08-13T04:42:22+00:00" - }, - { - "name": "sebastian/type", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449", - "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/type", - "type": "tidelift" - } - ], - "time": "2025-08-09T06:55:48+00:00" - }, - { - "name": "sebastian/version", - "version": "5.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", - "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-10-09T05:16:32+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.13.4", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" - }, - "bin": [ - "bin/phpcbf", - "bin/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "Former lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "Current lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", - "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", - "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" - }, - "funding": [ - { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", - "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" - }, - { - "url": "https://thanks.dev/u/gh/phpcsstandards", - "type": "thanks_dev" - } - ], - "time": "2025-09-05T05:47:09+00:00" - }, - { - "name": "staabm/side-effects-detector", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/staabm/side-effects-detector.git", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.6", - "phpunit/phpunit": "^9.6.21", - "symfony/var-dumper": "^5.4.43", - "tomasvotruba/type-coverage": "1.0.0", - "tomasvotruba/unused-public": "1.0.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A static analysis tool to detect side effects in PHP code", - "keywords": [ - "static analysis" - ], - "support": { - "issues": "https://github.com/staabm/side-effects-detector/issues", - "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" - }, - "funding": [ - { - "url": "https://github.com/staabm", - "type": "github" - } - ], - "time": "2024-10-20T05:08:20+00:00" - }, - { - "name": "symfony/console", - "version": "v6.4.25", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", - "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "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": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command-line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v6.4.25" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-08-22T10:21:53+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "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", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" - }, - "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" - } + "conventionalcommits", + "generation", + "git", + "history", + "php", + "readme", + "tag" ], - "time": "2024-09-25T14:21:43+00:00" + "support": { + "issues": "https://github.com/marcocesarato/php-conventional-changelog/issues", + "source": "https://github.com/marcocesarato/php-conventional-changelog/tree/v1.17.3" + }, + "time": "2026-01-21T11:40:14+00:00" }, { - "name": "symfony/dom-crawler", - "version": "v5.4.48", + "name": "psr/container", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "b57df76f4757a9a8dfbb57ba48d7780cc20776c6" + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b57df76f4757a9a8dfbb57ba48d7780cc20776c6", - "reference": "b57df76f4757a9a8dfbb57ba48d7780cc20776c6", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "masterminds/html5": "<2.6" - }, - "require-dev": { - "masterminds/html5": "^2.6", - "symfony/css-selector": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/css-selector": "" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3154,61 +805,73 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Eases DOM navigation for HTML and XML documents", - "homepage": "https://symfony.com", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.4.48" + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "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": "2024-11-13T14:36:38+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { - "name": "symfony/filesystem", - "version": "v7.3.2", + "name": "symfony/console", + "version": "v6.4.36", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "url": "https://github.com/symfony/console.git", + "reference": "9f481cfb580db8bcecc9b2d4c63f3e13df022ad5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/console/zipball/9f481cfb580db8bcecc9b2d4c63f3e13df022ad5", + "reference": "9f481cfb580db8bcecc9b2d4c63f3e13df022ad5", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "symfony/process": "^6.4|^7.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Filesystem\\": "" + "Symfony\\Component\\Console\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3228,10 +891,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides basic utilities for the filesystem", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/console/tree/v6.4.36" }, "funding": [ { @@ -3251,35 +920,38 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2026-03-27T15:30:51+00:00" }, { - "name": "symfony/finder", - "version": "v7.3.2", + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/filesystem": "^6.4|^7.0" + "php": ">=8.1" }, "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" }, - "exclude-from-classmap": [ - "/Tests/" + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3288,18 +960,18 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Finds files and directories via an intuitive fluent interface", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -3310,29 +982,25 @@ "url": "https://github.com/fabpot", "type": "github" }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.33.0", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { @@ -3382,7 +1050,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.35.0" }, "funding": [ { @@ -3402,20 +1070,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.33.0", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/ad1b7b9092976d6c948b8a187cec9faaea9ec1df", + "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df", "shasum": "" }, "require": { @@ -3464,7 +1132,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.35.0" }, "funding": [ { @@ -3484,11 +1152,11 @@ "type": "tidelift" } ], - "time": "2025-06-27T09:58:17+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3549,7 +1217,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.35.0" }, "funding": [ { @@ -3573,16 +1241,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315", + "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315", "shasum": "" }, "require": { @@ -3634,91 +1302,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-12-23T08:48:59+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "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" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.35.0" }, "funding": [ { @@ -3738,20 +1322,20 @@ "type": "tidelift" } ], - "time": "2025-01-02T08:10:11+00:00" + "time": "2026-04-10T17:25:58+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", "shasum": "" }, "require": { @@ -3805,7 +1389,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" }, "funding": [ { @@ -3816,31 +1400,36 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-25T09:37:31+00:00" + "time": "2025-07-15T11:30:57+00:00" }, { "name": "symfony/string", - "version": "v7.3.3", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c" + "reference": "114ac57257d75df748eda23dd003878080b8e688" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", - "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", + "url": "https://api.github.com/repos/symfony/string/zipball/114ac57257d75df748eda23dd003878080b8e688", + "reference": "114ac57257d75df748eda23dd003878080b8e688", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-grapheme": "~1.33", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, @@ -3848,12 +1437,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/emoji": "^7.1|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -3892,7 +1480,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.3" + "source": "https://github.com/symfony/string/tree/v7.4.8" }, "funding": [ { @@ -3912,70 +1500,20 @@ "type": "tidelift" } ], - "time": "2025-08-25T06:35:40+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2026-03-24T13:12:05+00:00" }, { "name": "twig/twig", - "version": "v3.21.1", + "version": "v3.24.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" + "reference": "a6769aefb305efef849dc25c9fd1653358c148f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a6769aefb305efef849dc25c9fd1653358c148f0", + "reference": "a6769aefb305efef849dc25c9fd1653358c148f0", "shasum": "" }, "require": { @@ -3985,7 +1523,8 @@ "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { - "phpstan/phpstan": "^2.0", + "php-cs-fixer/shim": "^3.0@stable", + "phpstan/phpstan": "^2.0@stable", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -4029,7 +1568,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.21.1" + "source": "https://github.com/twigphp/Twig/tree/v3.24.0" }, "funding": [ { @@ -4041,7 +1580,7 @@ "type": "tidelift" } ], - "time": "2025-05-03T07:21:55+00:00" + "time": "2026-03-17T21:31:11+00:00" } ], "aliases": [], @@ -4056,5 +1595,5 @@ "platform-overrides": { "php": "8.2.0" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/docs/db-schema.png b/docs/db-schema.png index 0faa703e..668cac48 100644 Binary files a/docs/db-schema.png and b/docs/db-schema.png differ diff --git a/front/computermodel.form.php b/front/computermodel.form.php new file mode 100644 index 00000000..5a3409cb --- /dev/null +++ b/front/computermodel.form.php @@ -0,0 +1,53 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use Glpi\Exception\Http\NotFoundHttpException; +use GlpiPlugin\Carbon\ComputerModel; + +include(__DIR__ . '/../../../inc/includes.php'); + +if (!Plugin::isPluginActive('carbon')) { + throw new NotFoundHttpException(); +} + +Session::checkRight('config', UPDATE); + +$item = new ComputerModel(); + +if (isset($_POST['update'])) { + // Add a new Form + Session::checkRight('entity', UPDATE); + $item->update($_POST); + Html::back(); +} + +Html::back(); diff --git a/front/computertype.form.php b/front/computertype.form.php index b7b90a71..dc0972b9 100644 --- a/front/computertype.form.php +++ b/front/computertype.form.php @@ -30,6 +30,7 @@ * ------------------------------------------------------------------------- */ +use ComputerType as GlpiComputerType; use Glpi\Exception\Http\NotFoundHttpException; use GlpiPlugin\Carbon\ComputerType; @@ -39,13 +40,12 @@ throw new NotFoundHttpException(); } -Session::checkRight('config', UPDATE); +Session::checkRight(GlpiComputerType::$rightname, UPDATE); $item = new ComputerType(); if (isset($_POST['update'])) { - // Add a new Form - Session::checkRight('entity', UPDATE); + Session::checkRight(GlpiComputerType::$rightname, UPDATE); $item->update($_POST); Html::back(); } diff --git a/front/embodiedimpact.form.php b/front/embodiedimpact.form.php index b588851c..6b88f2ba 100644 --- a/front/embodiedimpact.form.php +++ b/front/embodiedimpact.form.php @@ -32,9 +32,7 @@ use Glpi\Event; use Glpi\Exception\Http\NotFoundHttpException; -use GlpiPlugin\Carbon\Config; use GlpiPlugin\Carbon\EmbodiedImpact; -use GlpiPlugin\Carbon\Impact\Embodied\AbstractEmbodiedImpact; use GlpiPlugin\Carbon\Impact\Embodied\Engine; include(__DIR__ . '/../../../inc/includes.php'); @@ -60,7 +58,7 @@ sprintf(__('%s updates an item'), $_SESSION['glpiname']) ); Html::back(); -} else if (isset($_POST['reset'])) { +} elseif (isset($_POST['reset'])) { if (!isset($_POST['id'])) { Session::addMessageAfterRedirect(__('Missing arguments in request.', 'carbon'), false, ERROR); Html::back(); @@ -83,25 +81,28 @@ if (!$embodied_impact->delete($embodied_impact->fields)) { Session::addMessageAfterRedirect(__('Reset failed.', 'carbon'), false, ERROR); } -} else if (isset($_POST['calculate'])) { +} elseif (isset($_POST['calculate'])) { if (!isset($_POST['itemtype']) || !isset($_POST['items_id'])) { Session::addMessageAfterRedirect(__('Missing arguments in request.', 'carbon'), false, ERROR); Html::back(); } - $embodied_impact = Engine::getEngineFromItemtype($_POST['itemtype']); - if ($embodied_impact === null) { - Session::addMessageAfterRedirect(__('Unable to find calculation engine for this asset.', 'carbon'), false, ERROR); + $itemtype = $_POST['itemtype']; + if (!Toolbox::isCommonDBTM($itemtype)) { + Session::addMessageAfterRedirect(__('Bad arguments.', 'carbon'), false, ERROR); Html::back(); } - $itemtype = $embodied_impact::getItemtype(); $item = new $itemtype(); $item->check($_POST['items_id'], UPDATE); - if (!$embodied_impact->evaluateItem($_POST['items_id'])) { - Session::addMessageAfterRedirect(__('Update failed.', 'carbon'), false, ERROR); + $embodied_impact = Engine::getEngineFromItemtype($item); + if ($embodied_impact === null) { + Session::addMessageAfterRedirect(__('Unable to find calculation engine for this asset.', 'carbon'), false, ERROR); + Html::back(); } + + $embodied_impact->evaluateItem(); } Html::back(); diff --git a/front/location.form.php b/front/location.form.php new file mode 100644 index 00000000..2ebed113 --- /dev/null +++ b/front/location.form.php @@ -0,0 +1,53 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use Glpi\Exception\Http\NotFoundHttpException; +use GlpiPlugin\Carbon\Location; +use Location as GlpiLocation; + +include(__DIR__ . "/../../../inc/includes.php"); + +if (!Plugin::isPluginActive('carbon')) { + throw new NotFoundHttpException(); +} + +Session::checkRight(GlpiLocation::$rightname, UPDATE); + +$item = new Location(); + +if (isset($_POST['update'])) { + Session::checkRight(GlpiLocation::$rightname, UPDATE); + $item->update($_POST); + Html::back(); +} + +Html::back(); diff --git a/front/monitormodel.form.php b/front/monitormodel.form.php new file mode 100644 index 00000000..01ecccd8 --- /dev/null +++ b/front/monitormodel.form.php @@ -0,0 +1,54 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use Glpi\Exception\Http\NotFoundHttpException; +use GlpiPlugin\Carbon\MonitorModel; + +include(__DIR__ . '/../../../inc/includes.php'); + +if (!Plugin::isPluginActive('carbon')) { + throw new NotFoundHttpException(); +} + + +Session::checkRight('config', UPDATE); + +$item = new MonitorModel(); + +if (isset($_POST['update'])) { + // Add a new Form + Session::checkRight('entity', UPDATE); + $item->update($_POST); + Html::back(); +} + +Html::back(); diff --git a/front/monitortype.form.php b/front/monitortype.form.php index 585a3dd6..b76874f2 100644 --- a/front/monitortype.form.php +++ b/front/monitortype.form.php @@ -32,20 +32,20 @@ include(__DIR__ . "/../../../inc/includes.php"); -use GlpiPlugin\Carbon\MonitorType; use Glpi\Exception\Http\NotFoundHttpException; +use GlpiPlugin\Carbon\MonitorType; +use MonitorType as GlpiMonitorType; if (!Plugin::isPluginActive('carbon')) { throw new NotFoundHttpException(); } -Session::checkRight('config', UPDATE); +Session::checkRight(GlpiMonitorType::$rightname, UPDATE); $item = new MonitorType(); if (isset($_POST['update'])) { - // Add a new Form - Session::checkRight('entity', UPDATE); + Session::checkRight(GlpiMonitorType::$rightname, UPDATE); $item->update($_POST); Html::back(); } diff --git a/front/networkequipmentmodel.form.php b/front/networkequipmentmodel.form.php new file mode 100644 index 00000000..ff13a764 --- /dev/null +++ b/front/networkequipmentmodel.form.php @@ -0,0 +1,54 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use Glpi\Exception\Http\NotFoundHttpException; +use GlpiPlugin\Carbon\NetworkEquipmentModel; + +include(__DIR__ . '/../../../inc/includes.php'); + +if (!Plugin::isPluginActive('carbon')) { + throw new NotFoundHttpException(); +} + + +Session::checkRight('config', UPDATE); + +$item = new NetworkEquipmentModel(); + +if (isset($_POST['update'])) { + // Add a new Form + Session::checkRight('entity', UPDATE); + $item->update($_POST); + Html::back(); +} + +Html::back(); diff --git a/front/networkequipmenttype.form.php b/front/networkequipmenttype.form.php index 093c1f8e..397f092e 100644 --- a/front/networkequipmenttype.form.php +++ b/front/networkequipmenttype.form.php @@ -32,6 +32,7 @@ use Glpi\Exception\Http\NotFoundHttpException; use GlpiPlugin\Carbon\NetworkEquipmentType; +use NetworkEquipmentType as GlpiNetworkEquipmentType; include(__DIR__ . '/../../../inc/includes.php'); @@ -39,13 +40,12 @@ throw new NotFoundHttpException(); } -Session::checkRight('config', UPDATE); +Session::checkRight(GlpiNetworkEquipmentType::$rightname, UPDATE); $item = new NetworkEquipmentType(); if (isset($_POST['update'])) { - // Add a new Form - Session::checkRight('entity', UPDATE); + Session::checkRight(GlpiNetworkEquipmentType::$rightname, UPDATE); $item->update($_POST); Html::back(); } diff --git a/front/usageimpact.form.php b/front/usageimpact.form.php index 2994bb14..287ba380 100644 --- a/front/usageimpact.form.php +++ b/front/usageimpact.form.php @@ -32,10 +32,11 @@ use Glpi\Event; use Glpi\Exception\Http\NotFoundHttpException; -use GlpiPlugin\Carbon\UsageInfo; +use GlpiPlugin\Carbon\CommonAsset; use GlpiPlugin\Carbon\Impact\History\AbstractAsset; use GlpiPlugin\Carbon\Impact\Usage\Engine; use GlpiPlugin\Carbon\UsageImpact; +use GlpiPlugin\Carbon\UsageInfo; include(__DIR__ . '/../../../inc/includes.php'); @@ -60,7 +61,7 @@ sprintf(__('%s updates an item'), $_SESSION['glpiname']) ); Html::back(); -} else if (isset($_POST['reset'])) { +} elseif (isset($_POST['reset'])) { if (!isset($_POST['itemtype']) || !isset($_POST['items_id'])) { Session::addMessageAfterRedirect(__('Missing arguments in request.', 'carbon'), false, ERROR); Html::back(); @@ -90,14 +91,11 @@ Html::back(); } - if (!$gwp_impact->resetForItem($item->getID())) { + if (!CommonAsset::deleteUsageImpact($item)) { Session::addMessageAfterRedirect(__('Reset failed.', 'carbon'), false, ERROR); + Html::back(); } - - if (!$usage_impact->isNewItem() && !$usage_impact->delete($usage_impact->fields)) { - Session::addMessageAfterRedirect(__('Delete of usage impact failed.', 'carbon'), false, ERROR); - } -} else if (isset($_POST['calculate'])) { +} elseif (isset($_POST['calculate'])) { if (!isset($_POST['itemtype']) || !isset($_POST['items_id'])) { Session::addMessageAfterRedirect(__('Missing arguments in request.', 'carbon'), false, ERROR); Html::back(); @@ -120,7 +118,7 @@ /** @var AbstractAsset $gwp_impact */ $gwp_impact = new $gwp_impact_class(); - if (!$gwp_impact->canHistorize($_POST['items_id'])) { + if ($gwp_impact->getItemsToEvaluate([$item::getTableField('id') => $_POST['items_id']])->count() !== 1) { Session::addMessageAfterRedirect(__('Missing data prevents historization of this asset.', 'carbon'), false, ERROR); } else { if (!$gwp_impact->calculateImpact($_POST['items_id'])) { @@ -128,13 +126,13 @@ } } - $usage_impact = Engine::getEngineFromItemtype($_POST['itemtype']); + $usage_impact = Engine::getEngineFromItemtype($item); if ($usage_impact === null) { Session::addMessageAfterRedirect(__('Unable to find calculation engine for this asset.', 'carbon'), false, ERROR); Html::back(); } - if (!$usage_impact->evaluateItem($_POST['items_id'])) { + if (!$usage_impact->evaluateItem()) { Session::addMessageAfterRedirect(__('Update of usage impact failed.', 'carbon'), false, ERROR); } } diff --git a/hook.php b/hook.php index 7f91f6ef..66dd3725 100644 --- a/hook.php +++ b/hook.php @@ -30,28 +30,33 @@ * ------------------------------------------------------------------------- */ -use Glpi\Dashboard\Right as GlpiDashboardRight; -use GlpiPlugin\Carbon\ComputerType; -use GlpiPlugin\Carbon\ComputerUsageProfile; -use GlpiPlugin\Carbon\Install; -use GlpiPlugin\Carbon\Uninstall; -use GlpiPlugin\Carbon\UsageInfo; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\Zone; +use Computer as GlpiComputer; use ComputerType as GlpiComputerType; +use Glpi\Dashboard\Right as GlpiDashboardRight; use GlpiPlugin\Carbon\CarbonEmission; use GlpiPlugin\Carbon\CarbonIntensity; -use MonitorType as GlpiMonitorType; -use NetworkEquipmentType as GlpiNetworkEquipmentType; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; +use GlpiPlugin\Carbon\CommonAsset; +use GlpiPlugin\Carbon\ComputerType; +use GlpiPlugin\Carbon\ComputerUsageProfile; use GlpiPlugin\Carbon\Config; use GlpiPlugin\Carbon\EmbodiedImpact; +use GlpiPlugin\Carbon\Impact\History\AssetInterface; +use GlpiPlugin\Carbon\Install; use GlpiPlugin\Carbon\Location; use GlpiPlugin\Carbon\MonitorType; use GlpiPlugin\Carbon\NetworkEquipmentType; use GlpiPlugin\Carbon\SearchOptions; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\Toolbox; +use GlpiPlugin\Carbon\Uninstall; +use GlpiPlugin\Carbon\UsageInfo; +use GlpiPlugin\Carbon\Zone; use Location as GlpiLocation; +use Monitor as GlpiMonitor; +use MonitorType as GlpiMonitorType; +use NetworkEquipment as GlpiNetworkEquipment; +use NetworkEquipmentType as GlpiNetworkEquipmentType; use Profile as GlpiProfile; use Toolbox as GlpiToolbox; @@ -63,7 +68,7 @@ * -p version : specifi the version to begin a forced upgrade * -p reset-report-dashboard : delete then recreate the dashboard of the reporting page * - * @return boolean + * @return bool */ function plugin_carbon_install(array $args = []): bool { @@ -80,10 +85,19 @@ function plugin_carbon_install(array $args = []): bool // do not output messages ob_start(); } - if ($version === '0.0.0') { - $success = $install->install($args); - } else { - $success = $install->upgrade($version, $args); + try { + if ($version === '0.0.0') { + $success = $install->install($args); + } else { + $success = $install->upgrade($version, $args); + } + } catch (RuntimeException $e) { + if (isCommandLine()) { + throw $e; + } + $error_footer = '
' . __('Please check the logs for more details. Fill an issue in the repository of the plugin.', 'carbon'); + Session::addMessageAfterRedirect($e->getMessage() . $error_footer, false, ERROR); + $success = false; } if ($silent) { @@ -96,7 +110,7 @@ function plugin_carbon_install(array $args = []): bool /** * Plugin uninstall process * - * @return boolean + * @return bool */ function plugin_carbon_uninstall(): bool { @@ -107,7 +121,7 @@ function plugin_carbon_uninstall(): bool $uninstall = new Uninstall(); try { $uninstall->uninstall(); - } catch (\Exception $e) { + } catch (Exception $e) { $backtrace = GlpiToolbox::backtrace(''); trigger_error($e->getMessage() . PHP_EOL . $backtrace, E_USER_WARNING); return false; @@ -120,7 +134,7 @@ function plugin_carbon_getDropdown() { return [ ComputerUsageProfile::class => ComputerUsageProfile::getTypeName(), - CarbonIntensitySource::class => CarbonIntensitySource::getTypeName(), + Source::class => Source::getTypeName(), Zone::class => Zone::getTypeName(), CarbonIntensity::class => CarbonIntensity::getTypeName(), ]; @@ -136,6 +150,7 @@ function plugin_carbon_postShowTab(array $param) return; } + /** @var class-string $history_class */ $history_class = 'GlpiPlugin\\Carbon\\Impact\\History\\' . $asset_itemtype; $history_class::showHistorizableDiagnosis($param['item']); UsageInfo::showCharts($param['item']); @@ -144,7 +159,8 @@ function plugin_carbon_postShowTab(array $param) /** * Add search options to core itemtypes * - * @param string $itemtype +* @template T of CommonDBTM +* @param class-string $itemtype * @return array */ function plugin_carbon_getAddSearchOptionsNew($itemtype): array @@ -153,25 +169,11 @@ function plugin_carbon_getAddSearchOptionsNew($itemtype): array } /** - * Callback before showing save / update button on an item form + * Callback when an object is added into the database * - * @param array $params 'item' => CommonDBTM - * 'options => array + * @param CommonDBTM $item item being added * @return void */ -function plugin_carbon_postItemForm(array $params) -{ - switch ($params['item']->getType()) { - case GlpiLocation::class: - $location = new Location(); - $location->getFromDBByCrit([ - GlpiLocation::getForeignKeyField() => $params['item']->getID(), - ]); - $location->showForm($location->getID()); - break; - } -} - function plugin_carbon_hook_add_asset(CommonDBTM $item) { if (!in_array($item::getType(), PLUGIN_CARBON_TYPES)) { @@ -184,43 +186,51 @@ function plugin_carbon_hook_add_asset(CommonDBTM $item) if (GlpiLocation::isNewID($item->fields[$location_fk])) { return; } - $zone = Zone::getByAsset($item); - if ($zone === null) { - return; - } - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone->getFromDBByCrit([ - $zone->getForeignKeyField() => $zone->fields['id'], - CarbonIntensitySource::getForeignKeyField() => $zone->fields['plugin_carbon_carbonintensitysources_id_historical'], - ]); - if ($source_zone->isNewItem()) { + + $source_zone = new Source_Zone(); + if ($source_zone->getFromDbByItem($item) === false) { return; } $source_zone->toggleZone(true); } +/** + * Callback when an item is being updated in the database + * + * @param CommonDBTM $item item being updated + * @return void + */ function plugin_carbon_hook_update_asset(CommonDBTM $item) { if (!in_array($item::getType(), PLUGIN_CARBON_TYPES)) { return; } - $location_fk = GlpiLocation::getForeignKeyField(); - if (!in_array($location_fk, $item->updates)) { - return; - } - if (GlpiLocation::isNewID($item->fields[$location_fk])) { - return; - } - $zone = Zone::getByAsset($item); - if ($zone === null) { - return; - } - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone->getFromDBByCrit([ - $zone->getForeignKeyField() => $zone->fields['id'], - CarbonIntensitySource::getForeignKeyField() => $zone->fields['plugin_carbon_carbonintensitysources_id_historical'], - ]); - if ($source_zone->isNewItem()) { + + $item_table = $item::getTable(); + $location_table = getTableForItemType(Location::class); + $source_zone_table = getTableForItemType(Source_Zone::class); + $request = [ + 'INNER JOIN' => [ + $location_table => [ + 'ON' => [ + $source_zone_table => 'id', + $location_table => 'plugin_carbon_sources_zones_id', + ], + ], + $item_table => [ + 'ON' => [ + $item_table => 'locations_id', + $location_table => 'locations_id', + ], + ], + ], + 'WHERE' => [ + $item::getTableField('id') => $item->getID(), + ], + ]; + + $source_zone = new Source_Zone(); + if (!$source_zone->getFromDBByRequest($request)) { return; } $source_zone->toggleZone(true); @@ -243,19 +253,19 @@ function plugin_carbon_hook_pre_purge_asset(CommonDBTM $item) $carbon_emission = new CarbonEmission(); $carbon_emission->deleteByCriteria([ 'itemtype' => $itemtype, - 'items_id' => $item_id + 'items_id' => $item_id, ]); $embodied_impact = new EmbodiedImpact(); $embodied_impact->deleteByCriteria([ 'itemtype' => $itemtype, - 'items_id' => $item_id + 'items_id' => $item_id, ]); $usage_info = new UsageInfo(); $usage_info->deleteByCriteria([ 'itemtype' => $itemtype, - 'items_id' => $item_id + 'items_id' => $item_id, ]); } @@ -288,9 +298,15 @@ function plugin_carbon_hook_pre_purge_assettype(CommonDBTM $item) function plugin_carbon_MassiveActions($itemtype) { switch ($itemtype) { - case Computer::class: + case GlpiComputer::class: return [ ComputerUsageProfile::class . MassiveAction::CLASS_ACTION_SEPARATOR . 'MassAssociateItems' => __('Associate to an usage profile', 'carbon'), + CommonAsset::class . MassiveAction::CLASS_ACTION_SEPARATOR . 'MassDeleteAllImpacts' => __('Delete all calculated environmental impacts', 'carbon'), + ]; + case GlpiMonitor::class: + case GlpiNetworkEquipment::class: + return [ + CommonAsset::class . MassiveAction::CLASS_ACTION_SEPARATOR . 'MassDeleteAllImpacts' => __('Delete all calculated environmental impacts', 'carbon'), ]; case GlpiComputerType::class: return [ @@ -308,6 +324,7 @@ function plugin_carbon_MassiveActions($itemtype) case GlpiLocation::class: return [ Location::class . MassiveAction::CLASS_ACTION_SEPARATOR . 'MassUpdateBoaviztaZone' => __('Update zone for Boavizta engine', 'carbon'), + Location::class . MassiveAction::CLASS_ACTION_SEPARATOR . 'MassUpdateCarbonIntensityFeed' => __('Update carbon intensity source and zone', 'carbon'), ]; } diff --git a/install/Install.php b/install/Install.php index 10b885f3..f1c46ed8 100644 --- a/install/Install.php +++ b/install/Install.php @@ -35,10 +35,9 @@ use Config; use DBmysql; use DirectoryIterator; -use Glpi\Message\MessageType; -use Glpi\Toolbox\Sanitizer; use Migration; use Plugin; +use RuntimeException; class Install { @@ -52,7 +51,7 @@ class Install /** * Force upgrade from the previous version to the currrent one * - * @var boolean + * @var bool */ private bool $force_upgrade = false; @@ -99,7 +98,7 @@ public static function detectVersion(): string * Fresh install of the plugin * * @param array $args - * @return boolean + * @return bool */ public function install(array $args = []): bool { @@ -107,11 +106,18 @@ public function install(array $args = []): bool global $DB; $dbFile = plugin_carbon_getSchemaPath(); - if ($dbFile === null || !$DB->runFile($dbFile)) { + if ($dbFile === null) { $this->migration->addWarningMessage("Error creating tables : " . $DB->error()); return false; } + try { + $DB->runFile($dbFile); + } catch (RuntimeException $e) { + $this->migration->addWarningMessage("Error creating tables : " . $e->getMessage()); + return false; + } + // Execute all install sub tasks $install_dir = __DIR__ . '/install/'; $update_scripts = scandir($install_dir); @@ -139,6 +145,21 @@ public function upgrade(string $from_version, array $args = []): bool { $oldest_upgradable_version = self::OLDEST_UPGRADABLE_VERSION; + $db_version = Config::getConfigurationValue('plugin:carbon', 'dbversion'); + $matches = []; + preg_match('/^(\d+\.\d+\.\d+)/', PLUGIN_CARBON_VERSION, $matches); + $current_version = $matches[1]; + if (version_compare($db_version, $current_version) > 0) { + // database more recent than current version + $e = new RuntimeException(sprintf( + 'Database of the plugin %s is more recent than the installed version %s.', + $db_version, + $current_version + )); + trigger_error($e->getMessage(), E_USER_WARNING); + throw $e; + } + $this->force_upgrade = array_key_exists('force-upgrade', $args); if ($this->force_upgrade) { $this->force_upgrade_from_version = PLUGIN_CARBON_VERSION; @@ -147,19 +168,19 @@ public function upgrade(string $from_version, array $args = []): bool // Check the version os SEMVER compliant $regex = '!^' . self::SEMVER_REGEX . '$!'; if (preg_match($regex, $this->force_upgrade_from_version) !== 1) { - $e = new \RuntimeException('Invalid start version for upgrade.'); + $e = new RuntimeException('Invalid start version for upgrade.'); trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } if (version_compare($this->force_upgrade_from_version, $oldest_upgradable_version) < 0) { - $e = new \RuntimeException('Upgrade is not supported before ' . $this->force_upgrade_from_version . '.'); + $e = new RuntimeException('Upgrade is not supported before ' . $this->force_upgrade_from_version . '.'); trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } } } else { if (version_compare($from_version, $oldest_upgradable_version, 'lt')) { - $e = new \RuntimeException("Upgrade is not supported before $oldest_upgradable_version!"); + $e = new RuntimeException("Upgrade is not supported before $oldest_upgradable_version!"); trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } @@ -168,24 +189,17 @@ public function upgrade(string $from_version, array $args = []): bool ini_set("max_execution_time", "0"); $migrations = $this->getMigrationsToDo($from_version); foreach ($migrations as $file => $data) { - $function = $data['function']; - $target_version = $data['target_version']; - include_once($file); - if ($function($this->migration, $args)) { - // Set the version to the target one s it is complete - // May be useful if subsequent steps fail and need to run upgrade again, by not running already done steps - Config::setConfigurationValues('plugin:carbon', ['dbversion' => $target_version]); - } else { + if (!$this->upgradeOneVersion($file, $data, $args)) { return false; } } - // Cherry pick install sub tasts to run + // Cherry pick sub tasts to run from fresh install workflow // Useful to rewrite missing data in DB $install_dir = __DIR__ . '/install/'; $update_scripts = scandir($install_dir); $whitelist = [ - 'init_datasources.php' + 'init_datasources.php', ]; foreach ($update_scripts as $update_script) { if (!in_array($update_script, $whitelist)) { @@ -200,6 +214,21 @@ public function upgrade(string $from_version, array $args = []): bool return true; } + public function upgradeOneVersion(string $file, array $data, array $args = []): bool + { + $function = $data['function']; + $target_version = $data['target_version']; + include_once($file); + if ($function($this->migration, $args) === false) { + return false; + } + // Set the version to the target one s it is complete + // May be useful if subsequent steps fail and need to run upgrade again, by not running already done steps + Config::setConfigurationValues('plugin:carbon', ['dbversion' => $target_version]); + + return true; + } + /** * Get migrations that have to be ran. * @@ -207,7 +236,7 @@ public function upgrade(string $from_version, array $args = []): bool * * @return array */ - private function getMigrationsToDo(string $current_version): array + public function getMigrationsToDo(string $current_version): array { $pattern = '/^update_(?\d+\.\d+\.(?:\d+|x))_to_(?\d+\.\d+\.(?:\d+|x))\.php$/'; $plugin_directory = Plugin::getPhpDir('carbon') . '/install/migration'; @@ -243,25 +272,24 @@ private function getMigrationsToDo(string $current_version): array } /** - * Get or create a carbon intensity zone by name + * Get or create a carbon intensity source by name * * @param string $name Name of the zone - * @param int $is_fallback Is the zone a fallback zone (1) or not (0) + * @param int $fallback_level Is the zone a fallback zone (1) or not (0) + * @param int $is_carbon_intensity_source Does the source provide carbon intensity (1) or not (0) * @return int ID of the zone */ - public static function getOrCreateSource(string $name, int $is_fallback = 1): int + public static function getOrCreateSource(string $name, int $fallback_level = 1, int $is_carbon_intensity_source = 1): int { - $source = new CarbonIntensitySource(); - $source->getFromDBByCrit(['name' => $name]); + $source = new Source(); + $source->getOrCreate([ + 'fallback_level' => $fallback_level, + 'is_carbon_intensity_source' => $is_carbon_intensity_source, + ], [ + 'name' => $name, + ]); if ($source->isNewItem()) { - $source->add([ - 'name' => $name, - 'is_fallback' => $is_fallback, - ]); - /** @phpstan-ignore if.alwaysTrue */ - if ($source->isNewItem()) { - throw new \RuntimeException("Failed to create carbon intensity source '$name' in DB"); - } + throw new RuntimeException("Failed to create carbon intensity source '$name' in DB"); } return $source->getID(); } @@ -276,40 +304,46 @@ public static function getOrCreateSource(string $name, int $is_fallback = 1): in public static function getOrCreateZone(string $name, int $source_id): int { $zone = new Zone(); + $zone->getOrCreate([ + 'plugin_carbon_sources_id_historical' => $source_id, + ], [ + 'name' => $name, + ]); $zone->getFromDBByCrit(['name' => $name]); if ($zone->isNewItem()) { - $zone->add([ - 'name' => $name, - 'plugin_carbon_carbonintensitysources_id_historical' => $source_id, - ]); - /** @phpstan-ignore if.alwaysTrue */ - if ($zone->isNewItem()) { - throw new \RuntimeException("Failed to create zone '$name' in DB"); - } + throw new RuntimeException("Failed to create zone '$name' in DB"); } - return $zone->getID(); } /** * Link a carbon intensity source to a zone * - * @param int $source_id ID of the carbon intensity source - * @param int $zone_id ID of the zone - * @return int ID of the link + * @param int $source_id ID of the carbon intensity source + * @param int $zone_id ID of the zone + * @param string $code Identifier of the zone used by the source + * @return int ID of the link */ - public static function linkSourceZone(int $source_id, int $zone_id): int + public static function linkSourceZone(int $source_id, int $zone_id, string $code = ''): int { - $source_zone = new CarbonIntensitySource_Zone(); + $source_zone = new Source_Zone(); $source_zone->getFromDBByCrit([ - 'plugin_carbon_carbonintensitysources_id' => $source_id, - 'plugin_carbon_zones_id' => $zone_id, + 'plugin_carbon_sources_id' => $source_id, + 'plugin_carbon_zones_id' => $zone_id, ]); if ($source_zone->isNewItem()) { $source_zone->add([ - 'plugin_carbon_carbonintensitysources_id' => $source_id, - 'plugin_carbon_zones_id' => $zone_id, + 'plugin_carbon_sources_id' => $source_id, + 'plugin_carbon_zones_id' => $zone_id, + 'code' => $code, ]); + } else { + if ($source_zone->fields['code'] !== $code) { + $source_zone->update([ + 'id' => $source_zone->getID(), + 'code' => $code, + ]); + } } return $source_zone->getID(); diff --git a/install/Uninstall.php b/install/Uninstall.php index f721784d..dc94d6d0 100644 --- a/install/Uninstall.php +++ b/install/Uninstall.php @@ -33,13 +33,12 @@ namespace GlpiPlugin\Carbon; use Config; +use CronTask as GlpiCronTask; use DBmysql; use DisplayPreference; -use Migration; -use ProfileRight; -use CronTask as GlpiCronTask; use Glpi\Dashboard\Dashboard; -use GlpiPlugin\Carbon\CronTask; +use ProfileRight; +use RuntimeException; class Uninstall { @@ -70,7 +69,7 @@ private function deleteConfig() { $config = new Config(); if (!$config->deleteByCriteria(['context' => 'plugin:carbon'])) { - throw new \RuntimeException('Error while deleting config'); + throw new RuntimeException('Error while deleting config'); } } @@ -82,7 +81,7 @@ private function deleteRights() 'name' => ['LIKE', 'carbon:%'], ]) ) { - throw new \RuntimeException('Error while deleting rights'); + throw new RuntimeException('Error while deleting rights'); } } @@ -104,7 +103,7 @@ private function deleteDisplayPrefs() { $displayPreference = new DisplayPreference(); if (!$displayPreference->deleteByCriteria(['itemtype' => CarbonIntensity::class])) { - throw new \RuntimeException('Error while deleting display preferences'); + throw new RuntimeException('Error while deleting display preferences'); } } diff --git a/install/data/carbon_intensity/carbon-intensity-electricity.txt b/install/data/carbon_intensity/carbon-intensity-electricity.txt new file mode 100644 index 00000000..a776620c --- /dev/null +++ b/install/data/carbon_intensity/carbon-intensity-electricity.txt @@ -0,0 +1,2 @@ +Data source: +https://ourworldindata.org/grapher/carbon-intensity-electricity \ No newline at end of file diff --git a/install/data/carbon_intensity/quebec.php b/install/data/carbon_intensity/quebec.php index 3eea9910..7206e312 100644 --- a/install/data/carbon_intensity/quebec.php +++ b/install/data/carbon_intensity/quebec.php @@ -38,5 +38,5 @@ // https://www.hydroquebec.com/data/developpement-durable/pdf/amelioration-precision-empreinte-carbone-electricite.pdf // year => intensity in gCo2eq/KWh return [ - 2017 => 34.5 + 2017 => 34.5, ]; diff --git a/install/data/report_dashboard.json b/install/data/report_dashboard.json index 0c561512..e7dbc573 100644 --- a/install/data/report_dashboard.json +++ b/install/data/report_dashboard.json @@ -77,27 +77,27 @@ "point_labels": "0" } }, - "plugin_carbon_report_embodied_abiotic_depletion": { + "plugin_carbon_report_embodied_adp_impact": { "x": 5, "y": 3, "width": 5, "height": 3, "card_options": { "color": "#ffd966", - "widgettype": "embodied_abiotic_depletion", + "widgettype": "impact_criteria_number", "use_gradient": "0", "point_labels": "0", "limit": "7" } }, - "plugin_carbon_report_embodied_global_warming": { + "plugin_carbon_report_embodied_gwp_impact": { "x": 10, "y": 0, "width": 5, "height": 3, "card_options": { "color": "#7a941e", - "widgettype": "embodied_global_warming", + "widgettype": "impact_criteria_number", "use_gradient": "0", "point_labels": "0", "limit": "7" @@ -110,20 +110,20 @@ "height": 3, "card_options": { "color": "#326319", - "widgettype": "embodied_primary_energy", + "widgettype": "impact_criteria_number", "use_gradient": "0", "point_labels": "0", "limit": "7" } }, - "plugin_carbon_report_usage_abiotic_depletion": { + "plugin_carbon_report_usage_adp_impact": { "x": 10, "y": 3, "width": 5, "height": 3, "card_options": { "color": "#fccd3e", - "widgettype": "usage_abiotic_depletion", + "widgettype": "impact_criteria_number", "use_gradient": "0", "point_labels": "0", "limit": "7" diff --git a/install/install/create_automatic_actions.php b/install/install/create_automatic_actions.php index b755488e..edef8bb2 100644 --- a/install/install/create_automatic_actions.php +++ b/install/install/create_automatic_actions.php @@ -30,10 +30,17 @@ * ------------------------------------------------------------------------- */ -use GlpiPlugin\Carbon\CronTask; use CronTask as GlpiCronTask; +use GlpiPlugin\Carbon\CronTask; +use GlpiPlugin\Carbon\DataSource\CronTaskProvider; + +$cron_task_classes = CronTaskProvider::getCronTaskTypes(); +$automatic_actions = []; +foreach ($cron_task_classes as $cron_task_class) { + $automatic_actions = array_merge($automatic_actions, $cron_task_class::enumerateTasks()); +} -$automatic_actions = [ +$automatic_actions = array_merge($automatic_actions, [ [ 'itemtype' => CronTask::class, 'name' => 'LocationCountryCode', @@ -44,7 +51,7 @@ 'logs_lifetime' => 30, 'comment' => __('Find the Alpha3 country code (ISO3166) of locations', 'carbon'), 'param' => 10, // Maximum rows to generate per execution - ] + ], ], [ 'itemtype' => CronTask::class, @@ -56,31 +63,7 @@ 'logs_lifetime' => 30, 'comment' => __('Compute carbon emissions of computers', 'carbon'), 'param' => 10000, // Maximum rows to generate per execution - ] - ], - [ - 'itemtype' => CronTask::class, - 'name' => 'DownloadRte', - 'frequency' => DAY_TIMESTAMP, - 'options' => [ - 'mode' => GlpiCronTask::MODE_EXTERNAL, - 'allowmode' => GlpiCronTask::MODE_INTERNAL + GlpiCronTask::MODE_EXTERNAL, - 'logs_lifetime' => 30, - 'comment' => __('Collect carbon intensities from RTE', 'carbon'), - 'param' => 10000, // Maximum rows to generate per execution - ] - ], - [ - 'itemtype' => CronTask::class, - 'name' => 'DownloadElectricityMap', - 'frequency' => DAY_TIMESTAMP / 2, // Twice a day - 'options' => [ - 'mode' => GlpiCronTask::MODE_EXTERNAL, - 'allowmode' => GlpiCronTask::MODE_INTERNAL + GlpiCronTask::MODE_EXTERNAL, - 'logs_lifetime' => 30, - 'comment' => __('Collect carbon intensities from ElectricityMap', 'carbon'), - 'param' => 10000, // Maximum rows to generate per execution - ] + ], ], [ 'itemtype' => CronTask::class, @@ -92,13 +75,17 @@ 'logs_lifetime' => 30, 'comment' => __('Compute embodied impact of assets', 'carbon'), 'param' => 10000, // Maximum rows to generate per execution - ] + ], ], -]; +]); foreach ($automatic_actions as $action) { $task = new GlpiCronTask(); - if ($task->getFromDBByCrit(['name' => $action['name']]) !== false) { + $crit = [ + 'itemtype' => $action['itemtype'], + 'name' => $action['name'], + ]; + if ($task->getFromDBByCrit($crit) !== false) { $task->delete(['id' => $task->getID()]); } $success = GlpiCronTask::Register( @@ -108,6 +95,6 @@ $action['options'] ); if (!$success) { - throw new \RuntimeException('Error while creating automatic action: ' . $action['name']); + throw new RuntimeException('Error while creating automatic action: ' . $action['name']); } } diff --git a/install/install/create_config.php b/install/install/create_config.php index ab2f3452..5725f302 100644 --- a/install/install/create_config.php +++ b/install/install/create_config.php @@ -37,7 +37,7 @@ $PLUGIN_HOOKS[Hooks::SECURED_CONFIGS]['carbon'] = [ 'electricitymap_api_key', - 'co2signal_api_key' + 'co2signal_api_key', ]; $current_config = Config::getConfigurationValues('plugin:carbon'); diff --git a/install/install/create_dashboard.php b/install/install/create_dashboard.php index 62afbdc6..b0cb70a8 100644 --- a/install/install/create_dashboard.php +++ b/install/install/create_dashboard.php @@ -83,7 +83,7 @@ 'width' => $w, 'height' => $h, 'card_options' => $card['card_options'], - ] + ], ]); } @@ -105,13 +105,13 @@ $profile_right_table => 'profiles_id', [ 'AND' => [ProfileRight::getTableField('name') => [Config::$rightname, Report::$rightname]], - ] - ] - ] + ], + ], + ], ], 'WHERE' => [ new QueryExpression($rights), - ] + ], ]); foreach ($iterator as $profile) { diff --git a/install/install/create_display_prefs.php b/install/install/create_display_prefs.php index d944ffb5..0838c2a0 100644 --- a/install/install/create_display_prefs.php +++ b/install/install/create_display_prefs.php @@ -31,8 +31,8 @@ */ use GlpiPlugin\Carbon\CarbonIntensity; -use GlpiPlugin\Carbon\Zone; use GlpiPlugin\Carbon\SearchOptions; +use GlpiPlugin\Carbon\Zone; include_once __DIR__ . '/../../src/SearchOptions.php'; @@ -51,7 +51,7 @@ 3, SearchOptions::HISTORICAL_DATA_SOURCE, SearchOptions::HISTORICAL_DATA_DL_ENABLED, - ] + ], ], [], true diff --git a/install/install/create_uasge_profiles.php b/install/install/create_uasge_profiles.php index a1248b00..e88cbfdb 100644 --- a/install/install/create_uasge_profiles.php +++ b/install/install/create_uasge_profiles.php @@ -39,8 +39,8 @@ $usage_profiles = [ [ 'name' => __('Always on', 'carbon'), - 'time_start' => '00:00:00', - 'time_stop' => '23:59:00', + 'time_start' => '00:00', + 'time_stop' => '23:59', 'day_1' => '1', 'day_2' => '1', 'day_3' => '1', @@ -50,8 +50,8 @@ 'day_7' => '1', ], [ 'name' => __('Office hours', 'carbon'), - 'time_start' => '09:00:00', - 'time_stop' => '18:00:00', + 'time_start' => '09:00', + 'time_stop' => '18:00', 'day_1' => '1', 'day_2' => '1', 'day_3' => '1', diff --git a/install/install/init_datasources.php b/install/install/init_datasources.php index 2614450b..9735468c 100644 --- a/install/install/init_datasources.php +++ b/install/install/init_datasources.php @@ -30,32 +30,44 @@ * ------------------------------------------------------------------------- */ +use GlpiPlugin\Carbon\CarbonIntensity; use GlpiPlugin\Carbon\Install; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; +use GlpiPlugin\Carbon\Zone; use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\StreamOutput; /** @var DBmysql $DB */ global $DB; +// This file is executed at the end of an upgrade. +// Upgrade to 1.2.0 changed the tables modified by this code +// then we need to reset DB columns cache +$DB->listFields(getTableForItemType(Source::class), false); +$DB->listFields(getTableForItemType(Source_Zone::class), false); +$DB->listFields(getTableForItemType(Zone::class), false); + $source_id = Install::getOrCreateSource('RTE', 0); $zone_id = Install::getOrCreateZone('France', $source_id); +Install::linkSourceZone($source_id, $zone_id); $source_id = Install::getOrCreateSource('ElectricityMap', 0); $dbUtil = new DbUtils(); -$table = $dbUtil->getTableForItemType(GlpiPlugin\Carbon\CarbonIntensity::class); +$table = $dbUtil->getTableForItemType(CarbonIntensity::class); -// Expected columns are Entity;Code; Year; Carbon intensity of electricity - gCO2/kWh +// Expected columns are Entity; Code; Year; Carbon intensity of electricity - gCO2/kWh $data_source = dirname(__DIR__) . '/data/carbon_intensity/carbon-intensity-electricity.csv'; // Create data source in DB -$source_id = Install::getOrCreateSource('Ember - Energy Institute', 1); +$source_id = Install::getOrCreateSource('Ember - Energy Institute', 2); try { $file = new SplFileObject($data_source, 'r'); -} catch (\RuntimeException $e) { +} catch (RuntimeException $e) { throw $e; -} catch (\LogicException $e) { +} catch (LogicException $e) { throw $e; } $file->seek(PHP_INT_MAX); // Go to the end of the file @@ -64,7 +76,7 @@ $file->setFlags(SplFileObject::READ_CSV); $progress_bar = null; if (isCommandLine()) { - $output = new ConsoleOutput(); + $output = new StreamOutput(fopen('php://stdout', 'w')); $output->writeln("Writing fallback carbon intensity data"); $progress_bar = new ProgressBar($output, $rows_count); } @@ -80,8 +92,8 @@ $entity = $line[0]; $code = $line[1]; - $year = (int)$line[2]; - $intensity = (float)$line[3]; + $year = (int) $line[2]; + $intensity = (float) $line[3]; // Skip if the code is empty if ($code === '') { @@ -89,21 +101,21 @@ } $zone_id = Install::getOrCreateZone($entity, $source_id); - Install::linkSourceZone($source_id, $zone_id); + Install::linkSourceZone($source_id, $zone_id, $code); // Insert into the database - $success = $DB->updateOrInsert($table, [ - 'intensity' => $intensity, - 'data_quality' => 2 // constant GlpiPlugin\Carbon\DataTracking::DATA_QUALITY_ESTIMATED - ], [ - 'date' => "$year-01-01 00:00:00", - 'plugin_carbon_carbonintensitysources_id' => $source_id, - 'plugin_carbon_zones_id' => $zone_id - ]); - - if ($success === false) { + try { + $DB->updateOrInsert($table, [ + 'intensity' => $intensity, + 'data_quality' => 2, // constant GlpiPlugin\Carbon\DataTracking::DATA_QUALITY_ESTIMATED + ], [ + 'date' => "$year-01-01 00:00:00", + 'plugin_carbon_sources_id' => $source_id, + 'plugin_carbon_zones_id' => $zone_id, + ]); + } catch (RuntimeException $e) { $file = null; // close the file - throw new \RuntimeException("Failed to insert data for year $year"); + throw new RuntimeException("Failed to insert data for year $year; reason: " . $e->getMessage(), $e->getCode(), $e); } } if ($progress_bar) { @@ -111,23 +123,23 @@ } $file = null; // close the file -$source_id = Install::getOrCreateSource('Hydro Quebec'); +$source_id = Install::getOrCreateSource('Hydro Quebec', 1, 0); $zone_id_quebec = Install::getOrCreateZone('Quebec', $source_id); Install::linkSourceZone($source_id, $zone_id_quebec); $quebec_carbon_intensity = include(dirname(__DIR__) . '/data/carbon_intensity/quebec.php'); foreach ($quebec_carbon_intensity as $year => $intensity) { - $success = $DB->updateOrInsert($table, [ - 'intensity' => $intensity, - 'data_quality' => 2 // constant GlpiPlugin\Carbon\DataTracking::DATA_QUALITY_ESTIMATED - ], [ - 'date' => "$year-01-01 00:00:00", - 'plugin_carbon_carbonintensitysources_id' => $source_id, - 'plugin_carbon_zones_id' => $zone_id_quebec, - ]); - - if ($success === false) { + try { + $DB->updateOrInsert($table, [ + 'intensity' => $intensity, + 'data_quality' => 2, // constant GlpiPlugin\Carbon\DataTracking::DATA_QUALITY_ESTIMATED + ], [ + 'date' => "$year-01-01 00:00:00", + 'plugin_carbon_sources_id' => $source_id, + 'plugin_carbon_zones_id' => $zone_id_quebec, + ]); + } catch (RuntimeException $e) { $file = null; // close the file - throw new \RuntimeException("Failed to insert data for year $year"); + throw new RuntimeException("Failed to insert data for year $year; reason: " . $e->getMessage(), $e->getCode(), $e); } } diff --git a/install/migration/update_1.0.0_to_1.0.1.php b/install/migration/update_1.0.0_to_1.0.1.php index 975bf076..ba4ba692 100644 --- a/install/migration/update_1.0.0_to_1.0.1.php +++ b/install/migration/update_1.0.0_to_1.0.1.php @@ -57,10 +57,16 @@ function update100to101(Migration $migration) } $dbFile = plugin_carbon_getSchemaPath($to_version); - if ($dbFile === null || !$DB->runFile($dbFile)) { + if ($dbFile === null) { $migration->addWarningMessage("Error creating tables : " . $DB->error()); $updateresult = false; } + try { + $DB->runFile($dbFile); + } catch (RuntimeException $e) { + $migration->addWarningMessage("Error creating tables : " . $e->getMessage()); + $updateresult = false; + } // ************ Keep it at the end ************** $migration->executeMigration(); diff --git a/install/migration/update_1.0.0_to_1.0.1/01_fix_source_zone_quebec.php b/install/migration/update_1.0.0_to_1.0.1/01_fix_source_zone_quebec.php index b07b8b0f..2d30ab58 100644 --- a/install/migration/update_1.0.0_to_1.0.1/01_fix_source_zone_quebec.php +++ b/install/migration/update_1.0.0_to_1.0.1/01_fix_source_zone_quebec.php @@ -31,10 +31,6 @@ */ use Glpi\DBAL\QuerySubQuery; -use GlpiPlugin\Carbon\CarbonEmission; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; -use GlpiPlugin\Carbon\Zone; /** @var DBmysql $DB */ global $DB; @@ -42,18 +38,18 @@ $db_utils = new DbUtils(); // Update and fix the bad relation -$source_table = $db_utils->getTableForItemType(CarbonIntensitySource::class); -$zone_table = $db_utils->getTableForItemType(Zone::class); -$source_zone_table = $db_utils->getTableForItemType(CarbonIntensitySource_Zone::class); +$source_table = 'glpi_plugin_carbon_carbonintensitysources'; +$zone_table = 'glpi_plugin_carbon_zones'; +$source_zone_table = 'glpi_plugin_carbon_carbonintensitysources_zones'; $source_iterator = $DB->request([ 'SELECT' => 'id', 'FROM' => $source_table, - 'WHERE' => ['name' => 'Hydro Quebec'] + 'WHERE' => ['name' => 'Hydro Quebec'], ]); $zone_iterator = $DB->request([ 'SELECT' => 'id', 'FROM' => $zone_table, - 'WHERE' => ['name' => 'Quebec'] + 'WHERE' => ['name' => 'Quebec'], ]); if ($source_iterator->count() && $zone_iterator->count()) { $DB->update($source_zone_table, [ @@ -67,10 +63,10 @@ $itemtypes = [ Computer::class, Monitor::class, - NetworkEquipment::class + NetworkEquipment::class, ]; -$carbon_emission_table = $db_utils->getTableForItemType(CarbonEmission::class); +$carbon_emission_table = 'glpi_plugin_carbon_carbonemissions'; $location_table = $db_utils->getTableForItemType(Location::class); foreach ($itemtypes as $itemtype) { $item_table = $db_utils->getTableForItemType($itemtype); @@ -81,20 +77,20 @@ $location_table => [ 'FKEY' => [ $location_table => 'id', - $item_table => 'locations_id' - ] - ] + $item_table => 'locations_id', + ], + ], ], 'WHERE' => [ Location::getTableField('state') => 'Quebec', - ] + ], ]; $subquery = new QuerySubQuery($request); $DB->delete( $carbon_emission_table, [ 'itemtype' => $itemtype, - 'items_id' => $subquery + 'items_id' => $subquery, ] ); } diff --git a/install/migration/update_1.0.1_to_1.1.0.php b/install/migration/update_1.0.1_to_1.1.0.php new file mode 100644 index 00000000..19714136 --- /dev/null +++ b/install/migration/update_1.0.1_to_1.1.0.php @@ -0,0 +1,76 @@ +. + * + * ------------------------------------------------------------------------- + */ + +function update101to110(Migration $migration) +{ + /** @var DBmysql $DB */ + global $DB; + + $updateresult = true; + $from_version = '1.0.1'; + $to_version = '1.1.0'; + $update_dir = __DIR__ . "/update_{$from_version}_to_{$to_version}/"; + + //TRANS: %s is the number of new version + $migration->addInfoMessage(sprintf(__('Update to %s'), $to_version)); + $migration->setVersion($to_version); + + // New tables from enpty.sql file after the migration + // If a script requires a new table, it may create it by itself + + $update_scripts = scandir($update_dir); + natcasesort($update_scripts); + foreach ($update_scripts as $update_script) { + if (preg_match('/\.php$/', $update_script) !== 1) { + continue; + } + require $update_dir . $update_script; + } + + $dbFile = plugin_carbon_getSchemaPath($to_version); + if ($dbFile === null) { + $migration->addWarningMessage("Error creating tables : " . $DB->error()); + $updateresult = false; + } + try { + $DB->runFile($dbFile); + } catch (RuntimeException $e) { + $migration->addWarningMessage("Error creating tables : " . $e->getMessage()); + $updateresult = false; + } + + + // ************ Keep it at the end ************** + $migration->executeMigration(); + + return $updateresult; +} diff --git a/install/migration/update_1.0.1_to_1.1.0/01_usage_profile_time_format.php b/install/migration/update_1.0.1_to_1.1.0/01_usage_profile_time_format.php new file mode 100644 index 00000000..eac5cc06 --- /dev/null +++ b/install/migration/update_1.0.1_to_1.1.0/01_usage_profile_time_format.php @@ -0,0 +1,63 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var DBmysql $DB */ +global $DB; + +// Time selector in GLPI 11 sets H:m without s (seconds) +// We need to drop seconds from times saved in DB in version 1.0.x for GLPI 10 +$table = 'glpi_plugin_carbon_computerusageprofiles'; +$iterator = $DB->request([ + 'SELECT' => ['id', 'time_start', 'time_stop'], + 'FROM' => $table, +]); +foreach ($iterator as $row) { + $split_start = explode(':', $row['time_start']); + $split_stop = explode(':', $row['time_stop']); + $update = false; + if (count($split_start) > 2) { + array_splice($split_start, 2); + $update = true; + } + if (count($split_stop) > 2) { + array_splice($split_stop, 2); + $update = true; + } + if ($update) { + $DB->update($table, [ + 'time_start' => implode(':', $split_start), + 'time_stop' => implode(':', $split_stop), + ], [ + 'id' => $row['id'], + ]); + } +} diff --git a/install/migration/update_1.1.1_to_1.2.0.php b/install/migration/update_1.1.1_to_1.2.0.php new file mode 100644 index 00000000..fd3d0e80 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0.php @@ -0,0 +1,76 @@ +. + * + * ------------------------------------------------------------------------- + */ + +function update111to120(Migration $migration) +{ + /** @var DBmysql $DB */ + global $DB; + + $updateresult = true; + $from_version = '1.1.1'; + $to_version = '1.2.0'; + $update_dir = __DIR__ . "/update_{$from_version}_to_{$to_version}/"; + + //TRANS: %s is the number of new version + $migration->addInfoMessage(sprintf(__('Update to %s'), $to_version)); + $migration->setVersion($to_version); + + // New tables from enpty.sql file after the migration + // If a script requires a new table, it may create it by itself + + $update_scripts = scandir($update_dir); + natcasesort($update_scripts); + foreach ($update_scripts as $update_script) { + if (preg_match('/\.php$/', $update_script) !== 1) { + continue; + } + require $update_dir . $update_script; + } + + $dbFile = plugin_carbon_getSchemaPath($to_version); + if ($dbFile === null) { + $migration->addWarningMessage("Error creating tables : " . $DB->error()); + $updateresult = false; + } + try { + $DB->runFile($dbFile); + } catch (RuntimeException $e) { + $migration->addWarningMessage("Error creating tables : " . $e->getMessage()); + $updateresult = false; + } + + + // ************ Keep it at the end ************** + $migration->executeMigration(); + + return $updateresult; +} diff --git a/install/migration/update_1.1.1_to_1.2.0/01_rename_carbonintensitysource.php b/install/migration/update_1.1.1_to_1.2.0/01_rename_carbonintensitysource.php new file mode 100644 index 00000000..32780147 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/01_rename_carbonintensitysource.php @@ -0,0 +1,59 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var DBmysql $DB */ +/** @var Migration $migration */ + +// Rename CarbonIntensitySource +// Move data to new table +$old_table = 'glpi_plugin_carbon_carbonintensitysources'; +$new_table = 'glpi_plugin_carbon_sources'; +$migration->renameTable($old_table, $new_table); + +// Rename CarbonIntensitySource_Zone +$old_table = 'glpi_plugin_carbon_carbonintensitysources_zones'; +$new_table = 'glpi_plugin_carbon_sources_zones'; +$migration->renameTable($old_table, $new_table); + +$table = 'glpi_plugin_carbon_carbonintensities'; +$migration->changeField($table, 'plugin_carbon_carbonintensitysources_id', 'plugin_carbon_sources_id', 'fkey'); + +$table = 'glpi_plugin_carbon_sources_zones'; +$migration->changeField($table, 'plugin_carbon_carbonintensitysources_id', 'plugin_carbon_sources_id', 'fkey'); + +// Migrate tables now and clear cache to avoid issues in subsequent upgrade tasks +$migration->migrationOneTable('glpi_plugin_carbon_carbonintensities'); +$DB->listFields('glpi_plugin_carbon_carbonintensities', false); +$migration->migrationOneTable('glpi_plugin_carbon_sources_zones'); +$DB->listFields('glpi_plugin_carbon_sources_zones', false); +$migration->migrationOneTable('glpi_plugin_carbon_zones'); +$DB->listFields('glpi_plugin_carbon_zones', false); diff --git a/install/migration/update_1.1.1_to_1.2.0/01_usage_profile_time_format.php b/install/migration/update_1.1.1_to_1.2.0/01_usage_profile_time_format.php new file mode 100644 index 00000000..8aae0828 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/01_usage_profile_time_format.php @@ -0,0 +1,65 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var DBmysql $DB */ +global $DB; + +// Time selector in GLPI 11 sets H:m without s (seconds) +// We need to drop seconds from times saved in DB in version 1.0.x for GLPI 10 + +// This migtation update is repeated here as this format change has been detected on 2025/12 +$table = 'glpi_plugin_carbon_computerusageprofiles'; +$iterator = $DB->request([ + 'SELECT' => ['id', 'time_start', 'time_stop'], + 'FROM' => $table, +]); +foreach ($iterator as $row) { + $split_start = explode(':', $row['time_start']); + $split_stop = explode(':', $row['time_stop']); + $update = false; + if (count($split_start) > 2) { + array_splice($split_start, 2); + $update = true; + } + if (count($split_stop) > 2) { + array_splice($split_stop, 2); + $update = true; + } + if ($update) { + $DB->update($table, [ + 'time_start' => implode(':', $split_start), + 'time_stop' => implode(':', $split_stop), + ], [ + 'id' => $row['id'], + ]); + } +} diff --git a/install/migration/update_1.1.1_to_1.2.0/02_update_tables_schema.php b/install/migration/update_1.1.1_to_1.2.0/02_update_tables_schema.php new file mode 100644 index 00000000..3a69b09c --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/02_update_tables_schema.php @@ -0,0 +1,94 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var DBmysql $DB */ +/** @var Migration $migration */ + +$table = 'glpi_plugin_carbon_sources'; +$migration->addField( + $table, + 'is_carbon_intensity_source', + 'bool', + [ + 'after' => 'is_fallback', + 'update' => 1, + 'condition' => "WHERE `name` IN ('RTE', 'ElectricityMap', 'Ember - Energy Institute', 'Hydro Quebec')", + ] +); +$migration->changeField( + $table, + 'is_fallback', + 'fallback_level', + 'int' +); + +$table = 'glpi_plugin_carbon_locations'; +$migration->addField( + $table, + 'plugin_carbon_sources_zones_id', + 'fkey', + [ + 'after' => 'boavizta_zone', + ] +); +$migration->migrationOneTable($table); + +// Blacklist assets by type - to avoid computation of impacts +$table = 'glpi_plugin_carbon_computertypes'; +$migration->addField( + $table, + 'is_ignore', + 'bool', + [ + 'after' => 'category', + ] +); + +$table = 'glpi_plugin_carbon_monitortypes'; +$migration->addField( + $table, + 'is_ignore', + 'bool', + [ + 'after' => 'power_consumption', + ] +); + +$table = 'glpi_plugin_carbon_networkequipmenttypes'; +$migration->addField( + $table, + 'is_ignore', + 'bool', + [ + 'after' => 'power_consumption', + ] +); diff --git a/install/migration/update_1.1.1_to_1.2.0/03_RTE_zone.php b/install/migration/update_1.1.1_to_1.2.0/03_RTE_zone.php new file mode 100644 index 00000000..45d9b451 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/03_RTE_zone.php @@ -0,0 +1,42 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use GlpiPlugin\Carbon\Install; + +/** @var Migration $migration */ +/** @var DBmysql $DB */ + +// Force immediate migration of this table to let the subsequent code work +// with the up to date schema +$rte_source = Install::getOrCreateSource('RTE', 0, 1); +$france_zone = Install::getOrCreateZone('France', $rte_source); +Install::linkSourceZone($rte_source, $france_zone); diff --git a/install/migration/update_1.1.1_to_1.2.0/04_update_location_zone_relation.php b/install/migration/update_1.1.1_to_1.2.0/04_update_location_zone_relation.php new file mode 100644 index 00000000..9b78697f --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/04_update_location_zone_relation.php @@ -0,0 +1,127 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use Glpi\DBAL\QueryExpression; + +/** @var DBmysql $DB */ +global $DB; + +$zone_table = 'glpi_plugin_carbon_zones'; +if ($DB->fieldExists($zone_table, 'plugin_carbon_carbonintensitysources_id_historical', false)) { + // Migrate relations based on a country + $glpi_location_table = 'glpi_locations'; + $source_zone_table = 'glpi_plugin_carbon_sources_zones'; + $iterator = $DB->request([ + 'SELECT' => [ + $glpi_location_table . '.id as locations_id', + $zone_table . '.plugin_carbon_carbonintensitysources_id_historical', + $zone_table . '.id as plugin_carbon_zones_id', + $source_zone_table . '.id as plugin_carbon_sources_zones_id', + ], + 'FROM' => $glpi_location_table, + 'INNER JOIN' => [ + $zone_table => [ + 'FKEY' => [ + $zone_table => 'name', + $glpi_location_table => 'country', + ], + ], + $source_zone_table => [ + 'FKEY' => [ + $source_zone_table => 'plugin_carbon_zones_id', + $zone_table => 'id', + [ + 'AND' => [ + new QueryExpression('`' . $source_zone_table . '`.`plugin_carbon_sources_id` = `' . $zone_table . '`.`plugin_carbon_carbonintensitysources_id_historical`'), + ], + ], + ], + ], + ], + ]); + + $location_table = 'glpi_plugin_carbon_locations'; + /** @var Migration $migration */ + $migration->migrationOneTable($location_table); + foreach ($iterator as $row) { + $where = [ + 'locations_id' => $row['locations_id'], + ]; + $params = [ + 'plugin_carbon_sources_zones_id' => $row['plugin_carbon_sources_zones_id'], + ]; + $DB->updateOrInsert($location_table, $params, $where); + } + + // Migrate relations based on a state + $iterator = $DB->request([ + 'SELECT' => [ + $glpi_location_table . '.id as locations_id', + $zone_table . '.plugin_carbon_carbonintensitysources_id_historical', + $zone_table . '.id as plugin_carbon_zones_id', + $source_zone_table . '.id as plugin_carbon_sources_zones_id', + ], + 'FROM' => $glpi_location_table, + 'INNER JOIN' => [ + $zone_table => [ + 'FKEY' => [ + $zone_table => 'name', + $glpi_location_table => 'state', + ], + ], + $source_zone_table => [ + 'FKEY' => [ + $source_zone_table => 'plugin_carbon_zones_id', + $zone_table => 'id', + [ + 'AND' => [ + new QueryExpression('`' . $source_zone_table . '`.`plugin_carbon_sources_id` = `' . $zone_table . '`.`plugin_carbon_carbonintensitysources_id_historical`'), + ], + ], + ], + ], + ], + ]); + + foreach ($iterator as $row) { + $where = [ + 'locations_id' => $row['locations_id'], + ]; + $params = [ + 'plugin_carbon_sources_zones_id' => $row['plugin_carbon_sources_zones_id'], + ]; + $DB->updateOrInsert($location_table, $params, $where); + } +} + +/** @var Migration $migration */ +$migration->dropField($zone_table, 'plugin_carbon_carbonintensitysources_id_historical'); diff --git a/install/migration/update_1.1.1_to_1.2.0/05_update_fallback_levels.php b/install/migration/update_1.1.1_to_1.2.0/05_update_fallback_levels.php new file mode 100644 index 00000000..1f98f895 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/05_update_fallback_levels.php @@ -0,0 +1,46 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var DBmysql $DB */ +global $DB; + +$table = 'glpi_plugin_carbon_sources'; +$where = [ + 'name' => 'Ember - Energy Institute', +]; +$params = [ + 'fallback_level' => 2, + 'is_carbon_intensity_source' => 1, +]; +$raw_sql = $DB->buildUpdateOrInsert($table, $params, $where); +/** @var Migration $migration */ +$migration->addPostQuery($raw_sql, 'Failed to update fallback level of ' . $where['name'] . ' data source.'); diff --git a/install/migration/update_1.1.1_to_1.2.0/06_migrate_automatic_actions.php b/install/migration/update_1.1.1_to_1.2.0/06_migrate_automatic_actions.php new file mode 100644 index 00000000..b1a5ce72 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/06_migrate_automatic_actions.php @@ -0,0 +1,59 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use CronTask as GLPICronTask; + +$task = new GLPICronTask(); +$task->getFromDBByCrit([ + 'itemtype' => 'GlpiPlugin\\Carbon\\CronTask', + 'name' => 'DownloadRte', +]); +if (!$task->isNewItem()) { + $task->update([ + 'id' => $task->getID(), + 'itemtype' => 'GlpiPlugin\\Carbon\\DataSource\\CarbonIntensity\\Rte\\CronTask', + 'name' => 'DownloadRte', + ]); +} + +$task = new GLPICronTask(); +$task->getFromDBByCrit([ + 'itemtype' => 'GlpiPlugin\\Carbon\\CronTask', + 'name' => 'DownloadElectricityMap', +]); +if (!$task->isNewItem()) { + $task->update([ + 'id' => $task->getID(), + 'itemtype' => 'GlpiPlugin\\Carbon\\DataSource\\CarbonIntensity\\ElectricityMaps\\CronTask', + 'name' => 'DownloadElectricityMaps', + ]); +} diff --git a/install/migration/update_1.1.1_to_1.2.0/07_drop_planned_lifespan.php b/install/migration/update_1.1.1_to_1.2.0/07_drop_planned_lifespan.php new file mode 100644 index 00000000..bc8265d6 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/07_drop_planned_lifespan.php @@ -0,0 +1,35 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var Migration $migration */ +$table = 'glpi_plugin_carbon_usageinfos'; +$migration->dropField($table, 'planned_lifespan'); diff --git a/install/migration/update_1.1.1_to_1.2.0/09_add_impact_criterias.php b/install/migration/update_1.1.1_to_1.2.0/09_add_impact_criterias.php new file mode 100644 index 00000000..6b3d5a93 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/09_add_impact_criterias.php @@ -0,0 +1,225 @@ +. + * + * ------------------------------------------------------------------------- + */ + +/** @var DBmysql $DB */ +/** @var Migration $migration */ + +use Glpi\Dashboard\Item as DashboardItem; + +$new_criteria = [ + 'gwppb' => '(unit g CO2 eq) Biogenic climate change potential', + 'gwppf' => '(unit g CO2 eq) Fossil climate change potential', + 'gwpplu' => '(unit g CO2 eq) Land use change climate potential', + 'ir' => '(unit g U235 eq) Ionizing radiation potential', + 'lu' => '(unit m²a) Land use', + 'odp' => '(unit g CFC-11 eq) Ozone depletion potential', + 'pm' => '(unit cases) Fine particulate matter potential', + 'pocp' => '(unit g NMVOC eq) Photochemical ozone creation potential', + 'wu' => '(unit m³) Water use', + 'mips' => '(unit g) Material input per service unit', + 'adpe' => '(unit g Sb eq) Abiotic depletion potential (elements)', + 'adpf' => '(unit J) Abiotic depletion potential (fossil fuels)', + 'ap' => '(unit mol H+ eq) Acidification potential', + 'ctue' => '(unit CTUe) Freshwater ecotoxicity potential', + // ctuh_c => '(unit CTUh) Human toxicity - Carcinogenic effects', + // ctuh_nc => (unit CTUh) Human toxicity - non-carcinogenic effects', + 'epf' => '(unit g P eq) Freshwater eutrophication potential', + 'epm' => '(unit g N eq) Marine eutrophication potential', + 'ept' => '(unit mol N eq) Terrestrial eutrophication potential', +]; + +$tables = ['glpi_plugin_carbon_embodiedimpacts', 'glpi_plugin_carbon_usageimpacts']; +foreach ($tables as $table) { + $previous_criteria = 'pe'; + foreach ($new_criteria as $criteria => $comment) { + $migration->addField( + $table, + $criteria, + 'float DEFAULT \'0\'', + [ + 'comment' => $comment, + 'after' => $previous_criteria . '_quality', + ] + ); + $migration->addField( + $table, + $criteria . '_quality', + 'int unsigned NOT NULL DEFAULT \'0\'', + [ + 'comment' => 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + 'after' => $criteria, + ] + ); + $previous_criteria = $criteria; + } + + // Uniformize existing impact : make floats signed + $old_criteria = [ + 'gwp' => '(unit g CO2 eq) Global warming potential', + 'adp' => '(unit g Sb eq) Abiotic depletion potential', + 'pe' => '(unit J) Primary energy', + ]; + foreach ($old_criteria as $criteria => $comment) { + $migration->changeField($table, $criteria, $criteria, 'float DEFAULT \'0\'', [ + 'comment' => $comment, + ]); + } + + // Add a recalculate boolean + $migration->addField($table, 'recalculate', 'bool', [ + 'after' => 'date_mod', + 'update' => 1, + ]); +} + +// Rename cards for the report +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_report_embodied_global_warming', +]); +foreach ($rows as $row) { + $card_options = json_decode($row['card_options'], true); + if ($card_options['widgettype'] === 'embodied_global_warming') { + $card_options['widgettype'] = 'impact_criteria_number'; + } + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_report_embodied_gwp_impact', + 'card_options' => json_encode($card_options), + ]); +} + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_report_usage_abiotic_depletion', +]); +foreach ($rows as $row) { + $card_options = json_decode($row['card_options'], true); + if ($card_options['widgettype'] === 'usage_abiotic_depletion') { + $card_options['widgettype'] = 'impact_criteria_number'; + } + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_report_usage_adp_impact', + 'card_options' => json_encode($card_options), + ]); +} + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_report_embodied_abiotic_depletion', +]); +foreach ($rows as $row) { + $card_options = json_decode($row['card_options'], true); + if ($card_options['widgettype'] === 'embodied_abiotic_depletion') { + $card_options['widgettype'] = 'impact_criteria_number'; + } + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_report_embodied_adp_impact', + 'card_options' => json_encode($card_options), + ]); +} + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_report_embodied_pe_impact', +]); +foreach ($rows as $row) { + $card_options = json_decode($row['card_options'], true); + if ($card_options['widgettype'] === 'embodied_primary_energy') { + $card_options['widgettype'] = 'impact_criteria_number'; + } + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_report_embodied_pe_impact', + 'card_options' => json_encode($card_options), + ]); +} + +// Rename cards for the standard dashboard : usage indicators + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_total_usage_power', +]); +foreach ($rows as $row) { + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_usage_pe_impact', + ]); +} + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_total_usage_carbon_emission', +]); +foreach ($rows as $row) { + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_usage_gwp_impact', + ]); +} + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_total_usage_adp_impact', +]); +foreach ($rows as $row) { + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_usage_adp_impact', + ]); +} + +// Rename cards for the standard dashboard : Embodied + usage indicators +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_total_gwp_impact', +]); +foreach ($rows as $row) { + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_all_scopes_gwp_impact', + ]); +} + +$dashboard_item = new DashboardItem(); +$rows = $dashboard_item->find([ + 'card_id' => 'plugin_carbon_total_adp_impact', +]); +foreach ($rows as $row) { + $dashboard_item->update([ + 'id' => $row['id'], + 'card_id' => 'plugin_carbon_all_scopes_adp_impact', + ]); +} diff --git a/install/migration/update_1.1.1_to_1.2.0/10_update_display_preferences.php b/install/migration/update_1.1.1_to_1.2.0/10_update_display_preferences.php new file mode 100644 index 00000000..d9588f41 --- /dev/null +++ b/install/migration/update_1.1.1_to_1.2.0/10_update_display_preferences.php @@ -0,0 +1,138 @@ +. + * + * ------------------------------------------------------------------------- + */ + +use GlpiPlugin\Carbon\EmbodiedImpact; + +/** @var DBmysql $DB */ +/** @var Migration $migration */ + +$display_pref = new DisplayPreference(); + +$plugin_so_base = 128000; +$group_base = 1200; + +// +// EmbodiedImpact search options +// + +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 5, // Was GWP, now recalculate flag +]); +$id = $plugin_so_base + $group_base; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$id = $plugin_so_base + $group_base + 2; +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 6, // Was ADP, now recalculate flag +]); +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$id = $plugin_so_base + $group_base + 4; +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 7, // Was PE, now recalculate flag +]); +foreach ($rows as $row) { + $row['num'] = 1204; + $display_pref->update($row); +} + +// +// UsageImpact search options +// +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 128701, // usage GWP +]); +$id = $plugin_so_base + $group_base; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 128702, // usage GWP qiality +]); +$id = $plugin_so_base + $group_base + 1; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 128703, // usage ADP +]); +$id = $plugin_so_base + $group_base + 2; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 128704, // usage ADP qiality +]); +$id = $plugin_so_base + $group_base + 3; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 128705, // usage PE +]); +$id = $plugin_so_base + $group_base + 4; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} + +$rows = $display_pref->find([ + 'itemtype' => EmbodiedImpact::class, + 'num' => 128706, // usage PE qiality +]); +$id = $plugin_so_base + $group_base + 5; +foreach ($rows as $row) { + $row['num'] = $id; + $display_pref->update($row); +} diff --git a/install/migration/update_x.x.x_to_y.y.y.php b/install/migration/update_x.x.x_to_y.y.y.php index cb9599dc..3c5899ff 100644 --- a/install/migration/update_x.x.x_to_y.y.y.php +++ b/install/migration/update_x.x.x_to_y.y.y.php @@ -57,10 +57,17 @@ function update001to100(Migration $migration) } $dbFile = plugin_carbon_getSchemaPath($to_version); - if ($dbFile === null || !$DB->runFile($dbFile)) { + if ($dbFile === null) { $migration->addWarningMessage("Error creating tables : " . $DB->error()); $updateresult = false; } + try { + $DB->runFile($dbFile); + } catch (RuntimeException $e) { + $migration->addWarningMessage("Error creating tables : " . $e->getMessage()); + $updateresult = false; + } + // ************ Keep it at the end ************** $migration->executeMigration(); diff --git a/install/mysql/plugin_carbon_1.1.0_empty.sql b/install/mysql/plugin_carbon_1.1.0_empty.sql new file mode 100644 index 00000000..2758eee4 --- /dev/null +++ b/install/mysql/plugin_carbon_1.1.0_empty.sql @@ -0,0 +1,191 @@ +-- +-- ------------------------------------------------------------------------- +-- Carbon plugin for GLPI +-- +-- @copyright Copyright (C) 2024-2025 Teclib' and contributors. +-- @license https://www.gnu.org/licenses/gpl-3.0.txt GPLv3+ +-- @license MIT https://opensource.org/licenses/mit-license.php +-- @link https://github.com/pluginsGLPI/carbon +-- +-- ------------------------------------------------------------------------- +-- +-- LICENSE +-- +-- This file is part of Carbon plugin for GLPI. +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ------------------------------------------------------------------------- +-- + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonemissions` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `entities_id` int unsigned NOT NULL DEFAULT '0', + `types_id` int unsigned NOT NULL DEFAULT '0', + `models_id` int unsigned NOT NULL DEFAULT '0', + `locations_id` int unsigned NOT NULL DEFAULT '0', + `energy_per_day` float DEFAULT '0' COMMENT 'KWh', + `emission_per_day` float DEFAULT '0' COMMENT 'gCO2eq', + `date` timestamp NULL DEFAULT NULL, + `energy_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `emission_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`, `date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensities` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `date` timestamp NULL DEFAULT NULL, + `plugin_carbon_carbonintensitysources_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', + `intensity` float DEFAULT '0' COMMENT 'gCO2eq/KWh', + `data_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`date`, `plugin_carbon_carbonintensitysources_id`, `plugin_carbon_zones_id`), + INDEX `date` (`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_zones` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `entities_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_carbonintensitysources_id_historical` int unsigned NOT NULL DEFAULT '0' COMMENT 'Source to be used for historical calculation', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`name`), + INDEX `entities_id` (`entities_id`), + INDEX `plugin_carbon_carbonintensitysources_id_historical` (`plugin_carbon_carbonintensitysources_id_historical`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensitysources` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `is_fallback` tinyint NOT NULL DEFAULT '0' COMMENT 'Fallback source for carbon intensity', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensitysources_zones` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `plugin_carbon_carbonintensitysources_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', + `code` varchar(255) DEFAULT NULL COMMENT 'Zone identifier in the API of the source', + `is_download_enabled` tinyint NOT NULL DEFAULT '0' COMMENT 'Download enabled from the source for this zone', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`plugin_carbon_carbonintensitysources_id`, `plugin_carbon_zones_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computertypes` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `computertypes_id` int unsigned NOT NULL DEFAULT '0', + `power_consumption` int DEFAULT '0', + `category` int NOT NULL DEFAULT '0' COMMENT 'ComputerType::CATEGORY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`computertypes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computerusageprofiles` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `time_start` varchar(255) DEFAULT NULL, + `time_stop` varchar(255) DEFAULT NULL, + `day_1` tinyint NOT NULL DEFAULT '0', + `day_2` tinyint NOT NULL DEFAULT '0', + `day_3` tinyint NOT NULL DEFAULT '0', + `day_4` tinyint NOT NULL DEFAULT '0', + `day_5` tinyint NOT NULL DEFAULT '0', + `day_6` tinyint NOT NULL DEFAULT '0', + `day_7` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_embodiedimpacts` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `gwp` float unsigned DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` float unsigned DEFAULT '0' COMMENT '(unit gSbeq) Abiotic depletion potential', + `adp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` float unsigned DEFAULT '0' COMMENT '(unit J) Primary energy', + `pe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_environmentalimpacts` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `computers_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_computerusageprofiles_id` int unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`computers_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_monitortypes` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `monitortypes_id` int unsigned NOT NULL DEFAULT '0', + `power_consumption` int DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`monitortypes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_networkequipmenttypes` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `networkequipmenttypes_id` int unsigned NOT NULL DEFAULT '0', + `power_consumption` int DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`networkequipmenttypes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_locations` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `locations_id` int unsigned NOT NULL DEFAULT '0', + `boavizta_zone` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`locations_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_usageinfos` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_computerusageprofiles_id` int unsigned NOT NULL DEFAULT '0', + `planned_lifespan` int unsigned NOT NULL DEFAULT '0' COMMENT '(unit months)', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_usageimpacts` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `gwp` float unsigned DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` float unsigned DEFAULT '0' COMMENT '(unit gSbeq) Abiotic depletion potential', + `adp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` float unsigned DEFAULT '0' COMMENT '(unit J) Primary energy', + `pe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/install/mysql/plugin_carbon_1.1.1_empty.sql b/install/mysql/plugin_carbon_1.1.1_empty.sql new file mode 100644 index 00000000..2758eee4 --- /dev/null +++ b/install/mysql/plugin_carbon_1.1.1_empty.sql @@ -0,0 +1,191 @@ +-- +-- ------------------------------------------------------------------------- +-- Carbon plugin for GLPI +-- +-- @copyright Copyright (C) 2024-2025 Teclib' and contributors. +-- @license https://www.gnu.org/licenses/gpl-3.0.txt GPLv3+ +-- @license MIT https://opensource.org/licenses/mit-license.php +-- @link https://github.com/pluginsGLPI/carbon +-- +-- ------------------------------------------------------------------------- +-- +-- LICENSE +-- +-- This file is part of Carbon plugin for GLPI. +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ------------------------------------------------------------------------- +-- + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonemissions` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `entities_id` int unsigned NOT NULL DEFAULT '0', + `types_id` int unsigned NOT NULL DEFAULT '0', + `models_id` int unsigned NOT NULL DEFAULT '0', + `locations_id` int unsigned NOT NULL DEFAULT '0', + `energy_per_day` float DEFAULT '0' COMMENT 'KWh', + `emission_per_day` float DEFAULT '0' COMMENT 'gCO2eq', + `date` timestamp NULL DEFAULT NULL, + `energy_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `emission_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`, `date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensities` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `date` timestamp NULL DEFAULT NULL, + `plugin_carbon_carbonintensitysources_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', + `intensity` float DEFAULT '0' COMMENT 'gCO2eq/KWh', + `data_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`date`, `plugin_carbon_carbonintensitysources_id`, `plugin_carbon_zones_id`), + INDEX `date` (`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_zones` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `entities_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_carbonintensitysources_id_historical` int unsigned NOT NULL DEFAULT '0' COMMENT 'Source to be used for historical calculation', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`name`), + INDEX `entities_id` (`entities_id`), + INDEX `plugin_carbon_carbonintensitysources_id_historical` (`plugin_carbon_carbonintensitysources_id_historical`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensitysources` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `is_fallback` tinyint NOT NULL DEFAULT '0' COMMENT 'Fallback source for carbon intensity', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensitysources_zones` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `plugin_carbon_carbonintensitysources_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', + `code` varchar(255) DEFAULT NULL COMMENT 'Zone identifier in the API of the source', + `is_download_enabled` tinyint NOT NULL DEFAULT '0' COMMENT 'Download enabled from the source for this zone', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`plugin_carbon_carbonintensitysources_id`, `plugin_carbon_zones_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computertypes` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `computertypes_id` int unsigned NOT NULL DEFAULT '0', + `power_consumption` int DEFAULT '0', + `category` int NOT NULL DEFAULT '0' COMMENT 'ComputerType::CATEGORY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`computertypes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computerusageprofiles` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `time_start` varchar(255) DEFAULT NULL, + `time_stop` varchar(255) DEFAULT NULL, + `day_1` tinyint NOT NULL DEFAULT '0', + `day_2` tinyint NOT NULL DEFAULT '0', + `day_3` tinyint NOT NULL DEFAULT '0', + `day_4` tinyint NOT NULL DEFAULT '0', + `day_5` tinyint NOT NULL DEFAULT '0', + `day_6` tinyint NOT NULL DEFAULT '0', + `day_7` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_embodiedimpacts` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `gwp` float unsigned DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` float unsigned DEFAULT '0' COMMENT '(unit gSbeq) Abiotic depletion potential', + `adp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` float unsigned DEFAULT '0' COMMENT '(unit J) Primary energy', + `pe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_environmentalimpacts` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `computers_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_computerusageprofiles_id` int unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`computers_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_monitortypes` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `monitortypes_id` int unsigned NOT NULL DEFAULT '0', + `power_consumption` int DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`monitortypes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_networkequipmenttypes` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `networkequipmenttypes_id` int unsigned NOT NULL DEFAULT '0', + `power_consumption` int DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`networkequipmenttypes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_locations` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `locations_id` int unsigned NOT NULL DEFAULT '0', + `boavizta_zone` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`locations_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_usageinfos` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_computerusageprofiles_id` int unsigned NOT NULL DEFAULT '0', + `planned_lifespan` int unsigned NOT NULL DEFAULT '0' COMMENT '(unit months)', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_usageimpacts` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `itemtype` varchar(255) DEFAULT NULL, + `items_id` int unsigned NOT NULL DEFAULT '0', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `gwp` float unsigned DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` float unsigned DEFAULT '0' COMMENT '(unit gSbeq) Abiotic depletion potential', + `adp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` float unsigned DEFAULT '0' COMMENT '(unit J) Primary energy', + `pe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`itemtype`, `items_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/install/mysql/plugin_carbon_empty.sql b/install/mysql/plugin_carbon_empty.sql index 2758eee4..48a78f46 100644 --- a/install/mysql/plugin_carbon_empty.sql +++ b/install/mysql/plugin_carbon_empty.sql @@ -50,44 +50,110 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonemissions` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensities` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `date` timestamp NULL DEFAULT NULL, - `plugin_carbon_carbonintensitysources_id` int unsigned NOT NULL DEFAULT '0', - `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', - `intensity` float DEFAULT '0' COMMENT 'gCO2eq/KWh', - `data_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', - PRIMARY KEY (`id`), - UNIQUE KEY `unicity` (`date`, `plugin_carbon_carbonintensitysources_id`, `plugin_carbon_zones_id`), + `id` int unsigned NOT NULL AUTO_INCREMENT, + `date` timestamp NULL DEFAULT NULL, + `plugin_carbon_sources_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', + `intensity` float DEFAULT '0' COMMENT 'gCO2eq/KWh', + `data_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`date`, `plugin_carbon_sources_id`, `plugin_carbon_zones_id`), INDEX `date` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_zones` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `entities_id` int unsigned NOT NULL DEFAULT '0', - `plugin_carbon_carbonintensitysources_id_historical` int unsigned NOT NULL DEFAULT '0' COMMENT 'Source to be used for historical calculation', + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `entities_id` int unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`name`), - INDEX `entities_id` (`entities_id`), - INDEX `plugin_carbon_carbonintensitysources_id_historical` (`plugin_carbon_carbonintensitysources_id_historical`) + INDEX `entities_id` (`entities_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensitysources` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `is_fallback` tinyint NOT NULL DEFAULT '0' COMMENT 'Fallback source for carbon intensity', +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_sources` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `fallback_level` int NOT NULL DEFAULT '0' COMMENT 'Fallback source for carbon intensity', + `is_carbon_intensity_source` tinyint NOT NULL DEFAULT '0' COMMENT 'provides carbon intensity', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_carbonintensitysources_zones` ( +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_sources_zones` ( `id` int unsigned NOT NULL AUTO_INCREMENT, - `plugin_carbon_carbonintensitysources_id` int unsigned NOT NULL DEFAULT '0', + `plugin_carbon_sources_id` int unsigned NOT NULL DEFAULT '0', `plugin_carbon_zones_id` int unsigned NOT NULL DEFAULT '0', `code` varchar(255) DEFAULT NULL COMMENT 'Zone identifier in the API of the source', `is_download_enabled` tinyint NOT NULL DEFAULT '0' COMMENT 'Download enabled from the source for this zone', PRIMARY KEY (`id`), - UNIQUE KEY `unicity` (`plugin_carbon_carbonintensitysources_id`, `plugin_carbon_zones_id`) + UNIQUE KEY `unicity` (`plugin_carbon_sources_id`, `plugin_carbon_zones_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computermodels` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `computermodels_id` int unsigned NOT NULL DEFAULT '0', + `gwp` int DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` int DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential', + `adp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` int DEFAULT '0' COMMENT '(unit J) Primary energy consumption', + `pe_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pe_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppb` float DEFAULT '0' COMMENT '(unit g CO2 eq) Biogenic climate change potential', + `gwppb_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwppb_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppf` float DEFAULT '0' COMMENT '(unit g CO2 eq) Fossil climate change potential', + `gwppf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwppf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwpplu` float DEFAULT '0' COMMENT '(unit g CO2 eq) Land use change climate potential', + `gwpplu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwpplu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ir` float DEFAULT '0' COMMENT '(unit g U235 eq) Ionizing radiation potential', + `ir_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ir_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `lu` float DEFAULT '0' COMMENT '(unit m²a) Land use', + `lu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `lu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `odp` float DEFAULT '0' COMMENT '(unit g CFC-11 eq) Ozone depletion potential', + `odp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `odp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pm` float DEFAULT '0' COMMENT '(unit cases) Fine particulate matter potential', + `pm_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pm_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pocp` float DEFAULT '0' COMMENT '(unit g NMVOC eq) Photochemical ozone creation potential', + `pocp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pocp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `wu` float DEFAULT '0' COMMENT '(unit m³) Water use', + `wu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `wu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `mips` float DEFAULT '0' COMMENT '(unit g) Material input per service unit', + `mips_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `mips_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpe` float DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential (elements)', + `adpe_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adpe_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpf` float DEFAULT '0' COMMENT '(unit J) Abiotic depletion potential (fossil fuels)', + `adpf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adpf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ap` float DEFAULT '0' COMMENT '(unit mol H+ eq) Acidification potential', + `ap_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ap_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ctue` float DEFAULT '0' COMMENT '(unit CTUe) Freshwater ecotoxicity potential', + `ctue_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ctue_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epf` float DEFAULT '0' COMMENT '(unit g P eq) Freshwater eutrophication potential', + `epf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `epf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epm` float DEFAULT '0' COMMENT '(unit g N eq) Marine eutrophication potential', + `epm_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `epm_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ept` float DEFAULT '0' COMMENT '(unit mol N eq) Terrestrial eutrophication potential', + `ept_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ept_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`computermodels_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computertypes` ( @@ -95,6 +161,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computertypes` ( `computertypes_id` int unsigned NOT NULL DEFAULT '0', `power_consumption` int DEFAULT '0', `category` int NOT NULL DEFAULT '0' COMMENT 'ComputerType::CATEGORY_* constants', + `is_ignore` tinyint NOT NULL DEFAULT '0' COMMENT 'Ignored from calculations', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`computertypes_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -116,17 +183,52 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_computerusageprofiles` ( CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_embodiedimpacts` ( `id` int unsigned NOT NULL AUTO_INCREMENT, - `itemtype` varchar(255) DEFAULT NULL, + `itemtype` varchar(255) DEFAULT NULL, `items_id` int unsigned NOT NULL DEFAULT '0', - `engine` varchar(255) DEFAULT NULL, - `engine_version` varchar(255) DEFAULT NULL, - `date_mod` timestamp NULL DEFAULT NULL, - `gwp` float unsigned DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `recalculate` tinyint NOT NULL DEFAULT '0', + `gwp` float DEFAULT '0' COMMENT '(unit g CO2 eq) Global warming potential', `gwp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', - `adp` float unsigned DEFAULT '0' COMMENT '(unit gSbeq) Abiotic depletion potential', + `adp` float DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential', `adp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', - `pe` float unsigned DEFAULT '0' COMMENT '(unit J) Primary energy', + `pe` float DEFAULT '0' COMMENT '(unit J) Primary energy', `pe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppb` float DEFAULT '0' COMMENT '(unit g CO2 eq) Climate change - Contribution of biogenic emissions', + `gwppb_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppf` float DEFAULT '0' COMMENT '(unit g CO2 eq) Climate change - Contribution of fossil fuel emissions', + `gwppf_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwpplu` float DEFAULT '0' COMMENT '(unit g CO2 eq) Climate change - Contribution of emissions from land use change', + `gwpplu_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ir` float DEFAULT '0' COMMENT '(unit g U235 eq) Emissions of radionizing substances', + `ir_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `lu` float DEFAULT '0' COMMENT '(unit none) Land use', + `lu_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `odp` float DEFAULT '0' COMMENT '(unit g CFC-11 eq) Depletion of the ozone layer', + `odp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pm` float DEFAULT '0' COMMENT '(unit Disease occurrence) Fine particle emissions', + `pm_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pocp` float DEFAULT '0' COMMENT '(unit g NMVOC eq) Photochemical ozone formation', + `pocp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `wu` float DEFAULT '0' COMMENT '(unit M^3) Use of water resources', + `wu_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `mips` float DEFAULT '0' COMMENT '(unit g) Material input per unit of service', + `mips_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpe` float DEFAULT '0' COMMENT '(unit g SB eq) Use of mineral and metal resources', + `adpe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpf` float DEFAULT '0' COMMENT '(unit J) Use of fossil resources (including nuclear)', + `adpf_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ap` float DEFAULT '0' COMMENT '(unit mol H+ eq) Acidification', + `ap_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ctue` float DEFAULT '0' COMMENT '(unit CTUe) Freshwater ecotoxicity', + `ctue_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epf` float DEFAULT '0' COMMENT '(unit g P eq) Eutrophication of freshwater', + `epf_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epm` float DEFAULT '0' COMMENT '(unit g N eq) Eutrophication of marine waters', + `epm_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ept` float DEFAULT '0' COMMENT '(unit mol N eq) Terrestrial eutrophication', + `ept_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`itemtype`, `items_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -139,26 +241,163 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_environmentalimpacts` ( UNIQUE KEY `unicity` (`computers_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_monitormodels` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `monitormodels_id` int unsigned NOT NULL DEFAULT '0', + `gwp` int DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` int DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential', + `adp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` int DEFAULT '0' COMMENT '(unit J) Primary energy consumption', + `pe_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pe_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppb` float DEFAULT '0' COMMENT '(unit g CO2 eq) Biogenic climate change potential', + `gwppb_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwppb_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppf` float DEFAULT '0' COMMENT '(unit g CO2 eq) Fossil climate change potential', + `gwppf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwppf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwpplu` float DEFAULT '0' COMMENT '(unit g CO2 eq) Land use change climate potential', + `gwpplu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwpplu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ir` float DEFAULT '0' COMMENT '(unit g U235 eq) Ionizing radiation potential', + `ir_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ir_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `lu` float DEFAULT '0' COMMENT '(unit m²a) Land use', + `lu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `lu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `odp` float DEFAULT '0' COMMENT '(unit g CFC-11 eq) Ozone depletion potential', + `odp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `odp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pm` float DEFAULT '0' COMMENT '(unit cases) Fine particulate matter potential', + `pm_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pm_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pocp` float DEFAULT '0' COMMENT '(unit g NMVOC eq) Photochemical ozone creation potential', + `pocp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pocp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `wu` float DEFAULT '0' COMMENT '(unit m³) Water use', + `wu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `wu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `mips` float DEFAULT '0' COMMENT '(unit g) Material input per service unit', + `mips_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `mips_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpe` float DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential (elements)', + `adpe_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adpe_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpf` float DEFAULT '0' COMMENT '(unit J) Abiotic depletion potential (fossil fuels)', + `adpf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adpf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ap` float DEFAULT '0' COMMENT '(unit mol H+ eq) Acidification potential', + `ap_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ap_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ctue` float DEFAULT '0' COMMENT '(unit CTUe) Freshwater ecotoxicity potential', + `ctue_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ctue_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epf` float DEFAULT '0' COMMENT '(unit g P eq) Freshwater eutrophication potential', + `epf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `epf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epm` float DEFAULT '0' COMMENT '(unit g N eq) Marine eutrophication potential', + `epm_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `epm_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ept` float DEFAULT '0' COMMENT '(unit mol N eq) Terrestrial eutrophication potential', + `ept_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ept_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`monitormodels_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_monitortypes` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `monitortypes_id` int unsigned NOT NULL DEFAULT '0', `power_consumption` int DEFAULT '0', + `is_ignore` tinyint NOT NULL DEFAULT '0' COMMENT 'Ignored from calculations', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`monitortypes_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_networkequipmentmodels` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `networkequipmentmodels_id` int unsigned NOT NULL DEFAULT '0', + `gwp` int DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `gwp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adp` int DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential', + `adp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pe` int DEFAULT '0' COMMENT '(unit J) Primary energy consumption', + `pe_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pe_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppb` float DEFAULT '0' COMMENT '(unit g CO2 eq) Biogenic climate change potential', + `gwppb_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwppb_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppf` float DEFAULT '0' COMMENT '(unit g CO2 eq) Fossil climate change potential', + `gwppf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwppf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwpplu` float DEFAULT '0' COMMENT '(unit g CO2 eq) Land use change climate potential', + `gwpplu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `gwpplu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ir` float DEFAULT '0' COMMENT '(unit g U235 eq) Ionizing radiation potential', + `ir_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ir_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `lu` float DEFAULT '0' COMMENT '(unit m²a) Land use', + `lu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `lu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `odp` float DEFAULT '0' COMMENT '(unit g CFC-11 eq) Ozone depletion potential', + `odp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `odp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pm` float DEFAULT '0' COMMENT '(unit cases) Fine particulate matter potential', + `pm_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pm_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pocp` float DEFAULT '0' COMMENT '(unit g NMVOC eq) Photochemical ozone creation potential', + `pocp_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `pocp_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `wu` float DEFAULT '0' COMMENT '(unit m³) Water use', + `wu_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `wu_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `mips` float DEFAULT '0' COMMENT '(unit g) Material input per service unit', + `mips_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `mips_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpe` float DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential (elements)', + `adpe_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adpe_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpf` float DEFAULT '0' COMMENT '(unit J) Abiotic depletion potential (fossil fuels)', + `adpf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `adpf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ap` float DEFAULT '0' COMMENT '(unit mol H+ eq) Acidification potential', + `ap_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ap_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ctue` float DEFAULT '0' COMMENT '(unit CTUe) Freshwater ecotoxicity potential', + `ctue_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ctue_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epf` float DEFAULT '0' COMMENT '(unit g P eq) Freshwater eutrophication potential', + `epf_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `epf_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epm` float DEFAULT '0' COMMENT '(unit g N eq) Marine eutrophication potential', + `epm_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `epm_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ept` float DEFAULT '0' COMMENT '(unit mol N eq) Terrestrial eutrophication potential', + `ept_source` mediumtext DEFAULT NULL COMMENT 'any information to describe the source, URL preferred', + `ept_quality` int DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + PRIMARY KEY (`id`), + UNIQUE KEY `unicity` (`networkequipmentmodels_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_networkequipmenttypes` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `networkequipmenttypes_id` int unsigned NOT NULL DEFAULT '0', `power_consumption` int DEFAULT '0', + `is_ignore` tinyint NOT NULL DEFAULT '0' COMMENT 'Ignored from calculations', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`networkequipmenttypes_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_locations` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `locations_id` int unsigned NOT NULL DEFAULT '0', - `boavizta_zone` varchar(255) DEFAULT NULL, + `id` int unsigned NOT NULL AUTO_INCREMENT, + `locations_id` int unsigned NOT NULL DEFAULT '0', + `boavizta_zone` varchar(255) DEFAULT NULL, + `plugin_carbon_sources_zones_id` int unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`locations_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -168,24 +407,58 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_usageinfos` ( `itemtype` varchar(255) DEFAULT NULL, `items_id` int unsigned NOT NULL DEFAULT '0', `plugin_carbon_computerusageprofiles_id` int unsigned NOT NULL DEFAULT '0', - `planned_lifespan` int unsigned NOT NULL DEFAULT '0' COMMENT '(unit months)', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`itemtype`, `items_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `glpi_plugin_carbon_usageimpacts` ( `id` int unsigned NOT NULL AUTO_INCREMENT, - `itemtype` varchar(255) DEFAULT NULL, + `itemtype` varchar(255) DEFAULT NULL, `items_id` int unsigned NOT NULL DEFAULT '0', - `engine` varchar(255) DEFAULT NULL, - `engine_version` varchar(255) DEFAULT NULL, - `date_mod` timestamp NULL DEFAULT NULL, - `gwp` float unsigned DEFAULT '0' COMMENT '(unit gCO2eq) Global warming potential', + `engine` varchar(255) DEFAULT NULL, + `engine_version` varchar(255) DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + `recalculate` tinyint NOT NULL DEFAULT '0', + `gwp` float DEFAULT '0' COMMENT '(unit g CO2 eq) Global warming potential', `gwp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', - `adp` float unsigned DEFAULT '0' COMMENT '(unit gSbeq) Abiotic depletion potential', + `adp` float DEFAULT '0' COMMENT '(unit g Sb eq) Abiotic depletion potential', `adp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', - `pe` float unsigned DEFAULT '0' COMMENT '(unit J) Primary energy', + `pe` float DEFAULT '0' COMMENT '(unit J) Primary energy', `pe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppb` float DEFAULT '0' COMMENT '(unit g CO2 eq) Climate change - Contribution of biogenic emissions', + `gwppb_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwppf` float DEFAULT '0' COMMENT '(unit g CO2 eq) Climate change - Contribution of fossil fuel emissions', + `gwppf_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `gwpplu` float DEFAULT '0' COMMENT '(unit g CO2 eq) Climate change - Contribution of emissions from land use change', + `gwpplu_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ir` float DEFAULT '0' COMMENT '(unit g U235 eq) Emissions of radionizing substances', + `ir_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `lu` float DEFAULT '0' COMMENT '(unit none) Land use', + `lu_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `odp` float DEFAULT '0' COMMENT '(unit g CFC-11 eq) Depletion of the ozone layer', + `odp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pm` float DEFAULT '0' COMMENT '(unit Disease occurrence) Fine particle emissions', + `pm_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `pocp` float DEFAULT '0' COMMENT '(unit g NMVOC eq) Photochemical ozone formation', + `pocp_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `wu` float DEFAULT '0' COMMENT '(unit M^3) Use of water resources', + `wu_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `mips` float DEFAULT '0' COMMENT '(unit g) Material input per unit of service', + `mips_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpe` float DEFAULT '0' COMMENT '(unit g SB eq) Use of mineral and metal resources', + `adpe_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `adpf` float DEFAULT '0' COMMENT '(unit J) Use of fossil resources (including nuclear)', + `adpf_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ap` float DEFAULT '0' COMMENT '(unit mol H+ eq) Acidification', + `ap_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ctue` float DEFAULT '0' COMMENT '(unit CTUe) Freshwater ecotoxicity', + `ctue_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epf` float DEFAULT '0' COMMENT '(unit g P eq) Eutrophication of freshwater', + `epf_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `epm` float DEFAULT '0' COMMENT '(unit g N eq) Eutrophication of marine waters', + `epm_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', + `ept` float DEFAULT '0' COMMENT '(unit mol N eq) Terrestrial eutrophication', + `ept_quality` int unsigned NOT NULL DEFAULT '0' COMMENT 'DataTtacking\\AbstractTracked::DATA_QUALITY_* constants', PRIMARY KEY (`id`), UNIQUE KEY `unicity` (`itemtype`, `items_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/js/carbon.js b/js/carbon.js index 530bea44..ea8ad782 100644 --- a/js/carbon.js +++ b/js/carbon.js @@ -27,3 +27,17 @@ * * ------------------------------------------------------------------------- */ + +window.GLPIPlugin = window.GLPIPlugin || {}; + +window.GLPIPlugin.Carbon = { + onSourceChange: function() { + var value = document.querySelector("select[name='plugin_carbon_sources_id']").value; + var zoneDropdown = document.querySelector("select[name='plugin_carbon_zones_id']").closest('div.form-field'); + if (value == 0 && !zoneDropdown.classList.contains('d-none')) { + zoneDropdown.classList.add('d-none'); + } else if (value != 0 && zoneDropdown.classList.contains('d-none')) { + zoneDropdown.classList.remove('d-none'); + } + } +}; diff --git a/locales/carbon.pot b/locales/carbon.pot index 9212890a..0c2305a0 100644 --- a/locales/carbon.pot +++ b/locales/carbon.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-09-01 01:57+0000\n" +"POT-Creation-Date: 2026-04-16 02:56+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,12 +18,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 msgid "Start time" msgstr "" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 msgid "Stop time" msgstr "" @@ -31,10 +31,52 @@ msgstr "" msgid "Days of week where the computer usually runs" msgstr "" -#: templates/quick-report.html.twig front/report.php:54 +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "" + +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "" + +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "" +msgstr[1] "" + +#: templates/quick-report.html.twig front/report.php:55 msgid "GLPI Carbon" msgstr "" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "" +msgstr[1] "" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." +msgstr "" + #: templates/environmentalimpact-item.html.twig msgid "Usage" msgstr "" @@ -47,9 +89,11 @@ msgstr "" msgid "Calculate data" msgstr "" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "" +msgid_plural "Embodied impacts" +msgstr[0] "" +msgstr[1] "" #: templates/history/status-item.html.twig msgid "Historization status" @@ -83,67 +127,61 @@ msgid "Linked to a computer" msgstr "" #: templates/history/status-item.html.twig -msgid "Has a location" +msgid "Attached computer has a location" msgstr "" #: templates/history/status-item.html.twig -msgid "The location has a state or a country" +msgid "Has a location" msgstr "" #: templates/history/status-item.html.twig -msgid "The asset has a model" +msgid "The location has carbon intensity data" msgstr "" #: templates/history/status-item.html.twig -msgid "The model has a power consumption" +msgid "Real time carbon intensity enabled" msgstr "" #: templates/history/status-item.html.twig -msgid "The asset has a type" +msgid "The location has yearly carbon intensity data" msgstr "" #: templates/history/status-item.html.twig -msgid "The type has a power consumption" +msgid "The asset has a model" msgstr "" #: templates/history/status-item.html.twig -msgid "The asset has a category" +msgid "The model has a power consumption" msgstr "" #: templates/history/status-item.html.twig -msgid "The asset has a usage profile" +msgid "The asset has a type" msgstr "" #: templates/history/status-item.html.twig -msgid "The asset has an inventory entry date" +msgid "Type is not ignored" msgstr "" #: templates/history/status-item.html.twig -msgid "Legend" +msgid "The type has a power consumption" msgstr "" #: templates/history/status-item.html.twig -msgid "Satisfied requirement" +msgid "The asset has a category" msgstr "" #: templates/history/status-item.html.twig -msgid "Missing requirement" +msgid "The asset has a usage profile" msgstr "" #: templates/history/status-item.html.twig -msgid "Optional missing data" +msgid "The asset has an inventory entry date" msgstr "" -#: templates/usageinfo.html.twig -msgid "Asset usage" +#: templates/history/status-item.html.twig +msgid "Legend" msgstr "" -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "" -msgstr[1] "" - #: templates/monitortype.html.twig msgid "" "This power value is used as default when the power of a monitor model is " @@ -151,37 +189,15 @@ msgid "" msgstr "" #: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:50 +#: templates/networkequipmenttype.html.twig msgid "Power" msgid_plural "Powers" msgstr[0] "" msgstr[1] "" -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "" - -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "" - -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "No zone available" -msgstr "" - -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "Please run the automatic action to downlaod data from this source." -msgstr "" - -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "" - -#: templates/config.html.twig -msgid "Key for electricitymap.org API" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" msgstr "" #: templates/config.html.twig @@ -192,44 +208,15 @@ msgstr "" msgid "Usage carbon emissions are always calculated internally" msgstr "" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "" - -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "" - -#: templates/config.html.twig +#: templates/computertype.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." -msgstr "" - -#: templates/config.html.twig -msgid "Enable geocoding" -msgstr "" - -#: templates/location.html.twig src/UsageInfo.php:91 src/Profile.php:45 -msgid "Environmental impact" -msgstr "" - -#: templates/location.html.twig src/SearchOptions.php:121 src/Location.php:78 -msgid "Boavizta zone" -msgstr "" - -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" msgstr "" #: templates/dashboard/information-block.html.twig @@ -262,8 +249,19 @@ msgid "" "about 20 meters." msgstr "" -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "" + +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" msgstr "" #: templates/dashboard/monthly-carbon-emission.html.twig @@ -275,9 +273,15 @@ msgstr "" msgid "Compared to %s" msgstr "" -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "" + +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" #: templates/dashboard/information-video-card.html.twig @@ -288,33 +292,22 @@ msgstr "" msgid "Here is a video about the impact of numeric on the enviromnent." msgstr "" -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format +#: templates/abstractmodel.html.twig msgid "" -"It represents %s percent of your parc that contains %s network equipments." -msgstr "" - -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:295 -#: src/Dashboard/DemoProvider.php:77 src/Dashboard/Widget.php:110 -msgid "Embodied abiotic depletion potential" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Provider.php:816 src/Dashboard/Grid.php:178 -#: src/Dashboard/Grid.php:281 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Widget.php:96 -msgid "Usage abiotic depletion potential" +#: templates/abstractmodel.html.twig +msgid "Data quality" msgstr "" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" +#: templates/abstractmodel.html.twig +msgid "Data source" msgstr "" #: templates/networkequipmenttype.html.twig @@ -323,434 +316,607 @@ msgid "" "model is unknown" msgstr "" -#: setup.php:274 -msgid "Environmental Impact" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" msgstr "" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" msgstr "" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" -#: install/install/create_automatic_actions.php:45 -#: install/migration/update_0.0.6_to_1.0.0/02_create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" msgstr "" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" msgstr "" -#: install/install/create_automatic_actions.php:93 -#: install/migration/update_0.0.3_to_0.0.4/add_automatic_action.php:60 -msgid "Compute embodied impact of assets" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." msgstr "" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" msgstr "" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:68 -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -msgid "Creating data source name" +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" msgstr "" -#: src/UsageInfo.php:59 +#: src/UsageInfo.php:62 msgid "Usage informations" msgstr "" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:828 -#, php-format -msgid "Evaluates the carbon emission in CO₂ equivalent. %s More information %s" +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" msgstr "" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:864 -#: src/Dashboard/Widget.php:901 +#: src/UsageInfo.php:241 #, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent. " -"%s More information %s" +msgid "%s More information %s" msgstr "" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1086 -#, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" msgstr "" -#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:142 -#: src/ComputerType.php:70 src/MonitorType.php:50 -msgid "Power consumption" +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" msgstr "" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" msgstr "" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" msgstr "" -#: src/CronTask.php:70 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 msgid "Download carbon emissions from RTE" msgstr "" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" msgstr "" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" msgstr "" -#: src/CronTask.php:211 -msgid "No zone to download" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" msgstr "" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "" -msgstr[1] "" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" msgstr "" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" msgstr "" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" msgstr "" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" -msgstr[1] "" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" msgstr "" -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" msgstr "" -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 src/Dashboard/DemoProvider.php:49 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/DemoProvider.php:415 -msgid "CO₂eq" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" msgstr "" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 -msgid "g" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" msgstr "" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 -msgid "Kg" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." msgstr "" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 -msgid "t" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." msgstr "" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 -msgid "Kt" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" msgstr "" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 -msgid "Mt" +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" msgstr "" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 -msgid "Gt" +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" msgstr "" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 -msgid "Tt" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" msgstr "" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 -msgid "Pt" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 -msgid "Et" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 -msgid "Zt" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 -msgid "Yt" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Dashboard/Provider.php:334 -msgid "handled assets ratio" +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Provider.php:379 src/Dashboard/Grid.php:67 -msgid "Handled assets ratio" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Provider.php:402 src/Dashboard/DemoProvider.php:334 -msgid "Handled" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: src/Dashboard/Provider.php:407 src/Dashboard/DemoProvider.php:339 -msgid "Unhandled" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Provider.php:434 src/Dashboard/DemoProvider.php:279 -#, php-format -msgid "plugin carbon - handled %s" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: src/Dashboard/Provider.php:435 src/Dashboard/DemoProvider.php:280 -#, php-format -msgid "plugin carbon - unhandled %s" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: src/Dashboard/Provider.php:483 -msgid "plugin carbon - Total usage power consumption" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: src/Dashboard/Provider.php:552 src/Dashboard/DemoProvider.php:362 -#: src/Dashboard/DemoProvider.php:411 -msgid "plugin carbon - Usage carbon emission" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -msgid "Sbeq" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: src/Dashboard/Provider.php:850 -msgid "Total abiotic depletion potential" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: src/Dashboard/Provider.php:869 -msgid "Total usage abiotic depletion potential" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: src/Dashboard/Provider.php:881 -msgid "Total global warming potential" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: src/Dashboard/Provider.php:897 src/Dashboard/Grid.php:186 -#: src/Dashboard/Grid.php:289 -msgid "Embodied global warming potential" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: src/Dashboard/Provider.php:900 -msgid "Total usage global warming potential" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: src/Dashboard/Provider.php:922 src/Dashboard/Widget.php:482 -msgid "Consumed energy and carbon emission per month" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" msgstr "" -#: src/Dashboard/Provider.php:1027 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/Widget.php:527 -#: src/Dashboard/Widget.php:542 -msgid "Carbon emission" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" msgstr "" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 -msgid "KWh" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 -msgid "MWh" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 -msgid "GWh" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 -msgid "TWh" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 -msgid "PWh" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 -msgid "EWh" +#: src/Impact/Type.php:202 +msgid "Usage Land use" msgstr "" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 -msgid "ZWh" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 -msgid "YWh" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" msgstr "" -#: src/Dashboard/Provider.php:1043 src/Dashboard/DemoProvider.php:143 -#: src/Dashboard/DemoProvider.php:239 src/Dashboard/Widget.php:532 -#: src/Dashboard/Widget.php:545 -msgid "Consumed energy" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" msgstr "" -#: src/Dashboard/Grid.php:62 src/Dashboard/Grid.php:127 -#: src/Dashboard/Grid.php:228 src/AbstractType.php:58 +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "" + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "" + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "" +msgstr[1] "" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "" +msgstr[1] "" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 msgid "Carbon" msgstr "" -#: src/Dashboard/Grid.php:76 -msgid "Handled assets count" +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -#: src/Dashboard/Grid.php:139 +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "" +msgstr[1] "" + +#: src/Report.php:101 #, php-format -msgid "Handled %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" -#: src/Dashboard/Grid.php:150 -#, php-format -msgid "Unhandled %s" +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "" +msgstr[1] "" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "" + +#: src/Source_Zone.php:72 +msgid "Source name" msgstr "" -#: src/Dashboard/Grid.php:166 -msgid "Usage power consumption" +#: src/Source_Zone.php:80 +msgid "Zone name" msgstr "" -#: src/Dashboard/Grid.php:172 -msgid "Usage carbon emission" +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" msgstr "" -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:301 -msgid "Embodied primary energy consumed" +#: src/Source_Zone.php:96 +msgid "Code" msgstr "" -#: src/Dashboard/Grid.php:206 src/UsageImpact.php:105 -msgid "Global warming potential" +#: src/Source_Zone.php:150 +msgid "Not downloadable" msgstr "" -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" -#: src/Dashboard/Grid.php:239 -#, php-format -msgid "Unhandled %s ratio" +#: src/Source_Zone.php:172 +msgid "Source for historical" msgstr "" -#: src/Dashboard/Grid.php:251 -msgid "Usage carbon emission year to date" +#: src/Source_Zone.php:411 +msgid "Enable / Disable" msgstr "" -#: src/Dashboard/Grid.php:257 -msgid "Monthly carbon emission" +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" msgstr "" -#: src/Dashboard/Grid.php:266 -msgid "Usage global warming potential chart" +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" msgstr "" -#: src/Dashboard/Grid.php:275 src/Dashboard/Widget.php:83 -#: src/Dashboard/Widget.php:579 -msgid "Biggest monthly averaged carbon emission per model" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" msgstr "" -#: src/Dashboard/Grid.php:311 src/Dashboard/Widget.php:57 -msgid "Environmental impact information video" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" msgstr "" -#: src/Dashboard/Grid.php:316 -msgid "Environmental impact methodology_information" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" msgstr "" -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" msgstr "" -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" +#: src/CronTask.php:278 +msgid "No zone to download" msgstr "" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" +msgstr "" + +#: src/Dashboard/Widget.php:62 msgid "Methodology information" msgstr "" @@ -758,333 +924,464 @@ msgstr "" msgid "Total Carbon Emission" msgstr "" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" msgstr "" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "" + +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" msgstr "" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" msgstr "" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "" + +#: src/Dashboard/Widget.php:142 msgid "Unhandled Computers" msgstr "" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" msgstr "" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" msgstr "" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" msgstr "" -#: src/Dashboard/Widget.php:721 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 +msgid "Consumed energy and carbon emission per month" +msgstr "" + +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "" + +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "" + +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:787 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:1076 -msgid "Total embodied primary energy" +#: src/Dashboard/Widget.php:854 +msgid "More information" msgstr "" -#: src/Dashboard/Widget.php:1145 +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent. " +"%s More information %s" +msgstr "" + +#: src/Dashboard/Widget.php:1097 msgid "Handled percentage" msgstr "" -#: src/ComputerType.php:56 -msgid "Unspecified" +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" msgstr "" -#: src/ComputerType.php:58 -msgid "Server" +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" msgstr "" -#: src/ComputerType.php:59 -msgid "Laptop" +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" msgstr "" -#: src/ComputerType.php:60 -msgid "Tablet" +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" msgstr "" -#: src/ComputerType.php:61 -msgid "Smartphone" +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" msgstr "" -#: src/ComputerUsageProfile.php:52 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" -msgstr[1] "" +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "" -#: src/ComputerUsageProfile.php:92 -msgid "Start time is invalid" +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" msgstr "" -#: src/ComputerUsageProfile.php:97 -msgid "Stop time is invalid" +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" msgstr "" -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "" -msgstr[1] "" +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" msgstr "" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" msgstr "" -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" msgstr "" -#: src/UsageImpact.php:149 src/CarbonEmission.php:150 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" msgstr "" -#: src/UsageImpact.php:156 src/CarbonEmission.php:157 -#: src/EmbodiedImpact.php:127 -msgid "Engine" +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" msgstr "" -#: src/UsageImpact.php:163 src/CarbonEmission.php:164 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" msgstr "" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "" -#: src/Report.php:107 +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +msgid "plugin carbon - handled %s" msgstr "" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" -msgstr[1] "" +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "" -#: src/CarbonEmission.php:119 -msgid "Energy" +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" msgstr "" -#: src/CarbonEmission.php:127 -msgid "Emission" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" msgstr "" -#: src/CarbonEmission.php:135 -msgid "Energy quality" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" msgstr "" -#: src/CarbonEmission.php:143 -msgid "Emission quality" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" msgstr "" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" msgstr "" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" msgstr "" -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" msgstr "" -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" msgstr "" -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" msgstr "" -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" msgstr "" -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" msgstr "" -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" msgstr "" -#: src/CarbonIntensitySource_Zone.php:352 -msgid "Enable / Disable" +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 -msgid "grams of carbon dioxyde equivalent" +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 -msgid "grams of antimony equivalent" +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 -msgid "joules" +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" msgstr "" -#: src/Impact/History/AbstractAsset.php:364 -msgid "Error while calculating impact" +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" msgstr "" -#: src/Impact/History/AbstractAsset.php:372 -msgid "Nothing to calculate" +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" msgstr "" -#: src/Impact/History/AbstractAsset.php:378 +#: src/Dashboard/Grid.php:135 #, php-format -msgid "%d entries calculated" +msgid "Handled %s" msgstr "" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" msgstr "" -#: src/CarbonIntensity.php:91 +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 msgid "Emission date" msgstr "" -#: src/CarbonIntensity.php:118 +#: src/CarbonIntensity.php:114 msgid "Intensity" msgstr "" -#: src/Toolbox.php:251 +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "" +msgstr[1] "" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "" + +#: src/Toolbox.php:280 msgid "W" msgstr "" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" msgstr "" -#: hook.php:256 +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "" + +#: setup.php:285 +msgid "Environmental Impact" +msgstr "" + +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." +msgstr "" + +#: hook.php:301 msgid "Associate to an usage profile" msgstr "" -#: hook.php:260 hook.php:265 hook.php:269 +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "" + +#: hook.php:311 hook.php:316 hook.php:320 msgid "Update type power consumption" msgstr "" -#: hook.php:261 +#: hook.php:312 msgid "Update category" msgstr "" -#: hook.php:273 +#: hook.php:324 msgid "Update zone for Boavizta engine" msgstr "" -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "" + +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "" + +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 msgid "Missing arguments in request." msgstr "" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 msgid "Bad arguments." msgstr "" -#: front/usageimpact.form.php:88 front/embodiedimpact.form.php:69 -#: front/embodiedimpact.form.php:78 +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 msgid "Reset denied." msgstr "" -#: front/usageimpact.form.php:93 front/embodiedimpact.form.php:83 +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 msgid "Reset failed." msgstr "" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." -msgstr "" - -#: front/usageimpact.form.php:123 +#: front/usageimpact.form.php:122 msgid "Missing data prevents historization of this asset." msgstr "" -#: front/usageimpact.form.php:126 +#: front/usageimpact.form.php:125 msgid "Update of global warming potential failed." msgstr "" -#: front/usageimpact.form.php:132 front/embodiedimpact.form.php:93 +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 msgid "Unable to find calculation engine for this asset." msgstr "" -#: front/usageimpact.form.php:137 +#: front/usageimpact.form.php:136 msgid "Update of usage impact failed." msgstr "" - -#: front/embodiedimpact.form.php:102 -msgid "Update failed." -msgstr "" diff --git a/locales/cs_CZ.mo b/locales/cs_CZ.mo index 4b042c3f..a19cf2c6 100644 Binary files a/locales/cs_CZ.mo and b/locales/cs_CZ.mo differ diff --git a/locales/cs_CZ.po b/locales/cs_CZ.po index dc0d95d9..ba8a01f5 100644 --- a/locales/cs_CZ.po +++ b/locales/cs_CZ.po @@ -4,16 +4,16 @@ # FIRST AUTHOR , YEAR. # # Translators: -# David Stepan , 2025 +# David Stepan , 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: David Stepan , 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: David Stepan , 2026\n" "Language-Team: Czech (Czech Republic) (https://app.transifex.com/teclib/teams/28042/cs_CZ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,140 +21,60 @@ msgstr "" "Language: cs_CZ\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "Roční spotřeba emisí uhlíku" - -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" -msgstr "Měsíční emise uhlíku spotřeby" - -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" -msgstr "Ve srovnání s %s" - -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "Ztělesněná primární energie" - -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" -msgstr "Potenciál abiotického využití" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Varování" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format -msgid "" -"It represents %s percent of your parc that contains %s network equipments." +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" msgstr "" -"Představuje %s procent vašeho parku, který obsahuje %s síťových zařízení." - -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "Představuje %s procent vašeho parku, který obsahuje %s monitorů." - -#: templates/dashboard/information-block.html.twig -msgid "Information" -msgstr "Informace" -#: templates/dashboard/information-block.html.twig -msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" msgstr "" -"Naše data pocházejí ze spolehlivých zdrojů a jsou pečlivě vypočítávána " -"pomocí standardních metodik v oboru. Používáme přesné měřicí nástroje a " -"algoritmy, abychom zajistili přesnost a spolehlivost našich " -"environmentálních metrik." -#: templates/dashboard/information-block.html.twig -msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" msgstr "" -"S postupem k zelenější budoucnosti budou podniky brzy povinny hlásit " -"spotřebu energie a emise uhlíku. Od roku 2025 bude mnoho oblastí tyto " -"předpisy vymáhat. Přijetí těchto postupů nyní zajišťuje dodržování předpisů " -"a pomáhá v boji proti změně klimatu." - -#: templates/dashboard/information-block.html.twig -msgid "Did you know ?" -msgstr "Věděl jste to?" - -#: templates/dashboard/information-block.html.twig -msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." -msgstr "1 gram CO₂ odpovídá CO₂ emitovanému při ujetí autem asi 20 metrů." - -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "Emise uhlíku v hmotné atmosféře" -#: templates/dashboard/information-video-card.html.twig -msgid "Want to know more ?" -msgstr "Chcete se dozvědět více?" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: templates/dashboard/information-video-card.html.twig -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "Zde je video o dopadu čísel na životní prostředí." +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Oblast Boavizta" -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." -msgstr "Představuje %s procent vašeho parku, který obsahuje %s počítačů." +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intenzita uhlíku" -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" -msgstr "Ztělesněný potenciál vyčerpání abiotických látek" +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Využití aktiva" -#: templates/monitortype.html.twig -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" -msgstr "" -"Tato hodnota napájení se používá jako výchozí, pokud není napájení modelu " -"monitoru známo" +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Profil použití" +msgstr[1] "Profilů použití" +msgstr[2] "Profilů použití" +msgstr[3] "Profily použití" -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Výkon" -msgstr[1] "Výkonů" -msgstr[2] "Výkonů" -msgstr[3] "Výkony" +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI Carbon" -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" msgstr "" -"Tato hodnota výkonu se používá jako výchozí, pokud není výkon modelu " -"počítače znám." -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "Kategorie" +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" #: templates/pages/CarbonIntensitySource/tab_zone.html.twig msgid "No zone available" @@ -164,14 +84,6 @@ msgstr "Žádná zóna k dispozici" msgid "Please run the automatic action to downlaod data from this source." msgstr "Spusťte prosím automatickou akci pro stažení dat z tohoto zdroje." -#: templates/networkequipmenttype.html.twig -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" -msgstr "" -"Tato hodnota výkonu se používá jako výchozí, pokud není znám výkon modelu " -"síťového zařízení" - #: templates/environmentalimpact-item.html.twig msgid "Usage" msgstr "Využití" @@ -184,46 +96,13 @@ msgstr "" msgid "Calculate data" msgstr "Vypočítat data" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "" - -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "" - -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "Využití aktiva" - -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Profil použití" -msgstr[1] "Profilů použití" -msgstr[2] "Profilů použití" -msgstr[3] "Profily použití" - -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "GLPI Carbon" - -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 -msgid "Environmental impact" -msgstr "Dopad na životní prostředí" - -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" -msgstr "Oblast Boavizta" +msgid_plural "Embodied impacts" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" #: templates/history/status-item.html.twig msgid "Historization status" @@ -257,13 +136,17 @@ msgstr "Není šablona" msgid "Linked to a computer" msgstr "Propojeno s počítačem" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "" + #: templates/history/status-item.html.twig msgid "Has a location" msgstr "Má umístění" #: templates/history/status-item.html.twig -msgid "The location has a state or a country" -msgstr "Umístění má stát nebo zemi" +msgid "The location has carbon intensity data" +msgstr "" #: templates/history/status-item.html.twig msgid "Real time carbon intensity enabled" @@ -285,6 +168,10 @@ msgstr "Model má spotřebu energie" msgid "The asset has a type" msgstr "Aktivum má typ" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "" + #: templates/history/status-item.html.twig msgid "The type has a power consumption" msgstr "Typ má spotřebu energie" @@ -305,13 +192,27 @@ msgstr "Aktivum má datum zápisu do inventáře" msgid "Legend" msgstr "Legenda" -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "Mapy elektřiny" +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "" +"Tato hodnota napájení se používá jako výchozí, pokud není napájení modelu " +"monitoru známo" -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "Klíč pro API electricitymap.org" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Výkon" +msgstr[1] "Výkonů" +msgstr[2] "Výkonů" +msgstr[3] "Výkony" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "" #: templates/config.html.twig msgid "Impact engine" @@ -321,348 +222,655 @@ msgstr "Rázový motor" msgid "Usage carbon emissions are always calculated internally" msgstr "Emise uhlíku spotřeby se vždy počítají interně" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "Boavizta" - -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "Základní URL adresa instance Boaviztapi" - -#: templates/config.html.twig +#: templates/computertype.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -"Geokódování převádí polohu na kód ISO 3166 (3 písmena). Boavizta to " -"potřebuje k určení dopadů využití aktiv. Tato funkce odesílá adresu uloženou" -" v dané lokalitě službě nominatim.org. Pokud se jedná o problém, můžete ji " -"níže deaktivovat a kód země vyplnit ručně." - -#: templates/config.html.twig -msgid "Enable geocoding" -msgstr "Povolit geokódování" - -#: setup.php:273 -msgid "Environmental Impact" -msgstr "Dopad na životní prostředí" +"Tato hodnota výkonu se používá jako výchozí, pokud není výkon modelu " +"počítače znám." -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." -msgstr "" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Kategorie" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." -msgstr "" +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Informace" -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" +"Naše data pocházejí ze spolehlivých zdrojů a jsou pečlivě vypočítávána " +"pomocí standardních metodik v oboru. Používáme přesné měřicí nástroje a " +"algoritmy, abychom zajistili přesnost a spolehlivost našich " +"environmentálních metrik." -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." msgstr "" +"S postupem k zelenější budoucnosti budou podniky brzy povinny hlásit " +"spotřebu energie a emise uhlíku. Od roku 2025 bude mnoho oblastí tyto " +"předpisy vymáhat. Přijetí těchto postupů nyní zajišťuje dodržování předpisů " +"a pomáhá v boji proti změně klimatu." -#: front/embodiedimpact.form.php:102 -msgid "Update failed." -msgstr "Aktualizace selhala." +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "Věděl jste to?" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." +msgstr "1 gram CO₂ odpovídá CO₂ emitovanému při ujetí autem asi 20 metrů." + +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Varování" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Představuje %s procent vašeho parku, který obsahuje %s monitorů." + +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Roční spotřeba emisí uhlíku" + +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Měsíční emise uhlíku spotřeby" + +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "Ve srovnání s %s" + +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "Představuje %s procent vašeho parku, který obsahuje %s počítačů." + +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" +"Představuje %s procent vašeho parku, který obsahuje %s síťových zařízení." + +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "Chcete se dozvědět více?" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "Zde je video o dopadu čísel na životní prostředí." + +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." +#: templates/abstractmodel.html.twig +msgid "Data quality" msgstr "" -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." +#: templates/abstractmodel.html.twig +msgid "Data source" msgstr "" -#: hook.php:317 -msgid "Associate to an usage profile" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" +msgstr "" +"Tato hodnota výkonu se používá jako výchozí, pokud není znám výkon modelu " +"síťového zařízení" + +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" msgstr "" -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" msgstr "" -#: hook.php:322 -msgid "Update category" -msgstr "Aktualizovat kategorii" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" +msgstr "" -#: hook.php:334 -msgid "Update zone for Boavizta engine" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" -msgstr "Najděte kód země Alpha3 (ISO3166) pro lokality" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" -msgstr "Výpočet emisí uhlíku z počítačů" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" -msgstr "Shromážděná intenzita uhlíku z RTE" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Vytváření názvu zdroje dat" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "Sběr intenzity uhlíku z ElectricityMap" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "" -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" -msgstr "Výpočet ztělesněného dopadu aktiv" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" -msgstr "Vždy zapnuto" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" -msgstr "Úřední hodiny" +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Vytváření názvu datové zóny" -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "Uhlík" +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Vytváření falešných dat..." -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Aktualizace popisu řídicího panelu sestav" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Řídící panel nenalezen" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Popis řídicího panelu byl uložen do %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Vytváření testovacího inventáře" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Spotřeba energie" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Informace o použití" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Dopad na životní prostředí" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" msgstr "" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" msgstr "" -#: src/CronTask.php:70 +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Shromážděná intenzita uhlíku z RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 msgid "Download carbon emissions from RTE" msgstr "" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" msgstr "" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" -msgstr "Maximální počet položek k výpočtu" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" msgstr "" -#: src/CronTask.php:211 -msgid "No zone to download" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Motor" + +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Verze motoru" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" msgstr "" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" -msgstr "Spotřeba energie" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 msgid "grams of carbon dioxyde equivalent" msgstr "gramů ekvivalentu oxidu uhličitého" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 msgid "grams of antimony equivalent" msgstr "gramů ekvivalentu antimonu" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 msgid "joules" msgstr "joulů" -#: src/Impact/History/AbstractAsset.php:364 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "" + +#: src/Impact/History/AbstractAsset.php:370 msgid "Error while calculating impact" msgstr "" -#: src/Impact/History/AbstractAsset.php:372 +#: src/Impact/History/AbstractAsset.php:378 msgid "Nothing to calculate" msgstr "" -#: src/Impact/History/AbstractAsset.php:378 +#: src/Impact/History/AbstractAsset.php:384 #, php-format msgid "%d entries calculated" msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "" -#: src/Report.php:107 -#, php-format +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:164 msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "Uhlíková emise" -msgstr[1] "Uhlíkové emise" -msgstr[2] "Uhlíkových emisí" -msgstr[3] "Uhlíkové emise" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "" -#: src/CarbonEmission.php:119 -msgid "Energy" -msgstr "Energie" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" +msgstr "" -#: src/CarbonEmission.php:127 -msgid "Emission" -msgstr "Emise" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" +msgstr "" -#: src/CarbonEmission.php:135 -msgid "Energy quality" -msgstr "Kvalita energie" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "" -#: src/CarbonEmission.php:143 -msgid "Emission quality" -msgstr "Kvalita emisí" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" +msgstr "" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" -msgstr "Motor" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" -msgstr "Verze motoru" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" +msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" -msgstr "Vytváření názvu zdroje dat" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" +msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" -msgstr "Vytváření názvu datové zóny" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" +msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." -msgstr "Vytváření falešných dat..." +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" +msgstr "" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" -msgstr "Aktualizace popisu řídicího panelu sestav" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" -msgstr "Řídící panel nenalezen" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" -msgstr "Popis řídicího panelu byl uložen do %s" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" -msgstr "Zóna nenalezena" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." -msgstr "Načítání dat eco2mix..." +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" -msgstr "Vytváření testovacího inventáře" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "" + +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "" + +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "" + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "" + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" msgstr "" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" -msgstr "Stahování povoleno" +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Je historizovatelné" -#: src/UsageInfo.php:59 -msgid "Usage informations" -msgstr "Informace o použití" +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Nespecifikováno" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" -msgstr "Vyhodnocuje emise uhlíku v ekvivalentu CO₂. %s Více informací %s" +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Server" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 -#, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Notebook" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Chytrý telefon" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Dopad užívání" +msgstr[1] "Dopady užívání" +msgstr[2] "Dopadů užívání" +msgstr[3] "Dopady užívání" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Uhlík" + +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -"Vyhodnocuje spotřebu neobnovitelných zdrojů v ekvivalentu antimonu. %s Více " -"informací %s" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: src/Report.php:101 #, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" -msgstr "Vyhodnocuje spotřebovanou primární energii. %s Více informací %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" +msgstr "" -#: src/ComputerUsageProfile.php:52 +#: src/ComputerUsageProfile.php:51 msgid "Computer usage profile" msgid_plural "Computer usage profiles" msgstr[0] "" @@ -670,457 +878,549 @@ msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: src/ComputerUsageProfile.php:92 +#: src/ComputerUsageProfile.php:117 msgid "Start time is invalid" msgstr "" -#: src/ComputerUsageProfile.php:97 +#: src/ComputerUsageProfile.php:122 msgid "Stop time is invalid" msgstr "" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 -msgid "Environmental impact information video" -msgstr "Informační video o dopadu na životní prostředí" - -#: src/Dashboard/Widget.php:63 -msgid "Methodology information" -msgstr "Metodické informace" - -#: src/Dashboard/Widget.php:71 -msgid "Total Carbon Emission" -msgstr "Celkové emise uhlíku" +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Název zdroje" -#: src/Dashboard/Widget.php:77 -msgid "Monthly Carbon Emission" -msgstr "Měsíční emise uhlíku" +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Název zóny" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 -msgid "Biggest monthly averaged carbon emission per model" -msgstr "" +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Stahování povoleno" -#: src/Dashboard/Widget.php:90 -msgid "Carbon Emission Per month" -msgstr "Emise uhlíku za měsíc" +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Kód" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" -msgstr "" +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "Nelze stáhnout" -#: src/Dashboard/Widget.php:127 -msgid "Unhandled Computers" -msgstr "Neošetřené počítače" +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" +msgstr "Toto je záložní zdroj, nejsou k dispozici žádná data v reálném čase" -#: src/Dashboard/Widget.php:137 -msgid "Unhandled Monitors" -msgstr "Neošetřené monitory" +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Zdroj historických informací" -#: src/Dashboard/Widget.php:147 -msgid "Unhandled Network equipments" -msgstr "Neošetřená síťová zařízení" +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Zapnout / Vypnout" -#: src/Dashboard/Widget.php:157 -msgid "Radar chart" +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" msgstr "" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 -msgid "Consumed energy and carbon emission per month" +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" msgstr "" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 -msgid "Carbon emission" -msgstr "Emise uhlíku" - -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 -msgid "Consumed energy" -msgstr "Spotřebovaná energie" - -#: src/Dashboard/Widget.php:727 -#, php-format -msgid "" -"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " -"months. %s More information %s" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" msgstr "" -#: src/Dashboard/Widget.php:793 -#, php-format -msgid "" -"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " -"elapsed months. %s More information %s" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" msgstr "" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" -msgstr "Celková ztělesněná primární energie" - -#: src/Dashboard/Widget.php:1151 -msgid "Handled percentage" -msgstr "Ošetřeno procentně" - -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 -msgid "CO₂eq" -msgstr "CO₂eq" - -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "Sbeq" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Maximální počet položek k výpočtu" -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "Emise uhlíku za měsíc" +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "" -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "zásuvný modul uhlík - ošetřeno %s" +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "" -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "zásuvný modul uhlík - neošetřeno %s" +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" +msgstr "Informační video o dopadu na životní prostředí" -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "zásuvný modul uhlík - poměr ošetřených aktiv" +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "Metodické informace" -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "Ošetřeno" +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "Celkové emise uhlíku" -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" -msgstr "Neošetřeno" +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "Měsíční emise uhlíku" -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" -msgstr "zásuvný modul uhlík - Použití emisí uhlíku" +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "" -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "Intenzita oxidu uhličitého" +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "Emise uhlíku za měsíc" -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 -msgid "Handled assets ratio" -msgstr "Poměr ošetřených aktiv" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Potenciál abiotického využití" -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" -msgstr "Počet ošetřených aktiv" +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "" -#: src/Dashboard/Grid.php:145 -#, php-format -msgid "Handled %s" -msgstr "Ošetřené %s" +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "Neošetřené počítače" -#: src/Dashboard/Grid.php:156 -#, php-format -msgid "Unhandled %s" -msgstr "Neošetřené %s" +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "Neošetřené monitory" -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" -msgstr "Spotřeba energie" +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "Neošetřená síťová zařízení" -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" -msgstr "Emise uhlíku při spotřebě" +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "" -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" -msgstr "Ztělesněný potenciál globálního oteplování" +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 +msgid "Consumed energy and carbon emission per month" +msgstr "" -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" -msgstr "Spotřebovaná primární energie" +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "Emise uhlíku" -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "Potenciál globálního oteplování" +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "Spotřebovaná energie" -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" -msgstr "Potenciál abiotického vyčerpání" +#: src/Dashboard/Widget.php:746 +#, php-format +msgid "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" +msgstr "" -#: src/Dashboard/Grid.php:245 +#: src/Dashboard/Widget.php:812 #, php-format -msgid "Unhandled %s ratio" -msgstr "Neošetřený %s poměr " +msgid "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" +msgstr "" -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" -msgstr "Emise uhlíku z používání za rok do data" +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "" -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" -msgstr "Měsíční emise uhlíku" +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" +msgstr "" +"Vyhodnocuje spotřebu neobnovitelných zdrojů v ekvivalentu antimonu. %s Více " +"informací %s" -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" -msgstr "Použití grafu potenciálu globálního oteplování" +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "Ošetřeno procentně" -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "Metodologické informace o dopadu na životní prostředí" +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "CO₂eq" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 msgid "g" msgstr "g" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 msgid "Kg" msgstr "Kg" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 msgid "t" msgstr "t" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 msgid "Kt" msgstr "Kt" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 msgid "Mt" msgstr "Mt" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 msgid "Gt" msgstr "Gt" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 msgid "Tt" msgstr "Tt" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 msgid "Pt" msgstr "Pt" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 msgid "Et" msgstr "Et" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 msgid "Zt" msgstr "Zt" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 msgid "Yt" msgstr "Yt" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:427 msgid "handled assets ratio" msgstr "poměr spravovaných aktiv" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "Poměr ošetřených aktiv" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Ošetřeno" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "Neošetřeno" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 +#, php-format +msgid "plugin carbon - handled %s" +msgstr "zásuvný modul uhlík - ošetřeno %s" + +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "zásuvný modul uhlík - neošetřeno %s" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "" + +#: src/Dashboard/Provider.php:632 msgid "plugin carbon - Total usage power consumption" msgstr "zásuvný modul uhlík - Celková spotřeba energie" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "Celkový ztělesněný potenciál globálního oteplování" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "zásuvný modul uhlík - Použití emisí uhlíku" + +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:1035 msgid "Total abiotic depletion potential" msgstr "Celkový potenciál vyčerpání abiotických látek" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Ztělesněný potenciál vyčerpání abiotických látek" + +#: src/Dashboard/Provider.php:1054 msgid "Total usage abiotic depletion potential" msgstr "Celkový užití potenciálu abiotického vyčerpání" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:1066 msgid "Total global warming potential" msgstr "Celkový potenciál globálního oteplování" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Ztělesněný potenciál globálního oteplování" + +#: src/Dashboard/Provider.php:1085 msgid "Total usage global warming potential" msgstr "Celkové užití potenciálu globálního oteplování" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 msgid "KWh" msgstr "KWh" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 msgid "MWh" msgstr "MWh" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 msgid "GWh" msgstr "GWh" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 msgid "TWh" msgstr "TWh" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 msgid "PWh" msgstr "PWh" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 msgid "EWh" msgstr "EWh" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 msgid "ZWh" msgstr "ZWh" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 msgid "YWh" msgstr "YWh" -#: src/Toolbox.php:251 +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Počet ošetřených aktiv" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "Ošetřené %s" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "Neošetřené %s" + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Neošetřený %s poměr " + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Emise uhlíku z používání za rok do data" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Měsíční emise uhlíku" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Použití grafu potenciálu globálního oteplování" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Emise uhlíku za měsíc" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "zásuvný modul uhlík - poměr ošetřených aktiv" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intenzita oxidu uhličitého" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Datum emise" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intenzita" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Uhlíková emise" +msgstr[1] "Uhlíkové emise" +msgstr[2] "Uhlíkových emisí" +msgstr[3] "Uhlíkové emise" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energie" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emise" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Kvalita energie" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Kvalita emisí" + +#: src/Toolbox.php:280 msgid "W" msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" msgstr "Wh" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "Je historizovatelné" - -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "Dopad užívání" -msgstr[1] "Dopady užívání" -msgstr[2] "Dopadů užívání" -msgstr[3] "Dopady užívání" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "Potenciál kvality globálního oteplování" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Dopad na životní prostředí" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" -msgstr "Potenciál kvality abiotického vyčerpání" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." +msgstr "" -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "Kvalita primární energie" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "Intenzita uhlíku" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "" -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "Datum emise" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "" -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "Intenzita" +#: hook.php:312 +msgid "Update category" +msgstr "Aktualizovat kategorii" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "Potenciál globálního oteplování" +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" -msgstr "Potenciál abiotického vyčerpání" +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "Primární energie" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Najděte kód země Alpha3 (ISO3166) pro lokality" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "Nespecifikováno" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Výpočet emisí uhlíku z počítačů" -#: src/ComputerType.php:58 -msgid "Server" -msgstr "Server" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Výpočet ztělesněného dopadu aktiv" -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "Notebook" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Vždy zapnuto" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "Tablet" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Úřední hodiny" -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "Chytrý telefon" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "Název zdroje" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "Název zóny" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "Kód" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" -msgstr "Nelze stáhnout" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "Toto je záložní zdroj, nejsou k dispozici žádná data v reálném čase" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "Zdroj historických informací" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "" -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" -msgstr "Zapnout / Vypnout" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "" diff --git a/locales/de_DE.mo b/locales/de_DE.mo index 7cafa0b9..f89ef75a 100644 Binary files a/locales/de_DE.mo and b/locales/de_DE.mo differ diff --git a/locales/de_DE.po b/locales/de_DE.po index 9894d257..e283e5f4 100644 --- a/locales/de_DE.po +++ b/locales/de_DE.po @@ -4,17 +4,17 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Michael Schieferer, 2022 -# Christian Hoffmeister, 2025 +# Thierry Bugier , 2025 +# Christian Hoffmeister, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-21 13:21+0200\n" -"PO-Revision-Date: 2022-11-23 14:34+0000\n" -"Last-Translator: Christian Hoffmeister, 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Christian Hoffmeister, 2026\n" "Language-Team: German (Germany) (https://app.transifex.com/teclib/teams/28042/de_DE/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,601 +22,1370 @@ msgstr "" "Language: de_DE\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. TRANS: %s is the user login -#: front/environnementalimpact.form.php:57 -#, php-format -msgid "%s updates an item" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Startzeit" + +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Stopzeit" + +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "" + +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "" + +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "" + +#: templates/usageinfo.html.twig +msgid "Asset usage" msgstr "" -#: front/report.php:49 entrée standard:37 +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "" +msgstr[1] "" + +#: templates/quick-report.html.twig front/report.php:55 msgid "GLPI Carbon" msgstr "GLPI Carbon" -#: src/CarbonIntensityZone.php:50 +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 msgid "Carbon intensity zone" msgid_plural "Carbon intensity zones" msgstr[0] "" msgstr[1] "" -#: src/CarbonIntensityZone.php:122 src/CarbonIntensityZone.php:137 -msgid "Data source for historical calculation" +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "Keine Zone verfügbar" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." msgstr "" -#: src/AbstractType.php:50 entrée standard:37 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Energie" -msgstr[1] "Energie" +#: templates/environmentalimpact-item.html.twig +msgid "Usage" +msgstr "" -#: src/AbstractType.php:58 src/Dashboard/Dashboard.php:50 -#: src/Dashboard/Dashboard.php:56 src/Dashboard/Dashboard.php:62 -#: src/Dashboard/Dashboard.php:68 src/Dashboard/Dashboard.php:74 -#: src/Dashboard/Dashboard.php:80 src/Dashboard/Dashboard.php:86 -#: src/Dashboard/Dashboard.php:92 src/Dashboard/Dashboard.php:98 -#: src/Dashboard/Dashboard.php:103 src/Dashboard/Dashboard.php:108 -#: src/Dashboard/Dashboard.php:113 src/Dashboard/Dashboard.php:118 -msgid "Carbon" -msgstr "Kohlenstoffdioxid" +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "" + +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" msgstr[0] "" msgstr[1] "" -#: src/Command/CreateTestInventoryCommand.php:149 -msgid "Creating test inventory" +#: templates/history/status-item.html.twig +msgid "Historization status" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:70 -#: src/Command/CollectCarbonIntensityCommand.php:71 -msgid "Creating data source name" +#: templates/history/status-item.html.twig +msgid "No status" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:81 -msgid "Creating data zone name" +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and prevents from environmental impact calculation." msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:92 -msgid "Creating fake data..." +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:83 -msgid "Reading eco2mix data..." +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" msgstr "" -#: src/Profile.php:46 src/EnvironnementalImpact.php:54 -msgid "Environnemental impact" +#: templates/history/status-item.html.twig +msgid "Is not a template" msgstr "" -#: src/Profile.php:87 entrée standard:48 -msgctxt "button" -msgid "Save" -msgstr "Speichern" +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "" -#: src/CronTask.php:50 -msgid "Download carbon emissions from RTE" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" msgstr "" -#: src/CronTask.php:51 src/CronTask.php:57 -msgid "Maximum number of entries to download" +#: templates/history/status-item.html.twig +msgid "Has a location" msgstr "" -#: src/CronTask.php:56 -msgid "Download carbon emissions from ElectricityMap" +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" msgstr "" -#: src/CronTask.php:62 -msgid "Compute daily environnemental impact for all assets" +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" msgstr "" -#: src/CronTask.php:63 -msgid "Maximum number of entries to calculate" +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" msgstr "" -#: src/CarbonIntensity.php:57 -msgid "Carbon intensity" +#: templates/history/status-item.html.twig +msgid "The asset has a model" msgstr "" -#: src/CarbonIntensity.php:96 -msgid "ID" +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" msgstr "" -#: src/CarbonIntensity.php:105 -msgid "Emission date" +#: templates/history/status-item.html.twig +msgid "The asset has a type" msgstr "" -#: src/CarbonIntensity.php:132 -msgid "Intensity" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" msgstr "" -#: src/Report.php:48 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "" -#: src/Toolbox.php:194 src/Dashboard/Provider.php:519 -msgid "g" +#: templates/history/status-item.html.twig +msgid "The asset has a category" msgstr "" -#: src/Toolbox.php:195 src/Dashboard/Provider.php:520 -msgid "Kg" +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" msgstr "" -#: src/Toolbox.php:196 src/Dashboard/Provider.php:521 -msgid "t" +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" msgstr "" -#: src/Toolbox.php:197 src/Dashboard/Provider.php:522 -msgid "Kt" +#: templates/history/status-item.html.twig +msgid "Legend" msgstr "" -#: src/Toolbox.php:198 src/Dashboard/Provider.php:523 -msgid "Mt" +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" msgstr "" -#: src/Toolbox.php:199 src/Dashboard/Provider.php:524 -msgid "Gt" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Energie" +msgstr[1] "Energie" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" msgstr "" -#: src/Toolbox.php:200 src/Dashboard/Provider.php:525 -msgid "Tt" +#: templates/config.html.twig +msgid "Impact engine" msgstr "" -#: src/Toolbox.php:201 src/Dashboard/Provider.php:526 -msgid "Pt" +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" msgstr "" -#: src/Toolbox.php:202 src/Dashboard/Provider.php:527 -msgid "Et" +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -#: src/Toolbox.php:203 src/Dashboard/Provider.php:528 -msgid "Zt" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" msgstr "" -#: src/Toolbox.php:204 src/Dashboard/Provider.php:529 -msgid "Yt" +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Information" + +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" -#. TRANS: %1$s is a number maybe float or string and %2$s the unit -#: src/Toolbox.php:215 src/Toolbox.php:248 -#, php-format -msgid "%1$s %2$s" +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." msgstr "" -#: src/Toolbox.php:229 -msgid "W" +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" msgstr "" -#: src/Toolbox.php:230 -msgid "KW" +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." msgstr "" -#: src/Toolbox.php:231 -msgid "MW" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Warnung" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." msgstr "" -#: src/Toolbox.php:232 -msgid "GW" +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" msgstr "" -#: src/Toolbox.php:233 -msgid "TW" +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" msgstr "" -#: src/Toolbox.php:234 -msgid "PW" +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" msgstr "" -#: src/Toolbox.php:235 -msgid "EW" +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." msgstr "" -#: src/Toolbox.php:236 -msgid "ZW" +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" -#: src/Toolbox.php:237 -msgid "YW" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" msgstr "" -#: src/Dashboard/Widget.php:45 -msgid "Carbon Emission Per Type" +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." msgstr "" -#: src/Dashboard/Widget.php:51 -msgid "Carbon Emission Per Month" +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -#: src/Dashboard/Widget.php:57 entrée standard:38 -msgid "Total Carbon Emission" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: src/Dashboard/Widget.php:63 -msgid "Monthly Carbon Emission" +#: templates/abstractmodel.html.twig +msgid "Data quality" msgstr "" -#: src/Dashboard/Widget.php:69 -msgid "Unhandled Computers" +#: templates/abstractmodel.html.twig +msgid "Data source" msgstr "" -#: src/Dashboard/Filters/Item.php:42 -msgid "Item" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" msgstr "" -#: src/Dashboard/Provider.php:357 src/Dashboard/Provider.php:533 -#: src/Dashboard/Provider.php:534 -msgid "CO₂eq" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" msgstr "" -#: src/Dashboard/Provider.php:473 src/Dashboard/Provider.php:488 entrée -#: standard:120 -msgid "Carbon emission" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" msgstr "" -#: src/Dashboard/Provider.php:478 src/Dashboard/Provider.php:491 entrée -#: standard:123 -msgid "Consumed energy" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" -#: src/Dashboard/Provider.php:538 -msgid "KWh" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" -#: src/Dashboard/Provider.php:539 -msgid "MWh" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" msgstr "" -#: src/Dashboard/Provider.php:540 -msgid "GWh" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" msgstr "" -#: src/Dashboard/Provider.php:541 -msgid "TWh" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" msgstr "" -#: src/Dashboard/Provider.php:542 -msgid "PWh" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -#: src/Dashboard/Provider.php:543 -msgid "EWh" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: src/Dashboard/Provider.php:544 -msgid "ZWh" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." msgstr "" -#: src/Dashboard/Provider.php:545 -msgid "YWh" +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" msgstr "" -#: src/Dashboard/Dashboard.php:51 src/Dashboard/Dashboard.php:114 -msgid "Unhandled computers" +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." msgstr "" -#: src/Dashboard/Dashboard.php:57 -msgid "Handled computers" +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" msgstr "" -#: src/Dashboard/Dashboard.php:63 -msgid "Total power consumption" +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" msgstr "" -#: src/Dashboard/Dashboard.php:69 src/Dashboard/Dashboard.php:104 -msgid "Total carbon emission" +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" msgstr "" -#: src/Dashboard/Dashboard.php:75 -msgid "Total power consumption per model" +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" msgstr "" -#: src/Dashboard/Dashboard.php:81 -msgid "Total carbon emission per model" +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" msgstr "" -#: src/Dashboard/Dashboard.php:87 src/Dashboard/Dashboard.php:255 -msgid "Carbon emission per month" +#: src/UsageInfo.php:62 +msgid "Usage informations" msgstr "" -#: src/Dashboard/Dashboard.php:93 -msgid "Carbon intensity (gCO2eq / KWh)" +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" msgstr "" -#: src/Dashboard/Dashboard.php:99 -msgid "Carbon emission per type" +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" msgstr "" -#: src/Dashboard/Dashboard.php:109 entrée standard:38 -msgid "Monthly carbon emission" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" msgstr "" -#: src/Dashboard/Dashboard.php:119 -msgid "Carbon emission per month graph" +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" msgstr "" -#: src/Dashboard/Dashboard.php:273 -msgid "Carbon dioxyde intensity" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" msgstr "" -#: src/ComputerUsageProfile.php:48 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" -msgstr[1] "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "" -#: src/ComputerUsageProfile.php:84 -msgid "Knowbase category" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" msgstr "" -#: src/ComputerUsageProfile.php:90 -msgid "As child of" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 +msgid "Maximum number of entries to download" msgstr "" -#: src/ComputerUsageProfile.php:105 entrée standard:52 -msgid "Start time" -msgstr "Startzeit" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Ende" -#: src/ComputerUsageProfile.php:113 entrée standard:58 -msgid "Stop time" -msgstr "Stopzeit" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "" -#: src/ComputerUsageProfile.php:121 entrée standard:66 -msgid "Monday" -msgstr "Montag" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "" -#: src/ComputerUsageProfile.php:129 entrée standard:72 -msgid "Tuesday" -msgstr "Dienstag" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "" -#: src/ComputerUsageProfile.php:137 entrée standard:78 -msgid "Wednesday" -msgstr "MIttwoch" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "" -#: src/ComputerUsageProfile.php:145 entrée standard:84 -msgid "Thursday" -msgstr "Donnerstag" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "" -#: src/ComputerUsageProfile.php:153 entrée standard:90 -msgid "Friday" -msgstr "Freitag" +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "" -#: src/ComputerUsageProfile.php:161 entrée standard:96 -msgid "Saturday" -msgstr "Samstag" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "" -#: src/ComputerUsageProfile.php:169 entrée standard:103 -msgid "Sunday" -msgstr "Sonntag" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:124 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:219 entrée standard:40 -msgid "Name" -msgstr "Name" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:125 -msgid "Download enabled" -msgstr "Download erlauben" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:126 -msgid "Source for historical" -msgstr "Quelle für historisches" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:132 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:225 -msgid "Total" -msgstr "Total" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:189 -msgid "No" -msgstr "Nein" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:186 -msgid "Yes" -msgstr "Ja" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:285 -msgid "Enable / Disable" -msgstr "Einschalten / Ausschalten" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "" -#: src/CarbonEmission.php:50 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" -msgstr[1] "" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "" -#: hook.php:133 hook.php:172 -msgid "Power consumption (W)" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" msgstr "" -#: setup.php:204 -msgid "Environmental Impact" +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" msgstr "" -#. TRANS: %s is the number of new version -#: install/migration/update_0.0.0_to_0.0.1.php:44 -#: install/migration/update_xxx_to_yyy.php:45 +#: src/Impact/History/AbstractAsset.php:384 #, php-format -msgid "Update to %s" +msgid "%d entries calculated" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_uasge_profiles.php:39 -msgid "Office hours" -msgstr "Bürozeiten" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:46 -msgid "Compute carbon emissions of computers" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:58 -msgid "Collect carbon intensities from RTE" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:70 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: entrée standard:35 -msgid "No zone available" -msgstr "Keine Zone verfügbar" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" +msgstr "" -#: entrée standard:37 -msgid "Please run the automatic action to downlaod data from this source." +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: entrée standard:43 -msgid "Key for electricitymap.org API" -msgstr "Schlüssel für die API von electricitymap.org" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: entrée standard:61 -msgid "Days of week where the computer usually runs" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: entrée standard:38 -msgid "Warning" -msgstr "Warnung" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Type" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: entrée standard:33 -msgid "Consumed energy and carbon emission per month" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: entrée standard:40 -msgid "Information" -msgstr "Information" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "" -#: entrée standard:50 -msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: entrée standard:51 -msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: entrée standard:55 -msgid "Did you know ?" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: entrée standard:56 -msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: entrée standard:81 -#, php-format -msgid "%s rows / page" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: entrée standard:90 -#, php-format -msgid "Showing %s to %s of %s rows" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: entrée standard:94 -#, php-format -msgid "%s-%s/%s" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: entrée standard:104 -msgid "Start" -msgstr "Start" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "" -#: entrée standard:109 -msgid "Previous" -msgstr "Vorherige" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "" -#: entrée standard:118 -#, php-format -msgid "%s-%s of %s" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: entrée standard:141 -msgid "Next" -msgstr "weiter" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" +msgstr "" -#: entrée standard:146 -msgid "End" -msgstr "Ende" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" +msgstr "" -#: entrée standard:50 standard:281 -msgid "No data" -msgstr "Keine Daten" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "" -#: entrée standard:88 -msgid "Check all" -msgstr "Alles prüfen" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "" -#: entrée standard:123 -msgid "Filter" -msgstr "Filter" +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "" -#: entrée standard:129 -msgid "Export" -msgstr "Exportieren" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "" -#: entrée standard:184 -msgid "All" -msgstr "Alles" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "" -#: entrée standard:310 -#, php-format -msgid "Show %s entries" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -#: entrée standard:42 -msgid "Compared to last month" +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" msgstr "" -#: entrée standard:35 -msgid "Want to know more ?" +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" msgstr "" -#: entrée standard:36 -msgid "Here is a video about the impact of numeric on the enviromnent." +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Month" +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" +#: src/Impact/Type.php:210 +msgid "Usage Acidification" msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" msgstr "" -#: entrée standard:36 -msgid "Usage information" +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" msgstr "" -#: entrée standard:41 -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "" -msgstr[1] "" +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "" + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "" + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "" +msgstr[1] "" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "" +msgstr[1] "" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Kohlenstoffdioxid" + +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "" +msgstr[1] "" + +#: src/Report.php:101 +#, php-format +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" +msgstr "" + +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "" +msgstr[1] "" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Download erlauben" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" +msgstr "" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Quelle für historisches" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Einschalten / Ausschalten" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "" + +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "" + +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" +msgstr "" + +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "" + +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "" + +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "" + +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "" + +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "" + +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "" + +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "" + +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "" + +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "" + +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 +msgid "Consumed energy and carbon emission per month" +msgstr "" + +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "" + +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "" + +#: src/Dashboard/Widget.php:746 +#, php-format +msgid "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" +msgstr "" + +#: src/Dashboard/Widget.php:812 +#, php-format +msgid "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" +msgstr "" + +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "" + +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" +msgstr "" + +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "" + +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "" + +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "" + +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "" + +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "" + +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "" + +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "" + +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "" + +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "" + +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "" + +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "" + +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" +msgstr "" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 +#, php-format +msgid "plugin carbon - handled %s" +msgstr "" + +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "" + +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" +msgstr "" + +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "" + +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "" + +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" +msgstr "" + +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "" + +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" +msgstr "" + +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" +msgstr "" + +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "" + +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" +msgstr "" + +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "" + +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "" + +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "" + +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "" + +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "" + +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "" + +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "" + +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "" + +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "" + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "" +msgstr[1] "" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "" + +#: src/Toolbox.php:280 +msgid "W" +msgstr "" + +#: src/Toolbox.php:281 +msgid "KW" +msgstr "" + +#: src/Toolbox.php:282 +msgid "MW" +msgstr "" + +#: src/Toolbox.php:283 +msgid "GW" +msgstr "" + +#: src/Toolbox.php:284 +msgid "TW" +msgstr "" + +#: src/Toolbox.php:285 +msgid "PW" +msgstr "" + +#: src/Toolbox.php:286 +msgid "EW" +msgstr "" + +#: src/Toolbox.php:287 +msgid "ZW" +msgstr "" + +#: src/Toolbox.php:288 +msgid "YW" +msgstr "" + +#: src/Toolbox.php:315 +msgid "Wh" +msgstr "" + +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "" + +#: setup.php:285 +msgid "Environmental Impact" +msgstr "" + +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." +msgstr "" + +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "" + +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "" + +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "" + +#: hook.php:312 +msgid "Update category" +msgstr "" + +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "" + +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "" + +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "" + +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Bürozeiten" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "" + +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "" + +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "" + +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "" + +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "" + +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "" + +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "" + +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "" diff --git a/locales/en_GB.mo b/locales/en_GB.mo index 980bd90a..55d00116 100644 Binary files a/locales/en_GB.mo and b/locales/en_GB.mo differ diff --git a/locales/en_GB.po b/locales/en_GB.po index 65dcaca2..e95082a2 100644 --- a/locales/en_GB.po +++ b/locales/en_GB.po @@ -1,14 +1,14 @@ # English translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER +# Copyright (C) 2026 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. +# Automatically generated, 2026. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-09-01 01:57+0000\n" -"PO-Revision-Date: 2025-09-01 01:57+0000\n" +"POT-Creation-Date: 2026-04-16 02:56+0000\n" +"PO-Revision-Date: 2026-04-16 02:56+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en_GB\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 msgid "Start time" msgstr "Start time" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 msgid "Stop time" msgstr "Stop time" @@ -30,10 +30,52 @@ msgstr "Stop time" msgid "Days of week where the computer usually runs" msgstr "Days of week where the computer usually runs" -#: templates/quick-report.html.twig front/report.php:54 +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Boavizta zone" + +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Carbon intensity" + +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Asset usage" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Usage profile" +msgstr[1] "Usage profiles" + +#: templates/quick-report.html.twig front/report.php:55 msgid "GLPI Carbon" msgstr "GLPI Carbon" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Source" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "Carbon intensity zone" +msgstr[1] "Carbon intensity zones" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "No zone available" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." +msgstr "Please run the automatic action to downlaod data from this source." + #: templates/environmentalimpact-item.html.twig msgid "Usage" msgstr "Usage" @@ -46,9 +88,11 @@ msgstr "Reset data" msgid "Calculate data" msgstr "Calculate data" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "Embodied impact" +msgid_plural "Embodied impacts" +msgstr[0] "Embodied impact" +msgstr[1] "Embodied impacts" #: templates/history/status-item.html.twig msgid "Historization status" @@ -84,13 +128,25 @@ msgstr "Is not a template" msgid "Linked to a computer" msgstr "Linked to a computer" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "Attached computer has a location" + #: templates/history/status-item.html.twig msgid "Has a location" msgstr "Has a location" #: templates/history/status-item.html.twig -msgid "The location has a state or a country" -msgstr "The location has a state or a country" +msgid "The location has carbon intensity data" +msgstr "The location has carbon intensity data" + +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "Real time carbon intensity enabled" + +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "The location has yearly carbon intensity data" #: templates/history/status-item.html.twig msgid "The asset has a model" @@ -104,6 +160,10 @@ msgstr "The model has a power consumption" msgid "The asset has a type" msgstr "The asset has a type" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "Type is not ignored" + #: templates/history/status-item.html.twig msgid "The type has a power consumption" msgstr "The type has a power consumption" @@ -124,28 +184,6 @@ msgstr "The asset has an inventory entry date" msgid "Legend" msgstr "Legend" -#: templates/history/status-item.html.twig -msgid "Satisfied requirement" -msgstr "Satisfied requirement" - -#: templates/history/status-item.html.twig -msgid "Missing requirement" -msgstr "Missing requirement" - -#: templates/history/status-item.html.twig -msgid "Optional missing data" -msgstr "Optional missing data" - -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "Asset usage" - -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Usage profile" -msgstr[1] "Usage profiles" - #: templates/monitortype.html.twig msgid "" "This power value is used as default when the power of a monitor model is " @@ -155,40 +193,16 @@ msgstr "" "unknown" #: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:50 +#: templates/networkequipmenttype.html.twig msgid "Power" msgid_plural "Powers" msgstr[0] "Power" msgstr[1] "Powers" -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "" -"This power value is used as default when the power of a computer model is " -"unknown" - -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "Category" - -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "No zone available" -msgstr "No zone available" - -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "Please run the automatic action to downlaod data from this source." -msgstr "Please run the automatic action to downlaod data from this source." - -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "Electricity maps" - -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "Key for electricitymap.org API" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "Do not evaluate" #: templates/config.html.twig msgid "Impact engine" @@ -198,49 +212,18 @@ msgstr "Impact engine" msgid "Usage carbon emissions are always calculated internally" msgstr "Usage carbon emissions are always calculated internally" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "Boavizta" - -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "Base URL to the Boaviztapi instance" - -#: templates/config.html.twig +#: templates/computertype.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." - -#: templates/config.html.twig -msgid "Enable geocoding" -msgstr "Enable geocoding" - -#: templates/location.html.twig src/UsageInfo.php:91 src/Profile.php:45 -msgid "Environmental impact" -msgstr "Environmental impact" - -#: templates/location.html.twig src/SearchOptions.php:121 src/Location.php:78 -msgid "Boavizta zone" -msgstr "Boavizta zone" - -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Warning" +"This power value is used as default when the power of a computer model is " +"unknown" -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "It represents %s percent of your parc that contains %s monitors." +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Category" #: templates/dashboard/information-block.html.twig msgid "Information" @@ -282,9 +265,20 @@ msgstr "" "1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " "about 20 meters." -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "Embodied primary energy" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Warning" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "It represents %s percent of your parc that contains %s monitors." + +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Yearly Usage Carbon Emission" #: templates/dashboard/monthly-carbon-emission.html.twig msgid "Monthly usage carbon emission" @@ -295,10 +289,17 @@ msgstr "Monthly usage carbon emission" msgid "Compared to %s" msgstr "Compared to %s" -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "Embodied carbon emission" +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "It represents %s percent of your parc that contains %s computers." + +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." +msgstr "" +"It represents %s percent of your parc that contains %s network equipments." #: templates/dashboard/information-video-card.html.twig msgid "Want to know more ?" @@ -308,35 +309,25 @@ msgstr "Want to know more ?" msgid "Here is a video about the impact of numeric on the enviromnent." msgstr "Here is a video about the impact of numeric on the enviromnent." -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format +#: templates/abstractmodel.html.twig msgid "" -"It represents %s percent of your parc that contains %s network equipments." +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -"It represents %s percent of your parc that contains %s network equipments." - -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." -msgstr "It represents %s percent of your parc that contains %s computers." +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:295 -#: src/Dashboard/DemoProvider.php:77 src/Dashboard/Widget.php:110 -msgid "Embodied abiotic depletion potential" -msgstr "Embodied abiotic depletion potential" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." +msgstr "Take care of the expected units before setting an impact." -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Provider.php:816 src/Dashboard/Grid.php:178 -#: src/Dashboard/Grid.php:281 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Widget.php:96 -msgid "Usage abiotic depletion potential" -msgstr "Usage abiotic depletion potential" +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Data quality" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "Yearly Usage Carbon Emission" +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Data source" #: templates/networkequipmenttype.html.twig msgid "" @@ -346,69 +337,50 @@ msgstr "" "This power value is used as default when the power of a network equipment " "model is unknown" -#: setup.php:274 -msgid "Environmental Impact" -msgstr "Environmental Impact" - -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" -msgstr "Always on" - -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" -msgstr "Office hours" - -#: install/install/create_automatic_actions.php:45 -#: install/migration/update_0.0.6_to_1.0.0/02_create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" -msgstr "Find the Alpha3 country code (ISO3166) of locations" - -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" -msgstr "Compute carbon emissions of computers" - -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" -msgstr "Collect carbon intensities from RTE" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Read carbon dioxyde intensity from external sources" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "Collect carbon intensities from ElectricityMap" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Source:" -#: install/install/create_automatic_actions.php:93 -#: install/migration/update_0.0.3_to_0.0.4/add_automatic_action.php:60 -msgid "Compute embodied impact of assets" -msgstr "Compute embodied impact of assets" - -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" -msgstr "Creating test inventory" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" +msgstr "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" -msgstr "Updating the report dashboard description" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" +msgstr "Geocoding is not enabled. Cannot resolve an address into a zone" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" -msgstr "Dashboard not found" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Address:" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" -msgstr "Dashboard description saved to %s" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zone:" -#: src/Command/CollectCarbonIntensityCommand.php:68 +#: src/Command/CollectCarbonIntensityCommand.php:123 #: src/Command/CreateFakeCarbonIntensityCommand.php:67 msgid "Creating data source name" msgstr "Creating data source name" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" -msgstr "Zone not found" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "This source does not exist" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." -msgstr "Reading eco2mix data..." +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "The zone is not handled by the data source" + +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Reading data..." #: src/Command/CreateFakeCarbonIntensityCommand.php:78 msgid "Creating data zone name" @@ -418,705 +390,1032 @@ msgstr "Creating data zone name" msgid "Creating fake data..." msgstr "Creating fake data..." -#: src/UsageInfo.php:59 -msgid "Usage informations" -msgstr "Usage informations" +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Updating the report dashboard description" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:828 -#, php-format -msgid "Evaluates the carbon emission in CO₂ equivalent. %s More information %s" -msgstr "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Dashboard not found" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:864 -#: src/Dashboard/Widget.php:901 +#: src/Command/ExportDashboardCommand.php:99 #, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent. " -"%s More information %s" -msgstr "" -"Evaluates the consumption of non renewable resources in Antimony equivalent. " -"%s More information %s" +msgid "Dashboard description saved to %s" +msgstr "Dashboard description saved to %s" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1086 -#, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" -msgstr "Evaluates the primary energy consumed. %s More information %s" +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Creating test inventory" -#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:142 +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 #: src/ComputerType.php:70 src/MonitorType.php:50 msgid "Power consumption" msgstr "Power consumption" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" -msgstr "Find the Alpha3 country code (ISO3166)" +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Usage informations" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" -msgstr "Maximum number of locations to solve" +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Environmental impact" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "%s More information %s" + +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "Invalid Boavizta API URL" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Connection to Boavizta API established" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "Resource diagnosis" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Collect carbon intensities from RTE" -#: src/CronTask.php:70 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 msgid "Download carbon emissions from RTE" msgstr "Download carbon emissions from RTE" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "Maximum number of entries to download" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" -msgstr "Download carbon emissions from ElectricityMap" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "End" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" -msgstr "Compute usage environnemental impact for all assets" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "Collect carbon intensities from Electricity Maps" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" -msgstr "Maximum number of entries to calculate" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "Download carbon emissions from Electricity Maps" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" -msgstr "Compute embodied environnemental impact for all assets" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Date of evaluation" -#: src/CronTask.php:211 -msgid "No zone to download" -msgstr "No zone to download" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Engine" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "Carbon intensity zone" -msgstr[1] "Carbon intensity zones" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Engine version" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" -msgstr "Data source for historical calculation" +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "Impact not evaluated" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" -msgstr "Download enabled" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Unspecified quality" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" -msgstr "Invalid Boavizta API URL" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "Manual data" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" -msgstr "Connection to Boavizta API established" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Estimated data" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "Carbon intensity source" -msgstr[1] "Carbon intensity sources" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "Downsampled data" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "Is historizable" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Measured data" -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "Carbon dioxyde intensity" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "grams of carbon dioxyde equivalent" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "grams of antimony equivalent" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "joules" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "Connection to Boavizta failed." + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "Embodied impact evaluation falied." + +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "Error while calculating impact" + +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "Nothing to calculate" + +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" +msgstr "%d entries calculated" + +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "Embodied Global warming potential" + +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "Embodied Abiotic depletion potential" + +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "Embodied Primary energy consumed" + +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" +msgstr "Embodied Climate change - Contribution of biogenic emissions" + +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" +msgstr "Embodied Climate change - Contribution of fossil fuel emissions" + +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" +msgstr "" +"Embodied Climate change - Contribution of emissions from land use change" + +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "Embodied Emissions of radionizing substances" + +#: src/Impact/Type.php:166 +msgid "Embodied Land use" +msgstr "Embodied Land use" + +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" +msgstr "Embodied Depletion of the ozone layer" + +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "Embodied Fine particle emissions" + +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" +msgstr "Embodied Photochemical ozone formation" + +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" +msgstr "Embodied Use of water resources" + +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "Embodied Material input per unit of service" + +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" +msgstr "Embodied Use of mineral and metal resources" + +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" +msgstr "Embodied Use of fossil resources (including nuclear)" + +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" +msgstr "Embodied Acidification" + +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" +msgstr "Embodied Freshwater ecotoxicity" + +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "Embodied Eutrophication of freshwater" + +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "Embodied Eutrophication of marine waters" + +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "Embodied Terrestrial eutrophication" + +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "Usage Global warming potential" + +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "Usage Abiotic depletion potential" + +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "Usage Primary energy consumed" + +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" +msgstr "Usage Climate change - Contribution of biogenic emissions" + +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" +msgstr "Usage Climate change - Contribution of fossil fuel emissions" + +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "Usage Climate change - Contribution of emissions from land use change" + +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "Usage Emissions of radionizing substances" + +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "Usage Land use" + +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "Usage Depletion of the ozone layer" + +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "Usage Fine particle emissions" + +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "Usage Photochemical ozone formation" + +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "Usage Use of water resources" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "Usage Material input per unit of service" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "Usage Use of mineral and metal resources" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "Usage Use of fossil resources (including nuclear)" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "Usage Acidification" -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 src/Dashboard/DemoProvider.php:49 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/DemoProvider.php:415 +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "Usage Freshwater ecotoxicity" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "Usage Eutrophication of freshwater" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "Usage Eutrophication of marine waters" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "Usage Terrestrial eutrophication" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "Total Global warming potential" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "Total Abiotic depletion potential" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "Total Primary energy consumed" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "Total Climate change - Contribution of biogenic emissions" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "Total Climate change - Contribution of fossil fuel emissions" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "Total Climate change - Contribution of emissions from land use change" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "Total Emissions of radionizing substances" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "Total Land use" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "Total Depletion of the ozone layer" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "Total Fine particle emissions" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "Total Photochemical ozone formation" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "Total Use of water resources" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "Total Material input per unit of service" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "Total Use of mineral and metal resources" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "Total Use of fossil resources (including nuclear)" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "Total Acidification" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "Total Freshwater ecotoxicity" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "Total Eutrophication of freshwater" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "Total Eutrophication of marine waters" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "Total Terrestrial eutrophication" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "Carbon emission in CO₂ equivalent" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "Consumption of non renewable resources in Antimony equivalent." + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "Primary energy consumed." + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "Incidence of disease" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Carbon intensity source" +msgstr[1] "Carbon intensity sources" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Ignore environmental impact" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Is historizable" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Unspecified" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Server" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Laptop" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartphone" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Usage impact" +msgstr[1] "Usage impacts" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Carbon" + +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "Quality" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Carbon report" +msgstr[1] "Carbon reports" + +#: src/Report.php:101 +#, php-format +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" +msgstr "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" + +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "Computer usage profile" +msgstr[1] "Computer usage profiles" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "Start time is invalid" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "Stop time is invalid" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Source name" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Zone name" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Download enabled" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Code" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "Not downloadable" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" +msgstr "This is a fallback source, there is no real-time data available" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Source for historical" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Enable / Disable" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Find the Alpha3 country code (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Maximum number of locations to solve" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Download carbon emissions from Watttime" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Compute usage environmental impact for all assets" + +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Maximum number of entries to calculate" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Compute embodied environmental impact for all assets" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "No zone to download" + +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" +msgstr "Environmental impact information video" + +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "Methodology information" + +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "Total Carbon Emission" + +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "Monthly Carbon Emission" + +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "Biggest monthly averaged carbon emission per model" + +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "Carbon Emission Per month" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Usage abiotic depletion potential" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "Impact criteria" + +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "Unhandled Computers" + +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "Unhandled Monitors" + +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "Unhandled Network equipments" + +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "Radar chart" + +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 +msgid "Consumed energy and carbon emission per month" +msgstr "Consumed energy and carbon emission per month" + +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "Carbon emission" + +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "Consumed energy" + +#: src/Dashboard/Widget.php:746 +#, php-format +msgid "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" +msgstr "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" + +#: src/Dashboard/Widget.php:812 +#, php-format +msgid "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" +msgstr "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" + +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "More information" + +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent. " +"%s More information %s" +msgstr "" +"Evaluates the consumption of non renewable resources in Antimony equivalent. " +"%s More information %s" + +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "Handled percentage" + +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "CO₂eq" msgstr "CO₂eq" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 msgid "g" msgstr "g" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 msgid "Kg" msgstr "Kg" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 msgid "t" msgstr "t" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 msgid "Kt" msgstr "Kt" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 msgid "Mt" msgstr "Mt" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 msgid "Gt" msgstr "Gt" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 msgid "Tt" msgstr "Tt" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 msgid "Pt" msgstr "Pt" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 msgid "Et" msgstr "Et" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 msgid "Zt" msgstr "Zt" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 msgid "Yt" msgstr "Yt" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:427 msgid "handled assets ratio" msgstr "handled assets ratio" -#: src/Dashboard/Provider.php:379 src/Dashboard/Grid.php:67 +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 msgid "Handled assets ratio" msgstr "Handled assets ratio" -#: src/Dashboard/Provider.php:402 src/Dashboard/DemoProvider.php:334 +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 msgid "Handled" msgstr "Handled" -#: src/Dashboard/Provider.php:407 src/Dashboard/DemoProvider.php:339 +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 msgid "Unhandled" msgstr "Unhandled" -#: src/Dashboard/Provider.php:434 src/Dashboard/DemoProvider.php:279 +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Ignored" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format msgid "plugin carbon - handled %s" msgstr "plugin carbon - handled %s" -#: src/Dashboard/Provider.php:435 src/Dashboard/DemoProvider.php:280 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format msgid "plugin carbon - unhandled %s" msgstr "plugin carbon - unhandled %s" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "plugin carbon - ignored %s" + +#: src/Dashboard/Provider.php:632 msgid "plugin carbon - Total usage power consumption" msgstr "plugin carbon - Total usage power consumption" -#: src/Dashboard/Provider.php:552 src/Dashboard/DemoProvider.php:362 -#: src/Dashboard/DemoProvider.php:411 +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 msgid "plugin carbon - Usage carbon emission" msgstr "plugin carbon - Usage carbon emission" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "Total embodied global warming potential" - -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 +#: src/Dashboard/Provider.php:747 msgid "Sbeq" msgstr "Sbeq" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:1035 msgid "Total abiotic depletion potential" msgstr "Total abiotic depletion potential" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Embodied abiotic depletion potential" + +#: src/Dashboard/Provider.php:1054 msgid "Total usage abiotic depletion potential" msgstr "Total usage abiotic depletion potential" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:1066 msgid "Total global warming potential" msgstr "Total global warming potential" -#: src/Dashboard/Provider.php:897 src/Dashboard/Grid.php:186 -#: src/Dashboard/Grid.php:289 +#: src/Dashboard/Provider.php:1082 msgid "Embodied global warming potential" msgstr "Embodied global warming potential" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:1085 msgid "Total usage global warming potential" msgstr "Total usage global warming potential" -#: src/Dashboard/Provider.php:922 src/Dashboard/Widget.php:482 -msgid "Consumed energy and carbon emission per month" -msgstr "Consumed energy and carbon emission per month" - -#: src/Dashboard/Provider.php:1027 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/Widget.php:527 -#: src/Dashboard/Widget.php:542 -msgid "Carbon emission" -msgstr "Carbon emission" - -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 msgid "KWh" msgstr "KWh" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 msgid "MWh" msgstr "MWh" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 msgid "GWh" msgstr "GWh" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 msgid "TWh" msgstr "TWh" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 msgid "PWh" msgstr "PWh" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 msgid "EWh" msgstr "EWh" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 msgid "ZWh" msgstr "ZWh" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 msgid "YWh" msgstr "YWh" -#: src/Dashboard/Provider.php:1043 src/Dashboard/DemoProvider.php:143 -#: src/Dashboard/DemoProvider.php:239 src/Dashboard/Widget.php:532 -#: src/Dashboard/Widget.php:545 -msgid "Consumed energy" -msgstr "Consumed energy" - -#: src/Dashboard/Grid.php:62 src/Dashboard/Grid.php:127 -#: src/Dashboard/Grid.php:228 src/AbstractType.php:58 -msgid "Carbon" -msgstr "Carbon" - -#: src/Dashboard/Grid.php:76 +#: src/Dashboard/Grid.php:72 msgid "Handled assets count" msgstr "Handled assets count" -#: src/Dashboard/Grid.php:139 +#: src/Dashboard/Grid.php:135 #, php-format msgid "Handled %s" msgstr "Handled %s" -#: src/Dashboard/Grid.php:150 +#: src/Dashboard/Grid.php:146 #, php-format msgid "Unhandled %s" msgstr "Unhandled %s" -#: src/Dashboard/Grid.php:166 -msgid "Usage power consumption" -msgstr "Usage power consumption" - -#: src/Dashboard/Grid.php:172 -msgid "Usage carbon emission" -msgstr "Usage carbon emission" - -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:301 -msgid "Embodied primary energy consumed" -msgstr "Embodied primary energy consumed" - -#: src/Dashboard/Grid.php:206 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "Global warming potential" - -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" -msgstr "Abiotic depletion potential" - -#: src/Dashboard/Grid.php:239 +#: src/Dashboard/Grid.php:232 #, php-format msgid "Unhandled %s ratio" msgstr "Unhandled %s ratio" -#: src/Dashboard/Grid.php:251 +#: src/Dashboard/Grid.php:244 msgid "Usage carbon emission year to date" msgstr "Usage carbon emission year to date" -#: src/Dashboard/Grid.php:257 +#: src/Dashboard/Grid.php:250 msgid "Monthly carbon emission" msgstr "Monthly carbon emission" -#: src/Dashboard/Grid.php:266 +#: src/Dashboard/Grid.php:259 msgid "Usage global warming potential chart" msgstr "Usage global warming potential chart" -#: src/Dashboard/Grid.php:275 src/Dashboard/Widget.php:83 -#: src/Dashboard/Widget.php:579 -msgid "Biggest monthly averaged carbon emission per model" -msgstr "Biggest monthly averaged carbon emission per model" - -#: src/Dashboard/Grid.php:311 src/Dashboard/Widget.php:57 -msgid "Environmental impact information video" -msgstr "Environmental impact information video" +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Environmental impact methodology information" -#: src/Dashboard/Grid.php:316 -msgid "Environmental impact methodology_information" -msgstr "Environmental impact methodology_information" - -#: src/Dashboard/DemoProvider.php:113 +#: src/Dashboard/DemoProvider.php:76 msgid "Usage carbon emission per month" msgstr "Usage carbon emission per month" -#: src/Dashboard/DemoProvider.php:311 +#: src/Dashboard/DemoProvider.php:274 msgid "plugin carbon - handled assets ratio" msgstr "plugin carbon - handled assets ratio" -#: src/Dashboard/Widget.php:63 -msgid "Methodology information" -msgstr "Methodology information" - -#: src/Dashboard/Widget.php:71 -msgid "Total Carbon Emission" -msgstr "Total Carbon Emission" - -#: src/Dashboard/Widget.php:77 -msgid "Monthly Carbon Emission" -msgstr "Monthly Carbon Emission" - -#: src/Dashboard/Widget.php:90 -msgid "Carbon Emission Per month" -msgstr "Carbon Emission Per month" - -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" -msgstr "Embodied consumed primary energy" - -#: src/Dashboard/Widget.php:127 -msgid "Unhandled Computers" -msgstr "Unhandled Computers" - -#: src/Dashboard/Widget.php:137 -msgid "Unhandled Monitors" -msgstr "Unhandled Monitors" - -#: src/Dashboard/Widget.php:147 -msgid "Unhandled Network equipments" -msgstr "Unhandled Network equipments" - -#: src/Dashboard/Widget.php:157 -msgid "Radar chart" -msgstr "Radar chart" - -#: src/Dashboard/Widget.php:721 -#, php-format -msgid "" -"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " -"months. %s More information %s" -msgstr "" -"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " -"months. %s More information %s" - -#: src/Dashboard/Widget.php:787 -#, php-format -msgid "" -"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " -"elapsed months. %s More information %s" -msgstr "" -"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " -"elapsed months. %s More information %s" - -#: src/Dashboard/Widget.php:1076 -msgid "Total embodied primary energy" -msgstr "Total embodied primary energy" - -#: src/Dashboard/Widget.php:1145 -msgid "Handled percentage" -msgstr "Handled percentage" - -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "Unspecified" - -#: src/ComputerType.php:58 -msgid "Server" -msgstr "Server" - -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "Laptop" - -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "Tablet" - -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "Smartphone" - -#: src/ComputerUsageProfile.php:52 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "Computer usage profile" -msgstr[1] "Computer usage profiles" - -#: src/ComputerUsageProfile.php:92 -msgid "Start time is invalid" -msgstr "Start time is invalid" - -#: src/ComputerUsageProfile.php:97 -msgid "Stop time is invalid" -msgstr "Stop time is invalid" - -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "Usage impact" -msgstr[1] "Usage impacts" - -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "Global warming potential quality" - -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" -msgstr "Abiotic depletion potential quality" - -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "Primary energy quality" - -#: src/UsageImpact.php:149 src/CarbonEmission.php:150 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" -msgstr "Date of evaluation" - -#: src/UsageImpact.php:156 src/CarbonEmission.php:157 -#: src/EmbodiedImpact.php:127 -msgid "Engine" -msgstr "Engine" +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Carbon dioxyde intensity" -#: src/UsageImpact.php:163 src/CarbonEmission.php:164 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" -msgstr "Engine version" +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "Carbon intensity source and zone" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "Carbon report" -msgstr[1] "Carbon reports" +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Emission date" -#: src/Report.php:107 -#, php-format -msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" -msgstr "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intensity" -#: src/CarbonEmission.php:48 +#: src/CarbonEmission.php:49 msgid "Carbon Emission" msgid_plural "Carbon Emissions" msgstr[0] "Carbon Emission" msgstr[1] "Carbon Emissions" -#: src/CarbonEmission.php:119 +#: src/CarbonEmission.php:120 msgid "Energy" msgstr "Energy" -#: src/CarbonEmission.php:127 +#: src/CarbonEmission.php:128 msgid "Emission" msgstr "Emission" -#: src/CarbonEmission.php:135 +#: src/CarbonEmission.php:136 msgid "Energy quality" msgstr "Energy quality" -#: src/CarbonEmission.php:143 +#: src/CarbonEmission.php:144 msgid "Emission quality" msgstr "Emission quality" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "Global Warming Potential" - -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" -msgstr "Abiotic Depletion Potential" - -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "Primary energy" - -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "Source name" - -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "Zone name" - -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "Code" - -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" -msgstr "Not downloadable" - -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "This is a fallback source, there is no real-time data available" - -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "Source for historical" - -#: src/CarbonIntensitySource_Zone.php:352 -msgid "Enable / Disable" -msgstr "Enable / Disable" - -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 -msgid "grams of carbon dioxyde equivalent" -msgstr "grams of carbon dioxyde equivalent" - -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 -msgid "grams of antimony equivalent" -msgstr "grams of antimony equivalent" - -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 -msgid "joules" -msgstr "joules" - -#: src/Impact/History/AbstractAsset.php:364 -msgid "Error while calculating impact" -msgstr "Error while calculating impact" - -#: src/Impact/History/AbstractAsset.php:372 -msgid "Nothing to calculate" -msgstr "Nothing to calculate" - -#: src/Impact/History/AbstractAsset.php:378 -#, php-format -msgid "%d entries calculated" -msgstr "%d entries calculated" - -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "Carbon intensity" - -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "Emission date" - -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "Intensity" - -#: src/Toolbox.php:251 +#: src/Toolbox.php:280 msgid "W" msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" msgstr "Wh" -#: hook.php:256 +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" + +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Environmental Impact" + +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." +msgstr "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." + +#: hook.php:301 msgid "Associate to an usage profile" msgstr "Associate to an usage profile" -#: hook.php:260 hook.php:265 hook.php:269 +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "Delete all calculated environmental impacts" + +#: hook.php:311 hook.php:316 hook.php:320 msgid "Update type power consumption" msgstr "Update type power consumption" -#: hook.php:261 +#: hook.php:312 msgid "Update category" msgstr "Update category" -#: hook.php:273 +#: hook.php:324 msgid "Update zone for Boavizta engine" msgstr "Update zone for Boavizta engine" -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "Update carbon intensity source and zone" + +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Find the Alpha3 country code (ISO3166) of locations" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Compute carbon emissions of computers" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Compute embodied impact of assets" + +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Always on" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Office hours" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 msgid "Missing arguments in request." msgstr "Missing arguments in request." -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 msgid "Bad arguments." msgstr "Bad arguments." -#: front/usageimpact.form.php:88 front/embodiedimpact.form.php:69 -#: front/embodiedimpact.form.php:78 +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 msgid "Reset denied." msgstr "Reset denied." -#: front/usageimpact.form.php:93 front/embodiedimpact.form.php:83 +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 msgid "Reset failed." msgstr "Reset failed." -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." -msgstr "Delete of usage impact failed." - -#: front/usageimpact.form.php:123 +#: front/usageimpact.form.php:122 msgid "Missing data prevents historization of this asset." msgstr "Missing data prevents historization of this asset." -#: front/usageimpact.form.php:126 +#: front/usageimpact.form.php:125 msgid "Update of global warming potential failed." msgstr "Update of global warming potential failed." -#: front/usageimpact.form.php:132 front/embodiedimpact.form.php:93 +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 msgid "Unable to find calculation engine for this asset." msgstr "Unable to find calculation engine for this asset." -#: front/usageimpact.form.php:137 +#: front/usageimpact.form.php:136 msgid "Update of usage impact failed." msgstr "Update of usage impact failed." - -#: front/embodiedimpact.form.php:102 -msgid "Update failed." -msgstr "Update failed." diff --git a/locales/es_AR.mo b/locales/es_AR.mo index 51145131..78a1f019 100644 Binary files a/locales/es_AR.mo and b/locales/es_AR.mo differ diff --git a/locales/es_AR.po b/locales/es_AR.po index e9dcc579..df799141 100644 --- a/locales/es_AR.po +++ b/locales/es_AR.po @@ -5,16 +5,16 @@ # # Translators: # Thierry Bugier , 2025 -# Alan Lehoux, 2025 +# Alan Lehoux, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: Alan Lehoux, 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Alan Lehoux, 2026\n" "Language-Team: Spanish (Argentina) (https://app.transifex.com/teclib/teams/28042/es_AR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,47 +22,217 @@ msgstr "" "Language: es_AR\n" "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "Emisiones de Carbono Anuales" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Hora de inicio" -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" -msgstr "Emisiones de carbono mensuales" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Hora de fin" -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" -msgstr "En comparación con %s" +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Días de la semana en los que la computadora suele funcionar" -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "Energía primaria incorporada" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" -msgstr "Uso del potencial de agotamiento abiótico" +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Zona Boavizta" -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Advertencia" +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intensidad de carbono" -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Uso del activo" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Perfil de uso" +msgstr[1] "Perfiles de uso" +msgstr[2] "Perfiles de uso" + +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI Carbono" + +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Fuente" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "Zona de intensidad de carbono" +msgstr[1] "Zonas de intensidad de carbono" +msgstr[2] "Zonas de intensidad de carbono" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "No hay zona disponible" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." +msgstr "" +"Por favor, ejecutá la acción automática para descargar datos de esta fuente." + +#: templates/environmentalimpact-item.html.twig +msgid "Usage" +msgstr "Uso" + +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "Restablecer datos" + +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "Calcular datos" + +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: templates/history/status-item.html.twig +msgid "Historization status" +msgstr "Estado de historización" + +#: templates/history/status-item.html.twig +msgid "No status" +msgstr "Sin estado" + +#: templates/history/status-item.html.twig msgid "" -"It represents %s percent of your parc that contains %s network equipments." +"This data is missing and prevents from environmental impact calculation." +msgstr "Faltan estos datos, lo que impide calcular el impacto ambiental." + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." msgstr "" -"Representa %s por ciento de tu parque, que contiene %s equipos de red." +"Faltan estos datos, lo que podría reducir la calidad del cálculo de impacto " +"ambiental." -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "Representa %s por ciento de tu parque, que contiene %s monitores." +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" +msgstr "No está en la papelera" + +#: templates/history/status-item.html.twig +msgid "Is not a template" +msgstr "No es una plantilla" + +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "Vinculado a una computadora" + +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Has a location" +msgstr "Tiene una ubicación" + +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" +msgstr "La ubicación tiene datos de intensidad de carbono" + +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "Intensidad de carbono en tiempo real activada" + +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "La ubicación tiene datos anuales de intensidad de carbono" + +#: templates/history/status-item.html.twig +msgid "The asset has a model" +msgstr "El activo tiene un modelo" + +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" +msgstr "El modelo tiene un consumo de potencia" + +#: templates/history/status-item.html.twig +msgid "The asset has a type" +msgstr "El activo tiene un tipo" + +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "El tipo no está ignorado" + +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "El tipo tiene un consumo de potencia" + +#: templates/history/status-item.html.twig +msgid "The asset has a category" +msgstr "El activo tiene una categoría" + +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" +msgstr "El activo tiene un perfil de uso" + +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" +msgstr "El activo tiene una fecha de alta en el inventario" + +#: templates/history/status-item.html.twig +msgid "Legend" +msgstr "Leyenda" + +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de monitor" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Potencia" +msgstr[1] "Potencias" +msgstr[2] "Potencias" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "No evaluar" + +#: templates/config.html.twig +msgid "Impact engine" +msgstr "Motor de impacto" + +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" +msgstr "Las emisiones de carbono por uso siempre se calculan internamente" + +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" +msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de computadora" + +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Categoría" #: templates/dashboard/information-block.html.twig msgid "Information" @@ -105,69 +275,70 @@ msgstr "" "1 gramo de CO₂ equivale al CO₂ emitido al conducir un auto durante " "aproximadamente 20 metros." -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "Emisión de carbono incorporada" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Advertencia" -#: templates/dashboard/information-video-card.html.twig -msgid "Want to know more ?" -msgstr "¿Querés saber más?" +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Representa %s por ciento de tu parque, que contiene %s monitores." -#: templates/dashboard/information-video-card.html.twig -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "" -"Aquí hay un video sobre el impacto de lo digital en el medio ambiente." +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Emisión de Carbono Por Uso Anual" + +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Emisión de carbono por uso mensual" + +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "En comparación con %s" #: templates/dashboard/unhandled-computers-card.html.twig #, php-format msgid "It represents %s percent of your parc that contains %s computers." msgstr "Representa %s por ciento de tu parque, que contiene %s computadoras." -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" -msgstr "Potencial de agotamiento abiótico incorporado" - -#: templates/monitortype.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" -"Este valor de potencia se utiliza por defecto cuando se desconoce la " -"potencia de un modelo de monitor" +"Representa %s por ciento de tu parque, que contiene %s equipos de red." -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Potencia" -msgstr[1] "Potencias" -msgstr[2] "Potencias" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "¿Querés saber más?" -#: templates/computertype.html.twig +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "" +"Aquí hay un video sobre el impacto de lo digital en el medio ambiente." + +#: templates/abstractmodel.html.twig msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -"Este valor de potencia se utiliza por defecto cuando se desconoce la " -"potencia de un modelo de computadora" +"Los impactos detallados a continuación deben incluir únicamente los procesos" +" de fabricación, disposición final y reciclaje." -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "Categoría" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." +msgstr "" -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "No zone available" -msgstr "No hay zona disponible" +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Calidad de los datos" -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "Please run the automatic action to downlaod data from this source." -msgstr "" -"Por favor, ejecutá la acción automática para descargar datos de esta fuente." +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Fuente de datos" #: templates/networkequipmenttype.html.twig msgid "" @@ -177,941 +348,1092 @@ msgstr "" "Este valor de potencia se utiliza por defecto cuando se desconoce la " "potencia de un modelo de equipo de red" -#: templates/environmentalimpact-item.html.twig -msgid "Usage" -msgstr "Uso" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Leer intensidad de carbono de fuentes externas" -#: templates/environmentalimpact-item.html.twig -msgid "Reset data" -msgstr "Restablecer datos" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Fuente:" -#: templates/environmentalimpact-item.html.twig -msgid "Calculate data" -msgstr "Calcular datos" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" +msgstr "" +"La fuente seleccionada no enumera sus zonas compatibles. Intentando " +"identificar una zona a partir de una dirección" -#: templates/environmentalimpact-item.html.twig -msgid "Embodied impact" -msgstr "Impacto incorporado" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" +msgstr "" +"La geolocalización no está activada. No se puede resolver una dirección en " +"una zona" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "Hora de inicio" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Dirección:" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "Hora de fin" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zona:" -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "Días de la semana en los que la computadora suele funcionar" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Creando nombre de la fuente de datos" -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "Uso del activo" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "" -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Perfil de uso" -msgstr[1] "Perfiles de uso" -msgstr[2] "Perfiles de uso" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "" -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "GLPI Carbono" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Leyendo datos..." + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Creando nombre de la zona de datos" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Creando datos de prueba..." + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Actualizando la descripción del tablero de reportes" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Tablero no encontrado" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Descripción del tablero guardada en %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Creando inventario de prueba" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Consumo de potencia" -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Información de uso" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 msgid "Environmental impact" msgstr "Impacto ambiental" -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" -msgstr "Zona Boavizta" +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "" -#: templates/history/status-item.html.twig -msgid "Historization status" -msgstr "Estado de historización" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "URL de la API de Boavizta inválida" -#: templates/history/status-item.html.twig -msgid "No status" -msgstr "Sin estado" +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Conexión con la API de Boavizta establecida" -#: templates/history/status-item.html.twig -msgid "" -"This data is missing and prevents from environmental impact calculation." +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" msgstr "" -#: templates/history/status-item.html.twig -msgid "" -"This data is missing and may reduce the quality of environmental impact " -"calculation." -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Recopilar intensidades de carbono de RTE" -#: templates/history/status-item.html.twig -msgid "Is not in the trash bin" -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "Descargar las emisiones de carbono de RTE" -#: templates/history/status-item.html.twig -msgid "Is not a template" -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 +msgid "Maximum number of entries to download" +msgstr "Cantidad máxima de entradas a descargar" -#: templates/history/status-item.html.twig -msgid "Linked to a computer" -msgstr "" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Fin" -#: templates/history/status-item.html.twig -msgid "Has a location" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: templates/history/status-item.html.twig -msgid "The location has a state or a country" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: templates/history/status-item.html.twig -msgid "Real time carbon intensity enabled" -msgstr "" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Fecha de evaluación" -#: templates/history/status-item.html.twig -msgid "The location has yearly carbon intensity data" -msgstr "" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Motor" -#: templates/history/status-item.html.twig -msgid "The asset has a model" -msgstr "" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Versión del motor" -#: templates/history/status-item.html.twig -msgid "The model has a power consumption" -msgstr "" +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "Impacto no evaluado" -#: templates/history/status-item.html.twig -msgid "The asset has a type" -msgstr "" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Calidad sin especificar" -#: templates/history/status-item.html.twig -msgid "The type has a power consumption" -msgstr "" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "Datos manuales" -#: templates/history/status-item.html.twig -msgid "The asset has a category" -msgstr "" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Datos estimados" -#: templates/history/status-item.html.twig -msgid "The asset has a usage profile" -msgstr "" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "Datos submuestreados" -#: templates/history/status-item.html.twig -msgid "The asset has an inventory entry date" -msgstr "" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Datos medidos" -#: templates/history/status-item.html.twig -msgid "Legend" -msgstr "" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "gramos de dióxido de carbono equivalente" -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "gramos de antimonio equivalente" -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "Clave para API de electricitymap.org" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "joules" -#: templates/config.html.twig -msgid "Impact engine" -msgstr "" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "La conexión a Boavizta falló." -#: templates/config.html.twig -msgid "Usage carbon emissions are always calculated internally" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." msgstr "" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "Error al calcular el impacto" -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "No hay nada para calcular" + +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" +msgstr "Se calcularon %d entradas" + +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" msgstr "" -#: templates/config.html.twig -msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: templates/config.html.twig -msgid "Enable geocoding" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: setup.php:273 -msgid "Environmental Impact" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" msgstr "" -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: front/embodiedimpact.form.php:102 -msgid "Update failed." +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: hook.php:317 -msgid "Associate to an usage profile" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: hook.php:322 -msgid "Update category" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: hook.php:334 -msgid "Update zone for Boavizta engine" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" msgstr "" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" msgstr "" -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "Carbono" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" msgstr "" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" +#: src/Impact/Type.php:202 +msgid "Usage Land use" msgstr "" -#: src/CronTask.php:70 -msgid "Download carbon emissions from RTE" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" msgstr "" -#: src/CronTask.php:71 src/CronTask.php:77 -msgid "Maximum number of entries to download" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" msgstr "" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" msgstr "" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" msgstr "" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" msgstr "" -#: src/CronTask.php:211 -msgid "No zone to download" +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" msgstr "" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" +#: src/Impact/Type.php:210 +msgid "Usage Acidification" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 -msgid "grams of carbon dioxyde equivalent" +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 -msgid "grams of antimony equivalent" +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 -msgid "joules" +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" msgstr "" -#: src/Impact/History/AbstractAsset.php:364 -msgid "Error while calculating impact" +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" msgstr "" -#: src/Impact/History/AbstractAsset.php:372 -msgid "Nothing to calculate" +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" msgstr "" -#: src/Impact/History/AbstractAsset.php:378 -#, php-format -msgid "%d entries calculated" +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "" -#: src/Report.php:107 -#, php-format -msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" -#: src/CarbonEmission.php:119 -msgid "Energy" +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" msgstr "" -#: src/CarbonEmission.php:127 -msgid "Emission" +#: src/Impact/Type.php:238 +msgid "Total Land use" msgstr "" -#: src/CarbonEmission.php:135 -msgid "Energy quality" +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" msgstr "" -#: src/CarbonEmission.php:143 -msgid "Emission quality" +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" msgstr "" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" msgstr "" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" msgstr "" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." +#: src/Impact/Type.php:246 +msgid "Total Acidification" msgstr "" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" msgstr "" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" msgstr "" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" msgstr "" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." msgstr "" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." msgstr "" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" +#: src/Impact/Type.php:332 +msgid "Incidence of disease" msgstr "" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Fuente de intensidad de carbono" +msgstr[1] "Fuentes de intensidad de carbono" +msgstr[2] "Fuentes de intensidad de carbono" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" -msgstr "" +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Ignorar impacto ambiental" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" -msgstr "" +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Es historizable" -#: src/UsageInfo.php:59 -msgid "Usage informations" -msgstr "" +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Sin especificar" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" -msgstr "" +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Servidor" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 -#, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Laptop" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartphone" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Impacto por uso" +msgstr[1] "Impactos por uso" +msgstr[2] "Impactos por uso" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Carbono" + +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Informe de carbono" +msgstr[1] "Informes de carbono" +msgstr[2] "Informes de carbono" + +#: src/Report.php:101 #, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" +"Modo demo activado. Los datos debajos no son representativos de los activos " +"en la base de datos. %sDesactivar el modo demo%s" -#: src/ComputerUsageProfile.php:52 +#: src/ComputerUsageProfile.php:51 msgid "Computer usage profile" msgid_plural "Computer usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "Perfil de uso de computadora" +msgstr[1] "Perfiles de uso de computadora" +msgstr[2] "Perfiles de uso de computadora" -#: src/ComputerUsageProfile.php:92 +#: src/ComputerUsageProfile.php:117 msgid "Start time is invalid" -msgstr "" +msgstr "La hora de inicio es inválida" -#: src/ComputerUsageProfile.php:97 +#: src/ComputerUsageProfile.php:122 msgid "Stop time is invalid" +msgstr "La hora de finalización es inválida" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Nombre de la fuente" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Nombre de la zona" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Descarga activada" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Código" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "No descargable" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" +"Esta es una fuente de respaldo; no hay datos en tiempo real disponibles" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Fuente para histórico" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Activar / Desactivar" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Buscar el código de país Alpha3 (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Cantidad máxima de ubicaciones a resolver" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Descargar emisiones de carbono desde Watttime" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Calcular el impacto ambiental de uso para todos los activos" + +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Cantidad máxima de entradas a calcular" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Calcular el impacto ambiental incorporado para todos los activos" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "No hay zonas para descargar" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 msgid "Environmental impact information video" -msgstr "" +msgstr "Video informativo sobre el impacto ambiental" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:62 msgid "Methodology information" -msgstr "" +msgstr "Información sobre la metodología" #: src/Dashboard/Widget.php:71 msgid "Total Carbon Emission" -msgstr "" +msgstr "Emisiones Totales de Carbono" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" -msgstr "" +msgstr "Emisiones de Carbono Mensuales" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 msgid "Biggest monthly averaged carbon emission per model" -msgstr "" +msgstr "Máximo promedio mensual de emisiones de carbono por modelo" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" -msgstr "" +msgstr "Emisiones de Carbono Por mes" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico por uso" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" msgstr "" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:142 msgid "Unhandled Computers" -msgstr "" +msgstr "Computadoras no gestionadas" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" -msgstr "" +msgstr "Monitores No gestionados" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" -msgstr "" +msgstr "Equipos de red No gestionados" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" -msgstr "" +msgstr "Gráfico de radar" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" -msgstr "" +msgstr "Consumo de energía y emisiones de carbono por mes" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "Carbon emission" -msgstr "" +msgstr "Emisión de carbono" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 msgid "Consumed energy" -msgstr "" +msgstr "Energía consumida" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" +"Evalúa la emisión de carbono por uso en CO₂ equivalente durante los últimos " +"2 meses. %s Más información %s" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" +"Evalúa la emisión de carbono por uso en CO₂ equivalente durante los últimos " +"12 meses transcurridos. %s Más información %s" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" +#: src/Dashboard/Widget.php:854 +msgid "More information" msgstr "" -#: src/Dashboard/Widget.php:1151 -msgid "Handled percentage" +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" +"Evalúa el consumo de recursos no renovables en Antimonio equivalente. %s Más" +" información %s" -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "Porcentaje gestionado" + +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "CO₂eq" -msgstr "" +msgstr "CO₂eq" -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "" +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "g" -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "" +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "Kg" -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "" +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "t" -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "" +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "Kt" -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "" +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "Mt" -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "" +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "Gt" -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" -msgstr "" +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "Tt" -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" -msgstr "" +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "Pt" -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "" +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "Et" -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "Zt" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "Yt" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" +msgstr "proporción de activos gestionados" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 msgid "Handled assets ratio" -msgstr "" +msgstr "Proporción de activos gestionados" -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" -msgstr "" +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Gestionado" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "No gestionado" -#: src/Dashboard/Grid.php:145 +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Ignorados" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "Handled %s" -msgstr "" +msgid "plugin carbon - handled %s" +msgstr "complemento carbono - gestionado %s" -#: src/Dashboard/Grid.php:156 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format -msgid "Unhandled %s" -msgstr "" +msgid "plugin carbon - unhandled %s" +msgstr "complemento carbono - no gestionado %s" -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" -msgstr "" +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "complemento carbono - ignorados %s" -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" -msgstr "" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" +msgstr "complemento carbono - Consumo de potencia total por uso" -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" -msgstr "" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "complemento carbono - Emisión de carbono por uso" -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" -msgstr "" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sb eq." -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "" +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico total" -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" -msgstr "" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico incorporado" -#: src/Dashboard/Grid.php:245 -#, php-format -msgid "Unhandled %s ratio" -msgstr "" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico por uso total" -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" -msgstr "" +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" +msgstr "Potencial de calentamiento global total" -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" -msgstr "" +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Potencial de calentamiento global incorporado" -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" -msgstr "" +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" +msgstr "Potencial de calentamiento global por uso total" -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "" +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "KWh" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 -msgid "g" -msgstr "" +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "MWh" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 -msgid "Kg" -msgstr "" +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "GWh" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 -msgid "t" -msgstr "" +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "TWh" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 -msgid "Kt" -msgstr "" +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "PWh" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 -msgid "Mt" -msgstr "" +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "EWh" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 -msgid "Gt" -msgstr "" +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "ZWh" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 -msgid "Tt" -msgstr "" +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "YWh" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 -msgid "Pt" -msgstr "" +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Cantidad de activos gestionados" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 -msgid "Et" -msgstr "" +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "Gestionados %s" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 -msgid "Zt" -msgstr "" +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "No gestionados %s" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 -msgid "Yt" -msgstr "" +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Proporción de %s no gestionados" -#: src/Dashboard/Provider.php:334 -msgid "handled assets ratio" -msgstr "" +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Emisión de carbono por uso acumulada anual" -#: src/Dashboard/Provider.php:483 -msgid "plugin carbon - Total usage power consumption" -msgstr "" +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Emisiones de carbono mensuales" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "" +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Gráfico de potencial de calentamiento global por uso" -#: src/Dashboard/Provider.php:850 -msgid "Total abiotic depletion potential" -msgstr "" +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Información sobre la metodología de impacto ambiental" -#: src/Dashboard/Provider.php:869 -msgid "Total usage abiotic depletion potential" -msgstr "" +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Emisiones de carbono por uso por mes" -#: src/Dashboard/Provider.php:881 -msgid "Total global warming potential" -msgstr "" +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "complemento carbono - proporción de activos gestionados" -#: src/Dashboard/Provider.php:900 -msgid "Total usage global warming potential" -msgstr "" +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intensidad de dióxido de carbono" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 -msgid "KWh" +#: src/Location.php:189 +msgid "Carbon intensity source and zone" msgstr "" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 -msgid "MWh" -msgstr "" +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Fecha de emisión" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 -msgid "GWh" -msgstr "" +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intensidad" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 -msgid "TWh" -msgstr "" +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emisión de Carbono" +msgstr[1] "Emisiones de Carbono" +msgstr[2] "Emisiones de Carbono" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 -msgid "PWh" -msgstr "" +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energía" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 -msgid "EWh" -msgstr "" +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emisión" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 -msgid "ZWh" -msgstr "" +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Calidad de la energía" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 -msgid "YWh" -msgstr "" +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Calidad de emisión" -#: src/Toolbox.php:251 +#: src/Toolbox.php:280 msgid "W" -msgstr "" +msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" -msgstr "" +msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" -msgstr "" +msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" -msgstr "" +msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" -msgstr "" +msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" -msgstr "" +msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" -msgstr "" +msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" -msgstr "" +msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" -msgstr "" +msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" -msgstr "" - -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "" +msgstr "Watts-hora" -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Impacto Ambiental" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" +"Por favor, revisá los registros para maś detalles. Abrí un reporte en el " +"repositorio del complemento." -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Asociar a un perfil de uso" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "Eliminar todos los impactos ambientales calculados" -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Actualizar tipo de consumo de potencia" -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "" +#: hook.php:312 +msgid "Update category" +msgstr "Actualizar categoría" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "" +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Actualizar zona para el motor Boavizta" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" +#: hook.php:325 +msgid "Update carbon intensity source and zone" msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Buscar el código de país Alpha3 (ISO3166) de las ubicaciones" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Calcular las emisiones de carbono de las computadoras" -#: src/ComputerType.php:58 -msgid "Server" -msgstr "" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Calcular el impacto incorporado de los activos" -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Siempre encendido" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Horario de oficina" -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Faltan argumentos en la solicitud." -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Argumentos inválidos." -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Restablecimiento denegado." -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Error al restablecer." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" -msgstr "" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "La falta de datos impide generar el historial de este activo." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "Error al actualizar el potencial de calentamiento global." -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "No se pudo encontrar el motor de cálculo para este activo." -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" -msgstr "" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "Error al actualizar el impacto de uso." diff --git a/locales/es_ES.mo b/locales/es_ES.mo index 11595ca0..1421187d 100644 Binary files a/locales/es_ES.mo and b/locales/es_ES.mo differ diff --git a/locales/es_ES.po b/locales/es_ES.po index 7c64b96c..6fd95f56 100644 --- a/locales/es_ES.po +++ b/locales/es_ES.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Pruebas, 2026 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-21 13:21+0200\n" -"PO-Revision-Date: 2022-11-23 14:34+0000\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Pruebas, 2026\n" "Language-Team: Spanish (Spain) (https://app.transifex.com/teclib/teams/28042/es_ES/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,608 +21,1418 @@ msgstr "" "Language: es_ES\n" "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#. TRANS: %s is the user login -#: front/environnementalimpact.form.php:57 -#, php-format -msgid "%s updates an item" -msgstr "" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Hora de inicio" + +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Hora de fin" + +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Días de la semana en los que el ordenador funciona habitualmente" + +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: front/report.php:49 entrée standard:37 +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Zona de Boavizta" + +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intensidad de carbono" + +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Uso del activo" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Perfil de uso" +msgstr[1] "Perfiles de uso" +msgstr[2] "Perfiles de uso" + +#: templates/quick-report.html.twig front/report.php:55 msgid "GLPI Carbon" -msgstr "" +msgstr "GLPI Carbon" + +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Fuente" -#: src/CarbonIntensityZone.php:50 +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 msgid "Carbon intensity zone" msgid_plural "Carbon intensity zones" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "Zona de intensidad de carbono" +msgstr[1] "Zonas de intensidad de carbono" +msgstr[2] "Zonas de intensidad de carbono" -#: src/CarbonIntensityZone.php:122 src/CarbonIntensityZone.php:137 -msgid "Data source for historical calculation" +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "No hay zonas disponibles" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." msgstr "" +"Por favor, ejecute la acción automática para descargar los datos de esta " +"fuente." -#: src/AbstractType.php:50 entrée standard:37 -msgid "Power" -msgid_plural "Powers" +#: templates/environmentalimpact-item.html.twig +msgid "Usage" +msgstr "Uso" + +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "Restablecer datos" + +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "Calcular datos" + +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: src/AbstractType.php:58 src/Dashboard/Dashboard.php:50 -#: src/Dashboard/Dashboard.php:56 src/Dashboard/Dashboard.php:62 -#: src/Dashboard/Dashboard.php:68 src/Dashboard/Dashboard.php:74 -#: src/Dashboard/Dashboard.php:80 src/Dashboard/Dashboard.php:86 -#: src/Dashboard/Dashboard.php:92 src/Dashboard/Dashboard.php:98 -#: src/Dashboard/Dashboard.php:103 src/Dashboard/Dashboard.php:108 -#: src/Dashboard/Dashboard.php:113 src/Dashboard/Dashboard.php:118 -msgid "Carbon" +#: templates/history/status-item.html.twig +msgid "Historization status" +msgstr "Estado de historización" + +#: templates/history/status-item.html.twig +msgid "No status" +msgstr "Sin estado" + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and prevents from environmental impact calculation." msgstr "" +"Faltan estos datos, lo que impide el cálculo del impacto medioambiental." -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." +msgstr "" +"Faltan estos datos, lo que podría reducir la calidad del cálculo del impacto" +" medioambiental." -#: src/Command/CreateTestInventoryCommand.php:149 -msgid "Creating test inventory" +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" +msgstr "No está en la papelera" + +#: templates/history/status-item.html.twig +msgid "Is not a template" +msgstr "No es una plantilla" + +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "Vinculado a un ordenador" + +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:70 -#: src/Command/CollectCarbonIntensityCommand.php:71 -msgid "Creating data source name" +#: templates/history/status-item.html.twig +msgid "Has a location" +msgstr "Tiene una ubicación" + +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" +msgstr "La ubicación tiene datos de intensidad de carbono" + +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "Intensidad de carbono en tiempo real activada" + +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "La ubicación tiene datos anuales de intensidad de carbono" + +#: templates/history/status-item.html.twig +msgid "The asset has a model" +msgstr "El activo tiene un modelo" + +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" +msgstr "El modelo tiene un consumo de energía" + +#: templates/history/status-item.html.twig +msgid "The asset has a type" +msgstr "El activo tiene un tipo" + +#: templates/history/status-item.html.twig +msgid "Type is not ignored" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:81 -msgid "Creating data zone name" +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "El tipo tiene un consumo de energía" + +#: templates/history/status-item.html.twig +msgid "The asset has a category" +msgstr "El activo tiene una categoría" + +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" +msgstr "El activo tiene un perfil de uso" + +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" +msgstr "El activo tiene una fecha de entrada en inventario" + +#: templates/history/status-item.html.twig +msgid "Legend" +msgstr "Leyenda" + +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de monitor" -#: src/Command/CreateFakeCarbonIntensityCommand.php:92 -msgid "Creating fake data..." +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Potencia" +msgstr[1] "Potencias" +msgstr[2] "Potencias" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:83 -msgid "Reading eco2mix data..." +#: templates/config.html.twig +msgid "Impact engine" +msgstr "Motor de impacto" + +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" +msgstr "Las emisiones de carbono por uso se calculan siempre internamente" + +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de ordenador" + +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Categoría" -#: src/Profile.php:46 src/EnvironnementalImpact.php:54 -msgid "Environnemental impact" +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Información" + +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" +"Nuestros datos provienen de fuentes fiables y se calculan meticulosamente " +"utilizando metodologías estándar de la industria. Utilizamos herramientas de" +" medición y algoritmos precisos para garantizar la exactitud y fiabilidad de" +" nuestras métricas medioambientales." -#: src/Profile.php:87 entrée standard:48 -msgctxt "button" -msgid "Save" +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." msgstr "" +"A medida que avanzamos hacia un futuro más ecológico, pronto se exigirá a " +"las empresas que informen sobre el consumo de energía y las emisiones de " +"carbono. Para 2025, muchas zonas aplicarán estas normativas. Adoptar estas " +"prácticas ahora garantiza el cumplimiento y ayuda a combatir el cambio " +"climático." -#: src/CronTask.php:50 -msgid "Download carbon emissions from RTE" +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "¿Sabía que...?" + +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." msgstr "" +"1 gramo de CO₂ equivale al CO₂ emitido al conducir un coche durante unos 20 " +"metros." -#: src/CronTask.php:51 src/CronTask.php:57 -msgid "Maximum number of entries to download" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Advertencia" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Representa el %s por ciento de su parque que contiene %s monitores." + +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Emisión de carbono anual por uso" + +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Emisión de carbono mensual por uso" + +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "Comparado con %s" + +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "Representa el %s por ciento de su parque que contiene %s ordenadores." + +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." +msgstr "" +"Representa el %s por ciento de su parque que contiene %s equipos de red." + +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "¿Quiere saber más?" + +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." msgstr "" +"Aquí tiene un vídeo sobre el impacto de la tecnología digital en el medio " +"ambiente." -#: src/CronTask.php:56 -msgid "Download carbon emissions from ElectricityMap" +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -#: src/CronTask.php:62 -msgid "Compute daily environnemental impact for all assets" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: src/CronTask.php:63 -msgid "Maximum number of entries to calculate" +#: templates/abstractmodel.html.twig +msgid "Data quality" msgstr "" -#: src/CarbonIntensity.php:57 -msgid "Carbon intensity" +#: templates/abstractmodel.html.twig +msgid "Data source" msgstr "" -#: src/CarbonIntensity.php:96 -msgid "ID" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de equipo de red" -#: src/CarbonIntensity.php:105 -msgid "Emission date" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Leer la intensidad de dióxido de carbono de fuentes externas" + +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Fuente:" + +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" +"La fuente seleccionada no enumera las zonas que admite. Intentando " +"identificar una zona a partir de una dirección" -#: src/CarbonIntensity.php:132 -msgid "Intensity" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" +"La geocodificación no está activada. No se puede resolver una dirección en " +"una zona" -#: src/Report.php:48 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Dirección:" -#: src/Toolbox.php:194 src/Dashboard/Provider.php:519 -msgid "g" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zona:" + +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Creando nombre de la fuente de datos" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -#: src/Toolbox.php:195 src/Dashboard/Provider.php:520 -msgid "Kg" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: src/Toolbox.php:196 src/Dashboard/Provider.php:521 -msgid "t" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Leyendo datos..." + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Creando nombre de la zona de datos" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Creando datos de prueba..." + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Actualizando la descripción del cuadro de mando del informe" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Cuadro de mando no encontrado" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Descripción del cuadro de mando guardada en %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Creando inventario de prueba" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Consumo de energía" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Información de uso" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Impacto medioambiental" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" msgstr "" -#: src/Toolbox.php:197 src/Dashboard/Provider.php:522 -msgid "Kt" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "URL de la API de Boavizta no válida" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Conexión con la API de Boavizta establecida" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" msgstr "" -#: src/Toolbox.php:198 src/Dashboard/Provider.php:523 -msgid "Mt" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Recopilar intensidades de carbono de RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "Descargar emisiones de carbono de RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 +msgid "Maximum number of entries to download" +msgstr "Número máximo de entradas a descargar" + +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" msgstr "" -#: src/Toolbox.php:199 src/Dashboard/Provider.php:524 -msgid "Gt" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: src/Toolbox.php:200 src/Dashboard/Provider.php:525 -msgid "Tt" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: src/Toolbox.php:201 src/Dashboard/Provider.php:526 -msgid "Pt" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Fecha de evaluación" + +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Motor" + +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Versión del motor" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" msgstr "" -#: src/Toolbox.php:202 src/Dashboard/Provider.php:527 -msgid "Et" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" msgstr "" -#: src/Toolbox.php:203 src/Dashboard/Provider.php:528 -msgid "Zt" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" msgstr "" -#: src/Toolbox.php:204 src/Dashboard/Provider.php:529 -msgid "Yt" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" msgstr "" -#. TRANS: %1$s is a number maybe float or string and %2$s the unit -#: src/Toolbox.php:215 src/Toolbox.php:248 -#, php-format -msgid "%1$s %2$s" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" msgstr "" -#: src/Toolbox.php:229 -msgid "W" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" msgstr "" -#: src/Toolbox.php:230 -msgid "KW" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "gramos de dióxido de carbono equivalente" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "gramos de antimonio equivalente" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "julios" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." msgstr "" -#: src/Toolbox.php:231 -msgid "MW" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." msgstr "" -#: src/Toolbox.php:232 -msgid "GW" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "Error al calcular el impacto" + +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "Nada que calcular" + +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" +msgstr "%d entradas calculadas" + +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" msgstr "" -#: src/Toolbox.php:233 -msgid "TW" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: src/Toolbox.php:234 -msgid "PW" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: src/Toolbox.php:235 -msgid "EW" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Toolbox.php:236 -msgid "ZW" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Toolbox.php:237 -msgid "YW" +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Widget.php:45 -msgid "Carbon Emission Per Type" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Widget.php:51 -msgid "Carbon Emission Per Month" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: src/Dashboard/Widget.php:57 entrée standard:38 -msgid "Total Carbon Emission" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Widget.php:63 -msgid "Monthly Carbon Emission" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: src/Dashboard/Widget.php:69 -msgid "Unhandled Computers" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: src/Dashboard/Filters/Item.php:42 -msgid "Item" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: src/Dashboard/Provider.php:357 src/Dashboard/Provider.php:533 -#: src/Dashboard/Provider.php:534 -msgid "CO₂eq" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: src/Dashboard/Provider.php:473 src/Dashboard/Provider.php:488 entrée -#: standard:120 -msgid "Carbon emission" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: src/Dashboard/Provider.php:478 src/Dashboard/Provider.php:491 entrée -#: standard:123 -msgid "Consumed energy" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: src/Dashboard/Provider.php:538 -msgid "KWh" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: src/Dashboard/Provider.php:539 -msgid "MWh" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: src/Dashboard/Provider.php:540 -msgid "GWh" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: src/Dashboard/Provider.php:541 -msgid "TWh" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: src/Dashboard/Provider.php:542 -msgid "PWh" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: src/Dashboard/Provider.php:543 -msgid "EWh" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" msgstr "" -#: src/Dashboard/Provider.php:544 -msgid "ZWh" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" msgstr "" -#: src/Dashboard/Provider.php:545 -msgid "YWh" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: src/Dashboard/Dashboard.php:51 src/Dashboard/Dashboard.php:114 -msgid "Unhandled computers" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Dashboard.php:57 -msgid "Handled computers" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Dashboard/Dashboard.php:63 -msgid "Total power consumption" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Dashboard.php:69 src/Dashboard/Dashboard.php:104 -msgid "Total carbon emission" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Dashboard.php:75 -msgid "Total power consumption per model" +#: src/Impact/Type.php:202 +msgid "Usage Land use" msgstr "" -#: src/Dashboard/Dashboard.php:81 -msgid "Total carbon emission per model" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Dashboard.php:87 src/Dashboard/Dashboard.php:255 -msgid "Carbon emission per month" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" msgstr "" -#: src/Dashboard/Dashboard.php:93 -msgid "Carbon intensity (gCO2eq / KWh)" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -#: src/Dashboard/Dashboard.php:99 -msgid "Carbon emission per type" +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" msgstr "" -#: src/Dashboard/Dashboard.php:109 entrée standard:38 -msgid "Monthly carbon emission" +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" msgstr "" -#: src/Dashboard/Dashboard.php:119 -msgid "Carbon emission per month graph" +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" msgstr "" -#: src/Dashboard/Dashboard.php:273 -msgid "Carbon dioxyde intensity" +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" msgstr "" -#: src/ComputerUsageProfile.php:48 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "" -#: src/ComputerUsageProfile.php:84 -msgid "Knowbase category" +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" msgstr "" -#: src/ComputerUsageProfile.php:90 -msgid "As child of" +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" msgstr "" -#: src/ComputerUsageProfile.php:105 entrée standard:52 -msgid "Start time" +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" msgstr "" -#: src/ComputerUsageProfile.php:113 entrée standard:58 -msgid "Stop time" +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" msgstr "" -#: src/ComputerUsageProfile.php:121 entrée standard:66 -msgid "Monday" +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" msgstr "" -#: src/ComputerUsageProfile.php:129 entrée standard:72 -msgid "Tuesday" +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" msgstr "" -#: src/ComputerUsageProfile.php:137 entrée standard:78 -msgid "Wednesday" +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" msgstr "" -#: src/ComputerUsageProfile.php:145 entrée standard:84 -msgid "Thursday" +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" msgstr "" -#: src/ComputerUsageProfile.php:153 entrée standard:90 -msgid "Friday" +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/ComputerUsageProfile.php:161 entrée standard:96 -msgid "Saturday" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" msgstr "" -#: src/ComputerUsageProfile.php:169 entrée standard:103 -msgid "Sunday" +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:124 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:219 entrée standard:40 -msgid "Name" +#: src/Impact/Type.php:238 +msgid "Total Land use" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:125 -msgid "Download enabled" +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:126 -msgid "Source for historical" +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:132 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:225 -msgid "Total" +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:189 -msgid "No" +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:186 -msgid "Yes" +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:285 -msgid "Enable / Disable" +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" msgstr "" -#: src/CarbonEmission.php:50 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" -#: hook.php:133 hook.php:172 -msgid "Power consumption (W)" +#: src/Impact/Type.php:246 +msgid "Total Acidification" msgstr "" -#: setup.php:204 -msgid "Environmental Impact" +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" msgstr "" -#. TRANS: %s is the number of new version -#: install/migration/update_0.0.0_to_0.0.1.php:44 -#: install/migration/update_xxx_to_yyy.php:45 -#, php-format -msgid "Update to %s" +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_uasge_profiles.php:39 -msgid "Office hours" +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:46 -msgid "Compute carbon emissions of computers" +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:58 -msgid "Collect carbon intensities from RTE" +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:70 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." msgstr "" -#: entrée standard:35 -msgid "No zone available" +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." msgstr "" -#: entrée standard:37 -msgid "Please run the automatic action to downlaod data from this source." +#: src/Impact/Type.php:332 +msgid "Incidence of disease" msgstr "" -#: entrée standard:43 -msgid "Key for electricitymap.org API" +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Fuente de intensidad de carbono" +msgstr[1] "Fuentes de intensidad de carbono" +msgstr[2] "Fuentes de intensidad de carbono" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Es historizable" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Sin especificar" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Servidor" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Portátil" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tableta" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartphone" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Impacto por uso" +msgstr[1] "Impactos por uso" +msgstr[2] "Impactos por uso" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Carbono" + +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -#: entrée standard:36 +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Informe de carbono" +msgstr[1] "Informes de carbono" +msgstr[2] "Informes de carbono" + +#: src/Report.php:101 +#, php-format msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" +"Modo de demostración activado. Los datos que se muestran a continuación no " +"son representativos de los activos de la base de datos. %sDesactivar el modo" +" de demostración%s" -#: entrée standard:61 -msgid "Days of week where the computer usually runs" -msgstr "" +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "Perfil de uso del ordenador" +msgstr[1] "Perfiles de uso del ordenador" +msgstr[2] "Perfiles de uso del ordenador" -#: entrée standard:38 -msgid "Warning" +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "La hora de inicio no es válida" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "La hora de fin no es válida" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Nombre de la fuente" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Nombre de la zona" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Descarga activada" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Código" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "No descargable" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" +"Esta es una fuente de respaldo, no hay datos disponibles en tiempo real" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Fuente para históricos" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Activar / Desactivar" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Buscar el código de país Alfa-3 (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Número máximo de ubicaciones a resolver" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Descargar emisiones de carbono de Watttime" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Calcular el impacto medioambiental por uso para todos los activos" + +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Número máximo de entradas a calcular" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Calcular el impacto medioambiental incorporado de todos los activos" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "No hay zonas para descargar" + +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" +msgstr "Vídeo informativo sobre el impacto medioambiental" + +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "Información sobre la metodología" + +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "Emisión total de carbono" + +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "Emisión de carbono mensual" + +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "Mayor emisión de carbono media mensual por modelo" -#: entrée standard:33 -msgid "Carbon Emission per Type" +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "Emisión de carbono por mes" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico por uso" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" msgstr "" -#: entrée standard:33 +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "Ordenadores no gestionados" + +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "Monitores no gestionados" + +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "Equipos de red no gestionados" + +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "Gráfico de radar" + +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" -msgstr "" +msgstr "Energía consumida y emisión de carbono por mes" -#: entrée standard:40 -msgid "Information" -msgstr "" +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "Emisión de carbono" -#: entrée standard:50 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "Energía consumida" + +#: src/Dashboard/Widget.php:746 +#, php-format msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" msgstr "" +"Evalúa la emisión de carbono por uso en CO₂ equivalente durante los últimos " +"2 meses. %s Más información %s" -#: entrée standard:51 +#: src/Dashboard/Widget.php:812 +#, php-format msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" msgstr "" +"Evalúa la emisión de carbono por uso en CO₂ equivalente durante los últimos " +"12 meses transcurridos. %s Más información %s" -#: entrée standard:55 -msgid "Did you know ?" +#: src/Dashboard/Widget.php:854 +msgid "More information" msgstr "" -#: entrée standard:56 +#: src/Dashboard/Widget.php:893 +#, php-format msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" +"Evalúa el consumo de recursos no renovables en Antimonio equivalente. %s Más" +" información %s" -#: entrée standard:81 -#, php-format -msgid "%s rows / page" +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "Porcentaje gestionado" + +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "CO₂eq" + +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "g" + +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "kg" + +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "t" + +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "kt" + +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "Mt" + +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "Gt" + +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "Tt" + +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "Pt" + +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "Et" + +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "Zt" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "Yt" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" +msgstr "ratio de activos gestionados" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "Ratio de activos gestionados" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Gestionados" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "No gestionados" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" msgstr "" -#: entrée standard:90 +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "Showing %s to %s of %s rows" -msgstr "" +msgid "plugin carbon - handled %s" +msgstr "plugin carbon - gestionados %s" -#: entrée standard:94 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format -msgid "%s-%s/%s" -msgstr "" +msgid "plugin carbon - unhandled %s" +msgstr "plugin carbon - no gestionados %s" -#: entrée standard:104 -msgid "Start" +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" msgstr "" -#: entrée standard:109 -msgid "Previous" -msgstr "" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" +msgstr "plugin carbon - Consumo total de energía por uso" -#: entrée standard:118 -#, php-format -msgid "%s-%s of %s" -msgstr "" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "plugin carbon - Emisión de carbono por uso" -#: entrée standard:141 -msgid "Next" -msgstr "" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: entrée standard:146 -msgid "End" -msgstr "" +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" +msgstr "Potencial total de agotamiento abiótico" -#: entrée standard:50 standard:281 -msgid "No data" -msgstr "" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico incorporado" -#: entrée standard:88 -msgid "Check all" -msgstr "" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" +msgstr "Potencial total de agotamiento abiótico por uso" -#: entrée standard:123 -msgid "Filter" -msgstr "" +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" +msgstr "Potencial total de calentamiento global" -#: entrée standard:129 -msgid "Export" -msgstr "" +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Potencial de calentamiento global incorporado" -#: entrée standard:184 -msgid "All" -msgstr "" +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" +msgstr "Potencial total de calentamiento global por uso" -#: entrée standard:310 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "kWh" + +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "MWh" + +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "GWh" + +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "TWh" + +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "PWh" + +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "EWh" + +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "ZWh" + +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "YWh" + +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Recuento de activos gestionados" + +#: src/Dashboard/Grid.php:135 #, php-format -msgid "Show %s entries" -msgstr "" +msgid "Handled %s" +msgstr "%s gestionados" -#: entrée standard:42 -msgid "Compared to last month" -msgstr "" +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "%s no gestionados" -#: entrée standard:35 -msgid "Want to know more ?" -msgstr "" +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Ratio de %s no gestionados" -#: entrée standard:36 -msgid "Here is a video about the impact of numeric on the enviromnent." +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Emisión de carbono por uso en lo que va de año" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Emisión de carbono mensual" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Gráfico del potencial de calentamiento global por uso" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Información de la metodología de impacto medioambiental" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Emisión de carbono por uso al mes" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "plugin carbon - ratio de activos gestionados" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intensidad de dióxido de carbono" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Month" +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Fecha de emisión" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intensidad" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emisión de carbono" +msgstr[1] "Emisiones de carbono" +msgstr[2] "Emisiones de carbono" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energía" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emisión" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Calidad de la energía" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Calidad de la emisión" + +#: src/Toolbox.php:280 +msgid "W" +msgstr "W" + +#: src/Toolbox.php:281 +msgid "KW" +msgstr "kW" + +#: src/Toolbox.php:282 +msgid "MW" +msgstr "MW" + +#: src/Toolbox.php:283 +msgid "GW" +msgstr "GW" + +#: src/Toolbox.php:284 +msgid "TW" +msgstr "TW" + +#: src/Toolbox.php:285 +msgid "PW" +msgstr "PW" + +#: src/Toolbox.php:286 +msgid "EW" +msgstr "EW" + +#: src/Toolbox.php:287 +msgid "ZW" +msgstr "ZW" + +#: src/Toolbox.php:288 +msgid "YW" +msgstr "YW" + +#: src/Toolbox.php:315 +msgid "Wh" +msgstr "Wh" + +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" msgstr "" -#: entrée standard:36 +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Impacto medioambiental" + +#: hook.php:97 msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Asociar a un perfil de uso" + +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" msgstr "" -#: entrée standard:36 -msgid "Usage information" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Actualizar consumo de energía del tipo" + +#: hook.php:312 +msgid "Update category" +msgstr "Actualizar categoría" + +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Actualizar zona para el motor Boavizta" + +#: hook.php:325 +msgid "Update carbon intensity source and zone" msgstr "" -#: entrée standard:41 -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Buscar el código de país Alfa-3 (ISO3166) de las ubicaciones" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Calcular las emisiones de carbono de los ordenadores" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Calcular el impacto incorporado de los activos" + +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Siempre encendido" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Horario de oficina" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Faltan argumentos en la solicitud." + +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Argumentos incorrectos." + +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Restablecimiento denegado." + +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Fallo al restablecer." + +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "La falta de datos impide la historización de este activo." + +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "No se pudo actualizar el potencial de calentamiento global." + +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "No se ha podido encontrar el motor de cálculo para este activo." + +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "No se pudo actualizar el impacto de uso." diff --git a/locales/es_MX.mo b/locales/es_MX.mo index 8962b1a1..eab6bb16 100644 Binary files a/locales/es_MX.mo and b/locales/es_MX.mo differ diff --git a/locales/es_MX.po b/locales/es_MX.po index 13342e63..a6bb8207 100644 --- a/locales/es_MX.po +++ b/locales/es_MX.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Edwin Elias Alvarez , 2026 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-21 13:21+0200\n" -"PO-Revision-Date: 2022-11-23 14:34+0000\n" +"POT-Creation-Date: 2026-04-14 10:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Edwin Elias Alvarez , 2026\n" "Language-Team: Spanish (Mexico) (https://app.transifex.com/teclib/teams/28042/es_MX/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,608 +21,1430 @@ msgstr "" "Language: es_MX\n" "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#. TRANS: %s is the user login -#: front/environnementalimpact.form.php:57 -#, php-format -msgid "%s updates an item" -msgstr "" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Hora de inicio" + +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Hora de fin" + +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Días de la semana en los que el ordenador funciona habitualmente" + +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Zona de Boavizta" + +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intensidad de carbono" + +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Uso del activo" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Perfil de uso" +msgstr[1] "Perfiles de uso" +msgstr[2] "Perfiles de uso" -#: front/report.php:49 entrée standard:37 +#: templates/quick-report.html.twig front/report.php:55 msgid "GLPI Carbon" -msgstr "" +msgstr "GLPI Carbon" -#: src/CarbonIntensityZone.php:50 +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Fuente" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 msgid "Carbon intensity zone" msgid_plural "Carbon intensity zones" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "Zona de intensidad de carbono" +msgstr[1] "Zonas de intensidad de carbono" +msgstr[2] "Zonas de intensidad de carbono" -#: src/CarbonIntensityZone.php:122 src/CarbonIntensityZone.php:137 -msgid "Data source for historical calculation" -msgstr "" +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "No hay zonas disponibles" -#: src/AbstractType.php:50 entrée standard:37 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" - -#: src/AbstractType.php:58 src/Dashboard/Dashboard.php:50 -#: src/Dashboard/Dashboard.php:56 src/Dashboard/Dashboard.php:62 -#: src/Dashboard/Dashboard.php:68 src/Dashboard/Dashboard.php:74 -#: src/Dashboard/Dashboard.php:80 src/Dashboard/Dashboard.php:86 -#: src/Dashboard/Dashboard.php:92 src/Dashboard/Dashboard.php:98 -#: src/Dashboard/Dashboard.php:103 src/Dashboard/Dashboard.php:108 -#: src/Dashboard/Dashboard.php:113 src/Dashboard/Dashboard.php:118 -msgid "Carbon" +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." msgstr "" +"Por favor, ejecutá la acción automática para descargar datos de esta fuente." -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: templates/environmentalimpact-item.html.twig +msgid "Usage" +msgstr "Uso" -#: src/Command/CreateTestInventoryCommand.php:149 -msgid "Creating test inventory" -msgstr "" +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "Restablecer datos" -#: src/Command/CreateFakeCarbonIntensityCommand.php:70 -#: src/Command/CollectCarbonIntensityCommand.php:71 -msgid "Creating data source name" -msgstr "" +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "Calcular datos" -#: src/Command/CreateFakeCarbonIntensityCommand.php:81 -msgid "Creating data zone name" -msgstr "" +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" +msgstr[0] "Impacto incorporado" +msgstr[1] "Impactos incorporados" +msgstr[2] "Impactos incorporados" -#: src/Command/CreateFakeCarbonIntensityCommand.php:92 -msgid "Creating fake data..." -msgstr "" +#: templates/history/status-item.html.twig +msgid "Historization status" +msgstr "Estado de historización" -#: src/Command/CollectCarbonIntensityCommand.php:83 -msgid "Reading eco2mix data..." -msgstr "" +#: templates/history/status-item.html.twig +msgid "No status" +msgstr "Sin estado" -#: src/Profile.php:46 src/EnvironnementalImpact.php:54 -msgid "Environnemental impact" -msgstr "" +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and prevents from environmental impact calculation." +msgstr "Faltan estos datos, lo que impide calcular el impacto ambiental." -#: src/Profile.php:87 entrée standard:48 -msgctxt "button" -msgid "Save" +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." msgstr "" +"Faltan estos datos, lo que podría reducir la calidad del cálculo de impacto " +"ambiental." -#: src/CronTask.php:50 -msgid "Download carbon emissions from RTE" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" +msgstr "No está en la papelera" -#: src/CronTask.php:51 src/CronTask.php:57 -msgid "Maximum number of entries to download" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Is not a template" +msgstr "No es una plantilla" -#: src/CronTask.php:56 -msgid "Download carbon emissions from ElectricityMap" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "Vinculado a una computadora" -#: src/CronTask.php:62 -msgid "Compute daily environnemental impact for all assets" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "La computadora adjunta tiene una ubicación" -#: src/CronTask.php:63 -msgid "Maximum number of entries to calculate" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Has a location" +msgstr "Tiene una ubicación" -#: src/CarbonIntensity.php:57 -msgid "Carbon intensity" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" +msgstr "La ubicación tiene datos de intensidad de carbono" -#: src/CarbonIntensity.php:96 -msgid "ID" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "Intensidad de carbono en tiempo real activada" -#: src/CarbonIntensity.php:105 -msgid "Emission date" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "La ubicación tiene datos anuales de intensidad de carbono" -#: src/CarbonIntensity.php:132 -msgid "Intensity" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The asset has a model" +msgstr "El activo tiene un modelo" -#: src/Report.php:48 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" +msgstr "El modelo tiene un consumo de potencia" -#: src/Toolbox.php:194 src/Dashboard/Provider.php:519 -msgid "g" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The asset has a type" +msgstr "El activo tiene un tipo" -#: src/Toolbox.php:195 src/Dashboard/Provider.php:520 -msgid "Kg" -msgstr "" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "El tipo no está ignorado" -#: src/Toolbox.php:196 src/Dashboard/Provider.php:521 -msgid "t" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "El tipo tiene un consumo de potencia" -#: src/Toolbox.php:197 src/Dashboard/Provider.php:522 -msgid "Kt" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The asset has a category" +msgstr "El activo tiene una categoría" -#: src/Toolbox.php:198 src/Dashboard/Provider.php:523 -msgid "Mt" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" +msgstr "El activo tiene un perfil de uso" -#: src/Toolbox.php:199 src/Dashboard/Provider.php:524 -msgid "Gt" -msgstr "" +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" +msgstr "El activo tiene una fecha de alta en el inventario" -#: src/Toolbox.php:200 src/Dashboard/Provider.php:525 -msgid "Tt" +#: templates/history/status-item.html.twig +msgid "Legend" +msgstr "Leyenda" + +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de monitor" -#: src/Toolbox.php:201 src/Dashboard/Provider.php:526 -msgid "Pt" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Potencia" +msgstr[1] "Potencias" +msgstr[2] "Potencias" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "No evaluar" + +#: templates/config.html.twig +msgid "Impact engine" +msgstr "Motor de impacto" + +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" +msgstr "Las emisiones de carbono por uso siempre se calculan internamente" + +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de ordenador" -#: src/Toolbox.php:202 src/Dashboard/Provider.php:527 -msgid "Et" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Categoría" + +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Información" + +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" +"Nuestros datos provienen de fuentes confiables y se calculan meticulosamente" +" utilizando metodologías estándar de la industria. Utilizamos herramientas " +"de medición precisas y algoritmos para garantizar la exactitud y fiabilidad " +"de nuestras métricas ambientales." -#: src/Toolbox.php:203 src/Dashboard/Provider.php:528 -msgid "Zt" +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." msgstr "" +"A medida que avanzamos hacia un futuro más ecológico, las empresas pronto " +"deberán reportar el consumo de energía y las emisiones de carbono. Para " +"2025, muchas jurisdicciones implementarán estas regulaciones. Adoptar estas " +"prácticas desde ahora asegura el cumplimiento y contribuye a combatir el " +"cambio climático." -#: src/Toolbox.php:204 src/Dashboard/Provider.php:529 -msgid "Yt" +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "¿Sabías que...?" + +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." msgstr "" +"1 gramo de CO₂ equivale al CO₂ emitido al conducir un auto durante " +"aproximadamente 20 metros." + +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Alerta" -#. TRANS: %1$s is a number maybe float or string and %2$s the unit -#: src/Toolbox.php:215 src/Toolbox.php:248 +#: templates/dashboard/unhandled-monitors-card.html.twig #, php-format -msgid "%1$s %2$s" -msgstr "" +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Representa %s por ciento de tu parque, que contiene %s monitores." -#: src/Toolbox.php:229 -msgid "W" -msgstr "" +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Emisión de carbono por uso anual" -#: src/Toolbox.php:230 -msgid "KW" -msgstr "" +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Emisión de carbono por uso mensual" -#: src/Toolbox.php:231 -msgid "MW" -msgstr "" +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "Comparado con %s" -#: src/Toolbox.php:232 -msgid "GW" -msgstr "" +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "Representa %s por ciento de tu parque, que contiene %s computadoras." -#: src/Toolbox.php:233 -msgid "TW" +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" +"Representa %s por ciento de tu parque, que contiene %s equipos de red." -#: src/Toolbox.php:234 -msgid "PW" -msgstr "" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "¿Querés saber más?" -#: src/Toolbox.php:235 -msgid "EW" +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." msgstr "" +"Aquí hay un video sobre el impacto de lo digital en el medio ambiente." -#: src/Toolbox.php:236 -msgid "ZW" +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" +"Los impactos detallados a continuación deben incluir únicamente los procesos" +" de fabricación, disposición final y reciclaje." -#: src/Toolbox.php:237 -msgid "YW" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" +"Asegúrese de tener en cuenta las unidades esperadas antes de establecer un " +"impacto." -#: src/Dashboard/Widget.php:45 -msgid "Carbon Emission Per Type" -msgstr "" +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Calidad de los datos" -#: src/Dashboard/Widget.php:51 -msgid "Carbon Emission Per Month" -msgstr "" +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Fuente de datos" -#: src/Dashboard/Widget.php:57 entrée standard:38 -msgid "Total Carbon Emission" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" msgstr "" +"Este valor de potencia se utiliza por defecto cuando se desconoce la " +"potencia de un modelo de equipo de red" -#: src/Dashboard/Widget.php:63 -msgid "Monthly Carbon Emission" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Leer intensidad de carbono de fuentes externas" -#: src/Dashboard/Widget.php:69 -msgid "Unhandled Computers" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Fuente:" -#: src/Dashboard/Filters/Item.php:42 -msgid "Item" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" +"La fuente seleccionada no enumera sus zonas compatibles. Intentando " +"identificar una zona a partir de una dirección" -#: src/Dashboard/Provider.php:357 src/Dashboard/Provider.php:533 -#: src/Dashboard/Provider.php:534 -msgid "CO₂eq" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" +"La geolocalización no está activada. No se puede resolver una dirección en " +"una zona" -#: src/Dashboard/Provider.php:473 src/Dashboard/Provider.php:488 entrée -#: standard:120 -msgid "Carbon emission" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Dirección:" -#: src/Dashboard/Provider.php:478 src/Dashboard/Provider.php:491 entrée -#: standard:123 -msgid "Consumed energy" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zona:" -#: src/Dashboard/Provider.php:538 -msgid "KWh" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Creando nombre de la fuente de datos" -#: src/Dashboard/Provider.php:539 -msgid "MWh" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "Esta fuente no existe" -#: src/Dashboard/Provider.php:540 -msgid "GWh" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "La zona no es gestionada por la fuente de datos." -#: src/Dashboard/Provider.php:541 -msgid "TWh" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Leyendo datos..." -#: src/Dashboard/Provider.php:542 -msgid "PWh" -msgstr "" +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Creando nombre de la zona de datos" -#: src/Dashboard/Provider.php:543 -msgid "EWh" -msgstr "" +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Creando datos de prueba..." -#: src/Dashboard/Provider.php:544 -msgid "ZWh" -msgstr "" +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Actualizando la descripción del tablero de reportes" -#: src/Dashboard/Provider.php:545 -msgid "YWh" -msgstr "" +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Tablero no encontrado" -#: src/Dashboard/Dashboard.php:51 src/Dashboard/Dashboard.php:114 -msgid "Unhandled computers" -msgstr "" +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Descripción del tablero guardada en %s" -#: src/Dashboard/Dashboard.php:57 -msgid "Handled computers" -msgstr "" +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Creando inventario de prueba" -#: src/Dashboard/Dashboard.php:63 -msgid "Total power consumption" -msgstr "" +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Consumo de potencia" -#: src/Dashboard/Dashboard.php:69 src/Dashboard/Dashboard.php:104 -msgid "Total carbon emission" -msgstr "" +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Información de uso" -#: src/Dashboard/Dashboard.php:75 -msgid "Total power consumption per model" -msgstr "" +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Impacto ambiental" -#: src/Dashboard/Dashboard.php:81 -msgid "Total carbon emission per model" -msgstr "" +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "%s Más información %s" -#: src/Dashboard/Dashboard.php:87 src/Dashboard/Dashboard.php:255 -msgid "Carbon emission per month" -msgstr "" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "URL de la API de Boavizta no válida" -#: src/Dashboard/Dashboard.php:93 -msgid "Carbon intensity (gCO2eq / KWh)" -msgstr "" +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Conexión con la API de Boavizta establecida" -#: src/Dashboard/Dashboard.php:99 -msgid "Carbon emission per type" -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "Diagnóstico de recursos" -#: src/Dashboard/Dashboard.php:109 entrée standard:38 -msgid "Monthly carbon emission" -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Recopilar intensidades de carbono de RTE" -#: src/Dashboard/Dashboard.php:119 -msgid "Carbon emission per month graph" -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "Descargar las emisiones de carbono de RTE" -#: src/Dashboard/Dashboard.php:273 -msgid "Carbon dioxyde intensity" -msgstr "" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 +msgid "Maximum number of entries to download" +msgstr "Cantidad máxima de entradas a descargar" -#: src/ComputerUsageProfile.php:48 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Fin" -#: src/ComputerUsageProfile.php:84 -msgid "Knowbase category" -msgstr "" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "Recopilar intensidades de carbono de ElectricityMap" -#: src/ComputerUsageProfile.php:90 -msgid "As child of" -msgstr "" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "Descargar las emisiones de carbono de ElectricityMap" -#: src/ComputerUsageProfile.php:105 entrée standard:52 -msgid "Start time" -msgstr "" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Fecha de evaluación" -#: src/ComputerUsageProfile.php:113 entrée standard:58 -msgid "Stop time" -msgstr "" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Motor" + +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Versión del motor" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "Impacto no evaluado" + +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Calidad sin especificar" + +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "Datos manuales" + +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Datos estimados" + +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "Datos submuestreados" + +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Datos medidos" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "gramos de dióxido de carbono equivalente" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "gramos de antimonio equivalente" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "joules" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "La conexión a Boavizta falló." + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "La valoración de la evaluación del impacto incorporado falló." + +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "Error al calcular el impacto" + +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "No hay nada para calcular" + +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" +msgstr "%d entradas calculadas" + +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "Impacto incorporado – Potencial de calentamiento global" + +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "Impacto incorporado – Potencial de agotamiento abiótico" -#: src/ComputerUsageProfile.php:121 entrée standard:66 -msgid "Monday" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "Impacto incorporado – Energía primaria consumida" + +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" +"Impacto incorporado – Cambio climático: contribución de emisiones biogénicas" -#: src/ComputerUsageProfile.php:129 entrée standard:72 -msgid "Tuesday" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" +"Impacto incorporado – Cambio climático: contribución de emisiones de " +"combustibles fósiles" -#: src/ComputerUsageProfile.php:137 entrée standard:78 -msgid "Wednesday" +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" +"Impacto incorporado – Cambio climático: contribución de emisiones por cambio" +" de uso de suelo" + +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "Impacto incorporado – Emisiones de sustancias radiactivas" + +#: src/Impact/Type.php:166 +msgid "Embodied Land use" +msgstr "Impacto incorporado – Uso del suelo" + +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" +msgstr "Impacto incorporado – Agotamiento de la capa de ozono" + +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "Impacto incorporado – Emisiones de partículas finas" + +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" +msgstr "Impacto incorporado – Formación fotoquímica de ozono" + +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" +msgstr "Impacto incorporado – Uso de recursos hídricos" + +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "Impacto incorporado – Entrada de materiales por unidad de servicio" + +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" +msgstr "Impacto incorporado – Uso de recursos minerales y metálicos" + +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" +msgstr "Impacto incorporado – Uso de recursos fósiles (incluido nuclear)" + +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" +msgstr "Impacto incorporado – Acidificación" + +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" +msgstr "Impacto incorporado – Ecotoxicidad de agua dulce" + +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "Impacto incorporado – Eutrofización de agua dulce" + +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "Impacto incorporado – Eutrofización de aguas marinas" -#: src/ComputerUsageProfile.php:145 entrée standard:84 -msgid "Thursday" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "Impacto incorporado – Eutrofización terrestre" + +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "Uso – Potencial de calentamiento global" + +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "Uso – Potencial de agotamiento abiótico" + +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "Uso – Energía primaria consumida" + +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" +msgstr "Uso – Cambio climático: contribución de emisiones biogénicas" + +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" +"Uso – Cambio climático: contribución de emisiones de combustibles fósiles" -#: src/ComputerUsageProfile.php:153 entrée standard:90 -msgid "Friday" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" +"Uso – Cambio climático: contribución de emisiones por cambio de uso de suelo" + +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "Uso – Emisiones de sustancias radiactivas" + +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "Uso – Uso del suelo" + +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "Uso – Agotamiento de la capa de ozono" + +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "Uso – Emisiones de partículas finas" + +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "Uso – Formación fotoquímica de ozono" + +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "Uso – Uso de recursos hídricos" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "Uso – Entrada de materiales por unidad de servicio" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "Uso – Uso de recursos minerales y metálicos" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "Uso – Uso de recursos fósiles (incluido nuclear)" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "Uso – Acidificación" -#: src/ComputerUsageProfile.php:161 entrée standard:96 -msgid "Saturday" +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "Uso – Ecotoxicidad de agua dulce" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "Uso – Eutrofización de agua dulce" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "Uso – Eutrofización de aguas marinas" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "Uso – Eutrofización terrestre" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "Total – Potencial de calentamiento global" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "Total – Potencial de agotamiento abiótico" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "Total – Energía primaria consumida" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "Total – Cambio climático: contribución de emisiones biogénicas" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" +"Total – Cambio climático: contribución de emisiones de combustibles fósiles" -#: src/ComputerUsageProfile.php:169 entrée standard:103 -msgid "Sunday" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" msgstr "" +"Total – Cambio climático: contribución de emisiones por cambio de uso de " +"suelo" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "Total – Emisiones de sustancias radiactivas" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "Total – Uso del suelo" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "Total – Agotamiento de la capa de ozono" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "Total – Emisiones de partículas finas" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "Total – Formación fotoquímica de ozono" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "Total – Uso de recursos hídricos" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "Total – Entrada de materiales por unidad de servicio" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "Total – Uso de recursos minerales y metálicos" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "Total – Uso de recursos fósiles (incluido nuclear)" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "Total – Acidificación" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "Total – Ecotoxicidad de agua dulce" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "Total – Eutrofización de agua dulce" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "Total – Eutrofización de aguas marinas" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "Total – Eutrofización terrestre" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "Emisión de carbono en CO₂ equivalente" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "Consumo de recursos no renovables en antimonio equivalente." + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "Energía primaria consumida." + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "Incidencia de la enfermedad" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Fuente de intensidad de carbono" +msgstr[1] "Fuentes de intensidad de carbono" +msgstr[2] "Fuentes de intensidad de carbono" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Ignorar impacto ambiental" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Es historizable" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Sin especificar" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Servidor" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Portátil" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tableta" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartphone" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Impacto por uso" +msgstr[1] "Impactos por uso" +msgstr[2] "Impactos por uso" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Carbono" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:124 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:219 entrée standard:40 -msgid "Name" +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "Calidad" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Informe de carbono" +msgstr[1] "Informes de carbono" +msgstr[2] "Informes de carbono" + +#: src/Report.php:101 +#, php-format +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" +"Modo demo activado. Los datos de abajo no son representativos de los activos" +" en la base de datos. %sDesactivar el modo demo%s" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:125 +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "Perfil de uso de computadora" +msgstr[1] "Perfiles de uso de computadora" +msgstr[2] "Perfiles de uso de computadora" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "La hora de inicio es inválida" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "La hora de finalización es inválida" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Nombre de la fuente" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Nombre de la zona" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 msgid "Download enabled" -msgstr "" +msgstr "Descarga activada" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:126 -msgid "Source for historical" -msgstr "" +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Código" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:132 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:225 -msgid "Total" -msgstr "" +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "No descargable" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:189 -msgid "No" +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" +"Esta es una fuente de respaldo; no hay datos en tiempo real disponibles" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:186 -msgid "Yes" -msgstr "" +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Fuente para histórico" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:285 +#: src/Source_Zone.php:411 msgid "Enable / Disable" -msgstr "" +msgstr "Activar / Desactivar" -#: src/CarbonEmission.php:50 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Buscar el código de país Alpha3 (ISO3166)" -#: hook.php:133 hook.php:172 -msgid "Power consumption (W)" -msgstr "" +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Cantidad máxima de ubicaciones a resolver" -#: setup.php:204 -msgid "Environmental Impact" -msgstr "" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Descargar emisiones de carbono desde Watttime" -#. TRANS: %s is the number of new version -#: install/migration/update_0.0.0_to_0.0.1.php:44 -#: install/migration/update_xxx_to_yyy.php:45 -#, php-format -msgid "Update to %s" -msgstr "" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Calcular el impacto ambiental de uso para todos los activos" -#: install/migration/update_0.0.0_to_0.0.1/create_uasge_profiles.php:39 -msgid "Office hours" -msgstr "" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Cantidad máxima de entradas a calcular" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:46 -msgid "Compute carbon emissions of computers" -msgstr "" +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Calcular el impacto ambiental incorporado para todos los activos" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:58 -msgid "Collect carbon intensities from RTE" -msgstr "" +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "No hay zonas para descargar" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:70 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "" +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" +msgstr "Video informativo sobre el impacto ambiental" -#: entrée standard:35 -msgid "No zone available" -msgstr "" +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "Información sobre la metodología" -#: entrée standard:37 -msgid "Please run the automatic action to downlaod data from this source." -msgstr "" +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "Emisión Total de Carbono" -#: entrée standard:43 -msgid "Key for electricitymap.org API" -msgstr "" +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "Emisiones de Carbono Mensuales" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "" +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "Máximo promedio mensual de emisiones de carbono por modelo" -#: entrée standard:61 -msgid "Days of week where the computer usually runs" -msgstr "" +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "Emisión de carbono por mes" -#: entrée standard:38 -msgid "Warning" -msgstr "" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico por uso" -#: entrée standard:33 -msgid "Carbon Emission per Type" -msgstr "" +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "Criterios de impacto" + +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "Computadoras no gestionadas" -#: entrée standard:33 +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "Monitores no gestionados" + +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "Equipos de red no gestionados" + +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "Gráfico de radar" + +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" -msgstr "" +msgstr "Consumo de energía y emisión de carbono por mes" -#: entrée standard:40 -msgid "Information" -msgstr "" +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "Emisión de carbono" -#: entrée standard:50 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "Energía consumida" + +#: src/Dashboard/Widget.php:746 +#, php-format msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" msgstr "" +"Evalúa la emisión de carbono por uso en CO₂ equivalente durante los últimos " +"2 meses. %s Más información %s" -#: entrée standard:51 +#: src/Dashboard/Widget.php:812 +#, php-format msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" msgstr "" +"Evalúa la emisión de carbono por uso en CO₂ equivalente durante los últimos " +"12 meses transcurridos. %s Más información %s" -#: entrée standard:55 -msgid "Did you know ?" -msgstr "" +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "Más información" -#: entrée standard:56 +#: src/Dashboard/Widget.php:893 +#, php-format msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" +"Evalúa el consumo de recursos no renovables en Antimonio equivalente. %s Más" +" información %s" + +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "Porcentaje gestionado" + +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "CO₂eq" + +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "g" + +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "Kg" + +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "t" + +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "Kt" + +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "Mt" -#: entrée standard:81 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "Gt" + +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "Tt" + +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "Pt" + +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "Et" + +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "Zt" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "Yt" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" +msgstr "proporción de activos gestionados" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "Proporción de activos gestionados" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Gestionado" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "No gestionado" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Ignorados" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "%s rows / page" -msgstr "" +msgid "plugin carbon - handled %s" +msgstr "complemento carbono - gestionado %s" -#: entrée standard:90 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format -msgid "Showing %s to %s of %s rows" -msgstr "" +msgid "plugin carbon - unhandled %s" +msgstr "complemento carbono - no gestionado %s" -#: entrée standard:94 +#: src/Dashboard/Provider.php:584 #, php-format -msgid "%s-%s/%s" -msgstr "" +msgid "plugin carbon - ignored %s" +msgstr "complemento carbono - ignorados %s" -#: entrée standard:104 -msgid "Start" -msgstr "" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" +msgstr "complemento carbono - Consumo total de potencia por uso" -#: entrée standard:109 -msgid "Previous" -msgstr "" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "complemento carbono - Emisión de carbono por uso" -#: entrée standard:118 -#, php-format -msgid "%s-%s of %s" -msgstr "" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: entrée standard:141 -msgid "Next" -msgstr "" +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico total" -#: entrée standard:146 -msgid "End" -msgstr "" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico incorporado" -#: entrée standard:50 standard:281 -msgid "No data" -msgstr "" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" +msgstr "Potencial de agotamiento abiótico por uso total" -#: entrée standard:88 -msgid "Check all" -msgstr "" +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" +msgstr "Potencial de calentamiento global total" -#: entrée standard:123 -msgid "Filter" -msgstr "" +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Potencial de calentamiento global incorporado" -#: entrée standard:129 -msgid "Export" -msgstr "" +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" +msgstr "Potencial de calentamiento global por uso total" -#: entrée standard:184 -msgid "All" -msgstr "" +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "KWh" + +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "MWh" + +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "GWh" + +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "TWh" + +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "PWh" + +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "EWh" + +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "ZWh" -#: entrée standard:310 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "YWh" + +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Cantidad de activos gestionados" + +#: src/Dashboard/Grid.php:135 #, php-format -msgid "Show %s entries" -msgstr "" +msgid "Handled %s" +msgstr "Gestionados %s" -#: entrée standard:42 -msgid "Compared to last month" -msgstr "" +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "No gestionados %s" -#: entrée standard:35 -msgid "Want to know more ?" -msgstr "" +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Proporción de %s no gestionados" -#: entrée standard:36 -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "" +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Emisión de carbono por uso acumulada anual" -#: entrée standard:33 -msgid "Carbon Emission per Month" -msgstr "" +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Emisión de carbono mensual" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" -msgstr "" +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Gráfico de potencial de calentamiento global por uso" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Información sobre la metodología de impacto ambiental" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Emisiones de carbono por uso por mes" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "complemento carbono - proporción de activos gestionados" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intensidad de dióxido de carbono" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "Fuente y zona de intensidad de carbono" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Fecha de emisión" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intensidad" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emisión de Carbono" +msgstr[1] "Emisiones de Carbono" +msgstr[2] "Emisiones de Carbono" -#: entrée standard:36 +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energía" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emisión" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Calidad de la energía" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Calidad de emisión" + +#: src/Toolbox.php:280 +msgid "W" +msgstr "W" + +#: src/Toolbox.php:281 +msgid "KW" +msgstr "KW" + +#: src/Toolbox.php:282 +msgid "MW" +msgstr "MW" + +#: src/Toolbox.php:283 +msgid "GW" +msgstr "GW" + +#: src/Toolbox.php:284 +msgid "TW" +msgstr "TW" + +#: src/Toolbox.php:285 +msgid "PW" +msgstr "PW" + +#: src/Toolbox.php:286 +msgid "EW" +msgstr "EW" + +#: src/Toolbox.php:287 +msgid "ZW" +msgstr "ZW" + +#: src/Toolbox.php:288 +msgid "YW" +msgstr "YW" + +#: src/Toolbox.php:315 +msgid "Wh" +msgstr "Watts-hora" + +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" + +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Impacto Ambiental" + +#: hook.php:97 msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" +"Por favor, revisá los registros para más detalles. Abrí un reporte en el " +"repositorio del complemento." -#: entrée standard:36 -msgid "Usage information" -msgstr "" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Asociar a un perfil de uso" -#: entrée standard:41 -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "Eliminar todos los impactos ambientales calculados" + +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Actualizar el consumo de potencia del tipo" + +#: hook.php:312 +msgid "Update category" +msgstr "Actualizar categoría" + +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Actualizar zona para el motor Boavizta" + +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "Actualizar la fuente y la zona de intensidad de carbono" + +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Buscar el código de país Alpha3 (ISO3166) de las ubicaciones" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Calcular las emisiones de carbono de las computadoras" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Calcular el impacto incorporado de los activos" + +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Siempre encendido" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Horario de oficina" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Faltan argumentos en la solicitud." + +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Argumentos inválidos." + +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Restablecimiento denegado." + +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Error al restablecer." + +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "La falta de datos impide generar el historial de este activo." + +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "Error al actualizar el potencial de calentamiento global." + +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "No se pudo encontrar el motor de cálculo para este activo." + +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "Error al actualizar el impacto de uso." diff --git a/locales/es_VE.mo b/locales/es_VE.mo index c512588e..2db36c27 100644 Binary files a/locales/es_VE.mo and b/locales/es_VE.mo differ diff --git a/locales/es_VE.po b/locales/es_VE.po index af6950ad..b0cea495 100644 --- a/locales/es_VE.po +++ b/locales/es_VE.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" +"POT-Creation-Date: 2025-10-29 08:10+0000\n" "PO-Revision-Date: 2025-07-03 13:58+0000\n" "Last-Translator: Thierry Bugier , 2025\n" "Language-Team: Spanish (Venezuela) (https://app.transifex.com/teclib/teams/28042/es_VE/)\n" @@ -39,9 +39,9 @@ msgid "Embodied primary energy" msgstr "" #: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 +#: src/Dashboard/Widget.php:102 src/Dashboard/DemoProvider.php:95 #: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 +#: src/Dashboard/Provider.php:812 msgid "Usage abiotic depletion potential" msgstr "" @@ -93,7 +93,7 @@ msgid "" msgstr "" #: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 +#: src/Dashboard/Widget.php:111 msgid "Embodied carbon emission" msgstr "" @@ -111,9 +111,9 @@ msgid "It represents %s percent of your parc that contains %s computers." msgstr "" #: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 +#: src/Dashboard/Widget.php:118 src/Dashboard/DemoProvider.php:77 #: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 +#: src/Dashboard/Provider.php:778 src/Dashboard/Provider.php:862 msgid "Embodied abiotic depletion potential" msgstr "" @@ -172,12 +172,12 @@ msgstr "" msgid "Embodied impact" msgstr "" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:125 +#: src/ComputerUsageProfile.php:146 msgid "Start time" msgstr "" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:154 msgid "Stop time" msgstr "" @@ -196,7 +196,7 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: templates/quick-report.html.twig front/report.php:54 +#: templates/quick-report.html.twig front/report.php:55 msgid "GLPI Carbon" msgstr "" @@ -324,66 +324,66 @@ msgstr "" msgid "Enable geocoding" msgstr "" -#: setup.php:273 +#: setup.php:263 msgid "Environmental Impact" msgstr "" -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 +#: front/embodiedimpact.form.php:65 front/embodiedimpact.form.php:88 +#: front/usageimpact.form.php:65 front/usageimpact.form.php:102 msgid "Missing arguments in request." msgstr "" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 +#: front/embodiedimpact.form.php:70 front/embodiedimpact.form.php:79 +#: front/usageimpact.form.php:89 msgid "Reset denied." msgstr "" -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 +#: front/embodiedimpact.form.php:84 front/usageimpact.form.php:94 msgid "Reset failed." msgstr "" -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 +#: front/embodiedimpact.form.php:94 front/usageimpact.form.php:133 msgid "Unable to find calculation engine for this asset." msgstr "" -#: front/embodiedimpact.form.php:102 +#: front/embodiedimpact.form.php:103 msgid "Update failed." msgstr "" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 +#: front/usageimpact.form.php:79 front/usageimpact.form.php:108 +#: front/usageimpact.form.php:116 msgid "Bad arguments." msgstr "" -#: front/usageimpact.form.php:97 +#: front/usageimpact.form.php:98 msgid "Delete of usage impact failed." msgstr "" -#: front/usageimpact.form.php:123 +#: front/usageimpact.form.php:124 msgid "Missing data prevents historization of this asset." msgstr "" -#: front/usageimpact.form.php:126 +#: front/usageimpact.form.php:127 msgid "Update of global warming potential failed." msgstr "" -#: front/usageimpact.form.php:137 +#: front/usageimpact.form.php:138 msgid "Update of usage impact failed." msgstr "" -#: hook.php:317 +#: hook.php:293 msgid "Associate to an usage profile" msgstr "" -#: hook.php:321 hook.php:326 hook.php:330 +#: hook.php:297 hook.php:302 hook.php:306 msgid "Update type power consumption" msgstr "" -#: hook.php:322 +#: hook.php:298 msgid "Update category" msgstr "" -#: hook.php:334 +#: hook.php:310 msgid "Update zone for Boavizta engine" msgstr "" @@ -503,7 +503,7 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: src/Report.php:107 +#: src/Report.php:102 #, php-format msgid "" "Demo mode enabled. The data below are not representative of the assets in " @@ -565,11 +565,11 @@ msgstr "" msgid "Updating the report dashboard description" msgstr "" -#: src/Command/ExportDashboardCommand.php:75 +#: src/Command/ExportDashboardCommand.php:74 msgid "Dashboard not found" msgstr "" -#: src/Command/ExportDashboardCommand.php:101 +#: src/Command/ExportDashboardCommand.php:100 #, php-format msgid "Dashboard description saved to %s" msgstr "" @@ -606,8 +606,8 @@ msgid "Data source for historical calculation" msgstr "" #: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 +#: src/CarbonIntensitySource_Zone.php:169 +#: src/CarbonIntensitySource_Zone.php:264 msgid "Download enabled" msgstr "" @@ -615,21 +615,21 @@ msgstr "" msgid "Usage informations" msgstr "" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 +#: src/UsageInfo.php:214 src/Dashboard/Widget.php:848 #, php-format msgid "" "Evaluates the carbon emission in CO₂ equivalent. %s More information %s" msgstr "" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 +#: src/UsageInfo.php:222 src/Dashboard/Widget.php:884 +#: src/Dashboard/Widget.php:921 #, php-format msgid "" "Evaluates the consumption of non renewable resources in Antimony equivalent." " %s More information %s" msgstr "" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 +#: src/UsageInfo.php:234 src/Dashboard/Widget.php:1102 #, php-format msgid "Evaluates the primary energy consumed. %s More information %s" msgstr "" @@ -641,11 +641,11 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: src/ComputerUsageProfile.php:92 +#: src/ComputerUsageProfile.php:94 msgid "Start time is invalid" msgstr "" -#: src/ComputerUsageProfile.php:97 +#: src/ComputerUsageProfile.php:99 msgid "Stop time is invalid" msgstr "" @@ -653,95 +653,95 @@ msgstr "" msgid "Environmental impact information video" msgstr "" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:64 msgid "Methodology information" msgstr "" -#: src/Dashboard/Widget.php:71 +#: src/Dashboard/Widget.php:73 msgid "Total Carbon Emission" msgstr "" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:80 msgid "Monthly Carbon Emission" msgstr "" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 +#: src/Dashboard/Widget.php:87 src/Dashboard/Widget.php:599 #: src/Dashboard/Grid.php:281 msgid "Biggest monthly averaged carbon emission per model" msgstr "" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:95 msgid "Carbon Emission Per month" msgstr "" -#: src/Dashboard/Widget.php:116 +#: src/Dashboard/Widget.php:125 msgid "Embodied consumed primary energy" msgstr "" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:137 msgid "Unhandled Computers" msgstr "" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:148 msgid "Unhandled Monitors" msgstr "" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:159 msgid "Unhandled Network equipments" msgstr "" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:170 msgid "Radar chart" msgstr "" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:496 src/Dashboard/Provider.php:918 msgid "Consumed energy and carbon emission per month" msgstr "" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 +#: src/Dashboard/Widget.php:541 src/Dashboard/Widget.php:556 #: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Provider.php:1023 msgid "Carbon emission" msgstr "" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:559 #: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Provider.php:1039 msgid "Consumed energy" msgstr "" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:741 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:807 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:1082 +#: src/Dashboard/Widget.php:1092 msgid "Total embodied primary energy" msgstr "" -#: src/Dashboard/Widget.php:1151 +#: src/Dashboard/Widget.php:1161 msgid "Handled percentage" msgstr "" #: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 #: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 +#: src/Dashboard/Provider.php:169 src/Dashboard/Provider.php:560 +#: src/Dashboard/Provider.php:730 src/Dashboard/Provider.php:1023 +#: src/Dashboard/Provider.php:1025 msgid "CO₂eq" msgstr "" #: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 +#: src/Dashboard/Provider.php:792 src/Dashboard/Provider.php:826 msgid "Sbeq" msgstr "" @@ -749,12 +749,12 @@ msgstr "" msgid "Usage carbon emission per month" msgstr "" -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 +#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:430 #, php-format msgid "plugin carbon - handled %s" msgstr "" -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 +#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:431 #, php-format msgid "plugin carbon - unhandled %s" msgstr "" @@ -763,16 +763,16 @@ msgstr "" msgid "plugin carbon - handled assets ratio" msgstr "" -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 +#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:398 msgid "Handled" msgstr "" -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 +#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:403 msgid "Unhandled" msgstr "" #: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 +#: src/Dashboard/Provider.php:548 msgid "plugin carbon - Usage carbon emission" msgstr "" @@ -780,7 +780,7 @@ msgstr "" msgid "Carbon dioxyde intensity" msgstr "" -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 +#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:375 msgid "Handled assets ratio" msgstr "" @@ -807,7 +807,7 @@ msgid "Usage carbon emission" msgstr "" #: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 +#: src/Dashboard/Provider.php:893 msgid "Embodied global warming potential" msgstr "" @@ -844,118 +844,118 @@ msgstr "" msgid "Environmental impact methodology_information" msgstr "" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 +#: src/Dashboard/Provider.php:171 src/Dashboard/Provider.php:1010 #: src/Toolbox.php:201 msgid "g" msgstr "" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 +#: src/Dashboard/Provider.php:172 src/Dashboard/Provider.php:1011 #: src/Toolbox.php:202 msgid "Kg" msgstr "" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 +#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:1012 #: src/Toolbox.php:203 msgid "t" msgstr "" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 +#: src/Dashboard/Provider.php:174 src/Dashboard/Provider.php:1013 #: src/Toolbox.php:204 msgid "Kt" msgstr "" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 +#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 #: src/Toolbox.php:205 msgid "Mt" msgstr "" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 +#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 #: src/Toolbox.php:206 msgid "Gt" msgstr "" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 +#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 #: src/Toolbox.php:207 msgid "Tt" msgstr "" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 +#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 #: src/Toolbox.php:208 msgid "Pt" msgstr "" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 +#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 #: src/Toolbox.php:209 msgid "Et" msgstr "" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 +#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 #: src/Toolbox.php:210 msgid "Zt" msgstr "" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 +#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 #: src/Toolbox.php:211 msgid "Yt" msgstr "" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:330 msgid "handled assets ratio" msgstr "" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:479 msgid "plugin carbon - Total usage power consumption" msgstr "" -#: src/Dashboard/Provider.php:722 +#: src/Dashboard/Provider.php:718 msgid "Total embodied global warming potential" msgstr "" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:846 msgid "Total abiotic depletion potential" msgstr "" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:865 msgid "Total usage abiotic depletion potential" msgstr "" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:877 msgid "Total global warming potential" msgstr "" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:896 msgid "Total usage global warming potential" msgstr "" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1029 src/Toolbox.php:287 msgid "KWh" msgstr "" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1030 src/Toolbox.php:288 msgid "MWh" msgstr "" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1031 src/Toolbox.php:289 msgid "GWh" msgstr "" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1032 src/Toolbox.php:290 msgid "TWh" msgstr "" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1033 src/Toolbox.php:291 msgid "PWh" msgstr "" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1034 src/Toolbox.php:292 msgid "EWh" msgstr "" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1035 src/Toolbox.php:293 msgid "ZWh" msgstr "" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1036 src/Toolbox.php:294 msgid "YWh" msgstr "" @@ -999,8 +999,8 @@ msgstr "" msgid "Wh" msgstr "" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 +#: src/SearchOptions.php:196 src/SearchOptions.php:273 +#: src/SearchOptions.php:346 msgid "Is historizable" msgstr "" @@ -1023,15 +1023,15 @@ msgstr "" msgid "Primary energy quality" msgstr "" -#: src/CarbonIntensity.php:69 +#: src/CarbonIntensity.php:66 msgid "Carbon intensity" msgstr "" -#: src/CarbonIntensity.php:91 +#: src/CarbonIntensity.php:88 msgid "Emission date" msgstr "" -#: src/CarbonIntensity.php:118 +#: src/CarbonIntensity.php:115 msgid "Intensity" msgstr "" @@ -1087,10 +1087,10 @@ msgstr "" msgid "This is a fallback source, there is no real-time data available" msgstr "" -#: src/CarbonIntensitySource_Zone.php:174 +#: src/CarbonIntensitySource_Zone.php:170 msgid "Source for historical" msgstr "" -#: src/CarbonIntensitySource_Zone.php:359 +#: src/CarbonIntensitySource_Zone.php:351 msgid "Enable / Disable" msgstr "" diff --git a/locales/fr_FR.mo b/locales/fr_FR.mo index 154dec3f..aad6262a 100644 Binary files a/locales/fr_FR.mo and b/locales/fr_FR.mo differ diff --git a/locales/fr_FR.po b/locales/fr_FR.po index 21309671..9b0d6d3b 100644 --- a/locales/fr_FR.po +++ b/locales/fr_FR.po @@ -4,16 +4,17 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Thierry Bugier , 2025 +# EpicIT33, 2026 +# Thierry Bugier , 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: Thierry Bugier , 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Thierry Bugier , 2026\n" "Language-Team: French (France) (https://app.transifex.com/teclib/teams/28042/fr_FR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,46 +22,223 @@ msgstr "" "Language: fr_FR\n" "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Heure de démarrage" + +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Heure d'arrêt" + +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" msgstr "" +"Jours de la semaine où l'ordinateur est habituellement en fonctionnement" -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Zone Boavizta" + +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intensité carbone" + +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Utilisation de l'équipement" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Profil d'utilisation" +msgstr[1] "Profils d'utilisation" +msgstr[2] "Profils d'utilisation" + +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI Carbon" + +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Source" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "Zone d'intensité carbone" +msgstr[1] "Zones d'intensité carbone" +msgstr[2] "Zones d'intensité carbone" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "Pas de zone disponible" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." msgstr "" +"Veuillez exécuter l'action automatique pour télécharger les données depuis " +"cette source." -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" +#: templates/environmentalimpact-item.html.twig +msgid "Usage" +msgstr "Utilisation" + +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "Effacer les données" + +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "Calculer les données" + +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: templates/history/status-item.html.twig +msgid "Historization status" +msgstr "Statut d'historisation" + +#: templates/history/status-item.html.twig +msgid "No status" +msgstr "Aucun statut" + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and prevents from environmental impact calculation." msgstr "" +"Ces données sont manquantes et empêchent le calcul de l'impact " +"environnemental." -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." msgstr "" +"Ces données sont manquantes et peuvent réduire la qualité du calcul de " +"l'impact environnemental." -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" +msgstr "N'est pas dans la corbeille" + +#: templates/history/status-item.html.twig +msgid "Is not a template" +msgstr "N'est pas un modèle" + +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "Lié à un ordinateur" + +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" msgstr "" -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Attention" +#: templates/history/status-item.html.twig +msgid "Has a location" +msgstr "Est lié à un lieu" -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" +msgstr "Le lieu dispose de données sur l'intensité carbone." + +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "Intensité carbone en temps réel activé" + +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "Le lieu dispose de données annuelles sur l'intensité carbone" + +#: templates/history/status-item.html.twig +msgid "The asset has a model" +msgstr "L'équipement a un modèle" + +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" +msgstr "Le modèle a une puissance de consommation" + +#: templates/history/status-item.html.twig +msgid "The asset has a type" +msgstr "L'équipement a un type" + +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "Le type n'est pas ignoré" + +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "Le type a une puissance de consommation" + +#: templates/history/status-item.html.twig +msgid "The asset has a category" +msgstr "L'équipement a une catégorie" + +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" +msgstr "L'équipement a un profil d'utilisation" + +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" +msgstr "L'équipement a une date d'entrée dans l'inventaire" + +#: templates/history/status-item.html.twig +msgid "Legend" +msgstr "Légende" + +#: templates/monitortype.html.twig msgid "" -"It represents %s percent of your parc that contains %s network equipments." +"This power value is used as default when the power of a monitor model is " +"unknown" msgstr "" +"Cette valeur de puissance est utilisée par défaut lorsque la puissance d'un " +"modèle de moniteur est inconnue." -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Puissance" +msgstr[1] "Puissances" +msgstr[2] "Puissances" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "Ne pas évaluer" + +#: templates/config.html.twig +msgid "Impact engine" +msgstr "Moteur d'impact" + +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" msgstr "" +"Les émissions de carbone liées à l'utilisation sont toujours calculées en " +"interne." + +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" +msgstr "" +"Cette valeur de puissance est utilisée par défaut quand la puissance d'un " +"modèle d'ordinateur est inconnue" + +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Catégorie" #: templates/dashboard/information-block.html.twig msgid "Information" @@ -103,1011 +281,1167 @@ msgstr "" "1 gramme de CO₂ est équivalent au CO₂ émis quand vous roulez en voiture sur " "environ 20 mètres." -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Attention" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Il représente %s de votre parc qui contient %s moniteurs." + +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Émissions de carbone liées à l'utilisation annuelle" + +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Émissions de carbone liées à l'utilisation mensuelle" + +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "Comparé à %s" + +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." msgstr "" +"Cela représente %s de votre parc informatique qui contient %s ordinateurs." + +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." +msgstr "Il représente %s de votre parc qui contient %s équipements réseau." #: templates/dashboard/information-video-card.html.twig msgid "Want to know more ?" -msgstr "" +msgstr "Vous voulez en savoir plus ?" #: templates/dashboard/information-video-card.html.twig msgid "Here is a video about the impact of numeric on the enviromnent." msgstr "" "Voici une vidéo à propos de l'impact du numérique sur l'environnement." -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" +"Les impacts ci-dessous concernent uniquement les processus de fabrication, " +"d'élimination et de recyclage." -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: templates/monitortype.html.twig +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Qualité des données" + +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Source des données" + +#: templates/networkequipmenttype.html.twig msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +"This power value is used as default when the power of a network equipment " +"model is unknown" msgstr "" +"Cette valeur de puissance est utilisée par défaut lorsque la puissance d'un " +"modèle d'équipement réseau est inconnue." -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Puissance" -msgstr[1] "Puissances" -msgstr[2] "Puissances" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Lire l'intensité du dioxyde de carbone provenant de sources externes" -#: templates/computertype.html.twig +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Source:" + +#: src/Command/CollectCarbonIntensityCommand.php:95 msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" -"Cette valeur de puissance est utilisée par défaut quand la puissance d'un " -"modèle d'ordinateur est inconnue" +"La source sélectionnée n'énumère pas les zones prises en charge. Tentative " +"d'identification d'une zone à partir d'une adresse" -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" +"Le géocodage n'est pas activé. Impossible de placer une adresse dans une " +"zone." -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "No zone available" -msgstr "Pas de zone disponible" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Adresse:" -#: templates/pages/CarbonIntensitySource/tab_zone.html.twig -msgid "Please run the automatic action to downlaod data from this source." +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zone:" + +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Création du nom de la source de données" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -"Veuillez exécuter l'action automatique pour télécharger les données depuis " -"cette source." -#: templates/networkequipmenttype.html.twig -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: templates/environmentalimpact-item.html.twig -msgid "Usage" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Lecture des données..." + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Création du nom de la zone de données" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Création de données factices..." + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Mise à jour de la description du tableau de bord du rapport" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Tableau de bord non trouvé" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Descrition du tableau de bord enregistré dans %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Création de l'inventaire de test" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Puissance consommée" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Informations d'utilisation" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Impact environnemental" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "" + +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "URL vers l'API de Boavizta invalide" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Connexion à l'API Boavizta établie" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Collecte les intensités carbone depuis RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "Télécharge les émissions de carbone depuis RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 +msgid "Maximum number of entries to download" +msgstr "Nombre maximum d'éléments à télécharger" + +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Fin" + +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "" + +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: templates/environmentalimpact-item.html.twig -msgid "Reset data" -msgstr "" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Date d'évaluation" + +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Moteur" + +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Version du moteur" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "Impact non évalué" + +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Qualité non spécifiée" + +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "Données manuelles" + +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Données estimées" -#: templates/environmentalimpact-item.html.twig -msgid "Calculate data" -msgstr "" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "Données sous-échantillonnées" -#: templates/environmentalimpact-item.html.twig -msgid "Embodied impact" -msgstr "" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Données mesurées" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "Heure de démarrage" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "grammes d'équivalent dioxyde de carbone" -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "Heure d'arrêt" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "Grammes d'équivalent antimoine" -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "" -"Jours de la semaine où l'ordinateur est habituellement en fonctionnement" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "joules" -#: templates/usageinfo.html.twig -msgid "Asset usage" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "Connexion à Boavizta échouée." + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." msgstr "" -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Profil d'utilisation" -msgstr[1] "Profils d'utilisation" -msgstr[2] "Profils d'utilisation" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "Erreur pendant le calcul d'impact" -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "" +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "Rien à calculer" -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 -msgid "Environmental impact" +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" +msgstr "%d entrées calculées" + +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" msgstr "" -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: templates/history/status-item.html.twig -msgid "Historization status" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: templates/history/status-item.html.twig -msgid "No status" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: templates/history/status-item.html.twig -msgid "" -"This data is missing and prevents from environmental impact calculation." +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" -#: templates/history/status-item.html.twig +#: src/Impact/Type.php:164 msgid "" -"This data is missing and may reduce the quality of environmental impact " -"calculation." +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: templates/history/status-item.html.twig -msgid "Is not in the trash bin" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" msgstr "" -#: templates/history/status-item.html.twig -msgid "Is not a template" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: templates/history/status-item.html.twig -msgid "Linked to a computer" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: templates/history/status-item.html.twig -msgid "Has a location" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: templates/history/status-item.html.twig -msgid "The location has a state or a country" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: templates/history/status-item.html.twig -msgid "Real time carbon intensity enabled" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: templates/history/status-item.html.twig -msgid "The location has yearly carbon intensity data" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: templates/history/status-item.html.twig -msgid "The asset has a model" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: templates/history/status-item.html.twig -msgid "The model has a power consumption" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: templates/history/status-item.html.twig -msgid "The asset has a type" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: templates/history/status-item.html.twig -msgid "The type has a power consumption" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: templates/history/status-item.html.twig -msgid "The asset has a category" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: templates/history/status-item.html.twig -msgid "The asset has a usage profile" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: templates/history/status-item.html.twig -msgid "The asset has an inventory entry date" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: templates/history/status-item.html.twig -msgid "Legend" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" msgstr "" -#: templates/config.html.twig -msgid "Electricity maps" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" msgstr "" -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "Clé pour l'API electricitymap.org" - -#: templates/config.html.twig -msgid "Impact engine" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: templates/config.html.twig -msgid "Usage carbon emissions are always calculated internally" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" -#: templates/config.html.twig -msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" msgstr "" -#: templates/config.html.twig -msgid "Enable geocoding" +#: src/Impact/Type.php:202 +msgid "Usage Land use" msgstr "" -#: setup.php:273 -msgid "Environmental Impact" -msgstr "Impact environnemental" - -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" msgstr "" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" msgstr "" -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" msgstr "" -#: front/embodiedimpact.form.php:102 -msgid "Update failed." +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" msgstr "" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" msgstr "" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" msgstr "" -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." +#: src/Impact/Type.php:210 +msgid "Usage Acidification" msgstr "" -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" msgstr "" -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" msgstr "" -#: hook.php:317 -msgid "Associate to an usage profile" +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" msgstr "" -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" msgstr "" -#: hook.php:322 -msgid "Update category" +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" msgstr "" -#: hook.php:334 -msgid "Update zone for Boavizta engine" +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" msgstr "" -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" msgstr "" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" -msgstr "Collecte les intensités carbone depuis RTE" - -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "Collecte les intensités carbone depuis ElectricityMap" - -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" msgstr "" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" -msgstr "Heures de bureau" +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "" -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "Carbon" +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" msgstr "" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" msgstr "" -#: src/CronTask.php:70 -msgid "Download carbon emissions from RTE" -msgstr "Télécharge les émissions de carbone depuis RTE" +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "" -#: src/CronTask.php:71 src/CronTask.php:77 -msgid "Maximum number of entries to download" -msgstr "Nombre maximum d'éléments à télécharger" +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" -msgstr "Téléchargement des émissions de carbone depuis ElectricityMap" +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" msgstr "" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" -msgstr "Nombre maximum d'éléments à calculer" +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" +#: src/Impact/Type.php:246 +msgid "Total Acidification" msgstr "" -#: src/CronTask.php:211 -msgid "No zone to download" +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" msgstr "" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 -msgid "grams of carbon dioxyde equivalent" +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 -msgid "grams of antimony equivalent" +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 -msgid "joules" +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" msgstr "" -#: src/Impact/History/AbstractAsset.php:364 -msgid "Error while calculating impact" +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." msgstr "" -#: src/Impact/History/AbstractAsset.php:372 -msgid "Nothing to calculate" +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." msgstr "" -#: src/Impact/History/AbstractAsset.php:378 -#, php-format -msgid "%d entries calculated" +#: src/Impact/Type.php:332 +msgid "Incidence of disease" msgstr "" -#: src/CarbonIntensitySource.php:45 +#: src/Source.php:46 msgid "Carbon intensity source" msgid_plural "Carbon intensity sources" msgstr[0] "Source d'intensité carbone" msgstr[1] "Sources d'intensité carbone" msgstr[2] "Sources d'intensité carbone" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "Rapport carbone" -msgstr[1] "Rapports carbone" -msgstr[2] "Rapports carbone" - -#: src/Report.php:107 -#, php-format -msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" -msgstr "" - -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "Emission de carbone" -msgstr[1] "Emissions de carbone" -msgstr[2] "Emissions de carbone" - -#: src/CarbonEmission.php:119 -msgid "Energy" -msgstr "" - -#: src/CarbonEmission.php:127 -msgid "Emission" -msgstr "" +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Ignorer l'impact environnemental" -#: src/CarbonEmission.php:135 -msgid "Energy quality" -msgstr "" +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Est historisable" -#: src/CarbonEmission.php:143 -msgid "Emission quality" -msgstr "" +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Non spécifié" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" -msgstr "" +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Serveur" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" -msgstr "" +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Portable" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" -msgstr "" +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablette" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" -msgstr "Création du nom de la source de données" +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartphone" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" -msgstr "Création du nom de la zone de données" +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Impact d'utilisation" +msgstr[1] "Impacts d'utilisation" +msgstr[2] "Impacts d'utilisation" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." -msgstr "Création de données factices..." +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Carbon" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" -msgstr "" +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Rapport carbone" +msgstr[1] "Rapports carbone" +msgstr[2] "Rapports carbone" -#: src/Command/ExportDashboardCommand.php:101 +#: src/Report.php:101 #, php-format -msgid "Dashboard description saved to %s" -msgstr "" - -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" +"Mode démo activé. Les données ci-dessous ne sont pas représentatives des " +"ressources de la base de données. %sDésactiver le mode démo%s" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." -msgstr "Lecture des données Eco2mix" - -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" -msgstr "Création de l'inventaire de test" +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "Profil d'utilisation d'ordinateur" +msgstr[1] "Profils d'utilisation d'ordinateur" +msgstr[2] "Profils d'utilisation d'ordinateur" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" -msgstr "" +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "Heure de début invalide" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" -msgstr "" +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "Heure de fin invalide" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "Zone d'intensité carbone" -msgstr[1] "Zones d'intensité carbone" -msgstr[2] "Zones d'intensité carbone" +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Nom de la source" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" -msgstr "" +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Nom de la zone" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 msgid "Download enabled" msgstr "Téléchargement activé" -#: src/UsageInfo.php:59 -msgid "Usage informations" -msgstr "" +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Code" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" -msgstr "" +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "Non téléchargeable" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 -#, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" +"Il s'agit d'une source de secours, aucune donnée en temps réel n'est " +"disponible." + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Source pour l'historique" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Activer / Désactiver" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Trouver le code pays Alpha3 (ISO3166)" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 -#, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" -msgstr "" +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Nombre maximal de lieux à résoudre" -#: src/ComputerUsageProfile.php:52 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "Profil d'utilisation d'ordinateur" -msgstr[1] "Profils d'utilisation d'ordinateur" -msgstr[2] "Profils d'utilisation d'ordinateur" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Télécharger les émissions de carbone de Watttime" -#: src/ComputerUsageProfile.php:92 -msgid "Start time is invalid" -msgstr "" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Calculer l'impact environnemental de l'utilisation de tous les actifs" -#: src/ComputerUsageProfile.php:97 -msgid "Stop time is invalid" -msgstr "" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Nombre maximum d'éléments à calculer" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Calculer l'impact environnemental intrinsèque de tous les actifs" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "Aucune zone à télécharger" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 msgid "Environmental impact information video" -msgstr "" +msgstr "Vidéo sur l'impact environnemental" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:62 msgid "Methodology information" -msgstr "" +msgstr "Information sur la méthodologie" #: src/Dashboard/Widget.php:71 msgid "Total Carbon Emission" msgstr "Emission de carbone totale" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" msgstr "Emission de carbone mensuelle" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 msgid "Biggest monthly averaged carbon emission per model" -msgstr "" +msgstr "Émissions de carbone mensuelles moyennes les plus élevées par modèle" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" -msgstr "" +msgstr "Emissions de carbone mensuelle" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "potentiel d'épuisement abiotique lié à l'utilisation" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" msgstr "" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:142 msgid "Unhandled Computers" msgstr "Ordinateurs non gérés" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" -msgstr "" +msgstr "Moniteurs non gérés" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" -msgstr "" +msgstr "Equipements réseau non gérés" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" -msgstr "" +msgstr "Graphique radar" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" msgstr "Energie consommée et émission de carbone par mois" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "Carbon emission" msgstr "Emission de carbone" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 msgid "Consumed energy" msgstr "Energie consommée" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" +"Évalue les émissions de carbone liées à l'utilisation, exprimées en " +"équivalent CO₂, au cours des deux derniers mois. %sPlus d'informations%s" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" +"Évalue les émissions de carbone liées à l'utilisation, exprimées en " +"équivalent CO₂, au cours des 12 derniers mois. %sPlus d'informations%s" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" -msgstr "" - -#: src/Dashboard/Widget.php:1151 -msgid "Handled percentage" -msgstr "" - -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 -msgid "CO₂eq" -msgstr "CO₂eq" - -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "" - -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "" - -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "" - -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "" - -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "" - -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "" - -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" -msgstr "" - -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" -msgstr "" - -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "Intensité de dioxyde de carbone" - -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 -msgid "Handled assets ratio" -msgstr "" - -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" -msgstr "" - -#: src/Dashboard/Grid.php:145 -#, php-format -msgid "Handled %s" -msgstr "" - -#: src/Dashboard/Grid.php:156 -#, php-format -msgid "Unhandled %s" -msgstr "" - -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" -msgstr "" - -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" -msgstr "" - -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" -msgstr "" - -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" -msgstr "" - -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "" - -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" +#: src/Dashboard/Widget.php:854 +msgid "More information" msgstr "" -#: src/Dashboard/Grid.php:245 +#: src/Dashboard/Widget.php:893 #, php-format -msgid "Unhandled %s ratio" -msgstr "" - -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" +"Évalue la consommation de ressources non renouvelables en équivalent " +"antimoine. %sPlus d'informations%s" -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" -msgstr "Emission de carbone mensuelle" - -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" -msgstr "" +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "Pourcentage géré" -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "" +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "CO₂eq" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 msgid "g" msgstr "g" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 msgid "Kg" msgstr "Kg" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 msgid "t" msgstr "t" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 msgid "Kt" msgstr "Kt" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 msgid "Mt" msgstr "Mt" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 msgid "Gt" msgstr "Gt" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 msgid "Tt" msgstr "Tt" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 msgid "Pt" msgstr "Pt" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 msgid "Et" msgstr "Et" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 msgid "Zt" msgstr "Zt" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 msgid "Yt" msgstr "Yt" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:427 msgid "handled assets ratio" -msgstr "" +msgstr "Taux d'équipements gérés" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "Taux d'équipements gérés" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Géré" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "Non géré" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Ignoré" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 +#, php-format +msgid "plugin carbon - handled %s" +msgstr "Plugin Carbon - Géré %s" + +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "Plugin Carbon - non géré %s" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "plugin carbon - ignoré %s" + +#: src/Dashboard/Provider.php:632 msgid "plugin carbon - Total usage power consumption" -msgstr "" +msgstr "plugin Carbon - Puissance consommée totale d'utilisation" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "plugin Carbon - emission de carbone d'utilisation" + +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:1035 msgid "Total abiotic depletion potential" -msgstr "" +msgstr "Potentiel total d'épuisement abiotique" + +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Potentiel d'épuisement abiotique incorporé" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:1054 msgid "Total usage abiotic depletion potential" -msgstr "" +msgstr "potentiel d'épuisement abiotique total" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:1066 msgid "Total global warming potential" -msgstr "" +msgstr "Potentiel total de réchauffement climatique" + +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Potentiel de réchauffement climatique incorporé" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:1085 msgid "Total usage global warming potential" -msgstr "" +msgstr "potentiel de réchauffement climatique total lié à l'utilisation" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 msgid "KWh" msgstr "KWh" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 msgid "MWh" msgstr "MWh" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 msgid "GWh" msgstr "GWh" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 msgid "TWh" msgstr "TWh" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 msgid "PWh" msgstr "PWh" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 msgid "EWh" msgstr "EWh" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 msgid "ZWh" msgstr "ZWh" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 msgid "YWh" msgstr "YWh" -#: src/Toolbox.php:251 +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Nombre d'équipements non gérés" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "%s géré" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "%s non géré " + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Taux de %s non géré(e)s" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "" +"Émissions de carbone liées à l'utilisation de la dernière année à date" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Emission de carbone mensuelle" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Graphique du potentiel de réchauffement climatique" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Informations sur la méthodologie relative à l'impact environnemental" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Emission de carbone mensuelle d'utilisation" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "Plugin carbon - Taux d'équipements gérés" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intensité de dioxyde de carbone" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Date d'émission" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intensité" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emission de carbone" +msgstr[1] "Emissions de carbone" +msgstr[2] "Emissions de carbone" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energie" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emission" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Qualité de l'énergie" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Qualité de l'émission" + +#: src/Toolbox.php:280 msgid "W" msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" -msgstr "" - -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "" +msgstr "Wh" -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s%2$s" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Impact environnemental" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" +"Veuillez consulter les journaux pour plus de détails. Créez un ticket dans " +"le référentiel du plugin." -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Associer à un profil d'utilisation" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "Intensité carbone" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "Supprimer tous les impacts environnementaux calculés" -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "Date d'émission" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Mettre à jour la puissance consommée du type" -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "Intensité" +#: hook.php:312 +msgid "Update category" +msgstr "Mettre à jour la catégorie" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "" +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Mettre à jour la zone pour le moteur Boavizta" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" +#: hook.php:325 +msgid "Update carbon intensity source and zone" msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Trouvez le code pays Alpha3 (ISO3166) des lieux" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Calculer les émissions de carbone des ordinateurs" -#: src/ComputerType.php:58 -msgid "Server" -msgstr "" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Calcule l'impact incorporé des équipements" -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Toujours sous tension" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Heures de bureau" -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Arguments manquants dans la requête." -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Mauvais arguments." -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Réinitialisation refusée." -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "La réinitialisation a échoué." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" -msgstr "" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "L'absence de données empêche l'historisation de cet équipement." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "La mise à jour du potentiel de réchauffement climatique a échoué." -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "Source pour l'historique" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "Moteur de calcul introuvable pour cet équipement." -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" -msgstr "Activer / Désactiver" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "La mise à jour de l'impact d'utilisation a échoué." diff --git a/locales/hr_HR.mo b/locales/hr_HR.mo index c75f9ef9..687b88ac 100644 Binary files a/locales/hr_HR.mo and b/locales/hr_HR.mo differ diff --git a/locales/hr_HR.po b/locales/hr_HR.po index f6e8ac27..f90a792d 100644 --- a/locales/hr_HR.po +++ b/locales/hr_HR.po @@ -4,17 +4,16 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Thierry Bugier , 2025 -# Milo Ivir , 2025 +# Milo Ivir , 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: Milo Ivir , 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Milo Ivir , 2026\n" "Language-Team: Croatian (Croatia) (https://app.transifex.com/teclib/teams/28042/hr_HR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,140 +21,58 @@ msgstr "" "Language: hr_HR\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "Godišnja emisija ugljika zbog korištenja" - -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" -msgstr "Emisija ugljika mjesečnog korištenja" - -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" -msgstr "U usporedbi s %s" - -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "Ugrađena primarna energija" - -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" -msgstr "Potencijal abiotskog iscrpljivanja zbog korištenja" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Upozorenje" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format -msgid "" -"It represents %s percent of your parc that contains %s network equipments." -msgstr "Predstavlja %s posto tvojeg sustava koji sadrži %s mrežne opreme." - -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "Predstavlja %s posto tvojeg sustava koji sadrži %s monitora." - -#: templates/dashboard/information-block.html.twig -msgid "Information" -msgstr "Informacije" - -#: templates/dashboard/information-block.html.twig -msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." -msgstr "" -"Naši podaci potječu iz pouzdanih izvora i pomno se izračunavaju pomoću " -"industrijskih standardnih metodologija. Koristimo točne mjerne alate i " -"algoritme kako bismo osigurali preciznost i pouzdanost naših ekoloških " -"metričnih podataka." - -#: templates/dashboard/information-block.html.twig -msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." -msgstr "" -"Kako se krećemo prema zelenijoj budućnosti, tvrtke će uskoro morati " -"izvještavati o potrošnji energije i emisijama ugljika. Do 2025. mnoga će " -"područja provoditi ove propise. Usvajanjem ovih praksi sada osigurava " -"usklađenost i pomaže u borbi protiv klimatskih promjena." - -#: templates/dashboard/information-block.html.twig -msgid "Did you know ?" -msgstr "Je li znaš?" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Vrijeme početka" -#: templates/dashboard/information-block.html.twig -msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." -msgstr "" -"1 gram CO₂ ekvivalentan je CO₂ koji se emitira kada voziš automobil oko 20 " -"metara." +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Vrijeme prekida" -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "Ugrađena emisija ugljika" +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Dani u tjednu u kojima računalo obično radi" -#: templates/dashboard/information-video-card.html.twig -msgid "Want to know more ?" -msgstr "Želiš saznati više?" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: templates/dashboard/information-video-card.html.twig -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "Ovdje je video o numeričkom utjecaju na okoliš." +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Boavizta zona" -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." -msgstr "Predstavlja %s posto tvojeg sustava koji sadrži %s računala." +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intenzitet ugljika" -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" -msgstr "Ugrađeni potencijal abiotskog iscrpljivanja" +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Korištenje sredstva" -#: templates/monitortype.html.twig -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" -msgstr "" -"Ova vrijednost energije koristi se kao zadana kada je energija modela " -"monitora nepoznata" +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Profil korištenja" +msgstr[1] "Profili korištenja" +msgstr[2] "Profili korištenja" -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Struja" -msgstr[1] "Struje" -msgstr[2] "Struja" +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI ugljik" -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "" -"Ova vrijednost energije koristi se kao zadana kada je energija modela " -"računala nepoznata" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Izvor" -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "Kategorija" +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "Zona intenziteta ugljika" +msgstr[1] "Zone intenziteta ugljika" +msgstr[2] "Zone intenziteta ugljika" #: templates/pages/CarbonIntensitySource/tab_zone.html.twig msgid "No zone available" @@ -165,14 +82,6 @@ msgstr "Nijedna zona nije dostupna" msgid "Please run the automatic action to downlaod data from this source." msgstr "Pokreni automatsku radnju za uklanjanje podataka iz ovog izvora." -#: templates/networkequipmenttype.html.twig -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" -msgstr "" -"Ova vrijednost energije koristi se kao zadana kada je energija modela mrežne" -" opreme nepoznata" - #: templates/environmentalimpact-item.html.twig msgid "Usage" msgstr "Korištenje" @@ -185,45 +94,12 @@ msgstr "Resetiraj podatke" msgid "Calculate data" msgstr "Izračunaj podatke" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "Ugrađeni utjecaj" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "Vrijeme početka" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "Vrijeme prekida" - -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "Dani u tjednu u kojima računalo obično radi" - -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "Korištenje sredstva" - -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Profil korištenja" -msgstr[1] "Profili korištenja" -msgstr[2] "Profili korištenja" - -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "GLPI ugljik" - -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 -msgid "Environmental impact" -msgstr "Utjecaj na okoliš" - -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" -msgstr "Boavizta zona" +msgid_plural "Embodied impacts" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" #: templates/history/status-item.html.twig msgid "Historization status" @@ -257,21 +133,25 @@ msgstr "Nije predložak" msgid "Linked to a computer" msgstr "Povezano s računalom" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "" + #: templates/history/status-item.html.twig msgid "Has a location" msgstr "Ima mjesto" #: templates/history/status-item.html.twig -msgid "The location has a state or a country" -msgstr "Lokacija ima državu ili zemllju" +msgid "The location has carbon intensity data" +msgstr "Lokacija ima podatke o intenzitetu ugljika" #: templates/history/status-item.html.twig msgid "Real time carbon intensity enabled" -msgstr "" +msgstr "Stvarno vrijeme intenziteta ugljika je aktivirano" #: templates/history/status-item.html.twig msgid "The location has yearly carbon intensity data" -msgstr "" +msgstr "Lokacija ima godišnje podatke o intenzitetu ugljika" #: templates/history/status-item.html.twig msgid "The asset has a model" @@ -285,6 +165,10 @@ msgstr "Model ima potrošnju energije" msgid "The asset has a type" msgstr "Sredstvo ima vrstu" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "Vrsta se ne zanemaruje" + #: templates/history/status-item.html.twig msgid "The type has a power consumption" msgstr "Vrsta ima potrošnju energije" @@ -305,13 +189,26 @@ msgstr "Sredstvo ima datum unosa inventara" msgid "Legend" msgstr "Legenda" -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "Karte električne energije" +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "" +"Ova vrijednost energije koristi se kao zadana kada je energija modela " +"monitora nepoznata" -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "Kluč za electricitymap.org API" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Energija" +msgstr[1] "Energije" +msgstr[2] "Energijae" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "Nemoj procijeniti" #: templates/config.html.twig msgid "Impact engine" @@ -321,365 +218,737 @@ msgstr "Utjecajni pogon" msgid "Usage carbon emissions are always calculated internally" msgstr "Emisije ugljika zbog korištenja se uvijek izračunavaju interno" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "Boavizta" - -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "Osnovni URL za Boaviztapi instancu" - -#: templates/config.html.twig +#: templates/computertype.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -"Geokodiranje pretvara mjesto u ISO 3166 (3 slova) kod. Boavizta to treba " -"kako bi utvrdio utjecaj korištenja sredstva. Ova funkcija šalje adresu " -"spremljenu u mjestu usluge nominatim.org. Ako je to problem, to možeš " -"deaktivirati u nastavku i ručno ispuniti kod." - -#: templates/config.html.twig -msgid "Enable geocoding" -msgstr "Aktiviraj geokodiranje" +"Ova vrijednost energije koristi se kao zadana kada je energija modela " +"računala nepoznata" -#: setup.php:273 -msgid "Environmental Impact" -msgstr "Utjecaj na okoliš" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Kategorija" -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." -msgstr "Nedostaju argumenti u zahtjevu." +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Informacije" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." -msgstr "Resetiranje odbijeno." +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." +msgstr "" +"Naši podaci potječu iz pouzdanih izvora i pomno se izračunavaju pomoću " +"industrijskih standardnih metodologija. Koristimo točne mjerne alate i " +"algoritme kako bismo osigurali preciznost i pouzdanost naših ekoloških " +"metričnih podataka." -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." -msgstr "Resetiranje nije uspjelo." +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." +msgstr "" +"Kako se krećemo prema zelenijoj budućnosti, tvrtke će uskoro morati " +"izvještavati o potrošnji energije i emisijama ugljika. Do 2025. mnoga će " +"područja provoditi ove propise. Usvajanjem ovih praksi sada osigurava " +"usklađenost i pomaže u borbi protiv klimatskih promjena." -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." -msgstr "Nije moguće pronaći pogon za izračunavanje za ovo sredtsvo." +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "Je li znaš?" -#: front/embodiedimpact.form.php:102 -msgid "Update failed." -msgstr "Aktualiziranje neuspjelo." +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." +msgstr "" +"1 gram CO₂ ekvivalentan je CO₂ koji se emitira kada voziš automobil oko 20 " +"metara." -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." -msgstr "Loši argumenti." +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Upozorenje" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." -msgstr "Brisanje utjecaja zbog korištenja nije uspjelo." +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Predstavlja %s posto tvojeg sustava koji sadrži %s monitora." -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." -msgstr "Podaci koji nedostaju sprečavaju historizaciju ovog sredstva." +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Godišnja emisija ugljika zbog korištenja" -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." -msgstr "Aktualiziranje potencijala globalnog zagrijavanja nije uspjelo." +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Emisija ugljika mjesečnog korištenja" -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." -msgstr "Aktualiziranje utjecaja korištenja nije uspjelo." +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "U usporedbi s %s" -#: hook.php:317 -msgid "Associate to an usage profile" -msgstr "Poveži s profilom korištenja" +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "Predstavlja %s posto tvojeg sustava koji sadrži %s računala." -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" -msgstr "Aktualiziraj vrstu potrošnju energije" +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." +msgstr "Predstavlja %s posto tvojeg sustava koji sadrži %s mrežne opreme." -#: hook.php:322 -msgid "Update category" -msgstr "Aktualiziraj kategoriju" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "Želiš saznati više?" -#: hook.php:334 -msgid "Update zone for Boavizta engine" -msgstr "Aktualiziranje zonu za Boavizta pogon" +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "Ovdje je video o numeričkom utjecaju na okoliš." -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" -msgstr "Pronađi Alpha3 kod zemlje (ISO3166) mjesta" +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." +msgstr "" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" -msgstr "Izračunaj emisije ugljika računala" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." +msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" -msgstr "Prikupi intenzitet ugljika od RTE-a" +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Kvaliteta podataka" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "Prikupi intenzitet ugljika od ElectricityMap-a" +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Izvor podataka" -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" -msgstr "Izračunaj ugrađeni utjecaj sredstva" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" +msgstr "" +"Ova vrijednost energije koristi se kao zadana kada je energija modela mrežne" +" opreme nepoznata" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" -msgstr "Uvijek uključeno" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Čitaj intenzitet ugljičnog dioksida iz eksternih izvora" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" -msgstr "Radno vrijeme" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Izvor:" -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "Ugljik" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" +msgstr "" +"Izabrani izvor ne navodi svoje podržane zone. Pokušava se identificirati " +"zonu putem adrese" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" -msgstr "Pronađi Alpha3 kod zemlje (ISO3166)" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" +msgstr "Geokodiranje nije aktivirano. Nije moguće odrediti adresu u zonu" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" -msgstr "Maksimalan broj mjesta za rješavanje" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Adresa:" -#: src/CronTask.php:70 +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zona:" + +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Stvaranje imena izvora podataka" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "" + +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "" + +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Čitanje podataka …" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Stvaranje imena zone podataka" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Stvaranje lažnih podataka …" + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Aktualiziranje opisa nadzorne ploče izvještaja" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Nadzorna ploča nije pronađena" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Opis nadzorne ploče spremljen u %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Stvaranje testnog inventara" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Potrošnja struje" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Informacije o korištenju" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Utjecaj na okoliš" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "" + +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "Nevaljani URL Boavizta API-ja" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Veza s Boavizta API-jem je uspostavljena" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Prikupi intenzitet ugljika od RTE-a" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 msgid "Download carbon emissions from RTE" msgstr "Preuzmi emisije ugljika od RTE-a" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "Maksimalan broj unosa za preuzimanje" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" -msgstr "Preuzmi emisije ugljika od ElectricityMap" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Kraj" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" -msgstr "Izračunaj utjecaj na okoliš za sva sredstva zbog korištenja" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" -msgstr "Maksimalan broj unosa za računanje" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" -msgstr "Izračunaj ugrađeni utjecaj na okoliš za sva sredstva" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Datum evaluacije" -#: src/CronTask.php:211 -msgid "No zone to download" -msgstr "Nema zone za preuzimanje" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Pogon" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" -msgstr "Potrošnja struje" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Verzija pogona" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Neodređena kvaliteta" + +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "Ručni podaci" + +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Procijenjeni podaci" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "Smanjena količina podataka" + +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Izmjereni podaci" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 msgid "grams of carbon dioxyde equivalent" msgstr "grama ekvivalenta ugljičnog dioksida" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 msgid "grams of antimony equivalent" msgstr "grama ekvivalenta antimona" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 msgid "joules" msgstr "džula" -#: src/Impact/History/AbstractAsset.php:364 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "" + +#: src/Impact/History/AbstractAsset.php:370 msgid "Error while calculating impact" msgstr "Greška pri izračunavanju utjecaja" -#: src/Impact/History/AbstractAsset.php:372 +#: src/Impact/History/AbstractAsset.php:378 msgid "Nothing to calculate" msgstr "Nema se što izračunati" -#: src/Impact/History/AbstractAsset.php:378 +#: src/Impact/History/AbstractAsset.php:384 #, php-format msgid "%d entries calculated" msgstr "izračunati unosi: %d" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "Izvor intenziteta ugljika" -msgstr[1] "Izvori intenziteta ugljika" -msgstr[2] "Izvori intenziteta ugljika" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "Izvještaj o ugljiku" -msgstr[1] "Izvještaji o ugljiku" -msgstr[2] "Izvještaji o ugljiku" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "" -#: src/Report.php:107 -#, php-format +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:164 msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -"Aktiviran je demo modus. Podaci u nastavku nisu reprezentativni za sredstva " -"u bazi podataka. %sDeaktiviraj demo modus%s" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "Emisija ugljika" -msgstr[1] "Emisije ugljika" -msgstr[2] "Emisije ugljika" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "" -#: src/CarbonEmission.php:119 -msgid "Energy" -msgstr "Energija" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" +msgstr "" -#: src/CarbonEmission.php:127 -msgid "Emission" -msgstr "Emisija" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" +msgstr "" -#: src/CarbonEmission.php:135 -msgid "Energy quality" -msgstr "Kvaliteta energije" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "" -#: src/CarbonEmission.php:143 -msgid "Emission quality" -msgstr "Kvaliteta emisije" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" +msgstr "" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" -msgstr "Datum evaluacije" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" +msgstr "" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" -msgstr "Pogon" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" -msgstr "Verzija pogona" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" +msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" -msgstr "Stvaranje imena izvora podataka" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" +msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" -msgstr "Stvaranje imena zone podataka" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" +msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." -msgstr "Stvaranje lažnih podataka …" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" +msgstr "" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" -msgstr "Aktualiziranje opisa nadzorne ploče izvještaja" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" -msgstr "Nadzorna ploča nije pronađena" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" -msgstr "Opis nadzorne ploče spremljen u %s" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" -msgstr "Zona nije pronađena" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." -msgstr "Čitanje eco2mix podataka …" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" -msgstr "Stvaranje testnog inventara" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" -msgstr "Nevaljani URL Boavizta API-ja" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" +msgstr "" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" -msgstr "Veza s Boavizta API-jem je uspostavljena" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" +msgstr "" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "Zona intenziteta ugljika" -msgstr[1] "Zone intenziteta ugljika" -msgstr[2] "Zone intenziteta ugljika" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" -msgstr "Izvor podataka za povijesni izračun" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" -msgstr "Preuzimanje aktivirano" +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "" -#: src/UsageInfo.php:59 -msgid "Usage informations" -msgstr "Informacije o korištenju" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" -msgstr "Evaluira emisiju ugljika u ekvivalentu CO₂. %s Više informacija %s" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 -#, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -"Evaluira potrošnju neobnovljivih resursa u ekvivalentu antimona. %s Više " -"informacija %s" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "" + +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "" + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "" + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Izvor intenziteta ugljika" +msgstr[1] "Izvori intenziteta ugljika" +msgstr[2] "Izvori intenziteta ugljika" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Zanemari utjecaj na okoliš" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Može se historizirati" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Nespecificirano" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Server" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Laptop" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Pametni telefon" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Utjecaj korištenja" +msgstr[1] "Utjecaji korištenja" +msgstr[2] "Utjecaji korištenja" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Ugljik" + +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Izvještaj o ugljiku" +msgstr[1] "Izvještaji o ugljiku" +msgstr[2] "Izvještaji o ugljiku" + +#: src/Report.php:101 #, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" -msgstr "Evaluira potrošenu primarnu energiju. %s Više informacija %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" +msgstr "" +"Aktiviran je demo modus. Podaci u nastavku nisu reprezentativni za sredstva " +"u bazi podataka. %sDeaktiviraj demo modus%s" -#: src/ComputerUsageProfile.php:52 +#: src/ComputerUsageProfile.php:51 msgid "Computer usage profile" msgid_plural "Computer usage profiles" msgstr[0] "Profil korištenja računala" msgstr[1] "Profili korištenja računala" msgstr[2] "Profili korištenja računala" -#: src/ComputerUsageProfile.php:92 +#: src/ComputerUsageProfile.php:117 msgid "Start time is invalid" msgstr "Vrijeme početka nije valjano" -#: src/ComputerUsageProfile.php:97 +#: src/ComputerUsageProfile.php:122 msgid "Stop time is invalid" msgstr "Vrijeme prekida nije valjano" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Ime izvora" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Ime zone" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Preuzimanje aktivirano" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Kod" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "Ne može se preuzeti" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" +msgstr "Ovo je rezervni izvor, nema dostupnih podataka u stvarnom vremenu" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Izvor za povijesne podatke" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Aktiviraj / Deaktiviraj" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Pronađi Alpha3 kod zemlje (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Maksimalan broj mjesta za rješavanje" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Preuzmi emisije ugljika od Watttime" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Izračunaj utjecaj na okoliš za sva sredstva zbog korištenja" + +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Maksimalan broj unosa za računanje" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Izračunaj ugrađeni utjecaj na okoliš za sva sredstva" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "Nema zone za preuzimanje" + +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 msgid "Environmental impact information video" msgstr "Video s informacijama o utjecaju na okoliš" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:62 msgid "Methodology information" msgstr "Informacije o metodologiji" @@ -687,56 +956,60 @@ msgstr "Informacije o metodologiji" msgid "Total Carbon Emission" msgstr "Ukupna emisija ugljika" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" msgstr "Mjesečna emisija ugljika" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 msgid "Biggest monthly averaged carbon emission per model" msgstr "Najveća prosječna mjesečna emisija ugljika po modelu" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" msgstr "Emisija ugljika mjesečno" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" -msgstr "Ugrađena potrošena primarna energija" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Potencijal abiotskog iscrpljivanja zbog korištenja" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:142 msgid "Unhandled Computers" msgstr "Neupravljana računala" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" msgstr "Neupravljani monitori" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" msgstr "Neupravljana mrežna oprema" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" msgstr "Radarski dijagram" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" msgstr "Potrošena energija i emisija ugljika mjesečno" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "Carbon emission" msgstr "Emisija ugljika" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 msgid "Consumed energy" msgstr "Potrošena energija" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " @@ -745,7 +1018,7 @@ msgstr "" "Evaluira emisiju ugljika u ekvivalentu CO₂ tijekom zadnja 2 mjeseca. %s Više" " informacija %s" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " @@ -754,373 +1027,401 @@ msgstr "" "Evaluira emisiju ugljika u ekvivalentu CO₂ tijekom zadnjih 12 mjeseci. %s " "Više informacija %s" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" -msgstr "Ukupna ugrađena primarna energija" +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "" + +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" +msgstr "" +"Evaluira potrošnju neobnovljivih resursa u ekvivalentu antimona. %s Više " +"informacija %s" -#: src/Dashboard/Widget.php:1151 +#: src/Dashboard/Widget.php:1097 msgid "Handled percentage" msgstr "Postotak upravljanih" -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "CO₂eq" msgstr "CO₂eq" -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "Sbeq" - -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "Mjesečna emisija ugljika zbog korištenja" - -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "dodatak ugljik – upravljani %s" - -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "dodatak ugljik – neupravljani %s" - -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "dodatak ugljik – omjer upravljanih sredstva" - -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "Upravljani" - -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" -msgstr "Neupravljano" - -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" -msgstr "dodatak ugljik – Emisija ugljika korištenja" - -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "Intenzitet ugljičnog dioksida" - -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 -msgid "Handled assets ratio" -msgstr "Omjer upravljanih sredstva" - -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" -msgstr "Broj upravljanih sredstva" - -#: src/Dashboard/Grid.php:145 -#, php-format -msgid "Handled %s" -msgstr "Upravljani %s" - -#: src/Dashboard/Grid.php:156 -#, php-format -msgid "Unhandled %s" -msgstr "Neupravljani %s" - -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" -msgstr "Potrošnja energije zbog korištenja" - -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" -msgstr "Emisija ugljika zbog korištenja" - -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" -msgstr "Ugrađeni potencijal globalnog zagrijavanja" - -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" -msgstr "Potrošena ugrađenia primarna energija" - -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "Potencijal globalnog zagrijavanja" - -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" -msgstr "Potencijal abiotskog iscrpljivanja" - -#: src/Dashboard/Grid.php:245 -#, php-format -msgid "Unhandled %s ratio" -msgstr "Neupravljana %s omjer" - -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" -msgstr "Godina emisija ugljika do danas zbog korištenja" - -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" -msgstr "Mjesečna emisija ugljika" - -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" -msgstr "Dijagram potencijala globalnog zagrijavanje zbog korištenja" - -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "Informacije o metodologiji za utjecaj na okoliš" - -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 msgid "g" msgstr "g" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 msgid "Kg" msgstr "Kg" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 msgid "t" msgstr "t" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 msgid "Kt" msgstr "Kt" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 msgid "Mt" msgstr "Mt" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 msgid "Gt" msgstr "Gt" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 msgid "Tt" msgstr "Tt" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 msgid "Pt" msgstr "Pt" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 msgid "Et" msgstr "Et" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 msgid "Zt" msgstr "Zt" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 msgid "Yt" msgstr "Yt" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:427 msgid "handled assets ratio" msgstr "omjer upravljanih sredstva" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "Omjer upravljanih sredstva" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Upravljani" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "Neupravljano" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Zanemareno" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 +#, php-format +msgid "plugin carbon - handled %s" +msgstr "dodatak ugljik – upravljani %s" + +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "dodatak ugljik – neupravljani %s" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "dodatak ugljik – zanemareno %s" + +#: src/Dashboard/Provider.php:632 msgid "plugin carbon - Total usage power consumption" msgstr "dodatak ugljik – Ukupna potrošnja energije korištenja" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "Ukupni ugrađeni potencijal globalnog zagrijavanja" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "dodatak ugljik – Emisija ugljika korištenja" + +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:1035 msgid "Total abiotic depletion potential" msgstr "Ukupni potencijal iscrpljivanja abiotskih resursa" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Ugrađeni potencijal abiotskog iscrpljivanja" + +#: src/Dashboard/Provider.php:1054 msgid "Total usage abiotic depletion potential" msgstr "Ukupni potencijal iscrpljivanja abiotskih resursa zbog korištenja" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:1066 msgid "Total global warming potential" msgstr "Ukupni potencijal globalnog zagrijavanja" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Ugrađeni potencijal globalnog zagrijavanja" + +#: src/Dashboard/Provider.php:1085 msgid "Total usage global warming potential" msgstr "Ukupni potencijal globalnog zagrijavanja zbog korištenja" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 msgid "KWh" msgstr "KWh" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 msgid "MWh" msgstr "MWh" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 msgid "GWh" msgstr "GWh" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 msgid "TWh" msgstr "TWh" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 msgid "PWh" msgstr "PWh" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 msgid "EWh" msgstr "EWh" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 msgid "ZWh" msgstr "ZWh" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 msgid "YWh" msgstr "YWh" -#: src/Toolbox.php:251 +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Broj upravljanih sredstva" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "Upravljani %s" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "Neupravljani %s" + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Neupravljana %s omjer" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Godina emisija ugljika do danas zbog korištenja" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Mjesečna emisija ugljika" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Dijagram potencijala globalnog zagrijavanje zbog korištenja" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Informacije o metodologiji za utjecaj na okoliš" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Mjesečna emisija ugljika zbog korištenja" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "dodatak ugljik – omjer upravljanih sredstva" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intenzitet ugljičnog dioksida" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Datum emisije" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intenzitet" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emisija ugljika" +msgstr[1] "Emisije ugljika" +msgstr[2] "Emisije ugljika" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energija" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emisija" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Kvaliteta energije" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Kvaliteta emisije" + +#: src/Toolbox.php:280 msgid "W" msgstr "Š" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" msgstr "Wh" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "Može se historizirati" - -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "Utjecaj korištenja" -msgstr[1] "Utjecaji korištenja" -msgstr[2] "Utjecaji korištenja" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "Kvaliteta potencijala globalnog zagrijavanja" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Utjecaj na okoliš" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" -msgstr "Kvaliteta potencijalnog abiotskog iscrpljivanja" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." +msgstr "" +"Za više detalja provjeri zapisnike. Prijavi problem u repozitoriju dodatka." -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "Kvaliteta primarne energije" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Poveži s profilom korištenja" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "Intenzitet ugljika" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "" -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "Datum emisije" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Aktualiziraj vrstu potrošnju energije" -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "Intenzitet" +#: hook.php:312 +msgid "Update category" +msgstr "Aktualiziraj kategoriju" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "Potencijal globalnog zagrijavanja" +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Aktualiziranje zonu za Boavizta pogon" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" -msgstr "Potencijal abiotskog iscrpljivanja" +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "Primarna energija" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Pronađi Alpha3 kod zemlje (ISO3166) mjesta" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "Nespecificirano" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Izračunaj emisije ugljika računala" -#: src/ComputerType.php:58 -msgid "Server" -msgstr "Server" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Izračunaj ugrađeni utjecaj sredstva" -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "Laptop" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Uvijek uključeno" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "Tablet" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Radno vrijeme" -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "Pametni telefon" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Nedostaju argumenti u zahtjevu." -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "Ime izvora" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Loši argumenti." -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "Ime zone" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Resetiranje odbijeno." -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "Kod" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Resetiranje nije uspjelo." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" -msgstr "Ne može se preuzeti" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "Podaci koji nedostaju sprečavaju historizaciju ovog sredstva." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "Ovo je rezervni izvor, nema dostupnih podataka u stvarnom vremenu" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "Aktualiziranje potencijala globalnog zagrijavanja nije uspjelo." -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "Izvor za povijesne podatke" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "Nije moguće pronaći pogon za izračunavanje za ovo sredtsvo." -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" -msgstr "Aktiviraj / Deaktiviraj" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "Aktualiziranje utjecaja korištenja nije uspjelo." diff --git a/locales/ko_KR.mo b/locales/ko_KR.mo index 2d499fa0..c3721191 100644 Binary files a/locales/ko_KR.mo and b/locales/ko_KR.mo differ diff --git a/locales/ko_KR.po b/locales/ko_KR.po index 2b7e239b..27d7eef2 100644 --- a/locales/ko_KR.po +++ b/locales/ko_KR.po @@ -5,16 +5,16 @@ # # Translators: # Thierry Bugier , 2025 -# 조성현 (jaymz9634) , 2025 +# 조성현 (jaymz9634) , 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: 조성현 (jaymz9634) , 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: 조성현 (jaymz9634) , 2026\n" "Language-Team: Korean (Korea) (https://app.transifex.com/teclib/teams/28042/ko_KR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,124 +22,54 @@ msgstr "" "Language: ko_KR\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "" - -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" -msgstr "" - -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" -msgstr "" - -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "" - -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" -msgstr "" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format -msgid "" -"It represents %s percent of your parc that contains %s network equipments." -msgstr "" - -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "" - -#: templates/dashboard/information-block.html.twig -msgid "Information" -msgstr "" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "시작 시간" -#: templates/dashboard/information-block.html.twig -msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." -msgstr "" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "종료 시간" -#: templates/dashboard/information-block.html.twig -msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." -msgstr "" +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "컴퓨터가 일반적으로 실행되는 요일" -#: templates/dashboard/information-block.html.twig -msgid "Did you know ?" -msgstr "" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: templates/dashboard/information-block.html.twig -msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" msgstr "" -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "" +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "탄소 강도" -#: templates/dashboard/information-video-card.html.twig -msgid "Want to know more ?" -msgstr "더 자세히 알고 싶으신가요?" +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "자산 사용" -#: templates/dashboard/information-video-card.html.twig -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "" +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "사용 프로필" -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." -msgstr "" +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI 탄소" -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" msgstr "" -#: templates/monitortype.html.twig -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" -msgstr "이 전력 값은 모니터 모델의 전력이 알려지지 않은 경우 기본값으로 사용됩니다." - -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "전력" - -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "이 전력 값은 컴퓨터 모델의 전력이 알려지지 않은 경우 기본값으로 사용됩니다." - -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "분류" +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "탄소 강도 구역" #: templates/pages/CarbonIntensitySource/tab_zone.html.twig msgid "No zone available" @@ -149,12 +79,6 @@ msgstr "사용 가능한 구역 없음" msgid "Please run the automatic action to downlaod data from this source." msgstr "이 소스에서 데이터를 다운로드하려면 자동 작업을 실행하세요." -#: templates/networkequipmenttype.html.twig -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" -msgstr "이 전력 값은 네트워크 장비 모델의 전력이 알려지지 않은 경우 기본값으로 사용됩니다." - #: templates/environmentalimpact-item.html.twig msgid "Usage" msgstr "사용법" @@ -167,43 +91,10 @@ msgstr "데이터 재설정" msgid "Calculate data" msgstr "데이터 산출" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "구체화된 영향도" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "" - -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "" - -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "자산 사용" - -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "사용 프로필" - -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "GLPI 탄소" - -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 -msgid "Environmental impact" -msgstr "" - -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" -msgstr "" +msgid_plural "Embodied impacts" +msgstr[0] "" #: templates/history/status-item.html.twig msgid "Historization status" @@ -236,12 +127,16 @@ msgstr "" msgid "Linked to a computer" msgstr "" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "" + #: templates/history/status-item.html.twig msgid "Has a location" msgstr "" #: templates/history/status-item.html.twig -msgid "The location has a state or a country" +msgid "The location has carbon intensity data" msgstr "" #: templates/history/status-item.html.twig @@ -264,6 +159,10 @@ msgstr "" msgid "The asset has a type" msgstr "" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "" + #: templates/history/status-item.html.twig msgid "The type has a power consumption" msgstr "" @@ -284,13 +183,22 @@ msgstr "" msgid "Legend" msgstr "" -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "Electricity maps" +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "이 전력 값은 모니터 모델의 전력이 알려지지 않은 경우 기본값으로 사용됩니다." -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "electricitymap.org API에 대한 키" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "전력" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "" #: templates/config.html.twig msgid "Impact engine" @@ -300,785 +208,1179 @@ msgstr "임펙트 엔진" msgid "Usage carbon emissions are always calculated internally" msgstr "항상 내부적으로 사용 탄소 배출량 계산됨" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "Boavizta" +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" +msgstr "이 전력 값은 컴퓨터 모델의 전력이 알려지지 않은 경우 기본값으로 사용됩니다." -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "Boaviztapi 인스턴스에 대한 기본 URL" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "분류" -#: templates/config.html.twig +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "정보" + +#: templates/dashboard/information-block.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" -"지오코딩은 위치를 ISO 3166(3자리) 코드로 변환합니다. Boavizta는 자산 사용에 따른 영향을 파악하기 위해 이 기능이 " -"필요합니다. 이 기능은 위치에 저장된 주소를 nominatim.org 서비스로 전송합니다. 문제가 발생하는 경우 아래에서 이 기능을 " -"비활성화하고 국가 코드를 직접 입력할 수 있습니다." +"당사의 데이터는 신뢰할 수 있는 출처에서 수집되었으며, 업계 표준 방법론을 사용하여 꼼꼼하게 계산됩니다. 또한 정확한 측정 도구와 " +"알고리즘을 활용하여 환경 지표의 정확성과 신뢰성을 보장합니다." -#: templates/config.html.twig -msgid "Enable geocoding" -msgstr "지오코딩 활성화" +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." +msgstr "" +"우리가 더 푸른 미래를 향해 나아가면서, 기업들은 곧 에너지 사용량과 탄소 배출량을 보고해야 할 것입니다. 2025년까지 많은 지역에서 " +"이러한 규정을 시행할 것입니다. 지금 이러한 관행을 도입하면 규정 준수를 보장하고 기후 변화 대응에 도움이 됩니다." -#: setup.php:273 -msgid "Environmental Impact" +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "알고 계셨나요?" + +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." +msgstr "1g의 CO₂는 자동차를 약 20m 주행할 때 배출되는 CO₂와 같습니다." + +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "경고" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." msgstr "" -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" msgstr "" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" msgstr "" -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" msgstr "" -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." msgstr "" -#: front/embodiedimpact.form.php:102 -msgid "Update failed." +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "더 자세히 알고 싶으신가요?" + +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "숫자가 환경에 미치는 영향에 대한 영상입니다." + +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." +#: templates/abstractmodel.html.twig +msgid "Data quality" msgstr "" -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." +#: templates/abstractmodel.html.twig +msgid "Data source" msgstr "" -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" +msgstr "이 전력 값은 네트워크 장비 모델의 전력이 알려지지 않은 경우 기본값으로 사용됩니다." + +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" msgstr "" -#: hook.php:317 -msgid "Associate to an usage profile" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" msgstr "" -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" -#: hook.php:322 -msgid "Update category" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" -#: hook.php:334 -msgid "Update zone for Boavizta engine" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" msgstr "" -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" msgstr "" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "데이터 소스 이름 생성" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." msgstr "" -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "데이터 영역 이름 생성" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "가짜 데이터를 만드는 중..." + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" msgstr "" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" msgstr "" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" msgstr "" -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "탄소" +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "테스트 인벤토리 생성" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" msgstr "" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" +#: src/UsageInfo.php:62 +msgid "Usage informations" msgstr "" -#: src/CronTask.php:70 -msgid "Download carbon emissions from RTE" +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" msgstr "" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "RTE에서 탄소 강도 수집" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "RTE에서 탄소 배출량 다운로드" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" +msgstr "다운로드할 수 있는 최대 항목 수" + +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "종료" + +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" msgstr "" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" msgstr "" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" msgstr "" -#: src/CronTask.php:211 -msgid "No zone to download" +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" msgstr "" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "" + +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 msgid "grams of carbon dioxyde equivalent" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 msgid "grams of antimony equivalent" msgstr "" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 msgid "joules" msgstr "" -#: src/Impact/History/AbstractAsset.php:364 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "" + +#: src/Impact/History/AbstractAsset.php:370 msgid "Error while calculating impact" msgstr "" -#: src/Impact/History/AbstractAsset.php:372 +#: src/Impact/History/AbstractAsset.php:378 msgid "Nothing to calculate" msgstr "" -#: src/Impact/History/AbstractAsset.php:378 +#: src/Impact/History/AbstractAsset.php:384 #, php-format msgid "%d entries calculated" msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "" -#: src/Report.php:107 -#, php-format +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:164 msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "" -#: src/CarbonEmission.php:119 -msgid "Energy" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: src/CarbonEmission.php:127 -msgid "Emission" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: src/CarbonEmission.php:135 -msgid "Energy quality" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: src/CarbonEmission.php:143 -msgid "Emission quality" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "" + +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "" + +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "" + +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "" + +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "" + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "" + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "탄소 강도 소스" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "탄소" + +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" -msgstr "" +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "탄소 보고서" -#: src/Command/ExportDashboardCommand.php:101 +#: src/Report.php:101 #, php-format -msgid "Dashboard description saved to %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" -msgstr "" +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "컴퓨터 사용 프로필" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" msgstr "" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" msgstr "" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" +#: src/Source_Zone.php:72 +msgid "Source name" msgstr "" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" +#: src/Source_Zone.php:80 +msgid "Zone name" msgstr "" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "" +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "다운로드 활성화됨" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" +#: src/Source_Zone.php:96 +msgid "Code" msgstr "" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" +#: src/Source_Zone.php:150 +msgid "Not downloadable" msgstr "" -#: src/UsageInfo.php:59 -msgid "Usage informations" +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "이력 소스" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "활성화 / 비활성화" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" msgstr "" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 -#, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" msgstr "" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 -#, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" msgstr "" -#: src/ComputerUsageProfile.php:52 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "" -#: src/ComputerUsageProfile.php:92 -msgid "Start time is invalid" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "계산할 최대 항목 수" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" msgstr "" -#: src/ComputerUsageProfile.php:97 -msgid "Stop time is invalid" +#: src/CronTask.php:278 +msgid "No zone to download" msgstr "" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 msgid "Environmental impact information video" msgstr "" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:62 msgid "Methodology information" msgstr "" #: src/Dashboard/Widget.php:71 msgid "Total Carbon Emission" -msgstr "" +msgstr "총 탄소 배출량" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" -msgstr "" +msgstr "월별 탄소 배출량" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 msgid "Biggest monthly averaged carbon emission per model" msgstr "" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" msgstr "" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" msgstr "" -#: src/Dashboard/Widget.php:127 -msgid "Unhandled Computers" +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" msgstr "" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "처리 안된 컴퓨터" + +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" msgstr "" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" msgstr "" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" msgstr "" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" -msgstr "" +msgstr "월별 소비 에너지 및 탄소 배출량" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "Carbon emission" -msgstr "" +msgstr "탄소 배출" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 msgid "Consumed energy" -msgstr "" +msgstr "소모 에너지" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "" + +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" -#: src/Dashboard/Widget.php:1151 +#: src/Dashboard/Widget.php:1097 msgid "Handled percentage" msgstr "" -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "CO₂eq" -msgstr "" +msgstr "CO₂eq" -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "" +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "g" -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "" +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "Kg" -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "" +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "t" -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "" +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "Kt" -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "" +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "Mt" -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "" +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "Gt" -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "Tt" + +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "Pt" + +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "Et" + +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "Zt" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "Yt" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" msgstr "" -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" msgstr "" -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" msgstr "" -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 -msgid "Handled assets ratio" +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" msgstr "" -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" +#: src/Dashboard/Provider.php:507 +msgid "Ignored" msgstr "" -#: src/Dashboard/Grid.php:145 +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "Handled %s" +msgid "plugin carbon - handled %s" msgstr "" -#: src/Dashboard/Grid.php:156 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format -msgid "Unhandled %s" +msgid "plugin carbon - unhandled %s" msgstr "" -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" msgstr "" -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" msgstr "" -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" msgstr "" -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" msgstr "" -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" msgstr "" -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" msgstr "" -#: src/Dashboard/Grid.php:245 -#, php-format -msgid "Unhandled %s ratio" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" msgstr "" -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" msgstr "" -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" msgstr "" -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" msgstr "" -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "" +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "KWh" -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 -msgid "g" -msgstr "" +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "MWh" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 -msgid "Kg" -msgstr "" +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "GWh" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 -msgid "t" -msgstr "" +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "TWh" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 -msgid "Kt" -msgstr "" +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "PWh" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 -msgid "Mt" -msgstr "" +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "EWh" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 -msgid "Gt" -msgstr "" +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "ZWh" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 -msgid "Tt" -msgstr "" +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "YWh" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 -msgid "Pt" +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" msgstr "" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 -msgid "Et" +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" msgstr "" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 -msgid "Zt" +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" msgstr "" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 -msgid "Yt" +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" msgstr "" -#: src/Dashboard/Provider.php:334 -msgid "handled assets ratio" +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" msgstr "" -#: src/Dashboard/Provider.php:483 -msgid "plugin carbon - Total usage power consumption" -msgstr "" +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "월별 탄소 배출량" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" msgstr "" -#: src/Dashboard/Provider.php:850 -msgid "Total abiotic depletion potential" +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" msgstr "" -#: src/Dashboard/Provider.php:869 -msgid "Total usage abiotic depletion potential" +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" msgstr "" -#: src/Dashboard/Provider.php:881 -msgid "Total global warming potential" +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" msgstr "" -#: src/Dashboard/Provider.php:900 -msgid "Total usage global warming potential" -msgstr "" +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "이산화탄소 강도" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 -msgid "KWh" +#: src/Location.php:189 +msgid "Carbon intensity source and zone" msgstr "" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 -msgid "MWh" -msgstr "" +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "배출 일자" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 -msgid "GWh" -msgstr "" +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "강도" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 -msgid "TWh" -msgstr "" +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "탄소 배출" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 -msgid "PWh" +#: src/CarbonEmission.php:120 +msgid "Energy" msgstr "" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 -msgid "EWh" +#: src/CarbonEmission.php:128 +msgid "Emission" msgstr "" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 -msgid "ZWh" +#: src/CarbonEmission.php:136 +msgid "Energy quality" msgstr "" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 -msgid "YWh" +#: src/CarbonEmission.php:144 +msgid "Emission quality" msgstr "" -#: src/Toolbox.php:251 +#: src/Toolbox.php:280 msgid "W" -msgstr "" +msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" -msgstr "" +msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" -msgstr "" +msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" -msgstr "" +msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" -msgstr "" +msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" -msgstr "" +msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" -msgstr "" +msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" -msgstr "" +msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" -msgstr "" +msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" msgstr "" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "" - -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "환경 영향" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" +#: hook.php:301 +msgid "Associate to an usage profile" msgstr "" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" msgstr "" -#: src/CarbonIntensity.php:91 -msgid "Emission date" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" msgstr "" -#: src/CarbonIntensity.php:118 -msgid "Intensity" +#: hook.php:312 +msgid "Update category" msgstr "" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" +#: hook.php:324 +msgid "Update zone for Boavizta engine" msgstr "" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" +#: hook.php:325 +msgid "Update carbon intensity source and zone" msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" msgstr "" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "컴퓨터의 탄소 배출량 계산" -#: src/ComputerType.php:58 -msgid "Server" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" msgstr "" -#: src/ComputerType.php:59 -msgid "Laptop" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" msgstr "" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "공식 시간" -#: src/ComputerType.php:61 -msgid "Smartphone" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." msgstr "" -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." msgstr "" -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." msgstr "" -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." msgstr "" -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." msgstr "" -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." msgstr "" -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." msgstr "" -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." msgstr "" diff --git a/locales/pl_PL.mo b/locales/pl_PL.mo index 92fa5a7f..da41b17c 100644 Binary files a/locales/pl_PL.mo and b/locales/pl_PL.mo differ diff --git a/locales/pl_PL.po b/locales/pl_PL.po index ccc17fd1..52b9834f 100644 --- a/locales/pl_PL.po +++ b/locales/pl_PL.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Paweł Gorgoń, 2026 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-21 13:21+0200\n" -"PO-Revision-Date: 2022-11-23 14:34+0000\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Paweł Gorgoń, 2026\n" "Language-Team: Polish (Poland) (https://app.transifex.com/teclib/teams/28042/pl_PL/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,17 +21,54 @@ msgstr "" "Language: pl_PL\n" "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" -#. TRANS: %s is the user login -#: front/environnementalimpact.form.php:57 -#, php-format -msgid "%s updates an item" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Czas rozpoczęcia" + +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Czas zatrzymania" + +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Dni tygodnia, w które zazwyczaj uruchamiany jest komputer" + +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" msgstr "" -#: front/report.php:49 entrée standard:37 -msgid "GLPI Carbon" +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "" + +#: templates/usageinfo.html.twig +msgid "Asset usage" msgstr "" -#: src/CarbonIntensityZone.php:50 +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI Carbon" + +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Źródło" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 msgid "Carbon intensity zone" msgid_plural "Carbon intensity zones" msgstr[0] "" @@ -35,597 +76,1364 @@ msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: src/CarbonIntensityZone.php:122 src/CarbonIntensityZone.php:137 -msgid "Data source for historical calculation" +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "Brak dostępnej strefy" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." +msgstr "Proszę uruchomić automatyczną akcję pobierania danych z tego źródła." + +#: templates/environmentalimpact-item.html.twig +msgid "Usage" msgstr "" -#: src/AbstractType.php:50 entrée standard:37 -msgid "Power" -msgid_plural "Powers" +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "Zresetuj dane" + +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "Oblicz dane" + +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: src/AbstractType.php:58 src/Dashboard/Dashboard.php:50 -#: src/Dashboard/Dashboard.php:56 src/Dashboard/Dashboard.php:62 -#: src/Dashboard/Dashboard.php:68 src/Dashboard/Dashboard.php:74 -#: src/Dashboard/Dashboard.php:80 src/Dashboard/Dashboard.php:86 -#: src/Dashboard/Dashboard.php:92 src/Dashboard/Dashboard.php:98 -#: src/Dashboard/Dashboard.php:103 src/Dashboard/Dashboard.php:108 -#: src/Dashboard/Dashboard.php:113 src/Dashboard/Dashboard.php:118 -msgid "Carbon" +#: templates/history/status-item.html.twig +msgid "Historization status" msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" +#: templates/history/status-item.html.twig +msgid "No status" +msgstr "No status" + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and prevents from environmental impact calculation." +msgstr "Brak tych danych uniemożliwia obliczenie wpływu na środowisko." + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." +msgstr "" +"Brak tych danych może obniżyć jakość obliczeń oddziaływania na środowisko." + +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Is not a template" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Has a location" +msgstr "Has a location" + +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "" +"Lokalizacja posiada roczne dane dotyczące intensywności emisji dwutlenku " +"węgla" + +#: templates/history/status-item.html.twig +msgid "The asset has a model" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" +msgstr "Model ma zużycie energii" + +#: templates/history/status-item.html.twig +msgid "The asset has a type" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "Typ nie jest ignorowany" + +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "Typ ma zużycie energii" + +#: templates/history/status-item.html.twig +msgid "The asset has a category" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Legend" +msgstr "Legenda" + +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "" +"Ta wartość mocy jest używana domyślnie, gdy nieznana jest moc monitora." + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: src/Command/CreateTestInventoryCommand.php:149 -msgid "Creating test inventory" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "" + +#: templates/config.html.twig +msgid "Impact engine" +msgstr "" + +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" +msgstr "" +"Emisja dwutlenku węgla związana z użytkowaniem jest zawsze obliczana " +"wewnętrznie" + +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" +msgstr "" +"Ta wartość mocy jest używana domyślnie, gdy nieznana jest moc modelu " +"komputerowego" + +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Kategoria" + +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Informacja" + +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." +msgstr "" +"Nasze dane pochodzą z wiarygodnych źródeł i są skrupulatnie obliczane z " +"wykorzystaniem standardowych metodologii branżowych. Wykorzystujemy " +"precyzyjne narzędzia pomiarowe i algorytmy, aby zapewnić precyzję i " +"wiarygodność naszych wskaźników środowiskowych." + +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." +msgstr "" +"W miarę jak dążymy do bardziej zielonej przyszłości, firmy wkrótce będą " +"zobowiązane do raportowania zużycia energii i emisji dwutlenku węgla. Do " +"2025 roku wiele regionów będzie egzekwować te przepisy. Wdrożenie tych " +"praktyk już teraz gwarantuje zgodność z przepisami i pomaga w walce ze " +"zmianami klimatu." + +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "Czy wiesz, że ?" + +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." +msgstr "" +"1 gram CO₂ odpowiada ilości CO₂ emitowanego podczas jazdy samochodem na " +"odległość około 20 metrów." + +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Ostrzeżenie" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Reprezentuje %s procent Twojego parku zawierającego %s monitorów." + +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Roczna emisja dwutlenku węgla" + +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Miesięczna emisja dwutlenku węgla" + +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "" + +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "Reprezentuje %s procent Twojego parku zawierającego %s komputerów." + +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." +msgstr "" +"Reprezentuje %s procent Twojego parku zawierającego %s urządzeń sieciowych." + +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "Chcesz wiedzieć więcej?" + +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "" + +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" +"Przedstawione poniżej oddziaływania obejmują wyłącznie procesy produkcji, " +"utylizacji i recyklingu." + +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." +msgstr "" + +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Jakość danych" + +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Źródło danych" + +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" +msgstr "" +"Ta wartość mocy jest używana domyślnie, gdy nieznana jest moc modelu " +"urządzenia sieciowego" + +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "" + +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Źródło:" + +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" +msgstr "" + +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" +msgstr "" +"Geokodowanie nie jest włączone. Nie można przekształcić adresu w strefę." + +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Adres:" + +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Strefa:" -#: src/Command/CreateFakeCarbonIntensityCommand.php:70 -#: src/Command/CollectCarbonIntensityCommand.php:71 +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 msgid "Creating data source name" +msgstr "Tworzenie nazwy źródła danych" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:81 -msgid "Creating data zone name" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:92 +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Odczyt danych..." + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Tworzenie nazwy strefy danych" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 msgid "Creating fake data..." msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:83 -msgid "Reading eco2mix data..." +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" msgstr "" -#: src/Profile.php:46 src/EnvironnementalImpact.php:54 -msgid "Environnemental impact" +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Nie znaleziono pulpitu nawigacyjnego" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Opis pulpitu nawigacyjnego zapisany w %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" msgstr "" -#: src/Profile.php:87 entrée standard:48 -msgctxt "button" -msgid "Save" +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Pobór mocy" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Informacje o użytkowaniu" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Wpływ na środowisko" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" msgstr "" -#: src/CronTask.php:50 -msgid "Download carbon emissions from RTE" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" msgstr "" -#: src/CronTask.php:51 src/CronTask.php:57 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Zbierz intensywność emisji dwutlenku węgla z RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "Pobierz dane o emisji dwutlenku węgla z RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "" -#: src/CronTask.php:56 -msgid "Download carbon emissions from ElectricityMap" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" msgstr "" -#: src/CronTask.php:62 -msgid "Compute daily environnemental impact for all assets" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: src/CronTask.php:63 -msgid "Maximum number of entries to calculate" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: src/CarbonIntensity.php:57 -msgid "Carbon intensity" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Data oceny" + +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Silnik" + +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Wersja silnika" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" msgstr "" -#: src/CarbonIntensity.php:96 -msgid "ID" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" msgstr "" -#: src/CarbonIntensity.php:105 -msgid "Emission date" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" msgstr "" -#: src/CarbonIntensity.php:132 -msgid "Intensity" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" msgstr "" -#: src/Report.php:48 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "" -#: src/Toolbox.php:194 src/Dashboard/Provider.php:519 -msgid "g" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" msgstr "" -#: src/Toolbox.php:195 src/Dashboard/Provider.php:520 -msgid "Kg" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" +msgstr "gramy ekwiwalentu dwutlenku węgla" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" +msgstr "gramy ekwiwalentu antymonu" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" msgstr "" -#: src/Toolbox.php:196 src/Dashboard/Provider.php:521 -msgid "t" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." msgstr "" -#: src/Toolbox.php:197 src/Dashboard/Provider.php:522 -msgid "Kt" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." msgstr "" -#: src/Toolbox.php:198 src/Dashboard/Provider.php:523 -msgid "Mt" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "Błąd podczas obliczania wpływu" + +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "Nic do obliczenia" + +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" msgstr "" -#: src/Toolbox.php:199 src/Dashboard/Provider.php:524 -msgid "Gt" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" msgstr "" -#: src/Toolbox.php:200 src/Dashboard/Provider.php:525 -msgid "Tt" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: src/Toolbox.php:201 src/Dashboard/Provider.php:526 -msgid "Pt" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: src/Toolbox.php:202 src/Dashboard/Provider.php:527 -msgid "Et" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Toolbox.php:203 src/Dashboard/Provider.php:528 -msgid "Zt" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Toolbox.php:204 src/Dashboard/Provider.php:529 -msgid "Yt" +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#. TRANS: %1$s is a number maybe float or string and %2$s the unit -#: src/Toolbox.php:215 src/Toolbox.php:248 -#, php-format -msgid "%1$s %2$s" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" msgstr "" -#: src/Toolbox.php:229 -msgid "W" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: src/Toolbox.php:230 -msgid "KW" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: src/Toolbox.php:231 -msgid "MW" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: src/Toolbox.php:232 -msgid "GW" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: src/Toolbox.php:233 -msgid "TW" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: src/Toolbox.php:234 -msgid "PW" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: src/Toolbox.php:235 -msgid "EW" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: src/Toolbox.php:236 -msgid "ZW" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: src/Toolbox.php:237 -msgid "YW" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: src/Dashboard/Widget.php:45 -msgid "Carbon Emission Per Type" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: src/Dashboard/Widget.php:51 -msgid "Carbon Emission Per Month" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: src/Dashboard/Widget.php:57 entrée standard:38 -msgid "Total Carbon Emission" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: src/Dashboard/Widget.php:63 -msgid "Monthly Carbon Emission" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: src/Dashboard/Widget.php:69 -msgid "Unhandled Computers" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" msgstr "" -#: src/Dashboard/Filters/Item.php:42 -msgid "Item" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" msgstr "" -#: src/Dashboard/Provider.php:357 src/Dashboard/Provider.php:533 -#: src/Dashboard/Provider.php:534 -msgid "CO₂eq" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: src/Dashboard/Provider.php:473 src/Dashboard/Provider.php:488 entrée -#: standard:120 -msgid "Carbon emission" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Provider.php:478 src/Dashboard/Provider.php:491 entrée -#: standard:123 -msgid "Consumed energy" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Dashboard/Provider.php:538 -msgid "KWh" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Provider.php:539 -msgid "MWh" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Provider.php:540 -msgid "GWh" +#: src/Impact/Type.php:202 +msgid "Usage Land use" msgstr "" -#: src/Dashboard/Provider.php:541 -msgid "TWh" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Provider.php:542 -msgid "PWh" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" msgstr "" -#: src/Dashboard/Provider.php:543 -msgid "EWh" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -#: src/Dashboard/Provider.php:544 -msgid "ZWh" +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" msgstr "" -#: src/Dashboard/Provider.php:545 -msgid "YWh" +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" msgstr "" -#: src/Dashboard/Dashboard.php:51 src/Dashboard/Dashboard.php:114 -msgid "Unhandled computers" +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" msgstr "" -#: src/Dashboard/Dashboard.php:57 -msgid "Handled computers" +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" msgstr "" -#: src/Dashboard/Dashboard.php:63 -msgid "Total power consumption" +#: src/Impact/Type.php:210 +msgid "Usage Acidification" msgstr "" -#: src/Dashboard/Dashboard.php:69 src/Dashboard/Dashboard.php:104 -msgid "Total carbon emission" +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" msgstr "" -#: src/Dashboard/Dashboard.php:75 -msgid "Total power consumption per model" +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" msgstr "" -#: src/Dashboard/Dashboard.php:81 -msgid "Total carbon emission per model" +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" msgstr "" -#: src/Dashboard/Dashboard.php:87 src/Dashboard/Dashboard.php:255 -msgid "Carbon emission per month" +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" msgstr "" -#: src/Dashboard/Dashboard.php:93 -msgid "Carbon intensity (gCO2eq / KWh)" +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" msgstr "" -#: src/Dashboard/Dashboard.php:99 -msgid "Carbon emission per type" +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" msgstr "" -#: src/Dashboard/Dashboard.php:109 entrée standard:38 -msgid "Monthly carbon emission" +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" msgstr "" -#: src/Dashboard/Dashboard.php:119 -msgid "Carbon emission per month graph" +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Dashboard.php:273 -msgid "Carbon dioxyde intensity" +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/ComputerUsageProfile.php:48 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" +msgstr "" -#: src/ComputerUsageProfile.php:84 -msgid "Knowbase category" +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" msgstr "" -#: src/ComputerUsageProfile.php:90 -msgid "As child of" +#: src/Impact/Type.php:238 +msgid "Total Land use" msgstr "" -#: src/ComputerUsageProfile.php:105 entrée standard:52 -msgid "Start time" +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" msgstr "" -#: src/ComputerUsageProfile.php:113 entrée standard:58 -msgid "Stop time" +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" msgstr "" -#: src/ComputerUsageProfile.php:121 entrée standard:66 -msgid "Monday" +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" msgstr "" -#: src/ComputerUsageProfile.php:129 entrée standard:72 -msgid "Tuesday" +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" msgstr "" -#: src/ComputerUsageProfile.php:137 entrée standard:78 -msgid "Wednesday" +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" msgstr "" -#: src/ComputerUsageProfile.php:145 entrée standard:84 -msgid "Thursday" +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" msgstr "" -#: src/ComputerUsageProfile.php:153 entrée standard:90 -msgid "Friday" +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" msgstr "" -#: src/ComputerUsageProfile.php:161 entrée standard:96 -msgid "Saturday" +#: src/Impact/Type.php:246 +msgid "Total Acidification" msgstr "" -#: src/ComputerUsageProfile.php:169 entrée standard:103 -msgid "Sunday" +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:124 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:219 entrée standard:40 -msgid "Name" +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:125 -msgid "Download enabled" +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:126 -msgid "Source for historical" +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:132 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:225 -msgid "Total" +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:189 -msgid "No" +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:186 -msgid "Yes" +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:285 -msgid "Enable / Disable" +#: src/Impact/Type.php:332 +msgid "Incidence of disease" msgstr "" -#: src/CarbonEmission.php:50 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: hook.php:133 hook.php:172 -msgid "Power consumption (W)" +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" msgstr "" -#: setup.php:204 -msgid "Environmental Impact" +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" msgstr "" -#. TRANS: %s is the number of new version -#: install/migration/update_0.0.0_to_0.0.1.php:44 -#: install/migration/update_xxx_to_yyy.php:45 +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Nieokreślone" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Serwer" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Laptop" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartfon" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "" + +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Raport emisji dwutlenku węgla" +msgstr[1] "Raporty emisji dwutlenku węgla" +msgstr[2] "Raporty emisji dwutlenku węgla" +msgstr[3] "Raporty emisji dwutlenku węgla" + +#: src/Report.php:101 #, php-format -msgid "Update to %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_uasge_profiles.php:39 -msgid "Office hours" +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" +msgstr[3] "" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:46 -msgid "Compute carbon emissions of computers" +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:58 -msgid "Collect carbon intensities from RTE" +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Nazwa źródła" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Nazwa strefy" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:70 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Kod" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "Nie można pobrać" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" -#: entrée standard:35 -msgid "No zone available" +#: src/Source_Zone.php:172 +msgid "Source for historical" msgstr "" -#: entrée standard:37 -msgid "Please run the automatic action to downlaod data from this source." +#: src/Source_Zone.php:411 +msgid "Enable / Disable" msgstr "" -#: entrée standard:43 -msgid "Key for electricitymap.org API" +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Znajdź kod kraju Alpha3 (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" msgstr "" -#: entrée standard:61 -msgid "Days of week where the computer usually runs" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" msgstr "" -#: entrée standard:38 -msgid "Warning" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Type" +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" msgstr "" -#: entrée standard:33 -msgid "Consumed energy and carbon emission per month" +#: src/CronTask.php:278 +msgid "No zone to download" msgstr "" -#: entrée standard:40 -msgid "Information" +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" msgstr "" -#: entrée standard:50 +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "Informacje metodologiczne" + +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "Całkowita emisja dwutlenku węgla" + +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "Miesięczna emisja dwutlenku węgla" + +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" +msgstr "" + +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "Emisja dwutlenku węgla miesięcznie" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "" + +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "" + +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "" + +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "" + +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "Wykres radarowy" + +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 +msgid "Consumed energy and carbon emission per month" +msgstr "" + +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "Emisja dwutlenku węgla" + +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "Zużyta energia" + +#: src/Dashboard/Widget.php:746 +#, php-format msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" msgstr "" +"Ocenia emisję dwutlenku węgla w przeliczeniu na ekwiwalent CO₂ w ciągu " +"ostatnich 2 miesięcy. %s Więcej informacji %s" -#: entrée standard:51 +#: src/Dashboard/Widget.php:812 +#, php-format msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" msgstr "" +"Ocenia emisję dwutlenku węgla w ekwiwalencie CO₂ w ciągu ostatnich 12 " +"miesięcy. %s Więcej informacji %s" -#: entrée standard:55 -msgid "Did you know ?" +#: src/Dashboard/Widget.php:854 +msgid "More information" msgstr "" -#: entrée standard:56 +#: src/Dashboard/Widget.php:893 +#, php-format msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" +msgstr "" +"Ocenia zużycie zasobów nieodnawialnych w ekwiwalencie antymonu. %s Więcej " +"informacji %s" + +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" msgstr "" -#: entrée standard:81 +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "" + +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "g" + +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "Kg" + +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "t" + +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "Kt" + +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "Mt" + +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "Gt" + +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "Tt" + +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "Pt" + +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "Et" + +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "Zt" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "Yt" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" +msgstr "" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "%s rows / page" +msgid "plugin carbon - handled %s" msgstr "" -#: entrée standard:90 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format -msgid "Showing %s to %s of %s rows" +msgid "plugin carbon - unhandled %s" msgstr "" -#: entrée standard:94 +#: src/Dashboard/Provider.php:584 #, php-format -msgid "%s-%s/%s" +msgid "plugin carbon - ignored %s" msgstr "" -#: entrée standard:104 -msgid "Start" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" msgstr "" -#: entrée standard:109 -msgid "Previous" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" msgstr "" -#: entrée standard:118 -#, php-format -msgid "%s-%s of %s" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" msgstr "" -#: entrée standard:141 -msgid "Next" +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" msgstr "" -#: entrée standard:146 -msgid "End" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" msgstr "" -#: entrée standard:50 standard:281 -msgid "No data" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" msgstr "" -#: entrée standard:88 -msgid "Check all" +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" +msgstr "Całkowity potencjał globalnego ocieplenia" + +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" msgstr "" -#: entrée standard:123 -msgid "Filter" +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" +msgstr "Całkowity potencjał globalnego ocieplenia" + +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "KWh" + +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "MWh" + +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "GWh" + +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "TWh" + +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "PWh" + +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "EWh" + +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "ZWh" + +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "YWh" + +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" msgstr "" -#: entrée standard:129 -msgid "Export" +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" msgstr "" -#: entrée standard:184 -msgid "All" +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" msgstr "" -#: entrée standard:310 +#: src/Dashboard/Grid.php:232 #, php-format -msgid "Show %s entries" +msgid "Unhandled %s ratio" msgstr "" -#: entrée standard:42 -msgid "Compared to last month" +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" msgstr "" -#: entrée standard:35 -msgid "Want to know more ?" +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Miesięczna emisja dwutlenku węgla" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" msgstr "" -#: entrée standard:36 -msgid "Here is a video about the impact of numeric on the enviromnent." +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Month" +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emisja dwutlenku węgla" +msgstr[1] "Emisje dwutlenku węgla" +msgstr[2] "Emisje dwutlenku węgla" +msgstr[3] "Emisje dwutlenku węgla" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energia" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emisja" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Jakość energii" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Jakość emisji" + +#: src/Toolbox.php:280 +msgid "W" +msgstr "W" + +#: src/Toolbox.php:281 +msgid "KW" +msgstr "KW" + +#: src/Toolbox.php:282 +msgid "MW" +msgstr "MW" + +#: src/Toolbox.php:283 +msgid "GW" +msgstr "GW" + +#: src/Toolbox.php:284 +msgid "TW" +msgstr "TW" + +#: src/Toolbox.php:285 +msgid "PW" +msgstr "PW" + +#: src/Toolbox.php:286 +msgid "EW" +msgstr "EW" + +#: src/Toolbox.php:287 +msgid "ZW" +msgstr "ZW" + +#: src/Toolbox.php:288 +msgid "YW" +msgstr "YW" + +#: src/Toolbox.php:315 +msgid "Wh" +msgstr "Wh" + +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" msgstr "" -#: entrée standard:36 +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Wpływ na środowisko" + +#: hook.php:97 msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" -#: entrée standard:36 -msgid "Usage information" +#: hook.php:301 +msgid "Associate to an usage profile" msgstr "" -#: entrée standard:41 -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" -msgstr[3] "" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "" + +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "" + +#: hook.php:312 +msgid "Update category" +msgstr "" + +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "" + +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "" + +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Znajdź kod kraju Alpha3 (ISO3166) lokalizacji" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Oblicz emisję dwutlenku węgla przez komputery" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "" + +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Zawsze włączony" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Godziny pracy biura" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Brak argumentów w żądaniu." + +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Złe argumenty." + +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Resetowanie zabronione." + +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Resetowanie nie powiodło się." + +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "" + +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "" + +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "" + +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "Aktualizacja wpływu użytkowania nie powiodła się." diff --git a/locales/pt_BR.mo b/locales/pt_BR.mo index 3f34a2d4..15495850 100644 Binary files a/locales/pt_BR.mo and b/locales/pt_BR.mo differ diff --git a/locales/pt_BR.po b/locales/pt_BR.po index 7e4915aa..1fe1c407 100644 --- a/locales/pt_BR.po +++ b/locales/pt_BR.po @@ -5,17 +5,18 @@ # # Translators: # Eduardo Scott , 2025 -# Thierry Bugier , 2025 -# Pablo Pierri , 2025 +# Pablo Pierri , 2026 +# Thierry Bugier , 2026 +# Arthur Schaefer , 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: Pablo Pierri , 2025\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Arthur Schaefer , 2026\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/teclib/teams/28042/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,139 +24,58 @@ msgstr "" "Language: pt_BR\n" "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "" - -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" -msgstr "" - -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" -msgstr "" - -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "" - -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" -msgstr "" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Aviso" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format -msgid "" -"It represents %s percent of your parc that contains %s network equipments." -msgstr "" - -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "" - -#: templates/dashboard/information-block.html.twig -msgid "Information" -msgstr "Informação" - -#: templates/dashboard/information-block.html.twig -msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." -msgstr "" -"Nossos dados são obtidos de fontes confiáveis ​​e meticulosamente calculados" -" usando metodologias padrão da indústria. Utilizamos ferramentas e " -"algoritmos de medição precisos para garantir a precisão e a confiabilidade " -"de nossas métricas ambientais." - -#: templates/dashboard/information-block.html.twig -msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." -msgstr "" -"À medida que caminhamos para um futuro mais verde, as empresas em breve " -"serão obrigadas a reportar o consumo de energia e as emissões de carbono. " -"Até 2025, muitas regiões aplicarão essas regulamentações. A adoção dessas " -"práticas agora garante a conformidade e ajuda a combater as mudanças " -"climáticas." - -#: templates/dashboard/information-block.html.twig -msgid "Did you know ?" -msgstr "Você sabia ?" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Hora de início" -#: templates/dashboard/information-block.html.twig -msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." -msgstr "" -"1 grama de CO₂ é equivalente ao CO₂ emitido quando você dirige um carro por " -"cerca de 20 metros." +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Hora de fim" -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "" +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Dias da semana em que o computador normalmente funciona" -#: templates/dashboard/information-video-card.html.twig -msgid "Want to know more ?" -msgstr "Quer saber mais?" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: templates/dashboard/information-video-card.html.twig -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "" +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Zona Boavizta" -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." -msgstr "" +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Intensidade de carbono" -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" -msgstr "" +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Uso do ativo" -#: templates/monitortype.html.twig -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" -msgstr "" -"Este valor de potência padrão quando a potência de um modelo de monitor não " -"existe" +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Perfil de uso" +msgstr[1] "Perfis de uso" +msgstr[2] "Perfis de uso" -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Energia" -msgstr[1] "Energias" -msgstr[2] "Potências" +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI Carbon" -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "Valor padrão utilizado quando a potência não existe" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Origem" -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "" +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "Zona de intensidade de carbono" +msgstr[1] "Zonas de intensidade de carbono" +msgstr[2] "Zonas de intensidade de carbono" #: templates/pages/CarbonIntensitySource/tab_zone.html.twig msgid "No zone available" @@ -165,949 +85,1373 @@ msgstr "Nenhuma zona disponível" msgid "Please run the automatic action to downlaod data from this source." msgstr "Execute a ação automática para baixar dados desta fonte." -#: templates/networkequipmenttype.html.twig -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" -msgstr "" -"Este valor de potência padrão quando a potência de um modelo de equipamento " -"de rede não existe" - #: templates/environmentalimpact-item.html.twig msgid "Usage" -msgstr "" +msgstr "Uso" #: templates/environmentalimpact-item.html.twig msgid "Reset data" -msgstr "" +msgstr "Redefinir dados" #: templates/environmentalimpact-item.html.twig msgid "Calculate data" -msgstr "" +msgstr "Calcular dados" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "Iniciar o tempo" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "Pare o tempo" - -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "Dias da semana em que o computador normalmente funciona" - -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "" - -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Perfil de uso" -msgstr[1] "Perfis de uso" -msgstr[2] "Perfis de uso" - -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "GLPI Carbono" - -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 -msgid "Environmental impact" -msgstr "" - -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" -msgstr "" +msgid_plural "Embodied impacts" +msgstr[0] "Impacto incorporado" +msgstr[1] "Impactos incorporados" +msgstr[2] "Impactos incorporados" #: templates/history/status-item.html.twig msgid "Historization status" -msgstr "" +msgstr "Status de historização" #: templates/history/status-item.html.twig msgid "No status" -msgstr "" +msgstr "Sem status" #: templates/history/status-item.html.twig msgid "" "This data is missing and prevents from environmental impact calculation." -msgstr "" +msgstr "Esses dados estão ausentes e impedem o cálculo do impacto ambiental." #: templates/history/status-item.html.twig msgid "" "This data is missing and may reduce the quality of environmental impact " "calculation." msgstr "" +"Esses dados estão ausentes e podem comprometer a qualidade do cálculo do " +"impacto ambiental." #: templates/history/status-item.html.twig msgid "Is not in the trash bin" -msgstr "" +msgstr "Não está na lixeira" #: templates/history/status-item.html.twig msgid "Is not a template" -msgstr "" +msgstr "Não é um modelo" #: templates/history/status-item.html.twig msgid "Linked to a computer" -msgstr "" +msgstr "Conectado a um computador" + +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "Computador relacionado possui uma localização " #: templates/history/status-item.html.twig msgid "Has a location" -msgstr "" +msgstr "Possui uma localização" #: templates/history/status-item.html.twig -msgid "The location has a state or a country" -msgstr "" +msgid "The location has carbon intensity data" +msgstr "A localização possui dados the intensidade de carbono" #: templates/history/status-item.html.twig msgid "Real time carbon intensity enabled" -msgstr "" +msgstr "Intensidade de carbono em tempo real habilitada" #: templates/history/status-item.html.twig msgid "The location has yearly carbon intensity data" -msgstr "" +msgstr "A localização possui dados anuais de intensidade de carbono" #: templates/history/status-item.html.twig msgid "The asset has a model" -msgstr "" +msgstr "O ativo possui um modelo" #: templates/history/status-item.html.twig msgid "The model has a power consumption" -msgstr "" +msgstr "O modelo possui consumo de energia" #: templates/history/status-item.html.twig msgid "The asset has a type" -msgstr "" +msgstr "O ativo possui um tipo" + +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "Tipo não é ignorado" #: templates/history/status-item.html.twig msgid "The type has a power consumption" -msgstr "" +msgstr "O tipo possui um consumo de energia" #: templates/history/status-item.html.twig msgid "The asset has a category" -msgstr "" +msgstr "O ativo possui uma categoria" #: templates/history/status-item.html.twig msgid "The asset has a usage profile" -msgstr "" +msgstr "O ativo possui um perfil de uso" #: templates/history/status-item.html.twig msgid "The asset has an inventory entry date" -msgstr "" +msgstr "O ativo possui informações de entrada no inventário" #: templates/history/status-item.html.twig msgid "Legend" -msgstr "" +msgstr "Legenda" -#: templates/config.html.twig -msgid "Electricity maps" +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" msgstr "" +"Este valor de potência é utilizado como padrão quando a potência de um " +"modelo de monitor é desconhecida" -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "Chave para a API electricmap.org" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Potência" +msgstr[1] "Potências" +msgstr[2] "Potências" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "Não avaliar" #: templates/config.html.twig msgid "Impact engine" -msgstr "" +msgstr "Motor de impacto" #: templates/config.html.twig msgid "Usage carbon emissions are always calculated internally" msgstr "" +"As emissões de carbono durante o uso são sempre calculadas internamente" -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" +"Este valor de potência é utilizado como padrão quando a potência de um " +"modelo de computador é desconhecida" -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Categoria" -#: templates/config.html.twig +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Informação" + +#: templates/dashboard/information-block.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" +"Nossos dados provêm de fontes confiáveis e são meticulosamente calculados " +"utilizando metodologias padrão da indústria. Utilizamos ferramentas de " +"medição e algoritmos precisos para garantir o rigor e a confiabilidade de " +"nossas métricas ambientais." -#: templates/config.html.twig -msgid "Enable geocoding" +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." msgstr "" +"À medida que avançamos em direção a um futuro mais sustentável, as empresas " +"em breve deverão reportar seu consumo de energia e emissões de carbono. Até " +"2025, muitas regiões passarão a exigir o cumprimento dessas regulamentações." +" Adotar essas práticas agora garante a conformidade e ajuda a combater as " +"mudanças climáticas." -#: setup.php:273 -msgid "Environmental Impact" -msgstr "Impacto ambiental" - -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." -msgstr "" +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "Você sabia ?" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." msgstr "" +"1 grama de CO₂ equivale ao CO₂ emitido ao dirigir um carro por cerca de 20 " +"metros." -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." -msgstr "" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Aviso" -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." -msgstr "" +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Isso representa %s por cento do seu parque que contém %s monitores." -#: front/embodiedimpact.form.php:102 -msgid "Update failed." -msgstr "" +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Emissão de carbono decorrente do uso anual" -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." -msgstr "" +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Emissão de carbono decorrente do uso mensal" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." -msgstr "" +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "Comparado a %s" -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." msgstr "" +"Isso representa %s por cento do seu parque que contém %s computadores." -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" +"Isso representa %s por cento do seu parque que contém %s equipamentos de " +"rede." -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." -msgstr "" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "Quer saber mais?" -#: hook.php:317 -msgid "Associate to an usage profile" +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "Aqui está um vídeo sobre o impacto do digital no meio ambiente." + +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" +"Os impactos abaixo incluem apenas os processos de fabricação, descarte e " +"reciclagem." -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" +"Leve em consideração as unidades previstas antes de definir o impacto." -#: hook.php:322 -msgid "Update category" +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Qualidade de dados" + +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Origem de dados" + +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" msgstr "" +"Este valor de potência é utilizado como padrão quando a potência de um " +"modelo de equipamento de rede é desconhecida" -#: hook.php:334 -msgid "Update zone for Boavizta engine" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Ler a intensidade de dióxido de carbono de fontes externas" + +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Origem:" + +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" +"A fonte selecionada não lista as zonas suportadas. Tentando identificar uma " +"zona a partir de um endereço." -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" +"A geocodificação não está ativada. Não foi possível resolver um endereço " +"para uma zona" -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" -msgstr "Calcular as emissões de carbono dos computadores" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Endereço:" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Zona:" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "Coletar intensidades de carbono do ElectricityMap" +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Criando nome da fonte de dados" -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "Esta origem não existe" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" -msgstr "" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "A zona não é gerenciada pela fonte de dados" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" -msgstr "Horário de expediente" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Lendo dados..." -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "Carbon" +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Criando nome de zona de dados" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" -msgstr "" +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Criando dados fictícios…" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" -msgstr "" +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Atualizando a descrição do painel de relatórios" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Painel não encontrado" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Descrição do painel salva em %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Criando um teste de inventário" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Consumo de energia" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Informações de uso" -#: src/CronTask.php:70 +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Impacto ambiental" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "%s Mais informações %s" + +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "URL de API do Boavizta inválida" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Conexão com a API do Boavizta estabelecida" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "Diagnóstico de recursos" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "Coletar intensidades de carbono do RTE" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 msgid "Download carbon emissions from RTE" msgstr "Baixe as emissões de carbono da RTE" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "Número máximo de entradas para download" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" -msgstr "Baixar as emissões de carbono do ElectricityMap" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Fim" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" -msgstr "" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "Coletar dados de intensidade de carbono a partir de Electricity Maps" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" -msgstr "Número máximo de entradas a calcular" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "Fazer download de emissões a partir de Electricity Maps" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" -msgstr "" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Data de avaliação" -#: src/CronTask.php:211 -msgid "No zone to download" -msgstr "" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Engine" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" -msgstr "" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Versão do Engine" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "Impacto não avaliado" + +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Qualidade não especificada" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "Dados manuais" + +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Dados estimados" + +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "Dados sub amostrados" + +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Dados medidos" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 msgid "grams of carbon dioxyde equivalent" -msgstr "" +msgstr "gramas de dióxido de carbono equivalente" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 msgid "grams of antimony equivalent" -msgstr "" +msgstr "gramas de antimônio equivalente" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 msgid "joules" -msgstr "" +msgstr "joules" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "Conexão com Boavizat falhou." -#: src/Impact/History/AbstractAsset.php:364 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "A avaliação do impacto incorporado falhou." + +#: src/Impact/History/AbstractAsset.php:370 msgid "Error while calculating impact" -msgstr "" +msgstr "Erro ao calcular impacto" -#: src/Impact/History/AbstractAsset.php:372 +#: src/Impact/History/AbstractAsset.php:378 msgid "Nothing to calculate" -msgstr "" +msgstr "Nada a calcular" -#: src/Impact/History/AbstractAsset.php:378 +#: src/Impact/History/AbstractAsset.php:384 #, php-format msgid "%d entries calculated" -msgstr "" +msgstr "%d entradas calculadas" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "Potencial de aquecimento global incorporado" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "Potencial de depleção abiótica incorporado" -#: src/Report.php:107 -#, php-format -msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" -msgstr "" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "Energia primária incorporada consumida" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "Emissão de carbono" -msgstr[1] "Emissões de carbono" -msgstr[2] "Emissões de carbono" - -#: src/CarbonEmission.php:119 -msgid "Energy" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" +"Mudanças climáticas incorporadas - Contribuição das emissões biogênicas" -#: src/CarbonEmission.php:127 -msgid "Emission" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" +"Mudanças climáticas incorporadas - Contribuição das emissões de combustíveis" +" fósseis" -#: src/CarbonEmission.php:135 -msgid "Energy quality" +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" +"Mudanças climáticas incorporadas - Contribuição das emissões provenientes da" +" mudança no uso da terra" -#: src/CarbonEmission.php:143 -msgid "Emission quality" -msgstr "" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "Emissões incorporadas de substâncias radioativas" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" -msgstr "" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" +msgstr "Uso da terra incorporado" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" -msgstr "" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" +msgstr "Depleção incorporada da camada de ozônio" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" -msgstr "" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "Emissões de partículas finas incorporadas" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" -msgstr "Criando nome da fonte de dados" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" +msgstr "Formação de ozônio fotoquímico incorporado" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" -msgstr "Criando nome de zona de dados" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" +msgstr "Uso incorporado dos recursos hídricos" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." -msgstr "" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "Entrada de material incorporado por unidade de serviço" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" -msgstr "" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" +msgstr "Utilização incorporada de recursos minerais e metálicos" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" +msgstr "Utilização incorporada de recursos fósseis (incluindo nucleares)" + +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" +msgstr "Acidificação incorporada" + +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" +msgstr "Ecotoxicidade da água doce incorporada" + +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "Eutrofização incorporada de água doce" + +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "Embodied Eutrophication of marine waters" + +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "Eutrofização terrestre incorporada" + +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "Potencial de aquecimento global devido ao uso" + +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "Potencial de depleção abiótica devido ao uso" + +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "Energia primária consumida" + +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" +"Mudanças climáticas - Contribuição das emissões biogênicas devido ao uso" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" +"Mudanças climáticas - Contribuição das emissões de combustíveis fósseis " +"devido ao uso" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" +"Mudanças climáticas - Contribuição das emissões provenientes da mudança no " +"uso da terra devido ao uso" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." -msgstr "Lendo dados do eco2mix..." +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "Emissões de substâncias radioativas devido ao uso" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" -msgstr "Criando um teste de inventário" +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "Ocupação do solo devido ao uso" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" -msgstr "" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "Depleção da camada de ozônio devido ao uso" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" -msgstr "" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "Emissão de partículas finas devido ao uso" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "Zona de intensidade de carbono" -msgstr[1] "Zonas de intensidade de carbono" -msgstr[2] "Zonas de intensidade de carbono" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "Formação fotoquímica de ozônio devido ao uso" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" -msgstr "Fonte de dados para cálculo histórico" +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "Consumo de recursos hídricos devido ao uso" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" -msgstr "Habilitar download" +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "Utilização de materiais por unidade de serviço" -#: src/UsageInfo.php:59 -msgid "Usage informations" +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "Utilização de recursos minerais e metálicos" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "Utilização de recursos fósseis (incluindo nucleares)" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "Acidificação devido ao uso" + +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "Ecotoxicidade em água doce devido ao uso" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "Eutrofização de água doce devido ao uso" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "Eutrofização de água-marinha devido ao uso" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "Eutrofização terrestre devido ao uso" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "Potencial total de aquecimento global" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "Aquecimento global total Potencial total de depleção abiótica" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "Consumo total de energia primária" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "Mudanças climáticas - Contribuição das emissões biogênicas total" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" +"Mudanças climáticas - Contribuição das emissões de combustíveis fósseis " +"total" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" msgstr "" +"Mudanças climáticas - Contribuição das emissões provenientes da mudança no " +"uso da terra total" + +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "Emissões de substâncias radioativas totais" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "Uso da terra total" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "Depleção da camada de ozônio devido total" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "Emissão de partículas finas total" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "Formação fotoquímica de ozônio total" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "Consumo de recursos hídricos total" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "Utilização de materiais por unidade de serviço total" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "Utilização de recursos minerais e metálicos total" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "Utilização de recursos fósseis (incluindo nucleares) total" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "Acidificação total" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "Ecotoxicidade em água doce total" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "Eutrofização de água doce total" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "Eutrofização de água-marinha total" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "Eutrofização terrestre total" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "Emissão de carbono em CO₂ equivalente" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "Consumo de recursos não renováveis em antimônio equivalente." + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "Energia primária cosnumida" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "Incidência da doença" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Origem de intensidade de carbono" +msgstr[1] "Origem de intensidade de carbono" +msgstr[2] "Origens de intensidade de carbono" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Ignorar o impacto ambiental" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "É historizável" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Não especificado" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Servidor" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Laptop" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Smartphone" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Impacto de uso" +msgstr[1] "Impacto do uso" +msgstr[2] "Impactos do uso" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Carbon" + +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "Qualidade" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Relatório do Carbon" +msgstr[1] "Relatório do Carbon" +msgstr[2] "Relatórios do Carbon" + +#: src/Report.php:101 #, php-format msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" +"Modo de demonstração ativado. Os dados abaixo não representam os ativos no " +"banco de dados. %sDesativar modo de demonstração%s" + +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "Perfil de uso do computador" +msgstr[1] "Perfis de uso do computador" +msgstr[2] "Perfis de uso do computador" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "O horário de início é inválido" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "O horário de fim é inválido" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Nome da fonte" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Nome da zona" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "Habilitado download" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Código" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "Não é possível fazer o download" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" +msgstr "Esta é uma fonte alternativa; não há dados em tempo real disponíveis" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Fonte para histórico" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Desabilitar / Habilitar" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Encontrar o código de país Alpha3 (ISO3166)" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 -#, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" -msgstr "" +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Número máximo de localizações para solucionar" -#: src/ComputerUsageProfile.php:52 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "Perfil de uso do computador" -msgstr[1] "Perfis de uso do computador" -msgstr[2] "Perfis de uso do computador" +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Baixe as emissões de carbono do Watttime" -#: src/ComputerUsageProfile.php:92 -msgid "Start time is invalid" -msgstr "" +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Calcular o impacto ambiental da utilização de todos os ativos" -#: src/ComputerUsageProfile.php:97 -msgid "Stop time is invalid" -msgstr "" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Número máximo de entradas a calcular" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Calcular o impacto ambiental incorporado de todos os ativos" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "Sem zona para baixar" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 msgid "Environmental impact information video" -msgstr "" +msgstr "Vídeo informativo sobre o impacto ambiental" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:62 msgid "Methodology information" -msgstr "" +msgstr "Informações sobre a metodologia" #: src/Dashboard/Widget.php:71 msgid "Total Carbon Emission" msgstr "Emissão total de carbono" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" msgstr "Emissão de carbono mensalmente" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 msgid "Biggest monthly averaged carbon emission per model" -msgstr "" +msgstr "Maior média mensal de emissões de carbono por modelo" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" -msgstr "" +msgstr "Emissão de carbono por mês" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" -msgstr "" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Potencial de depleção abiótica" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "Critérios de impacto" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:142 msgid "Unhandled Computers" -msgstr "Computadores não utilizados" +msgstr "Computadores não controlados" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" -msgstr "" +msgstr "Monitores não controlados" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" -msgstr "" +msgstr "Equipamentos de rede não controlados" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" -msgstr "" +msgstr "Gráfico de radar" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" msgstr "Energia consumida e emissão de carbono por mês" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "Carbon emission" msgstr "Emissão de carbono" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 msgid "Consumed energy" msgstr "Energia consumida" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" +"Avalia a emissão de carbono em equivalente de CO₂ durante os últimos 2 " +"meses. %s Mais informações %s" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" + +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "Mais informações" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" -#: src/Dashboard/Widget.php:1151 +#: src/Dashboard/Widget.php:1097 msgid "Handled percentage" -msgstr "" +msgstr "Porcentagem tratada" -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "CO₂eq" msgstr "CO₂eq" -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "" - -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "" - -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "" - -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "" - -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "" - -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "" - -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" -msgstr "" - -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" -msgstr "" - -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "Intensidade de dióxido de carbono" - -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 -msgid "Handled assets ratio" -msgstr "" - -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" -msgstr "" - -#: src/Dashboard/Grid.php:145 -#, php-format -msgid "Handled %s" -msgstr "" - -#: src/Dashboard/Grid.php:156 -#, php-format -msgid "Unhandled %s" -msgstr "" - -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" -msgstr "" - -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" -msgstr "" - -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" -msgstr "" - -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" -msgstr "" - -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "" - -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" -msgstr "" - -#: src/Dashboard/Grid.php:245 -#, php-format -msgid "Unhandled %s ratio" -msgstr "" - -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" -msgstr "" - -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" -msgstr "Emissão mensal de carbono" - -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" -msgstr "" - -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "" - -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 msgid "g" msgstr "g" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 msgid "Kg" msgstr "Kg" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 msgid "t" msgstr "t" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 msgid "Kt" msgstr "Kt" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 msgid "Mt" msgstr "Mt" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 msgid "Gt" msgstr "Gt" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 msgid "Tt" msgstr "Tt" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 msgid "Pt" msgstr "Pt" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 msgid "Et" msgstr "Et" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 msgid "Zt" msgstr "Zt" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 msgid "Yt" msgstr "Yt" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:427 msgid "handled assets ratio" -msgstr "" +msgstr "índice de ativos tratados" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "Proporção de ativos gerenciados" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "Gerenciados" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "Não gerenciados" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Ignorado" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 +#, php-format +msgid "plugin carbon - handled %s" +msgstr "plugin carbon - tratados %s" + +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "plugin carbon - não tratados %s" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "plugin carbon - ignorado %s" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:632 msgid "plugin carbon - Total usage power consumption" -msgstr "" +msgstr "plugin carbon - Consumo total de energia" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "plugin carbon - Emissão de uso de carbono" + +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:1035 msgid "Total abiotic depletion potential" -msgstr "" +msgstr "Potencial total de depleção abiótica" + +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Potencial de esgotamento abiótico incorporado" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:1054 msgid "Total usage abiotic depletion potential" -msgstr "" +msgstr "Potencial total de depleção abiótica" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:1066 msgid "Total global warming potential" -msgstr "" +msgstr "Potencial total de aquecimento global" + +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Potencial de aquecimento global incorporado" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:1085 msgid "Total usage global warming potential" -msgstr "" +msgstr "Potencial de aquecimento global do uso total" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 msgid "KWh" msgstr "KWh" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 msgid "MWh" msgstr "MWh" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 msgid "GWh" msgstr "GWh" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 msgid "TWh" msgstr "TWh" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 msgid "PWh" msgstr "PWh" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 msgid "EWh" msgstr "EWh" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 msgid "ZWh" msgstr "ZWh" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 msgid "YWh" msgstr "YWh" -#: src/Toolbox.php:251 +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "Contagem de ativos gerenciados" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "Gerenciados %s" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "Não gerenciados %s" + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "Proporção %s não tratada" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Emissões de carbono do uso no acumulado do ano" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Emissão mensal de carbono" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Gráfico de potencial de aquecimento global de uso" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Informações sobre a metodologia de impacto ambiental" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Emissão de carbono por utilização por mês" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "plugin carbono - proporção de ativos gerenciados" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Intensidade de dióxido de carbono" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "Fonte e zona de intensidade de carbono" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Data de emissão" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Intensidade" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Emissão de carbono" +msgstr[1] "Emissões de carbono" +msgstr[2] "Emissões de carbono" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Energia" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emissão" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Qualidade de energia" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Qulidade de emissão" + +#: src/Toolbox.php:280 msgid "W" msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" -msgstr "" - -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "" +msgstr "Wh" -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Impacto ambiental" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" +"Verifique os registros para obter mais detalhes. Registre um problema no " +"repositório do plugin." -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Associar a um perfil de utilização" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "Intensidade de carbono" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "Eliminar todos os impactos ambientais calculados" -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "Data de emissão" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Atualizar tipo de consumo de energia" -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "Intensidade" +#: hook.php:312 +msgid "Update category" +msgstr "Atualizar categoria" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "" +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Atualizar zona para o motor Boavizta" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" -msgstr "" +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "Atualizar a fonte e a zona de intensidade de carbono." -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Encontrar o código de país Alpha3 (ISO3166) de localizações" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Calcular as emissões de carbono dos computadores" -#: src/ComputerType.php:58 -msgid "Server" -msgstr "" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Computar impacto incorporado dos ativos" -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Sempre ligado" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Horário de expediente" -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "Argumentos faltantes na requisição." -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Argumentos errados." -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Redefinição negada." -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Redefinição falhou." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." msgstr "" +"A falta de dados impede a criação de um registro histórico deste ativo." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "A atualização do potencial de aquecimento global falhou." -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "Fonte para histórico" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "Não foi possível encontrar um mecanismo de cálculo para este ativo." -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" -msgstr "Desabilitar / Habilitar" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "A atualização do impacto de uso falhou." diff --git a/locales/tr_TR.mo b/locales/tr_TR.mo index affc957f..c2c13fc5 100644 Binary files a/locales/tr_TR.mo and b/locales/tr_TR.mo differ diff --git a/locales/tr_TR.po b/locales/tr_TR.po index 1c6a0390..487ff31c 100644 --- a/locales/tr_TR.po +++ b/locales/tr_TR.po @@ -4,17 +4,17 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Thierry Bugier , 2025 -# Kaya Zeren , 2025 +# Thierry Bugier , 2026 +# Kaya Zeren , 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-28 15:18+0000\n" -"PO-Revision-Date: 2025-07-03 13:58+0000\n" -"Last-Translator: Kaya Zeren , 2025\n" +"POT-Creation-Date: 2026-04-14 10:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: Kaya Zeren , 2026\n" "Language-Team: Turkish (Turkey) (https://app.transifex.com/teclib/teams/28042/tr_TR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,141 +22,56 @@ msgstr "" "Language: tr_TR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: templates/dashboard/usage-carbon-emission-last-year.html.twig -msgid "Yearly Usage Carbon Emission" -msgstr "Yıllık kullanım karbon emisyonu" - -#: templates/dashboard/monthly-carbon-emission.html.twig -msgid "Monthly usage carbon emission" -msgstr "Aylık kullanım karbon emisyonu" - -#: templates/dashboard/monthly-carbon-emission.html.twig -#, php-format -msgid "Compared to %s" -msgstr "%s ile karşılaştırma" - -#: templates/dashboard/embodied-primary-energy.html.twig -msgid "Embodied primary energy" -msgstr "Gerçekleşen birincil enerji" - -#: templates/dashboard/usage-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:96 src/Dashboard/DemoProvider.php:95 -#: src/Dashboard/Grid.php:184 src/Dashboard/Grid.php:287 -#: src/Dashboard/Provider.php:816 -msgid "Usage abiotic depletion potential" -msgstr "Kullanım abiyotik tükenme potansiyeli" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#: templates/dashboard/unhandled-monitors-card.html.twig -#: templates/dashboard/unhandled-computers-card.html.twig -msgid "Warning" -msgstr "Uyarı" - -#: templates/dashboard/unhandled-network-equipments-card.html.twig -#, php-format -msgid "" -"It represents %s percent of your parc that contains %s network equipments." -msgstr "Parkınızın yüzde %s kadarındaki %s ağ aygıtını gösterir." - -#: templates/dashboard/unhandled-monitors-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s monitors." -msgstr "Parkınızın yüzde %s kadarındaki %s ekranı gösterir." - -#: templates/dashboard/information-block.html.twig -msgid "Information" -msgstr "Bilgiler" - -#: templates/dashboard/information-block.html.twig -msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." -msgstr "" -"Verilerimiz güvenilir kaynaklardan elde edilir ve endüstri standardı " -"yöntemler kullanılarak titizlikle hesaplanır. Çevresel ölçümlerimizin " -"hassasiyetini ve güvenilirliğini sağlamak için doğru ölçüm araçlarını ve " -"algoritmaları kullanırız." - -#: templates/dashboard/information-block.html.twig -msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." -msgstr "" -"Daha yeşil bir geleceğe doğru ilerlerken, yakında kuruluşların enerji " -"kullanımını ve karbon emisyonlarını bildirmeleri gerekecek. 2025 yılına " -"kadar birçok bölge bu düzenlemeleri yürürlüğe koyacak. Bu uygulamaları " -"benimsemek uyumluluğu garanti ediyor ve iklim değişikliğiyle mücadeleye " -"yardımcı oluyor." - -#: templates/dashboard/information-block.html.twig -msgid "Did you know ?" -msgstr "Biliyor musunuz?" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "Başlangıç zamanı" -#: templates/dashboard/information-block.html.twig -msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." -msgstr "" -"1 gram CO₂, bir otomobili yaklaşık 20 metre sürdüğünüzde ortaya çıkan CO₂ " -"miktarına eşdeğerdir." +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "Bitiş zamanı" -#: templates/dashboard/embodied-carbon-emission.html.twig -#: src/Dashboard/Widget.php:104 -msgid "Embodied carbon emission" -msgstr "Gerçekleşen karbon emisyonu" +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" +msgstr "Bilgisayarın genellikle çalıştığı haftanın günleri" -#: templates/dashboard/information-video-card.html.twig -msgid "Want to know more ?" -msgstr "Ayrıntılı bilgi almak ister misiniz?" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" -#: templates/dashboard/information-video-card.html.twig -msgid "Here is a video about the impact of numeric on the enviromnent." -msgstr "" -"Sayısal değerlerin çevreye etkisini anlatan bir videoya bakabilirsiniz." +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" +msgstr "Boavizta bölgesi" -#: templates/dashboard/unhandled-computers-card.html.twig -#, php-format -msgid "It represents %s percent of your parc that contains %s computers." -msgstr "Parkınızın yüzde %s kadarındaki %s bilgisayarı gösterir." +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "Karbon yoğunluğu" -#: templates/dashboard/embodied-abiotic-depletion.html.twig -#: src/Dashboard/Widget.php:110 src/Dashboard/DemoProvider.php:77 -#: src/Dashboard/Grid.php:204 src/Dashboard/Grid.php:301 -#: src/Dashboard/Provider.php:782 src/Dashboard/Provider.php:866 -msgid "Embodied abiotic depletion potential" -msgstr "Gerçekleşen abiyotik tükenme potansiyeli" +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "Varlık kullanımı" -#: templates/monitortype.html.twig -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" -msgstr "" -"Bir ekran modelinin gücü bilinmediğinde varsayılan olarak bu güç değeri " -"kullanılır" +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "Kullanım profili" +msgstr[1] "Kullanım profilleri" -#: templates/monitortype.html.twig templates/computertype.html.twig -#: templates/networkequipmenttype.html.twig src/AbstractType.php:56 -msgid "Power" -msgid_plural "Powers" -msgstr[0] "Güç" -msgstr[1] "Güçler" +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI Carbon" -#: templates/computertype.html.twig -msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" -msgstr "" -"Bir bilgisayar modelinin gücü bilinmediğinde varsayılan olarak bu güç değeri" -" kullanılır" +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "Kaynak" -#: templates/computertype.html.twig src/SearchOptions.php:251 -#: src/ComputerType.php:78 -msgid "Category" -msgstr "Kategori" +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 +msgid "Carbon intensity zone" +msgid_plural "Carbon intensity zones" +msgstr[0] "Karbon yoğunluğu bölgesi" +msgstr[1] "Karbon yoğunluğu bölgeleri" #: templates/pages/CarbonIntensitySource/tab_zone.html.twig msgid "No zone available" @@ -166,14 +81,6 @@ msgstr "Kullanılabilecek bir bölge yok" msgid "Please run the automatic action to downlaod data from this source." msgstr "Lütfen bu kaynaktan veri indirecek otomatik işlemi çalıştırın." -#: templates/networkequipmenttype.html.twig -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" -msgstr "" -"Bir ağ aygıtı modelinin gücü bilinmediğinde varsayılan olarak bu güç değeri " -"kullanılır" - #: templates/environmentalimpact-item.html.twig msgid "Usage" msgstr "Kullanım" @@ -186,44 +93,11 @@ msgstr "Verileri sıfırla" msgid "Calculate data" msgstr "Verileri hesapla" -#: templates/environmentalimpact-item.html.twig +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 msgid "Embodied impact" -msgstr "Gerçekleşen etki" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:123 -#: src/ComputerUsageProfile.php:144 -msgid "Start time" -msgstr "Başlangıç zamanı" - -#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:152 -msgid "Stop time" -msgstr "Bitiş zamanı" - -#: templates/computerusageprofile.html.twig -msgid "Days of week where the computer usually runs" -msgstr "Bilgisayarın genellikle çalıştığı haftanın günleri" - -#: templates/usageinfo.html.twig -msgid "Asset usage" -msgstr "Varlık kullanımı" - -#: templates/usageinfo.html.twig -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "Kullanım profili" -msgstr[1] "Kullanım profilleri" - -#: templates/quick-report.html.twig front/report.php:54 -msgid "GLPI Carbon" -msgstr "GLPI Carbon" - -#: templates/location.html.twig src/Profile.php:45 src/UsageInfo.php:91 -msgid "Environmental impact" -msgstr "Çevresel etki" - -#: templates/location.html.twig src/Location.php:78 src/SearchOptions.php:121 -msgid "Boavizta zone" -msgstr "Boavizta bölgesi" +msgid_plural "Embodied impacts" +msgstr[0] "Gerçekleşen etki" +msgstr[1] "Gerçekleşen etkiler" #: templates/history/status-item.html.twig msgid "Historization status" @@ -256,13 +130,17 @@ msgstr "Bir kalıp olmayan" msgid "Linked to a computer" msgstr "Bir bilgisayar ile bağlantılı olan" +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" +msgstr "İlişkilendirilmiş bilgisayarın bir konumu var" + #: templates/history/status-item.html.twig msgid "Has a location" msgstr "Konumu şu olan " #: templates/history/status-item.html.twig -msgid "The location has a state or a country" -msgstr "Konumunda bir il ya da ülke olan" +msgid "The location has carbon intensity data" +msgstr "Bu konumun karbon yoğunluğu verileri var" #: templates/history/status-item.html.twig msgid "Real time carbon intensity enabled" @@ -284,6 +162,10 @@ msgstr "Modelin güç tüketimi şu olan" msgid "The asset has a type" msgstr "Varlık türü şu olan" +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "Tür yok sayılamaz" + #: templates/history/status-item.html.twig msgid "The type has a power consumption" msgstr "Türün güç tüketimi şu olan" @@ -304,13 +186,25 @@ msgstr "Varlık envanter kaydı tarihi şu olan" msgid "Legend" msgstr "İşaret" -#: templates/config.html.twig -msgid "Electricity maps" -msgstr "Elektrik haritaları" +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "" +"Bir ekran modelinin gücü bilinmediğinde varsayılan olarak bu güç değeri " +"kullanılır" -#: templates/config.html.twig -msgid "Key for electricitymap.org API" -msgstr "electricitymap.org API anahtarı" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Power" +msgid_plural "Powers" +msgstr[0] "Güç" +msgstr[1] "Güçler" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" +msgstr "Değerlendirilmesin" #: templates/config.html.twig msgid "Impact engine" @@ -318,365 +212,744 @@ msgstr "Etki hesaplayıcı" #: templates/config.html.twig msgid "Usage carbon emissions are always calculated internally" -msgstr "Kullanım karbon emisyonları her zaman içeride hesaplanır" - -#: templates/config.html.twig src/Impact/Embodied/Engine.php:46 -#: src/Impact/Usage/Engine.php:46 -msgid "Boavizta" -msgstr "Boavizta" - -#: templates/config.html.twig -msgid "Base URL to the Boaviztapi instance" -msgstr "Boaviztapi kopyasının temel adresi" +msgstr "Kullanım kaynaklı karbon emisyonları her zaman içeride hesaplanır" -#: templates/config.html.twig +#: templates/computertype.html.twig msgid "" -"Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta " -"needs this to determine usage impacts of assets. This feature sends the " -"address stored in a location to nominatim.org service. If this is an issue, " -"you can disable it below, and fill the coutry code manually." +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -"Coğrafi kodlama, bir konumu ISO 3166 (3 harf) koduna dönüştürür. Boavizta " -"varlıkların kullanım etkilerini belirlemek için buna gerek duyar. Bu " -"özellik, bir konumda kaydedilen adresi nominatim.org hizmetine gönderir. Bu " -"durum sizin için bir uygun değilse, aşağıdan kapatabilir ve ülke kodunu el " -"ile yazabilirsiniz." - -#: templates/config.html.twig -msgid "Enable geocoding" -msgstr "Coğrafi kodlama kullanılsın" +"Bir bilgisayar modelinin gücü bilinmediğinde varsayılan olarak bu güç değeri" +" kullanılır" -#: setup.php:273 -msgid "Environmental Impact" -msgstr "Çevresel etki" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "Kategori" -#: front/embodiedimpact.form.php:64 front/embodiedimpact.form.php:87 -#: front/usageimpact.form.php:64 front/usageimpact.form.php:101 -msgid "Missing arguments in request." -msgstr "İstekte argümanlar eksik." +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "Bilgiler" -#: front/embodiedimpact.form.php:69 front/embodiedimpact.form.php:78 -#: front/usageimpact.form.php:88 -msgid "Reset denied." -msgstr "Sıfırlama reddedildi." +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." +msgstr "" +"Verilerimiz güvenilir kaynaklardan elde edilir ve endüstri standardı " +"yöntemler kullanılarak titizlikle hesaplanır. Çevresel ölçümlerimizin " +"hassasiyetini ve güvenilirliğini sağlamak için doğru ölçüm araçlarını ve " +"algoritmaları kullanırız." -#: front/embodiedimpact.form.php:83 front/usageimpact.form.php:93 -msgid "Reset failed." -msgstr "Sıfırlanamadı." +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." +msgstr "" +"Daha yeşil bir geleceğe doğru ilerlerken, yakında kuruluşların enerji " +"kullanımını ve karbon emisyonlarını bildirmeleri gerekecek. 2025 yılına " +"kadar birçok bölge bu düzenlemeleri yürürlüğe koyacak. Bu uygulamaları " +"benimsemek uyumluluğu garanti ediyor ve iklim değişikliğiyle mücadeleye " +"yardımcı oluyor." -#: front/embodiedimpact.form.php:93 front/usageimpact.form.php:132 -msgid "Unable to find calculation engine for this asset." -msgstr "Bu varlık için bir hesaplayıcısı bulunamadı." +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "Biliyor musunuz?" -#: front/embodiedimpact.form.php:102 -msgid "Update failed." -msgstr "Güncellenemedi." +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." +msgstr "" +"1 gram CO₂, bir otomobili yaklaşık 20 metre sürdüğünüzde ortaya çıkan CO₂ " +"miktarına eşdeğerdir." -#: front/usageimpact.form.php:78 front/usageimpact.form.php:107 -#: front/usageimpact.form.php:115 -msgid "Bad arguments." -msgstr "Argümanlar yanlış." +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "Uyarı" -#: front/usageimpact.form.php:97 -msgid "Delete of usage impact failed." -msgstr "Kullanım etkisi silinemedi." +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." +msgstr "Parkınızın yüzde %s kadarındaki %s ekranı gösterir." -#: front/usageimpact.form.php:123 -msgid "Missing data prevents historization of this asset." -msgstr "Eksik veriler bu varlığın geçmiş hesaplamasını engelliyor. " +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "Yıllık kullanım kaynaklı karbon emisyonu" -#: front/usageimpact.form.php:126 -msgid "Update of global warming potential failed." -msgstr "Küresel ısınma potansiyeli güncellenemedi." +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "Aylık kullanım kaynaklı karbon emisyonu" -#: front/usageimpact.form.php:137 -msgid "Update of usage impact failed." -msgstr "Kullanım etkisi güncellenemedi." +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "%s ile karşılaştırma" -#: hook.php:317 -msgid "Associate to an usage profile" -msgstr "Bir kullanım profili ile ilişkilendir" +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." +msgstr "Parkınızın yüzde %s kadarındaki %s bilgisayarı gösterir." -#: hook.php:321 hook.php:326 hook.php:330 -msgid "Update type power consumption" -msgstr "Güncelleme türü güç tüketimi" +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." +msgstr "Parkınızın yüzde %s kadarındaki %s ağ aygıtını gösterir." -#: hook.php:322 -msgid "Update category" -msgstr "Güncelleme kategorisi" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "Ayrıntılı bilgi almak ister misiniz?" -#: hook.php:334 -msgid "Update zone for Boavizta engine" -msgstr "Boavizta hesaplayıcı bölgesini güncelle" +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "" +"Sayısal değerlerin çevreye etkisini anlatan bir videoya bakabilirsiniz." -#: install/install/create_automatic_actions.php:45 -msgid "Find the Alpha3 country code (ISO3166) of locations" -msgstr "Konumların Alpha3 ülke kodunu bul (ISO3166)" +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." +msgstr "" +"Aşağıdaki etkiler yalnızca üretim, imha ve geri dönüşüm süreçlerini kapsar." -#: install/install/create_automatic_actions.php:57 -msgid "Compute carbon emissions of computers" -msgstr "Bilgisayarların karbon emisyonlarını hesapla" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." +msgstr "" -#: install/install/create_automatic_actions.php:69 -msgid "Collect carbon intensities from RTE" -msgstr "RTE üzerinden karbon yoğunluklarını al" +#: templates/abstractmodel.html.twig +msgid "Data quality" +msgstr "Veri kalitesi" -#: install/install/create_automatic_actions.php:81 -msgid "Collect carbon intensities from ElectricityMap" -msgstr "ElectricityMap üzerinden karbon yoğunluklarını al" +#: templates/abstractmodel.html.twig +msgid "Data source" +msgstr "Veri kaynağı" -#: install/install/create_automatic_actions.php:93 -msgid "Compute embodied impact of assets" -msgstr "Varlıkların gerçekleşen etkisini hesapla" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" +msgstr "" +"Bir ağ aygıtı modelinin gücü bilinmediğinde varsayılan olarak bu güç değeri " +"kullanılır" -#: install/install/create_uasge_profiles.php:41 -msgid "Always on" -msgstr "Her zaman açık" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" +msgstr "Dış kaynaklardan gelen karbon dioksit yoğunluğunu okuyun" -#: install/install/create_uasge_profiles.php:52 -msgid "Office hours" -msgstr "Çalışma saatleri" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "Kaynak:" -#: src/AbstractType.php:64 src/Dashboard/Grid.php:68 -#: src/Dashboard/Grid.php:133 src/Dashboard/Grid.php:234 -msgid "Carbon" -msgstr "Karbon" +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" +msgstr "" +"Seçilmiş kaynak, desteklenen bölgeleri belirtmiyor. Adresten bölge " +"belirlenmeye çalışılıyor" -#: src/CronTask.php:64 -msgid "Find the Alpha3 country code (ISO3166)" -msgstr "Alpha3 ülke kodunu bul (ISO3166)" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" +msgstr "Coğrafi kodlama açılmamış. Adresten bölge bulunamaz" -#: src/CronTask.php:65 -msgid "Maximum number of locations to solve" -msgstr "Çözülecek en fazla konum sayısı" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "Adres:" + +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "Bölge:" + +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "Veri kaynağı adı oluşturuluyor" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" +msgstr "" + +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" +msgstr "" -#: src/CronTask.php:70 +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "Veriler okunuyor..." + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "Veri bölgesi adı oluşturuluyor" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "Sahte veriler oluşturuluyor..." + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "Rapor panosu açıklaması güncelleniyor" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "Pano bulunamadı" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "Pano açıklaması %s üzerine kaydedildi" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "Sınama envanteri oluşturuluyor" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "Güç tüketimi" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "Kullanım bilgileri" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "Çevresel etki" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" +msgstr "%s Diğer bilgiler %s" + +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "Boavizta API adresi geçersiz" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "Boavizta API bağlantısı kuruldu" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" +msgstr "Kaynak teşhisi" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "RTE üzerinden karbon yoğunluklarını al" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 msgid "Download carbon emissions from RTE" msgstr "RTE üzerinden karbon emisyonlarını indir" -#: src/CronTask.php:71 src/CronTask.php:77 +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 msgid "Maximum number of entries to download" msgstr "İndirilecek en fazla kayıt sayısı" -#: src/CronTask.php:76 -msgid "Download carbon emissions from ElectricityMap" -msgstr "ElectricityMap üzerinden karbon emisyonlarını indir" +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" +msgstr "Bitiş" -#: src/CronTask.php:82 -msgid "Compute usage environnemental impact for all assets" -msgstr "Tüm varlıkların kullanım çevresel etkisini hesapla" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" +msgstr "Electricity Maps üzerinden karbon yoğunluklarını al" -#: src/CronTask.php:83 src/CronTask.php:88 -msgid "Maximum number of entries to calculate" -msgstr "Hesaplanacak en fazla kayıt sayısı" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" +msgstr "Electricity Maps üzerinden karbon emisyonlarını indir" -#: src/CronTask.php:87 -msgid "Compute embodied environnemental impact for all assets" -msgstr "Tüm varlıkların gerçekleşen çevresel etkisini hesapla" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "Değerlendirme tarihi" -#: src/CronTask.php:211 -msgid "No zone to download" -msgstr "İndirilecek bir bölge yok" +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "Hesaplayıcı" -#: src/NetworkEquipmentType.php:50 src/MonitorType.php:50 -#: src/SearchOptions.php:142 src/ComputerType.php:70 -msgid "Power consumption" -msgstr "Güç tüketimi" +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "Hesaplayıcı sürümü" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:83 -#: src/Impact/Usage/AbstractUsageImpact.php:83 +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" +msgstr "Etki değerlendirilemedi" + +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" +msgstr "Kalite belirtilmemiş" + +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" +msgstr "El ile veriler" + +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" +msgstr "Ön görülen veriler" + +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" +msgstr "İndirgenmiş veriler" + +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" +msgstr "Ölçülen veriler" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 msgid "grams of carbon dioxyde equivalent" msgstr "gram karbondioksit eşdeğeri" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:85 -#: src/Impact/Usage/AbstractUsageImpact.php:85 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 msgid "grams of antimony equivalent" msgstr "gram antimon eşdeğeri" -#: src/Impact/Embodied/AbstractEmbodiedImpact.php:87 -#: src/Impact/Usage/AbstractUsageImpact.php:87 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 msgid "joules" msgstr "jul" -#: src/Impact/History/AbstractAsset.php:364 +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." +msgstr "Boavizta bağlantısı kurulamadı." + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." +msgstr "Birleştirilmiş etki değerlendirmesi yapılamadı." + +#: src/Impact/History/AbstractAsset.php:370 msgid "Error while calculating impact" msgstr "Etki hesaplanırken sorun çıktı" -#: src/Impact/History/AbstractAsset.php:372 +#: src/Impact/History/AbstractAsset.php:378 msgid "Nothing to calculate" msgstr "Hesaplanacak bir şey yok" -#: src/Impact/History/AbstractAsset.php:378 +#: src/Impact/History/AbstractAsset.php:384 #, php-format msgid "%d entries calculated" msgstr "%d kayıt hesaplandı" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "Karbon yoğunluğu kaynağı" -msgstr[1] "Karbon yoğunluğu kaynakları" +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" +msgstr "Gerçekleşen küresel ısınma potansiyeli" -#: src/Report.php:50 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "Karbon raporu" -msgstr[1] "Karbon raporları" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" +msgstr "Gerçekleşen abiyotik tükenme potansiyeli" -#: src/Report.php:107 -#, php-format +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" +msgstr "Gerçekleşen birincil enerji tüketimi" + +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" +msgstr "Gerçekleşen iklim değişikliği - Biyojenik emisyonların katkısı" + +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" +msgstr "Gerçekleşen iklim değişikliği - Fosil yakıt emisyonlarının katkısı" + +#: src/Impact/Type.php:164 msgid "" -"Demo mode enabled. The data below are not representative of the assets in " -"the database. %sDisable demo mode%s" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -"Tanıtım kipi açık. Aşağıdaki veriler veri tabanındaki varlıkları " -"göstermiyor. %sTanıtım kipini kapat%s" +"Gerçekleşen iklim değişikliği - Toprak kullanımı değişikliği emisyonlarının " +"katkısı" -#: src/CarbonEmission.php:48 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "Karbon emisyonu" -msgstr[1] "Karbon emisyonları" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" +msgstr "Gerçekleşen radyoaktif madde emisyonları" -#: src/CarbonEmission.php:119 -msgid "Energy" -msgstr "Enerji" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" +msgstr "Gerçekleşen toprak kullanımı" -#: src/CarbonEmission.php:127 -msgid "Emission" -msgstr "Emisyon" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" +msgstr "Gerçekleşen ozon tabakası tükenmesi" -#: src/CarbonEmission.php:135 -msgid "Energy quality" -msgstr "Enerji kalitesi" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" +msgstr "Gerçekleşen ince parçacık emisyonları" -#: src/CarbonEmission.php:143 -msgid "Emission quality" -msgstr "Emisyon kalitesi" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" +msgstr "Gerçekleşen fotokimyasal ozon oluşumu" -#: src/CarbonEmission.php:150 src/UsageImpact.php:149 -#: src/EmbodiedImpact.php:120 -msgid "Date of evaluation" -msgstr "Değerlendirme tarihi" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" +msgstr "Gerçekleşen su kaynakları tüketimi" -#: src/CarbonEmission.php:157 src/UsageImpact.php:156 -#: src/EmbodiedImpact.php:127 -msgid "Engine" -msgstr "Hesaplayıcı" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" +msgstr "Gerçekleşen hizmet birimi başına malzeme girişi" -#: src/CarbonEmission.php:164 src/UsageImpact.php:163 -#: src/EmbodiedImpact.php:134 -msgid "Engine version" -msgstr "Hesaplayıcı sürümü" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" +msgstr "Gerçekleşen mineral ve metal kaynakları tüketimi" -#: src/Command/CreateFakeCarbonIntensityCommand.php:67 -#: src/Command/CollectCarbonIntensityCommand.php:68 -msgid "Creating data source name" -msgstr "Veri kaynağı adı oluşturuluyor" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" +msgstr "Gerçekleşen fosil kaynaklar tüketimi (nükleer ile)" -#: src/Command/CreateFakeCarbonIntensityCommand.php:78 -msgid "Creating data zone name" -msgstr "Veri bölgesi adı oluşturuluyor" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" +msgstr "Gerçekleşen asitlendirme" -#: src/Command/CreateFakeCarbonIntensityCommand.php:89 -msgid "Creating fake data..." -msgstr "Sahte veriler oluşturuluyor..." +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" +msgstr "Gerçekleşen tatlı su ekotoksikliği" -#: src/Command/ExportDashboardCommand.php:69 -msgid "Updating the report dashboard description" -msgstr "Rapor panosu açıklaması güncelleniyor" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" +msgstr "Gerçekleşen tatlı suda besin artışı" -#: src/Command/ExportDashboardCommand.php:75 -msgid "Dashboard not found" -msgstr "Pano bulunamadı" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" +msgstr "Gerçekleşen deniz suyunda besin artışı" -#: src/Command/ExportDashboardCommand.php:101 -#, php-format -msgid "Dashboard description saved to %s" -msgstr "Pano açıklaması %s üzerine kaydedildi" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" +msgstr "Gerçekleşen karasal besin artışı" -#: src/Command/CollectCarbonIntensityCommand.php:85 -msgid "Zone not found" -msgstr "Bölge bulunamadı" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" +msgstr "Kullanım küresel ısınma potansiyeli" -#: src/Command/CollectCarbonIntensityCommand.php:91 -msgid "Reading eco2mix data..." -msgstr "Eco2mix verileri okunuyor..." +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" +msgstr "Kullanım abiyotik tükenme potansiyeli" -#: src/Command/CreateTestInventoryCommand.php:146 -msgid "Creating test inventory" -msgstr "Sınama envanteri oluşturuluyor" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" +msgstr "Kullanım birincil enerji tüketimi" -#: src/Config.php:130 -msgid "Invalid Boavizta API URL" -msgstr "Boavizta API adresi geçersiz" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" +msgstr "Kullanım iklim değişikliği - Biyojenik emisyonların katkısı" -#: src/Config.php:138 -msgid "Connection to Boavizta API established" -msgstr "Boavizta API bağlantısı kuruldu" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" +msgstr "Kullanım iklim değişikliği - Fosil yakıt emisyonlarının katkısı" -#: src/Zone.php:53 -msgid "Carbon intensity zone" -msgid_plural "Carbon intensity zones" -msgstr[0] "Karbon yoğunluğu bölgesi" -msgstr[1] "Karbon yoğunluğu bölgeleri" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" +msgstr "" +"Kullanım iklim değişikliği - Toprak kullanımı değişikliği emisyonlarının " +"katkısı" -#: src/Zone.php:126 src/Zone.php:141 -msgid "Data source for historical calculation" -msgstr "Geçmiş hesaplaması veri kaynağı" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" +msgstr "Kullanım radyoaktif madde emisyonları" -#: src/Zone.php:157 src/CarbonIntensitySource_Zone.php:86 -#: src/CarbonIntensitySource_Zone.php:173 -#: src/CarbonIntensitySource_Zone.php:272 -msgid "Download enabled" -msgstr "İndirme açık" +#: src/Impact/Type.php:202 +msgid "Usage Land use" +msgstr "Kullanım toprak kullanımı" -#: src/UsageInfo.php:59 -msgid "Usage informations" -msgstr "Kullanım bilgileri" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" +msgstr "Kullanım ozon tabakası tüketimi" -#: src/UsageInfo.php:218 src/Dashboard/Widget.php:834 -#, php-format -msgid "" -"Evaluates the carbon emission in CO₂ equivalent. %s More information %s" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" +msgstr "Kullanım ince parçacık emisyonları" + +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" +msgstr "Kullanım fotokimyasal ozon oluşumu" + +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" +msgstr "Kullanım su kaynakları tüketimi" + +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" +msgstr "Kullanım hizmet birimi başına malzeme girişi" + +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "Kullanım mineral ve metal kaynakları tüketimi" + +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" +msgstr "Kullanım fosil kaynaklar tüketimi (nükleer ile)" + +#: src/Impact/Type.php:210 +msgid "Usage Acidification" +msgstr "Kullanım asitlendirmesi" + +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" +msgstr "Kullanım tatlı su ekotoksikliği" + +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" +msgstr "Kullanım tatlı suda besin artışı" + +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" +msgstr "Kullanım deniz suyunda besin artışı" + +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" +msgstr "Kullanım karasal besin artışı" + +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" +msgstr "Toplam küresel ısınma potansiyeli" + +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" +msgstr "Toplam abiyotik tükenme potansiyeli" + +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" +msgstr "Toplam tüketilen birincil enerji" + +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" +msgstr "Toplam iklim değişikliği - Biyojenik emisyonların katkısı" + +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" +msgstr "Toplam iklim değişikliği - Fosil yakıt emisyonlarının katkısı" + +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" msgstr "" -"Karbon emisyonunu CO₂ eşdeğeri olarak değerlendirir. %s Ayrıntılı bilgi alın" -" %s" +"Toplam iklim değişikliği - Toprak kullanımı değişikliği emisyonlarının " +"katkısı" -#: src/UsageInfo.php:226 src/Dashboard/Widget.php:870 -#: src/Dashboard/Widget.php:907 -#, php-format -msgid "" -"Evaluates the consumption of non renewable resources in Antimony equivalent." -" %s More information %s" +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" +msgstr "Toplam radyoaktif madde emisyonları" + +#: src/Impact/Type.php:238 +msgid "Total Land use" +msgstr "Toplam toprak kullanımı" + +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" +msgstr "Toplam ozon tabakası tükenmesi" + +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" +msgstr "Toplam ince parçacık emisyonları" + +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" +msgstr "Toplam fotokimyasal ozon oluşumu" + +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" +msgstr "Toplam su kaynakları tüketimi" + +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "Toplam hizmet birimi başına malzeme girişi" + +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" +msgstr "Toplam mineral ve metal kaynakları tüketimi" + +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" +msgstr "Toplam fosil kaynaklar tüketimi (nükleer ile)" + +#: src/Impact/Type.php:246 +msgid "Total Acidification" +msgstr "Toplam asitlendirme" + +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" +msgstr "Toplam tatlı su ekotoksikliği" + +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" +msgstr "Toplam tatlı suda besin artışı" + +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" +msgstr "Toplam deniz suyunda besin artışı" + +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" +msgstr "Toplam karasal besin artışı" + +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" +msgstr "CO₂ eşdeğeri olarak karbon emisyonu" + +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "Yenilenebilir olmayan kaynakların antimon eşdeğeri olarak tüketimi." + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." +msgstr "Tüketilen birincil enerji." + +#: src/Impact/Type.php:332 +msgid "Incidence of disease" +msgstr "Krizin görülme sıklığı" + +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "Karbon yoğunluğu kaynağı" +msgstr[1] "Karbon yoğunluğu kaynakları" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "Çevresel etkiyi yok say" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "Geçmiş oluşturulabilir" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "Belirtilmemiş" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "Sunucu" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "Dizüstü" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "Tablet" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "Akıllı telefon" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "Kullanım etkisi" +msgstr[1] "Kullanım etkileri" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "Karbon" + +#: src/AbstractModel.php:197 +msgid "Quality" msgstr "" -"Yenilenebilir olmayan kaynakların tüketimini antimon eşdeğeri olarak " -"değerlendirir. %s Ayrıntılı bilgi alın %s" -#: src/UsageInfo.php:238 src/Dashboard/Widget.php:1092 +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "Karbon raporu" +msgstr[1] "Karbon raporları" + +#: src/Report.php:101 #, php-format -msgid "Evaluates the primary energy consumed. %s More information %s" -msgstr "Birincil enerji tüketimini değerlendirir. %s Ayrıntılı bilgi alın %s" +msgid "" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" +msgstr "" +"Tanıtım kipi açık. Aşağıdaki veriler veri tabanındaki varlıkları " +"göstermiyor. %sTanıtım kipini kapat%s" -#: src/ComputerUsageProfile.php:52 +#: src/ComputerUsageProfile.php:51 msgid "Computer usage profile" msgid_plural "Computer usage profiles" msgstr[0] "Bilgisayar kullanım profili" msgstr[1] "Bilgisayar kullanım profilleri" -#: src/ComputerUsageProfile.php:92 +#: src/ComputerUsageProfile.php:117 msgid "Start time is invalid" msgstr "Başlangıç zamanı geçersiz" -#: src/ComputerUsageProfile.php:97 +#: src/ComputerUsageProfile.php:122 msgid "Stop time is invalid" msgstr "Bitiş zamanı geçersiz" -#: src/Dashboard/Widget.php:57 src/Dashboard/Grid.php:317 +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "Kaynak adı" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "Bölge adı" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "İndirme açık" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "Kod" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "İndirilebilir değil" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" +msgstr "Bu varsayılan bir kaynaktır. Burada gerçek zamanlı veriler bulunmaz" + +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "Geçmiş oluşturma kaynağı" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "Aç / Kapat" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "Alpha3 ülke kodunu bul (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "Çözülecek en fazla konum sayısı" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "Watttime üzerinden karbon emisyonlarını indir" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" +msgstr "Tüm varlıkların kullanım çevresel etkisini hesapla" + +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "Hesaplanacak en fazla kayıt sayısı" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" +msgstr "Tüm varlıkların gerçekleşen çevresel etkisini hesapla" + +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "İndirilecek bir bölge yok" + +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 msgid "Environmental impact information video" msgstr "Çevresel etki bilgilendirme videosu" -#: src/Dashboard/Widget.php:63 +#: src/Dashboard/Widget.php:62 msgid "Methodology information" msgstr "Yöntem bilgileri" @@ -684,439 +957,472 @@ msgstr "Yöntem bilgileri" msgid "Total Carbon Emission" msgstr "Toplam karbon emisyonu" -#: src/Dashboard/Widget.php:77 +#: src/Dashboard/Widget.php:78 msgid "Monthly Carbon Emission" msgstr "Aylık karbon emisyonu" -#: src/Dashboard/Widget.php:83 src/Dashboard/Widget.php:585 -#: src/Dashboard/Grid.php:281 +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 msgid "Biggest monthly averaged carbon emission per model" msgstr "Her model için en büyük aylık ortalama karbon emisyonu" -#: src/Dashboard/Widget.php:90 +#: src/Dashboard/Widget.php:93 msgid "Carbon Emission Per month" msgstr "Aylık karbon emisyonu" -#: src/Dashboard/Widget.php:116 -msgid "Embodied consumed primary energy" -msgstr "Gerçekleşen birincil enerji tüketimi" +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "Kullanım abiyotik tükenme potansiyeli" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "Etki ölçütü" -#: src/Dashboard/Widget.php:127 +#: src/Dashboard/Widget.php:142 msgid "Unhandled Computers" msgstr "İşlenmeyen bilgisayarlar" -#: src/Dashboard/Widget.php:137 +#: src/Dashboard/Widget.php:153 msgid "Unhandled Monitors" msgstr "İşlenmeyen ekranlar" -#: src/Dashboard/Widget.php:147 +#: src/Dashboard/Widget.php:164 msgid "Unhandled Network equipments" msgstr "İşlenmeyen ağ aygıtları" -#: src/Dashboard/Widget.php:157 +#: src/Dashboard/Widget.php:175 msgid "Radar chart" msgstr "Radar çizelge" -#: src/Dashboard/Widget.php:482 src/Dashboard/Provider.php:922 +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 msgid "Consumed energy and carbon emission per month" msgstr "Aylık enerji tüketimi ve karbon emisyonu" -#: src/Dashboard/Widget.php:527 src/Dashboard/Widget.php:542 -#: src/Dashboard/DemoProvider.php:125 src/Dashboard/DemoProvider.php:226 -#: src/Dashboard/Provider.php:1027 +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "Carbon emission" msgstr "Karbon emisyonu" -#: src/Dashboard/Widget.php:532 src/Dashboard/Widget.php:545 -#: src/Dashboard/DemoProvider.php:143 src/Dashboard/DemoProvider.php:239 -#: src/Dashboard/Provider.php:1043 +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 msgid "Consumed energy" msgstr "Enerji tüketimi" -#: src/Dashboard/Widget.php:727 +#: src/Dashboard/Widget.php:746 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " "months. %s More information %s" msgstr "" -"Son 2 aylık karbon emisyonunu kullanımını CO₂ eşdeğeri olarak değerlendirir." -" %s Ayrıntılı bilgi alın %s" +"Son 2 ayın kullanım karbon emisyonunu CO₂ eşdeğeri olarak değerlendirir. %s " +"Ayrıntılı bilgi alın %s" -#: src/Dashboard/Widget.php:793 +#: src/Dashboard/Widget.php:812 #, php-format msgid "" "Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " "elapsed months. %s More information %s" msgstr "" -"Son 12 aylık karbon emisyonunu kullanımını CO₂ eşdeğeri olarak " -"değerlendirir. %s Ayrıntılı bilgi alın %s" +"Son 12 ayın kullanım karbon emisyonunu CO₂ eşdeğeri olarak değerlendirir. %s" +" Ayrıntılı bilgi alın %s" -#: src/Dashboard/Widget.php:1082 -msgid "Total embodied primary energy" -msgstr "Toplam gerçekleşen birincil enerji" +#: src/Dashboard/Widget.php:854 +msgid "More information" +msgstr "Diğer bilgiler" + +#: src/Dashboard/Widget.php:893 +#, php-format +msgid "" +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" +msgstr "" +"Yenilenebilir olmayan kaynakların tüketimini antimon eşdeğeri olarak " +"değerlendirir. %s Ayrıntılı bilgi alın %s" -#: src/Dashboard/Widget.php:1151 +#: src/Dashboard/Widget.php:1097 msgid "Handled percentage" msgstr "İşlenen yüzde" -#: src/Dashboard/DemoProvider.php:49 src/Dashboard/DemoProvider.php:125 -#: src/Dashboard/DemoProvider.php:226 src/Dashboard/DemoProvider.php:415 -#: src/Dashboard/Provider.php:173 src/Dashboard/Provider.php:564 -#: src/Dashboard/Provider.php:734 src/Dashboard/Provider.php:1027 -#: src/Dashboard/Provider.php:1029 +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 msgid "CO₂eq" msgstr "CO₂eq" -#: src/Dashboard/DemoProvider.php:83 src/Dashboard/DemoProvider.php:101 -#: src/Dashboard/Provider.php:796 src/Dashboard/Provider.php:830 -msgid "Sbeq" -msgstr "Sbeq" - -#: src/Dashboard/DemoProvider.php:113 -msgid "Usage carbon emission per month" -msgstr "Aylık kullanım karbon emisyonu" - -#: src/Dashboard/DemoProvider.php:279 src/Dashboard/Provider.php:434 -#, php-format -msgid "plugin carbon - handled %s" -msgstr "Carbon eklentisi- İşlenen %s" - -#: src/Dashboard/DemoProvider.php:280 src/Dashboard/Provider.php:435 -#, php-format -msgid "plugin carbon - unhandled %s" -msgstr "Carbon eklentisi- İşlenmeyen %s" - -#: src/Dashboard/DemoProvider.php:311 -msgid "plugin carbon - handled assets ratio" -msgstr "Carbon eklentisi- İşlenen varlık oranı" - -#: src/Dashboard/DemoProvider.php:334 src/Dashboard/Provider.php:402 -msgid "Handled" -msgstr "İşlenen" - -#: src/Dashboard/DemoProvider.php:339 src/Dashboard/Provider.php:407 -msgid "Unhandled" -msgstr "İşlenmeyen" - -#: src/Dashboard/DemoProvider.php:362 src/Dashboard/DemoProvider.php:411 -#: src/Dashboard/Provider.php:552 -msgid "plugin carbon - Usage carbon emission" -msgstr "Carbon eklentisi - Kullanım karbon emisyonu" - -#: src/Dashboard/Dashboard.php:69 -msgid "Carbon dioxyde intensity" -msgstr "Karbondioksit yoğunluğu" - -#: src/Dashboard/Grid.php:73 src/Dashboard/Provider.php:379 -msgid "Handled assets ratio" -msgstr "İşlenen varlık oranı" - -#: src/Dashboard/Grid.php:82 -msgid "Handled assets count" -msgstr "İşlenen varlık sayısı" - -#: src/Dashboard/Grid.php:145 -#, php-format -msgid "Handled %s" -msgstr "İşlenen %s" - -#: src/Dashboard/Grid.php:156 -#, php-format -msgid "Unhandled %s" -msgstr "İşlenmeyen %s" - -#: src/Dashboard/Grid.php:172 -msgid "Usage power consumption" -msgstr "Kullanım güç tüketimi" - -#: src/Dashboard/Grid.php:178 -msgid "Usage carbon emission" -msgstr "Kullanım karbon emisyonu" - -#: src/Dashboard/Grid.php:192 src/Dashboard/Grid.php:295 -#: src/Dashboard/Provider.php:897 -msgid "Embodied global warming potential" -msgstr "Gerçekleşen küresel ısınma potansiyeli" - -#: src/Dashboard/Grid.php:198 src/Dashboard/Grid.php:307 -msgid "Embodied primary energy consumed" -msgstr "Gerçekleşen birincil enerji tüketimi" - -#: src/Dashboard/Grid.php:212 src/UsageImpact.php:105 -msgid "Global warming potential" -msgstr "Küresel ısınma potansiyeli" - -#: src/Dashboard/Grid.php:218 src/UsageImpact.php:119 -msgid "Abiotic depletion potential" -msgstr "Abiyotik tükenme potansiyeli" - -#: src/Dashboard/Grid.php:245 -#, php-format -msgid "Unhandled %s ratio" -msgstr "İşlenmeyen %s oranı" - -#: src/Dashboard/Grid.php:257 -msgid "Usage carbon emission year to date" -msgstr "Yıl başından bugüne kadar kullanım karbon emisyonu" - -#: src/Dashboard/Grid.php:263 -msgid "Monthly carbon emission" -msgstr "Aylık karbon emisyonu" - -#: src/Dashboard/Grid.php:272 -msgid "Usage global warming potential chart" -msgstr "Kullanım küresel ısınma potansiyeli çizelgesi" - -#: src/Dashboard/Grid.php:322 -msgid "Environmental impact methodology_information" -msgstr "Çevresel etki yöntemi bilgileri" - -#: src/Dashboard/Provider.php:175 src/Dashboard/Provider.php:1014 -#: src/Toolbox.php:201 +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 msgid "g" msgstr "g" -#: src/Dashboard/Provider.php:176 src/Dashboard/Provider.php:1015 -#: src/Toolbox.php:202 +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 msgid "Kg" msgstr "Kg" -#: src/Dashboard/Provider.php:177 src/Dashboard/Provider.php:1016 -#: src/Toolbox.php:203 +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 msgid "t" msgstr "t" -#: src/Dashboard/Provider.php:178 src/Dashboard/Provider.php:1017 -#: src/Toolbox.php:204 +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 msgid "Kt" msgstr "Kt" -#: src/Dashboard/Provider.php:179 src/Dashboard/Provider.php:1018 -#: src/Toolbox.php:205 +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 msgid "Mt" msgstr "Mt" -#: src/Dashboard/Provider.php:180 src/Dashboard/Provider.php:1019 -#: src/Toolbox.php:206 +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 msgid "Gt" msgstr "Gt" -#: src/Dashboard/Provider.php:181 src/Dashboard/Provider.php:1020 -#: src/Toolbox.php:207 +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 msgid "Tt" msgstr "Tt" -#: src/Dashboard/Provider.php:182 src/Dashboard/Provider.php:1021 -#: src/Toolbox.php:208 +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 msgid "Pt" msgstr "Pt" -#: src/Dashboard/Provider.php:183 src/Dashboard/Provider.php:1022 -#: src/Toolbox.php:209 +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 msgid "Et" msgstr "Et" -#: src/Dashboard/Provider.php:184 src/Dashboard/Provider.php:1023 -#: src/Toolbox.php:210 +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 msgid "Zt" msgstr "Zt" -#: src/Dashboard/Provider.php:185 src/Dashboard/Provider.php:1024 -#: src/Toolbox.php:211 +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 msgid "Yt" msgstr "Yt" -#: src/Dashboard/Provider.php:334 +#: src/Dashboard/Provider.php:427 msgid "handled assets ratio" msgstr "işlenen varlık oranı" -#: src/Dashboard/Provider.php:483 +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "İşlenen varlık oranı" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "İşlenen" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "İşlenmeyen" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" +msgstr "Yok sayılan" + +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 +#, php-format +msgid "plugin carbon - handled %s" +msgstr "Carbon eklentisi- İşlenen %s" + +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 +#, php-format +msgid "plugin carbon - unhandled %s" +msgstr "Carbon eklentisi- İşlenmeyen %s" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" +msgstr "Carbon eklentisi- Yok sayılan %s" + +#: src/Dashboard/Provider.php:632 msgid "plugin carbon - Total usage power consumption" -msgstr "Carbon eklentisi - Toplam kullanım güç tüketimi" +msgstr "Carbon eklentisi - Kullanım toplam güç tüketimi" + +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" +msgstr "Carbon eklentisi - Kullanım karbon emisyonu" -#: src/Dashboard/Provider.php:722 -msgid "Total embodied global warming potential" -msgstr "Toplam gerçekleşen küresel ısınma potansiyeli" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" -#: src/Dashboard/Provider.php:850 +#: src/Dashboard/Provider.php:1035 msgid "Total abiotic depletion potential" msgstr "Toplam abiyotik tükenme potansiyeli" -#: src/Dashboard/Provider.php:869 +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" +msgstr "Gerçekleşen abiyotik tükenme potansiyeli" + +#: src/Dashboard/Provider.php:1054 msgid "Total usage abiotic depletion potential" -msgstr "Toplam kullanım abiyotik tükenme potansiyeli" +msgstr "Kullanım toplam abiyotik tükenme potansiyeli" -#: src/Dashboard/Provider.php:881 +#: src/Dashboard/Provider.php:1066 msgid "Total global warming potential" msgstr "Toplam küresel ısınma potansiyeli" -#: src/Dashboard/Provider.php:900 +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "Gerçekleşen küresel ısınma potansiyeli" + +#: src/Dashboard/Provider.php:1085 msgid "Total usage global warming potential" -msgstr "Toplam kullanım küresel ısınma potansiyeli" +msgstr "Kullanım toplam küresel ısınma potansiyeli" -#: src/Dashboard/Provider.php:1033 src/Toolbox.php:287 +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 msgid "KWh" msgstr "KWh" -#: src/Dashboard/Provider.php:1034 src/Toolbox.php:288 +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 msgid "MWh" msgstr "MWh" -#: src/Dashboard/Provider.php:1035 src/Toolbox.php:289 +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 msgid "GWh" msgstr "GWh" -#: src/Dashboard/Provider.php:1036 src/Toolbox.php:290 +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 msgid "TWh" msgstr "TWh" -#: src/Dashboard/Provider.php:1037 src/Toolbox.php:291 +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 msgid "PWh" msgstr "PWh" -#: src/Dashboard/Provider.php:1038 src/Toolbox.php:292 +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 msgid "EWh" msgstr "EWh" -#: src/Dashboard/Provider.php:1039 src/Toolbox.php:293 +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 msgid "ZWh" msgstr "ZWh" -#: src/Dashboard/Provider.php:1040 src/Toolbox.php:294 +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 msgid "YWh" msgstr "YWh" -#: src/Toolbox.php:251 +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "İşlenen varlık sayısı" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "İşlenen %s" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "İşlenmeyen %s" + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "İşlenmeyen %s oranı" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" +msgstr "Yıl başından bugüne kadar kullanım karbon emisyonu" + +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "Aylık karbon emisyonu" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" +msgstr "Kullanım küresel ısınma potansiyeli çizelgesi" + +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" +msgstr "Çevresel etki yöntemi bilgileri" + +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "Aylık kullanım karbon emisyonu" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" +msgstr "Carbon eklentisi- İşlenen varlık oranı" + +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" +msgstr "Karbondioksit yoğunluğu" + +#: src/Location.php:189 +msgid "Carbon intensity source and zone" +msgstr "" + +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "Emisyon tarihi" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "Yoğunluk" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "Karbon emisyonu" +msgstr[1] "Karbon emisyonları" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "Enerji" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "Emisyon" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "Enerji kalitesi" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "Emisyon kalitesi" + +#: src/Toolbox.php:280 msgid "W" msgstr "W" -#: src/Toolbox.php:252 +#: src/Toolbox.php:281 msgid "KW" msgstr "KW" -#: src/Toolbox.php:253 +#: src/Toolbox.php:282 msgid "MW" msgstr "MW" -#: src/Toolbox.php:254 +#: src/Toolbox.php:283 msgid "GW" msgstr "GW" -#: src/Toolbox.php:255 +#: src/Toolbox.php:284 msgid "TW" msgstr "TW" -#: src/Toolbox.php:256 +#: src/Toolbox.php:285 msgid "PW" msgstr "PW" -#: src/Toolbox.php:257 +#: src/Toolbox.php:286 msgid "EW" msgstr "EW" -#: src/Toolbox.php:258 +#: src/Toolbox.php:287 msgid "ZW" msgstr "ZW" -#: src/Toolbox.php:259 +#: src/Toolbox.php:288 msgid "YW" msgstr "YW" -#: src/Toolbox.php:286 +#: src/Toolbox.php:315 msgid "Wh" msgstr "Wh" -#: src/SearchOptions.php:196 src/SearchOptions.php:275 -#: src/SearchOptions.php:342 src/SearchOptions.php:406 -msgid "Is historizable" -msgstr "Geçmiş oluşturulabilir" - -#: src/UsageImpact.php:50 -msgid "Usage impact" -msgid_plural "Usage impacts" -msgstr[0] "Kullanım etkisi" -msgstr[1] "Kullanım etkileri" +#: src/Toolbox.php:373 src/Toolbox.php:378 +#, php-format +msgid "%1$s %2$s" +msgstr "%1$s %2$s" -#: src/UsageImpact.php:112 -msgid "Global warming potential quality" -msgstr "Küresel ısınma potansiyeli kalitesi" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "Çevresel etki" -#: src/UsageImpact.php:127 -msgid "Abiotic depletion potential quality" -msgstr "Abiyotik tükenme potansiyeli kalitesi" +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." +msgstr "" +"Ayrıntılı bilgi almak için lütfen günlüklere bakın. Eklenti deposuna bir " +"sorun bildirin." -#: src/UsageImpact.php:134 src/UsageImpact.php:142 -msgid "Primary energy quality" -msgstr "Birincil enerji kalitesi" +#: hook.php:301 +msgid "Associate to an usage profile" +msgstr "Bir kullanım profili ile ilişkilendir" -#: src/CarbonIntensity.php:69 -msgid "Carbon intensity" -msgstr "Karbon yoğunluğu" +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" +msgstr "Tüm hesaplanmış çevresel etkileri sil" -#: src/CarbonIntensity.php:91 -msgid "Emission date" -msgstr "Emisyon tarihi" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" +msgstr "Güncelleme türü güç tüketimi" -#: src/CarbonIntensity.php:118 -msgid "Intensity" -msgstr "Yoğunluk" +#: hook.php:312 +msgid "Update category" +msgstr "Güncelleme kategorisi" -#: src/EmbodiedImpact.php:90 -msgid "Global Warming Potential" -msgstr "Küresel ısınma potansiyeli" +#: hook.php:324 +msgid "Update zone for Boavizta engine" +msgstr "Boavizta hesaplayıcı bölgesini güncelle" -#: src/EmbodiedImpact.php:100 -msgid "Abiotic Depletion Potential" -msgstr "Abiyotik tükenme potansiyeli" +#: hook.php:325 +msgid "Update carbon intensity source and zone" +msgstr "" -#: src/EmbodiedImpact.php:110 -msgid "Primary energy" -msgstr "Birincil enerji" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "Konumların Alpha3 ülke kodunu bul (ISO3166)" -#: src/ComputerType.php:56 -msgid "Unspecified" -msgstr "Belirtilmemiş" +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "Bilgisayarların karbon emisyonlarını hesapla" -#: src/ComputerType.php:58 -msgid "Server" -msgstr "Sunucu" +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" +msgstr "Varlıkların gerçekleşen etkisini hesapla" -#: src/ComputerType.php:59 -msgid "Laptop" -msgstr "Dizüstü" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "Her zaman açık" -#: src/ComputerType.php:60 -msgid "Tablet" -msgstr "Tablet" +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "Çalışma saatleri" -#: src/ComputerType.php:61 -msgid "Smartphone" -msgstr "Akıllı telefon" +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "İstekte argümanlar eksik." -#: src/CarbonIntensitySource_Zone.php:70 -msgid "Source name" -msgstr "Kaynak adı" +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "Argümanlar yanlış." -#: src/CarbonIntensitySource_Zone.php:78 -msgid "Zone name" -msgstr "Bölge adı" +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "Sıfırlama reddedildi." -#: src/CarbonIntensitySource_Zone.php:94 -msgid "Code" -msgstr "Kod" +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "Sıfırlanamadı." -#: src/CarbonIntensitySource_Zone.php:148 -msgid "Not downloadable" -msgstr "İndirilebilir değil" +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "Eksik veriler bu varlığın geçmiş hesaplamasını engelliyor. " -#: src/CarbonIntensitySource_Zone.php:148 -msgid "This is a fallback source, there is no real-time data available" -msgstr "Bu varsayılan bir kaynaktır. Burada gerçek zamanlı veriler bulunmaz" +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "Küresel ısınma potansiyeli güncellenemedi." -#: src/CarbonIntensitySource_Zone.php:174 -msgid "Source for historical" -msgstr "Geçmiş oluşturma kaynağı" +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "Bu varlık için bir hesaplayıcısı bulunamadı." -#: src/CarbonIntensitySource_Zone.php:359 -msgid "Enable / Disable" -msgstr "Aç / Kapat" +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "Kullanım etkisi güncellenemedi." diff --git a/locales/zh_CN.mo b/locales/zh_CN.mo index 55dbd42c..f21027c1 100644 Binary files a/locales/zh_CN.mo and b/locales/zh_CN.mo differ diff --git a/locales/zh_CN.po b/locales/zh_CN.po index f232fc78..8dc5da63 100644 --- a/locales/zh_CN.po +++ b/locales/zh_CN.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# DWXXX, 2026 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-21 13:21+0200\n" -"PO-Revision-Date: 2022-11-23 14:34+0000\n" +"POT-Creation-Date: 2026-04-15 02:49+0000\n" +"PO-Revision-Date: 2025-10-29 09:26+0000\n" +"Last-Translator: DWXXX, 2026\n" "Language-Team: Chinese (China) (https://app.transifex.com/teclib/teams/28042/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,594 +21,1361 @@ msgstr "" "Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" -#. TRANS: %s is the user login -#: front/environnementalimpact.form.php:57 -#, php-format -msgid "%s updates an item" +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:148 +#: src/ComputerUsageProfile.php:169 +msgid "Start time" +msgstr "开始时间" + +#: templates/computerusageprofile.html.twig src/ComputerUsageProfile.php:177 +msgid "Stop time" +msgstr "停止时间" + +#: templates/computerusageprofile.html.twig +msgid "Days of week where the computer usually runs" msgstr "" -#: front/report.php:49 entrée standard:37 -msgid "GLPI Carbon" +#: templates/location.html.twig src/Impact/Embodied/Engine.php:53 +#: src/Impact/Usage/Engine.php:48 +msgid "Boavizta" +msgstr "Boavizta" + +#: templates/location.html.twig src/SearchOptions.php:138 src/Location.php:182 +msgid "Boavizta zone" msgstr "" -#: src/CarbonIntensityZone.php:50 +#: templates/location.html.twig src/CarbonIntensity.php:65 +msgid "Carbon intensity" +msgstr "碳强度" + +#: templates/usageinfo.html.twig +msgid "Asset usage" +msgstr "" + +#: templates/usageinfo.html.twig +msgid "Usage profile" +msgid_plural "Usage profiles" +msgstr[0] "" + +#: templates/quick-report.html.twig front/report.php:55 +msgid "GLPI Carbon" +msgstr "GLPI碳" + +#: templates/components/form/source_zone_selector.html.twig +#: src/AbstractModel.php:186 +msgid "Source" +msgstr "源" + +#: templates/components/form/source_zone_selector.html.twig src/Zone.php:51 msgid "Carbon intensity zone" msgid_plural "Carbon intensity zones" +msgstr[0] "碳强度区域" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "No zone available" +msgstr "没有可用区域" + +#: templates/pages/CarbonIntensitySource/tab_zone.html.twig +msgid "Please run the automatic action to downlaod data from this source." +msgstr "" + +#: templates/environmentalimpact-item.html.twig +msgid "Usage" +msgstr "使用" + +#: templates/environmentalimpact-item.html.twig +msgid "Reset data" +msgstr "重置数据" + +#: templates/environmentalimpact-item.html.twig +msgid "Calculate data" +msgstr "计算数据" + +#: templates/environmentalimpact-item.html.twig src/EmbodiedImpact.php:44 +msgid "Embodied impact" +msgid_plural "Embodied impacts" msgstr[0] "" -#: src/CarbonIntensityZone.php:122 src/CarbonIntensityZone.php:137 -msgid "Data source for historical calculation" +#: templates/history/status-item.html.twig +msgid "Historization status" +msgstr "历史状态" + +#: templates/history/status-item.html.twig +msgid "No status" +msgstr "无状态" + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and prevents from environmental impact calculation." +msgstr "" + +#: templates/history/status-item.html.twig +msgid "" +"This data is missing and may reduce the quality of environmental impact " +"calculation." +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Is not in the trash bin" +msgstr "不在垃圾筒内" + +#: templates/history/status-item.html.twig +msgid "Is not a template" +msgstr "不是模版" + +#: templates/history/status-item.html.twig +msgid "Linked to a computer" +msgstr "关联到计算机" + +#: templates/history/status-item.html.twig +msgid "Attached computer has a location" msgstr "" -#: src/AbstractType.php:50 entrée standard:37 +#: templates/history/status-item.html.twig +msgid "Has a location" +msgstr "有地址" + +#: templates/history/status-item.html.twig +msgid "The location has carbon intensity data" +msgstr "此地点有碳强度数据" + +#: templates/history/status-item.html.twig +msgid "Real time carbon intensity enabled" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The location has yearly carbon intensity data" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The asset has a model" +msgstr "资产有型号" + +#: templates/history/status-item.html.twig +msgid "The model has a power consumption" +msgstr "此型号有电力消耗" + +#: templates/history/status-item.html.twig +msgid "The asset has a type" +msgstr "资产有类型" + +#: templates/history/status-item.html.twig +msgid "Type is not ignored" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "The type has a power consumption" +msgstr "此类型有电力消耗" + +#: templates/history/status-item.html.twig +msgid "The asset has a category" +msgstr "资产有分类" + +#: templates/history/status-item.html.twig +msgid "The asset has a usage profile" +msgstr "此资产有用例配置文件" + +#: templates/history/status-item.html.twig +msgid "The asset has an inventory entry date" +msgstr "" + +#: templates/history/status-item.html.twig +msgid "Legend" +msgstr "图例" + +#: templates/monitortype.html.twig +msgid "" +"This power value is used as default when the power of a monitor model is " +"unknown" +msgstr "" + +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig msgid "Power" msgid_plural "Powers" -msgstr[0] "" +msgstr[0] "电力" -#: src/AbstractType.php:58 src/Dashboard/Dashboard.php:50 -#: src/Dashboard/Dashboard.php:56 src/Dashboard/Dashboard.php:62 -#: src/Dashboard/Dashboard.php:68 src/Dashboard/Dashboard.php:74 -#: src/Dashboard/Dashboard.php:80 src/Dashboard/Dashboard.php:86 -#: src/Dashboard/Dashboard.php:92 src/Dashboard/Dashboard.php:98 -#: src/Dashboard/Dashboard.php:103 src/Dashboard/Dashboard.php:108 -#: src/Dashboard/Dashboard.php:113 src/Dashboard/Dashboard.php:118 -msgid "Carbon" +#: templates/monitortype.html.twig templates/computertype.html.twig +#: templates/networkequipmenttype.html.twig +msgid "Do not evaluate" msgstr "" -#: src/CarbonIntensitySource.php:45 -msgid "Carbon intensity source" -msgid_plural "Carbon intensity sources" -msgstr[0] "" +#: templates/config.html.twig +msgid "Impact engine" +msgstr "影响引擎" -#: src/Command/CreateTestInventoryCommand.php:149 -msgid "Creating test inventory" +#: templates/config.html.twig +msgid "Usage carbon emissions are always calculated internally" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:70 -#: src/Command/CollectCarbonIntensityCommand.php:71 -msgid "Creating data source name" +#: templates/computertype.html.twig +msgid "" +"This power value is used as default when the power of a computer model is " +"unknown" msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:81 -msgid "Creating data zone name" +#: templates/computertype.html.twig src/SearchOptions.php:303 +#: src/ComputerType.php:78 +msgid "Category" +msgstr "分类" + +#: templates/dashboard/information-block.html.twig +msgid "Information" +msgstr "信息" + +#: templates/dashboard/information-block.html.twig +msgid "" +"Our data is sourced from reliable sources and is meticulously calculated " +"using industry-standard methodologies. We utilize accurate measurement tools" +" and algorithms to ensure the precision and reliability of our environmental" +" metrics." msgstr "" -#: src/Command/CreateFakeCarbonIntensityCommand.php:92 -msgid "Creating fake data..." +#: templates/dashboard/information-block.html.twig +msgid "" +"As we move towards a greener future, businesses will soon be required to " +"report energy usage and carbon emissions. By 2025, many areas will enforce " +"these regulations. Adopting these practices now ensures compliance and helps" +" combat climate change." msgstr "" -#: src/Command/CollectCarbonIntensityCommand.php:83 -msgid "Reading eco2mix data..." +#: templates/dashboard/information-block.html.twig +msgid "Did you know ?" +msgstr "你知道吗?" + +#: templates/dashboard/information-block.html.twig +msgid "" +"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " +"about 20 meters." msgstr "" -#: src/Profile.php:46 src/EnvironnementalImpact.php:54 -msgid "Environnemental impact" +#: templates/dashboard/unhandled-monitors-card.html.twig +#: templates/dashboard/unhandled-computers-card.html.twig +#: templates/dashboard/unhandled-network-equipments-card.html.twig +msgid "Warning" +msgstr "警告" + +#: templates/dashboard/unhandled-monitors-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s monitors." msgstr "" -#: src/Profile.php:87 entrée standard:48 -msgctxt "button" -msgid "Save" +#: templates/dashboard/usage-carbon-emission-last-year.html.twig +msgid "Yearly Usage Carbon Emission" +msgstr "每年碳排放使用量" + +#: templates/dashboard/monthly-carbon-emission.html.twig +msgid "Monthly usage carbon emission" +msgstr "每月碳排放使用量" + +#: templates/dashboard/monthly-carbon-emission.html.twig +#, php-format +msgid "Compared to %s" +msgstr "相比于 %s" + +#: templates/dashboard/unhandled-computers-card.html.twig +#, php-format +msgid "It represents %s percent of your parc that contains %s computers." msgstr "" -#: src/CronTask.php:50 -msgid "Download carbon emissions from RTE" +#: templates/dashboard/unhandled-network-equipments-card.html.twig +#, php-format +msgid "" +"It represents %s percent of your parc that contains %s network equipments." msgstr "" -#: src/CronTask.php:51 src/CronTask.php:57 -msgid "Maximum number of entries to download" +#: templates/dashboard/information-video-card.html.twig +msgid "Want to know more ?" +msgstr "相了解更多?" + +#: templates/dashboard/information-video-card.html.twig +msgid "Here is a video about the impact of numeric on the enviromnent." +msgstr "这里有一个视频介绍环境方面的影响数值。" + +#: templates/abstractmodel.html.twig +msgid "" +"The impacts below shall include the manufacturing, disposal and recycling " +"processes only." msgstr "" -#: src/CronTask.php:56 -msgid "Download carbon emissions from ElectricityMap" +#: templates/abstractmodel.html.twig +msgid "Take care of the expected units before setting an impact." msgstr "" -#: src/CronTask.php:62 -msgid "Compute daily environnemental impact for all assets" +#: templates/abstractmodel.html.twig +msgid "Data quality" msgstr "" -#: src/CronTask.php:63 -msgid "Maximum number of entries to calculate" +#: templates/abstractmodel.html.twig +msgid "Data source" msgstr "" -#: src/CarbonIntensity.php:57 -msgid "Carbon intensity" +#: templates/networkequipmenttype.html.twig +msgid "" +"This power value is used as default when the power of a network equipment " +"model is unknown" msgstr "" -#: src/CarbonIntensity.php:96 -msgid "ID" +#: src/Command/CollectCarbonIntensityCommand.php:70 +msgid "Read carbon dioxyde intensity from external sources" msgstr "" -#: src/CarbonIntensity.php:105 -msgid "Emission date" +#: src/Command/CollectCarbonIntensityCommand.php:84 +msgid "Source:" +msgstr "源:" + +#: src/Command/CollectCarbonIntensityCommand.php:95 +msgid "" +"The selected source does not enumerates its supported zones. Trying to " +"identify a zone from an address" msgstr "" -#: src/CarbonIntensity.php:132 -msgid "Intensity" +#: src/Command/CollectCarbonIntensityCommand.php:99 +msgid "Geocoding is not enabled. Cannot resolve an address into a zone" msgstr "" -#: src/Report.php:48 -msgid "Carbon report" -msgid_plural "Carbon reports" -msgstr[0] "" +#: src/Command/CollectCarbonIntensityCommand.php:104 +msgid "Address:" +msgstr "地址:" -#: src/Toolbox.php:194 src/Dashboard/Provider.php:519 -msgid "g" +#: src/Command/CollectCarbonIntensityCommand.php:107 +msgid "Zone:" +msgstr "区域:" + +#: src/Command/CollectCarbonIntensityCommand.php:123 +#: src/Command/CreateFakeCarbonIntensityCommand.php:67 +msgid "Creating data source name" +msgstr "创建数据源名称" + +#: src/Command/CollectCarbonIntensityCommand.php:130 +msgid "This source does not exist" msgstr "" -#: src/Toolbox.php:195 src/Dashboard/Provider.php:520 -msgid "Kg" +#: src/Command/CollectCarbonIntensityCommand.php:149 +msgid "The zone is not handled by the data source" msgstr "" -#: src/Toolbox.php:196 src/Dashboard/Provider.php:521 -msgid "t" +#: src/Command/CollectCarbonIntensityCommand.php:155 +msgid "Reading data..." +msgstr "读取数据..." + +#: src/Command/CreateFakeCarbonIntensityCommand.php:78 +msgid "Creating data zone name" +msgstr "创建数据区域名称" + +#: src/Command/CreateFakeCarbonIntensityCommand.php:89 +msgid "Creating fake data..." +msgstr "创建假数据..." + +#: src/Command/ExportDashboardCommand.php:68 +msgid "Updating the report dashboard description" +msgstr "更新报告仪表板描述" + +#: src/Command/ExportDashboardCommand.php:73 +msgid "Dashboard not found" +msgstr "仪表板未找到" + +#: src/Command/ExportDashboardCommand.php:99 +#, php-format +msgid "Dashboard description saved to %s" +msgstr "保存仪表板描述到 %s" + +#: src/Command/CreateTestInventoryCommand.php:145 +msgid "Creating test inventory" +msgstr "创建测试资产" + +#: src/NetworkEquipmentType.php:50 src/SearchOptions.php:161 +#: src/ComputerType.php:70 src/MonitorType.php:50 +msgid "Power consumption" +msgstr "电力消耗量" + +#: src/UsageInfo.php:62 +msgid "Usage informations" +msgstr "使用信息" + +#: src/UsageInfo.php:94 src/AbstractModel.php:54 src/Location.php:73 +#: src/AbstractType.php:55 src/Profile.php:45 +msgid "Environmental impact" +msgstr "环境影响" + +#: src/UsageInfo.php:241 +#, php-format +msgid "%s More information %s" msgstr "" -#: src/Toolbox.php:197 src/Dashboard/Provider.php:522 -msgid "Kt" +#: src/DataSource/Lca/Boaviztapi/Config.php:100 +msgid "Invalid Boavizta API URL" +msgstr "无效的Boavizta API地址" + +#: src/DataSource/Lca/Boaviztapi/Config.php:108 +msgid "Connection to Boavizta API established" +msgstr "连接到 Boavizta API 成功" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:56 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:53 +msgid "Resource diagnosis" msgstr "" -#: src/Toolbox.php:198 src/Dashboard/Provider.php:523 -msgid "Mt" +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:71 +msgid "Collect carbon intensities from RTE" +msgstr "从RTE收集碳强度" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:89 +msgid "Download carbon emissions from RTE" +msgstr "从RTE下载碳排放" + +#: src/DataSource/CarbonIntensity/Rte/CronTask.php:90 +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:87 +#: src/CronTask.php:107 +msgid "Maximum number of entries to download" +msgstr "下载的最大条目" + +#: src/DataSource/CarbonIntensity/AbstractCronTask.php:103 +#: src/Source_Zone.php:537 +msgid "End" msgstr "" -#: src/Toolbox.php:199 src/Dashboard/Provider.php:524 -msgid "Gt" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:68 +msgid "Collect carbon intensities from Electricity Maps" msgstr "" -#: src/Toolbox.php:200 src/Dashboard/Provider.php:525 -msgid "Tt" +#: src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php:86 +msgid "Download carbon emissions from Electricity Maps" msgstr "" -#: src/Toolbox.php:201 src/Dashboard/Provider.php:526 -msgid "Pt" +#: src/AbstractImpact.php:125 src/CarbonEmission.php:151 +msgid "Date of evaluation" +msgstr "评估日期" + +#: src/AbstractImpact.php:132 src/CarbonEmission.php:158 +msgid "Engine" +msgstr "引擎" + +#: src/AbstractImpact.php:139 src/CarbonEmission.php:165 +msgid "Engine version" +msgstr "引擎版本" + +#: src/DataTracking/AbstractTracked.php:77 +msgid "Impact not evaluated" msgstr "" -#: src/Toolbox.php:202 src/Dashboard/Provider.php:527 -msgid "Et" +#: src/DataTracking/AbstractTracked.php:78 +msgid "Unspecified quality" msgstr "" -#: src/Toolbox.php:203 src/Dashboard/Provider.php:528 -msgid "Zt" +#: src/DataTracking/AbstractTracked.php:79 +msgid "Manual data" msgstr "" -#: src/Toolbox.php:204 src/Dashboard/Provider.php:529 -msgid "Yt" +#: src/DataTracking/AbstractTracked.php:80 +msgid "Estimated data" msgstr "" -#. TRANS: %1$s is a number maybe float or string and %2$s the unit -#: src/Toolbox.php:215 src/Toolbox.php:248 -#, php-format -msgid "%1$s %2$s" +#: src/DataTracking/AbstractTracked.php:81 +msgid "Downsampled data" msgstr "" -#: src/Toolbox.php:229 -msgid "W" +#: src/DataTracking/AbstractTracked.php:82 +msgid "Measured data" msgstr "" -#: src/Toolbox.php:230 -msgid "KW" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:93 +#: src/Impact/Usage/AbstractUsageImpact.php:91 +msgid "grams of carbon dioxyde equivalent" msgstr "" -#: src/Toolbox.php:231 -msgid "MW" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:95 +#: src/Impact/Usage/AbstractUsageImpact.php:93 +msgid "grams of antimony equivalent" msgstr "" -#: src/Toolbox.php:232 -msgid "GW" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:97 +#: src/Impact/Usage/AbstractUsageImpact.php:95 +msgid "joules" +msgstr "焦耳" + +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:132 +msgid "Connection to Boavizta failed." msgstr "" -#: src/Toolbox.php:233 -msgid "TW" +#: src/Impact/Embodied/AbstractEmbodiedImpact.php:135 +msgid "Embodied impact evaluation falied." msgstr "" -#: src/Toolbox.php:234 -msgid "PW" +#: src/Impact/History/AbstractAsset.php:370 +msgid "Error while calculating impact" +msgstr "计算影响时出错" + +#: src/Impact/History/AbstractAsset.php:378 +msgid "Nothing to calculate" +msgstr "无需计算" + +#: src/Impact/History/AbstractAsset.php:384 +#, php-format +msgid "%d entries calculated" +msgstr "%d 条目被计算" + +#: src/Impact/Type.php:159 +msgid "Embodied Global warming potential" msgstr "" -#: src/Toolbox.php:235 -msgid "EW" +#: src/Impact/Type.php:160 +msgid "Embodied Abiotic depletion potential" msgstr "" -#: src/Toolbox.php:236 -msgid "ZW" +#: src/Impact/Type.php:161 +msgid "Embodied Primary energy consumed" msgstr "" -#: src/Toolbox.php:237 -msgid "YW" +#: src/Impact/Type.php:162 +msgid "Embodied Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Widget.php:45 -msgid "Carbon Emission Per Type" +#: src/Impact/Type.php:163 +msgid "Embodied Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Dashboard/Widget.php:51 -msgid "Carbon Emission Per Month" +#: src/Impact/Type.php:164 +msgid "" +"Embodied Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Widget.php:57 entrée standard:38 -msgid "Total Carbon Emission" +#: src/Impact/Type.php:165 +msgid "Embodied Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Widget.php:63 -msgid "Monthly Carbon Emission" +#: src/Impact/Type.php:166 +msgid "Embodied Land use" msgstr "" -#: src/Dashboard/Widget.php:69 -msgid "Unhandled Computers" +#: src/Impact/Type.php:167 +msgid "Embodied Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Filters/Item.php:42 -msgid "Item" +#: src/Impact/Type.php:168 +msgid "Embodied Fine particle emissions" msgstr "" -#: src/Dashboard/Provider.php:357 src/Dashboard/Provider.php:533 -#: src/Dashboard/Provider.php:534 -msgid "CO₂eq" +#: src/Impact/Type.php:169 +msgid "Embodied Photochemical ozone formation" msgstr "" -#: src/Dashboard/Provider.php:473 src/Dashboard/Provider.php:488 entrée -#: standard:120 -msgid "Carbon emission" +#: src/Impact/Type.php:170 +msgid "Embodied Use of water resources" msgstr "" -#: src/Dashboard/Provider.php:478 src/Dashboard/Provider.php:491 entrée -#: standard:123 -msgid "Consumed energy" +#: src/Impact/Type.php:171 +msgid "Embodied Material input per unit of service" msgstr "" -#: src/Dashboard/Provider.php:538 -msgid "KWh" +#: src/Impact/Type.php:172 +msgid "Embodied Use of mineral and metal resources" msgstr "" -#: src/Dashboard/Provider.php:539 -msgid "MWh" +#: src/Impact/Type.php:173 +msgid "Embodied Use of fossil resources (including nuclear)" msgstr "" -#: src/Dashboard/Provider.php:540 -msgid "GWh" +#: src/Impact/Type.php:174 +msgid "Embodied Acidification" msgstr "" -#: src/Dashboard/Provider.php:541 -msgid "TWh" +#: src/Impact/Type.php:175 +msgid "Embodied Freshwater ecotoxicity" msgstr "" -#: src/Dashboard/Provider.php:542 -msgid "PWh" +#: src/Impact/Type.php:178 +msgid "Embodied Eutrophication of freshwater" msgstr "" -#: src/Dashboard/Provider.php:543 -msgid "EWh" +#: src/Impact/Type.php:179 +msgid "Embodied Eutrophication of marine waters" msgstr "" -#: src/Dashboard/Provider.php:544 -msgid "ZWh" +#: src/Impact/Type.php:180 +msgid "Embodied Terrestrial eutrophication" msgstr "" -#: src/Dashboard/Provider.php:545 -msgid "YWh" +#: src/Impact/Type.php:195 +msgid "Usage Global warming potential" msgstr "" -#: src/Dashboard/Dashboard.php:51 src/Dashboard/Dashboard.php:114 -msgid "Unhandled computers" +#: src/Impact/Type.php:196 +msgid "Usage Abiotic depletion potential" msgstr "" -#: src/Dashboard/Dashboard.php:57 -msgid "Handled computers" +#: src/Impact/Type.php:197 +msgid "Usage Primary energy consumed" msgstr "" -#: src/Dashboard/Dashboard.php:63 -msgid "Total power consumption" +#: src/Impact/Type.php:198 +msgid "Usage Climate change - Contribution of biogenic emissions" msgstr "" -#: src/Dashboard/Dashboard.php:69 src/Dashboard/Dashboard.php:104 -msgid "Total carbon emission" +#: src/Impact/Type.php:199 +msgid "Usage Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/Dashboard/Dashboard.php:75 -msgid "Total power consumption per model" +#: src/Impact/Type.php:200 +msgid "Usage Climate change - Contribution of emissions from land use change" msgstr "" -#: src/Dashboard/Dashboard.php:81 -msgid "Total carbon emission per model" +#: src/Impact/Type.php:201 +msgid "Usage Emissions of radionizing substances" msgstr "" -#: src/Dashboard/Dashboard.php:87 src/Dashboard/Dashboard.php:255 -msgid "Carbon emission per month" +#: src/Impact/Type.php:202 +msgid "Usage Land use" msgstr "" -#: src/Dashboard/Dashboard.php:93 -msgid "Carbon intensity (gCO2eq / KWh)" +#: src/Impact/Type.php:203 +msgid "Usage Depletion of the ozone layer" msgstr "" -#: src/Dashboard/Dashboard.php:99 -msgid "Carbon emission per type" +#: src/Impact/Type.php:204 +msgid "Usage Fine particle emissions" msgstr "" -#: src/Dashboard/Dashboard.php:109 entrée standard:38 -msgid "Monthly carbon emission" +#: src/Impact/Type.php:205 +msgid "Usage Photochemical ozone formation" msgstr "" -#: src/Dashboard/Dashboard.php:119 -msgid "Carbon emission per month graph" +#: src/Impact/Type.php:206 +msgid "Usage Use of water resources" msgstr "" -#: src/Dashboard/Dashboard.php:273 -msgid "Carbon dioxyde intensity" +#: src/Impact/Type.php:207 +msgid "Usage Material input per unit of service" msgstr "" -#: src/ComputerUsageProfile.php:48 -msgid "Computer usage profile" -msgid_plural "Computer usage profiles" -msgstr[0] "" +#: src/Impact/Type.php:208 +msgid "Usage Use of mineral and metal resources" +msgstr "" -#: src/ComputerUsageProfile.php:84 -msgid "Knowbase category" +#: src/Impact/Type.php:209 +msgid "Usage Use of fossil resources (including nuclear)" msgstr "" -#: src/ComputerUsageProfile.php:90 -msgid "As child of" +#: src/Impact/Type.php:210 +msgid "Usage Acidification" msgstr "" -#: src/ComputerUsageProfile.php:105 entrée standard:52 -msgid "Start time" +#: src/Impact/Type.php:211 +msgid "Usage Freshwater ecotoxicity" msgstr "" -#: src/ComputerUsageProfile.php:113 entrée standard:58 -msgid "Stop time" +#: src/Impact/Type.php:214 src/Impact/Type.php:342 +msgid "Usage Eutrophication of freshwater" msgstr "" -#: src/ComputerUsageProfile.php:121 entrée standard:66 -msgid "Monday" +#: src/Impact/Type.php:215 src/Impact/Type.php:343 +msgid "Usage Eutrophication of marine waters" msgstr "" -#: src/ComputerUsageProfile.php:129 entrée standard:72 -msgid "Tuesday" +#: src/Impact/Type.php:216 src/Impact/Type.php:344 +msgid "Usage Terrestrial eutrophication" msgstr "" -#: src/ComputerUsageProfile.php:137 entrée standard:78 -msgid "Wednesday" +#: src/Impact/Type.php:231 +msgid "Total Global warming potential" msgstr "" -#: src/ComputerUsageProfile.php:145 entrée standard:84 -msgid "Thursday" +#: src/Impact/Type.php:232 +msgid "Total Abiotic depletion potential" msgstr "" -#: src/ComputerUsageProfile.php:153 entrée standard:90 -msgid "Friday" +#: src/Impact/Type.php:233 +msgid "Total Primary energy consumed" msgstr "" -#: src/ComputerUsageProfile.php:161 entrée standard:96 -msgid "Saturday" +#: src/Impact/Type.php:234 +msgid "Total Climate change - Contribution of biogenic emissions" msgstr "" -#: src/ComputerUsageProfile.php:169 entrée standard:103 -msgid "Sunday" +#: src/Impact/Type.php:235 +msgid "Total Climate change - Contribution of fossil fuel emissions" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:124 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:219 entrée standard:40 -msgid "Name" +#: src/Impact/Type.php:236 +msgid "Total Climate change - Contribution of emissions from land use change" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:125 -msgid "Download enabled" +#: src/Impact/Type.php:237 +msgid "Total Emissions of radionizing substances" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:126 -msgid "Source for historical" +#: src/Impact/Type.php:238 +msgid "Total Land use" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:132 -#: src/CarbonIntensitySource_CarbonIntensityZone.php:225 -msgid "Total" +#: src/Impact/Type.php:239 +msgid "Total Depletion of the ozone layer" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:189 -msgid "No" +#: src/Impact/Type.php:240 +msgid "Total Fine particle emissions" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:284 entrée standard:186 -msgid "Yes" +#: src/Impact/Type.php:241 +msgid "Total Photochemical ozone formation" msgstr "" -#: src/CarbonIntensitySource_CarbonIntensityZone.php:285 -msgid "Enable / Disable" +#: src/Impact/Type.php:242 +msgid "Total Use of water resources" msgstr "" -#: src/CarbonEmission.php:50 -msgid "Carbon Emission" -msgid_plural "Carbon Emissions" -msgstr[0] "" +#: src/Impact/Type.php:243 +msgid "Total Material input per unit of service" +msgstr "" -#: hook.php:133 hook.php:172 -msgid "Power consumption (W)" +#: src/Impact/Type.php:244 +msgid "Total Use of mineral and metal resources" msgstr "" -#: setup.php:204 -msgid "Environmental Impact" +#: src/Impact/Type.php:245 +msgid "Total Use of fossil resources (including nuclear)" msgstr "" -#. TRANS: %s is the number of new version -#: install/migration/update_0.0.0_to_0.0.1.php:44 -#: install/migration/update_xxx_to_yyy.php:45 -#, php-format -msgid "Update to %s" +#: src/Impact/Type.php:246 +msgid "Total Acidification" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_uasge_profiles.php:39 -msgid "Office hours" +#: src/Impact/Type.php:247 +msgid "Total Freshwater ecotoxicity" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:46 -msgid "Compute carbon emissions of computers" +#: src/Impact/Type.php:250 +msgid "Total Eutrophication of freshwater" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:58 -msgid "Collect carbon intensities from RTE" +#: src/Impact/Type.php:251 +msgid "Total Eutrophication of marine waters" msgstr "" -#: install/migration/update_0.0.0_to_0.0.1/create_automatic_actions.php:70 -msgid "Collect carbon intensities from ElectricityMap" +#: src/Impact/Type.php:252 +msgid "Total Terrestrial eutrophication" msgstr "" -#: entrée standard:35 -msgid "No zone available" +#: src/Impact/Type.php:323 +msgid "Carbon emission in CO₂ equivalent" msgstr "" -#: entrée standard:37 -msgid "Please run the automatic action to downlaod data from this source." +#: src/Impact/Type.php:324 +msgid "Consumption of non renewable resources in Antimony equivalent." +msgstr "" + +#: src/Impact/Type.php:325 +msgid "Primary energy consumed." msgstr "" -#: entrée standard:43 -msgid "Key for electricitymap.org API" +#: src/Impact/Type.php:332 +msgid "Incidence of disease" msgstr "" -#: entrée standard:36 +#: src/Source.php:46 +msgid "Carbon intensity source" +msgid_plural "Carbon intensity sources" +msgstr[0] "碳强度来源" + +#: src/SearchOptions.php:184 src/SearchOptions.php:316 +#: src/SearchOptions.php:329 src/SearchOptions.php:342 +msgid "Ignore environmental impact" +msgstr "" + +#: src/SearchOptions.php:241 src/SearchOptions.php:365 +#: src/SearchOptions.php:442 +msgid "Is historizable" +msgstr "" + +#: src/ComputerType.php:56 +msgid "Unspecified" +msgstr "未指定" + +#: src/ComputerType.php:58 +msgid "Server" +msgstr "服务器" + +#: src/ComputerType.php:59 +msgid "Laptop" +msgstr "笔记本" + +#: src/ComputerType.php:60 +msgid "Tablet" +msgstr "平板" + +#: src/ComputerType.php:61 +msgid "Smartphone" +msgstr "智能手机" + +#: src/UsageImpact.php:39 +msgid "Usage impact" +msgid_plural "Usage impacts" +msgstr[0] "" + +#: src/AbstractModel.php:62 src/Dashboard/Grid.php:58 +#: src/Dashboard/Grid.php:123 src/Dashboard/Grid.php:221 +#: src/AbstractType.php:63 +msgid "Carbon" +msgstr "碳" + +#: src/AbstractModel.php:197 +msgid "Quality" +msgstr "" + +#: src/Report.php:49 +msgid "Carbon report" +msgid_plural "Carbon reports" +msgstr[0] "碳汇报" + +#: src/Report.php:101 +#, php-format msgid "" -"This power value is used as default when the power of a computer model is " -"unknown" +"Demo mode enabled. The data below are not representative of the assets in " +"the database. %sDisable demo mode%s" msgstr "" -#: entrée standard:61 -msgid "Days of week where the computer usually runs" +#: src/ComputerUsageProfile.php:51 +msgid "Computer usage profile" +msgid_plural "Computer usage profiles" +msgstr[0] "" + +#: src/ComputerUsageProfile.php:117 +msgid "Start time is invalid" +msgstr "开始时间无效" + +#: src/ComputerUsageProfile.php:122 +msgid "Stop time is invalid" +msgstr "停止时间无效" + +#: src/Source_Zone.php:72 +msgid "Source name" +msgstr "源名称" + +#: src/Source_Zone.php:80 +msgid "Zone name" +msgstr "区域名称" + +#: src/Source_Zone.php:88 src/Source_Zone.php:171 src/Source_Zone.php:268 +#: src/Zone.php:127 +msgid "Download enabled" +msgstr "启用下载" + +#: src/Source_Zone.php:96 +msgid "Code" +msgstr "编码" + +#: src/Source_Zone.php:150 +msgid "Not downloadable" +msgstr "不可下载" + +#: src/Source_Zone.php:150 +msgid "This is a fallback source, there is no real-time data available" msgstr "" -#: entrée standard:38 -msgid "Warning" +#: src/Source_Zone.php:172 +msgid "Source for historical" +msgstr "历史来源" + +#: src/Source_Zone.php:411 +msgid "Enable / Disable" +msgstr "启用/禁用" + +#: src/CronTask.php:100 +msgid "Find the Alpha3 country code (ISO3166)" +msgstr "查找Alpha3国家代码 (ISO3166)" + +#: src/CronTask.php:101 +msgid "Maximum number of locations to solve" +msgstr "解决的最多地点" + +#: src/CronTask.php:106 +msgid "Download carbon emissions from Watttime" +msgstr "从Watttime下载碳排放" + +#: src/CronTask.php:112 +msgid "Compute usage environmental impact for all assets" msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Type" +#: src/CronTask.php:113 src/CronTask.php:118 +msgid "Maximum number of entries to calculate" +msgstr "计算的最大条目" + +#: src/CronTask.php:117 +msgid "Compute embodied environmental impact for all assets" msgstr "" -#: entrée standard:33 -msgid "Consumed energy and carbon emission per month" +#: src/CronTask.php:278 +msgid "No zone to download" +msgstr "没有区域供下载" + +#: src/Dashboard/Widget.php:55 src/Dashboard/Grid.php:310 +msgid "Environmental impact information video" msgstr "" -#: entrée standard:40 -msgid "Information" +#: src/Dashboard/Widget.php:62 +msgid "Methodology information" +msgstr "方法信息" + +#: src/Dashboard/Widget.php:71 +msgid "Total Carbon Emission" +msgstr "总碳排放" + +#: src/Dashboard/Widget.php:78 +msgid "Monthly Carbon Emission" +msgstr "每月碳排放" + +#: src/Dashboard/Widget.php:85 src/Dashboard/Widget.php:604 +#: src/Dashboard/Grid.php:268 +msgid "Biggest monthly averaged carbon emission per model" msgstr "" -#: entrée standard:50 +#: src/Dashboard/Widget.php:93 +msgid "Carbon Emission Per month" +msgstr "每月碳排放" + +#: src/Dashboard/Widget.php:100 src/Dashboard/Provider.php:733 +msgid "Usage abiotic depletion potential" +msgstr "非生物资源消耗潜值用例" + +#: src/Dashboard/Widget.php:130 +msgid "Impact criteria" +msgstr "" + +#: src/Dashboard/Widget.php:142 +msgid "Unhandled Computers" +msgstr "未处理的电脑" + +#: src/Dashboard/Widget.php:153 +msgid "Unhandled Monitors" +msgstr "未处理的显示器" + +#: src/Dashboard/Widget.php:164 +msgid "Unhandled Network equipments" +msgstr "未处理的网络设备" + +#: src/Dashboard/Widget.php:175 +msgid "Radar chart" +msgstr "雷达图" + +#: src/Dashboard/Widget.php:501 src/Dashboard/Provider.php:1107 +msgid "Consumed energy and carbon emission per month" +msgstr "" + +#: src/Dashboard/Widget.php:546 src/Dashboard/Widget.php:561 +#: src/Dashboard/Provider.php:1212 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "Carbon emission" +msgstr "碳排放" + +#: src/Dashboard/Widget.php:551 src/Dashboard/Widget.php:564 +#: src/Dashboard/Provider.php:1228 src/Dashboard/DemoProvider.php:106 +#: src/Dashboard/DemoProvider.php:202 +msgid "Consumed energy" +msgstr "消费的电力" + +#: src/Dashboard/Widget.php:746 +#, php-format msgid "" -"Our data is sourced from reliable sources and is meticulously calculated " -"using industry-standard methodologies. We utilize accurate measurement tools" -" and algorithms to ensure the precision and reliability of our environmental" -" metrics." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 2 " +"months. %s More information %s" msgstr "" -#: entrée standard:51 +#: src/Dashboard/Widget.php:812 +#, php-format msgid "" -"As we move towards a greener future, businesses will soon be required to " -"report energy usage and carbon emissions. By 2025, many areas will enforce " -"these regulations. Adopting these practices now ensures compliance and helps" -" combat climate change." +"Evaluates the usage carbon emission in CO₂ equivalent during the last 12 " +"elapsed months. %s More information %s" msgstr "" -#: entrée standard:55 -msgid "Did you know ?" +#: src/Dashboard/Widget.php:854 +msgid "More information" msgstr "" -#: entrée standard:56 +#: src/Dashboard/Widget.php:893 +#, php-format msgid "" -"1 gram of CO₂ is equivalent to the CO₂ emitted when you drive a car for " -"about 20 meters." +"Evaluates the consumption of non renewable resources in Antimony equivalent." +" %s More information %s" msgstr "" -#: entrée standard:81 -#, php-format -msgid "%s rows / page" +#: src/Dashboard/Widget.php:1097 +msgid "Handled percentage" +msgstr "已处理百分比" + +#: src/Dashboard/Provider.php:193 src/Dashboard/Provider.php:316 +#: src/Dashboard/Provider.php:713 src/Dashboard/Provider.php:1212 +#: src/Dashboard/Provider.php:1214 src/Dashboard/DemoProvider.php:88 +#: src/Dashboard/DemoProvider.php:189 +msgid "CO₂eq" +msgstr "CO₂eq" + +#: src/Dashboard/Provider.php:195 src/Dashboard/Provider.php:318 +#: src/Dashboard/Provider.php:1199 src/Toolbox.php:243 +msgid "g" +msgstr "g" + +#: src/Dashboard/Provider.php:196 src/Dashboard/Provider.php:319 +#: src/Dashboard/Provider.php:1200 src/Toolbox.php:244 +msgid "Kg" +msgstr "Kg" + +#: src/Dashboard/Provider.php:197 src/Dashboard/Provider.php:320 +#: src/Dashboard/Provider.php:1201 src/Toolbox.php:245 +msgid "t" +msgstr "t" + +#: src/Dashboard/Provider.php:198 src/Dashboard/Provider.php:321 +#: src/Dashboard/Provider.php:1202 src/Toolbox.php:246 +msgid "Kt" +msgstr "Kt" + +#: src/Dashboard/Provider.php:199 src/Dashboard/Provider.php:322 +#: src/Dashboard/Provider.php:1203 src/Toolbox.php:247 +msgid "Mt" +msgstr "Mt" + +#: src/Dashboard/Provider.php:200 src/Dashboard/Provider.php:323 +#: src/Dashboard/Provider.php:1204 src/Toolbox.php:248 +msgid "Gt" +msgstr "Gt" + +#: src/Dashboard/Provider.php:201 src/Dashboard/Provider.php:324 +#: src/Dashboard/Provider.php:1205 src/Toolbox.php:249 +msgid "Tt" +msgstr "Tt" + +#: src/Dashboard/Provider.php:202 src/Dashboard/Provider.php:325 +#: src/Dashboard/Provider.php:1206 src/Toolbox.php:250 +msgid "Pt" +msgstr "Pt" + +#: src/Dashboard/Provider.php:203 src/Dashboard/Provider.php:326 +#: src/Dashboard/Provider.php:1207 src/Toolbox.php:251 +msgid "Et" +msgstr "Et" + +#: src/Dashboard/Provider.php:204 src/Dashboard/Provider.php:327 +#: src/Dashboard/Provider.php:1208 src/Toolbox.php:252 +msgid "Zt" +msgstr "Zt" + +#: src/Dashboard/Provider.php:205 src/Dashboard/Provider.php:328 +#: src/Dashboard/Provider.php:1209 src/Toolbox.php:253 +msgid "Yt" +msgstr "Yt" + +#: src/Dashboard/Provider.php:427 +msgid "handled assets ratio" +msgstr "已处理资产比率" + +#: src/Dashboard/Provider.php:473 src/Dashboard/Grid.php:63 +msgid "Handled assets ratio" +msgstr "已处理的资产比率" + +#: src/Dashboard/Provider.php:497 src/Dashboard/DemoProvider.php:297 +msgid "Handled" +msgstr "已处理" + +#: src/Dashboard/Provider.php:502 src/Dashboard/DemoProvider.php:302 +msgid "Unhandled" +msgstr "未处理" + +#: src/Dashboard/Provider.php:507 +msgid "Ignored" msgstr "" -#: entrée standard:90 +#: src/Dashboard/Provider.php:534 src/Dashboard/DemoProvider.php:242 #, php-format -msgid "Showing %s to %s of %s rows" -msgstr "" +msgid "plugin carbon - handled %s" +msgstr "插件 carbon - 已处理 %s" -#: entrée standard:94 +#: src/Dashboard/Provider.php:535 src/Dashboard/DemoProvider.php:243 #, php-format -msgid "%s-%s/%s" +msgid "plugin carbon - unhandled %s" +msgstr "插件 carbon - 未处理 %s" + +#: src/Dashboard/Provider.php:584 +#, php-format +msgid "plugin carbon - ignored %s" msgstr "" -#: entrée standard:104 -msgid "Start" +#: src/Dashboard/Provider.php:632 +msgid "plugin carbon - Total usage power consumption" msgstr "" -#: entrée standard:109 -msgid "Previous" +#: src/Dashboard/Provider.php:701 src/Dashboard/DemoProvider.php:325 +msgid "plugin carbon - Usage carbon emission" msgstr "" -#: entrée standard:118 -#, php-format -msgid "%s-%s of %s" +#: src/Dashboard/Provider.php:747 +msgid "Sbeq" +msgstr "Sbeq" + +#: src/Dashboard/Provider.php:1035 +msgid "Total abiotic depletion potential" msgstr "" -#: entrée standard:141 -msgid "Next" +#: src/Dashboard/Provider.php:1051 +msgid "Embodied abiotic depletion potential" msgstr "" -#: entrée standard:146 -msgid "End" +#: src/Dashboard/Provider.php:1054 +msgid "Total usage abiotic depletion potential" +msgstr "" + +#: src/Dashboard/Provider.php:1066 +msgid "Total global warming potential" +msgstr "总全球暖化指数" + +#: src/Dashboard/Provider.php:1082 +msgid "Embodied global warming potential" +msgstr "" + +#: src/Dashboard/Provider.php:1085 +msgid "Total usage global warming potential" +msgstr "" + +#: src/Dashboard/Provider.php:1218 src/Toolbox.php:316 +msgid "KWh" +msgstr "KWh" + +#: src/Dashboard/Provider.php:1219 src/Toolbox.php:317 +msgid "MWh" +msgstr "MWh" + +#: src/Dashboard/Provider.php:1220 src/Toolbox.php:318 +msgid "GWh" +msgstr "GWh" + +#: src/Dashboard/Provider.php:1221 src/Toolbox.php:319 +msgid "TWh" +msgstr "TWh" + +#: src/Dashboard/Provider.php:1222 src/Toolbox.php:320 +msgid "PWh" +msgstr "PWh" + +#: src/Dashboard/Provider.php:1223 src/Toolbox.php:321 +msgid "EWh" +msgstr "EWh" + +#: src/Dashboard/Provider.php:1224 src/Toolbox.php:322 +msgid "ZWh" +msgstr "ZWh" + +#: src/Dashboard/Provider.php:1225 src/Toolbox.php:323 +msgid "YWh" +msgstr "YWh" + +#: src/Dashboard/Grid.php:72 +msgid "Handled assets count" +msgstr "已处理的资产数量" + +#: src/Dashboard/Grid.php:135 +#, php-format +msgid "Handled %s" +msgstr "已处理 %s" + +#: src/Dashboard/Grid.php:146 +#, php-format +msgid "Unhandled %s" +msgstr "未处理 %s" + +#: src/Dashboard/Grid.php:232 +#, php-format +msgid "Unhandled %s ratio" +msgstr "已处理 %s 比率" + +#: src/Dashboard/Grid.php:244 +msgid "Usage carbon emission year to date" msgstr "" -#: entrée standard:50 standard:281 -msgid "No data" +#: src/Dashboard/Grid.php:250 +msgid "Monthly carbon emission" +msgstr "每月碳排放" + +#: src/Dashboard/Grid.php:259 +msgid "Usage global warming potential chart" msgstr "" -#: entrée standard:88 -msgid "Check all" +#: src/Dashboard/Grid.php:315 +msgid "Environmental impact methodology information" msgstr "" -#: entrée standard:123 -msgid "Filter" +#: src/Dashboard/DemoProvider.php:76 +msgid "Usage carbon emission per month" +msgstr "每月碳排放量" + +#: src/Dashboard/DemoProvider.php:274 +msgid "plugin carbon - handled assets ratio" msgstr "" -#: entrée standard:129 -msgid "Export" +#: src/Dashboard/Dashboard.php:68 +msgid "Carbon dioxyde intensity" msgstr "" -#: entrée standard:184 -msgid "All" +#: src/Location.php:189 +msgid "Carbon intensity source and zone" msgstr "" -#: entrée standard:310 +#: src/CarbonIntensity.php:87 +msgid "Emission date" +msgstr "排放数据" + +#: src/CarbonIntensity.php:114 +msgid "Intensity" +msgstr "强度" + +#: src/CarbonEmission.php:49 +msgid "Carbon Emission" +msgid_plural "Carbon Emissions" +msgstr[0] "碳排放" + +#: src/CarbonEmission.php:120 +msgid "Energy" +msgstr "能源" + +#: src/CarbonEmission.php:128 +msgid "Emission" +msgstr "排放" + +#: src/CarbonEmission.php:136 +msgid "Energy quality" +msgstr "能源质量" + +#: src/CarbonEmission.php:144 +msgid "Emission quality" +msgstr "排放质量" + +#: src/Toolbox.php:280 +msgid "W" +msgstr "W" + +#: src/Toolbox.php:281 +msgid "KW" +msgstr "KW" + +#: src/Toolbox.php:282 +msgid "MW" +msgstr "MW" + +#: src/Toolbox.php:283 +msgid "GW" +msgstr "GW" + +#: src/Toolbox.php:284 +msgid "TW" +msgstr "TW" + +#: src/Toolbox.php:285 +msgid "PW" +msgstr "PW" + +#: src/Toolbox.php:286 +msgid "EW" +msgstr "EW" + +#: src/Toolbox.php:287 +msgid "ZW" +msgstr "ZW" + +#: src/Toolbox.php:288 +msgid "YW" +msgstr "YW" + +#: src/Toolbox.php:315 +msgid "Wh" +msgstr "Wh" + +#: src/Toolbox.php:373 src/Toolbox.php:378 #, php-format -msgid "Show %s entries" +msgid "%1$s %2$s" msgstr "" -#: entrée standard:42 -msgid "Compared to last month" +#: setup.php:285 +msgid "Environmental Impact" +msgstr "环境影响" + +#: hook.php:97 +msgid "" +"Please check the logs for more details. Fill an issue in the repository of " +"the plugin." msgstr "" -#: entrée standard:35 -msgid "Want to know more ?" +#: hook.php:301 +msgid "Associate to an usage profile" msgstr "" -#: entrée standard:36 -msgid "Here is a video about the impact of numeric on the enviromnent." +#: hook.php:302 hook.php:307 +msgid "Delete all calculated environmental impacts" msgstr "" -#: entrée standard:33 -msgid "Carbon Emission per Month" +#: hook.php:311 hook.php:316 hook.php:320 +msgid "Update type power consumption" msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a network equipment " -"model is unknown" +#: hook.php:312 +msgid "Update category" +msgstr "更新分类" + +#: hook.php:324 +msgid "Update zone for Boavizta engine" msgstr "" -#: entrée standard:36 -msgid "" -"This power value is used as default when the power of a monitor model is " -"unknown" +#: hook.php:325 +msgid "Update carbon intensity source and zone" msgstr "" -#: entrée standard:36 -msgid "Usage information" +#: install/install/create_automatic_actions.php:52 +msgid "Find the Alpha3 country code (ISO3166) of locations" +msgstr "查找此地点的Alpha3国家代码(ISO3166)" + +#: install/install/create_automatic_actions.php:64 +msgid "Compute carbon emissions of computers" +msgstr "计算电脑的碳排放" + +#: install/install/create_automatic_actions.php:76 +msgid "Compute embodied impact of assets" msgstr "" -#: entrée standard:41 -msgid "Usage profile" -msgid_plural "Usage profiles" -msgstr[0] "" +#: install/install/create_uasge_profiles.php:41 +msgid "Always on" +msgstr "一直开启" + +#: install/install/create_uasge_profiles.php:52 +msgid "Office hours" +msgstr "办公时间" + +#: front/usageimpact.form.php:66 front/usageimpact.form.php:100 +#: front/embodiedimpact.form.php:63 front/embodiedimpact.form.php:86 +msgid "Missing arguments in request." +msgstr "请求缺少参数" + +#: front/usageimpact.form.php:80 front/usageimpact.form.php:106 +#: front/usageimpact.form.php:114 front/embodiedimpact.form.php:92 +msgid "Bad arguments." +msgstr "错误参数" + +#: front/usageimpact.form.php:90 front/embodiedimpact.form.php:68 +#: front/embodiedimpact.form.php:77 +msgid "Reset denied." +msgstr "重置被拒绝。" + +#: front/usageimpact.form.php:95 front/embodiedimpact.form.php:82 +msgid "Reset failed." +msgstr "重置失败。" + +#: front/usageimpact.form.php:122 +msgid "Missing data prevents historization of this asset." +msgstr "" + +#: front/usageimpact.form.php:125 +msgid "Update of global warming potential failed." +msgstr "更新全球暖化指数失败" + +#: front/usageimpact.form.php:131 front/embodiedimpact.form.php:101 +msgid "Unable to find calculation engine for this asset." +msgstr "" + +#: front/usageimpact.form.php:136 +msgid "Update of usage impact failed." +msgstr "" diff --git a/package-lock.json b/package-lock.json index 1cb6b224..ddc500ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "carbon", - "version": "1.0.0-beta.3", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "carbon", - "version": "1.0.0-beta.3", + "version": "1.2.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { @@ -25,49 +25,34 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "dev": true, "peer": true, "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "peer": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", - "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@csstools/css-parser-algorithms": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.6.3.tgz", - "integrity": "sha512-xI/tL2zxzEbESvnSxwFgwvy5HS00oCXxL4MLs6HUiDcYfwowsoQaABKxUElp1ARITrINzBnsECOc1q0eg2GOrA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz", + "integrity": "sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==", "dev": true, "funding": [ { @@ -84,13 +69,13 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@csstools/css-tokenizer": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.3.1.tgz", - "integrity": "sha512-iMNHTyxLbBlWIfGtabT157LH9DUx9X8+Y3oymFEuMj8HNc+rpE3dPFGFgHjpKfjeFDjLjYIAIhXPGvS2lKxL9g==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz", + "integrity": "sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==", "dev": true, "funding": [ { @@ -108,9 +93,9 @@ } }, "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.11.tgz", - "integrity": "sha512-uox5MVhvNHqitPP+SynrB1o8oPxPMt2JLgp5ghJOWf54WGQ5OKu47efne49r1SWqs3wRP8xSWjnO9MBKxhB1dA==", + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.13.tgz", + "integrity": "sha512-XaHr+16KRU9Gf8XLi3q8kDlI18d5vzKSKCY510Vrtc9iNR0NJzbY9hhTmwhzYZj/ZwGL4VmB3TA9hJW0Um2qFA==", "dev": true, "funding": [ { @@ -127,31 +112,8 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" - } - }, - "node_modules/@csstools/selector-specificity": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", - "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "peer": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^6.0.13" + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@discoveryjs/json-ext": { @@ -163,113 +125,23 @@ "node": ">=10.0.0" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", + "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==", "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=18" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -281,19 +153,10 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -301,15 +164,15 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -355,9 +218,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "dev": true, "dependencies": { "@types/estree": "*", @@ -375,9 +238,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true }, "node_modules/@types/json-schema": { @@ -394,12 +257,12 @@ "peer": true }, "node_modules/@types/node": { - "version": "20.12.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.10.tgz", - "integrity": "sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==", + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.19.0" } }, "node_modules/@types/normalize-package-data": { @@ -410,148 +273,148 @@ "peer": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -617,9 +480,9 @@ "integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==" }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -628,25 +491,28 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", "dev": true, + "engines": { + "node": ">=10.13.0" + }, "peerDependencies": { - "acorn": "^8" + "acorn": "^8.14.0" } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -670,35 +536,16 @@ } } }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" + "fast-deep-equal": "^3.1.3" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, "peerDependencies": { - "ajv": "^6.9.1" + "ajv": "^8.8.2" } }, "node_modules/ansi-regex": { @@ -706,27 +553,31 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "peer": true, "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "peer": true, "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/apexcharts": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.49.0.tgz", - "integrity": "sha512-2T9HnbQFLCuYRPndQLmh+bEQFoz0meUbvASaGgiSKDuYhWcLBodJtIpKql2aOtMx4B/sHrWW0dm90HsW4+h2PQ==", + "version": "3.54.1", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.54.1.tgz", + "integrity": "sha512-E4et0h/J1U3r3EwS/WlqJCQIbepKbp6wGUmaAwJOMjHUP4Ci0gxanLa7FR3okx6p9coi4st6J853/Cb1NP0vpA==", "dependencies": { "@yr/monotone-cubic-spline": "^1.0.3", "svg.draggable.js": "^2.2.2", @@ -775,11 +626,25 @@ } }, "node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "peer": true + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.17", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.17.tgz", + "integrity": "sha512-HdrkN8eVG2CXxeifv/VdJ4A4RSra1DTW8dc/hdxzhGHN8QePs6gKaWM9pHPcpCoxYZJuOZ8drHmbdpLHjCYjLA==", + "dev": true, + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } }, "node_modules/big.js": { "version": "5.2.2", @@ -791,42 +656,34 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" } }, - "node_modules/brace-expansion/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "peer": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "dev": true, "funding": [ { @@ -843,10 +700,11 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -904,9 +762,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001616", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz", - "integrity": "sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==", + "version": "1.0.30001787", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001787.tgz", + "integrity": "sha512-mNcrMN9KeI68u7muanUpEejSLghOKlVhRqS/Za2IeyGllJ9I9otGpR9g3nsw7n4W378TE/LyIteA0+/FOZm4Kg==", "dev": true, "funding": [ { @@ -923,48 +781,10 @@ } ] }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "dev": true, "engines": { "node": ">=6.0" @@ -984,20 +804,35 @@ "node": ">=6" } }, + "node_modules/clone-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "peer": true, "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "peer": true }, @@ -1025,7 +860,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, - "license": "MIT", "peer": true }, "node_modules/copy-webpack-plugin": { @@ -1033,7 +867,6 @@ "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-13.0.1.tgz", "integrity": "sha512-J+YV3WfhY6W/Xf9h+J1znYuqTye2xkBUIGyTPWuBAT27qajBa5mR4f8WBmfDY3YjRftT2kqZZiLi1qf0H+UOFw==", "dev": true, - "license": "MIT", "dependencies": { "glob-parent": "^6.0.1", "normalize-path": "^3.0.0", @@ -1052,76 +885,6 @@ "webpack": "^5.1.0" } }, - "node_modules/copy-webpack-plugin/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/copy-webpack-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/copy-webpack-plugin/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/copy-webpack-plugin/node_modules/schema-utils": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", - "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/cosmiconfig": { "version": "8.3.6", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", @@ -1154,7 +917,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1165,13 +927,13 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", - "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.3.3.tgz", + "integrity": "sha512-8HFEBPKhOpJPEPu70wJJetjKta86Gw9+CCyCnB3sui2qQfOvRyqBy4IKLKKAwdMpWb2lHXWk9Wb4Z6AmaUT1Pg==", "dev": true, "peer": true, "engines": { - "node": ">=12 || >=16" + "node": ">=12" } }, "node_modules/css-loader": { @@ -1236,13 +998,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "peer": true, "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1316,24 +1078,18 @@ "node": ">=8" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/electron-to-chromium": { - "version": "1.4.757", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.757.tgz", - "integrity": "sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw==", + "version": "1.5.334", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.334.tgz", + "integrity": "sha512-mgjZAz7Jyx1SRCwEpy9wefDS7GvNPazLthHg8eQMJ76wBdGQQDW33TCrUTvQ4wzpmOrv2zrFoD3oNufMdyMpog==", "dev": true }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "peer": true }, "node_modules/emojis-list": { "version": "3.0.0", @@ -1345,22 +1101,22 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "version": "5.20.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz", + "integrity": "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" + "tapable": "^2.3.0" }, "engines": { "node": ">=10.13.0" } }, "node_modules/envinfo": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", - "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.21.0.tgz", + "integrity": "sha512-Lw7I8Zp5YKHFCXL7+Dz95g4CcbMEpgvqZNNq3AmlT5XAV6CgAAk6gyAMqn2zjw08K9BHfcNuKrMiCPLByGafow==", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -1370,9 +1126,9 @@ } }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "peer": true, "dependencies": { @@ -1380,30 +1136,20 @@ } }, "node_modules/es-module-lexer": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.2.tgz", - "integrity": "sha512-l60ETUTmLqbVbVHv1J4/qj+M8nq7AwMzEcg3kmJDt9dCNrTk+yHcYFf/Kw75pMDwd9mPcIGCG5LcS20SxYRzFA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", + "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", "dev": true }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -1463,9 +1209,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "peer": true, "dependencies": { @@ -1473,12 +1219,25 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1499,8 +1258,7 @@ "type": "opencollective", "url": "https://opencollective.com/fastify" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -1512,9 +1270,9 @@ } }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", "dev": true, "peer": true, "dependencies": { @@ -1554,10 +1312,59 @@ "webpack": "^4.0.0 || ^5.0.0" } }, + "node_modules/file-loader/node_modules/ajv": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/file-loader/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/file-loader/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/file-loader/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "peer": true, "dependencies": { @@ -1568,16 +1375,20 @@ } }, "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "peer": true, "dependencies": { - "locate-path": "^5.0.0", + "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat": { @@ -1605,9 +1416,9 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "peer": true }, @@ -1616,7 +1427,6 @@ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, - "license": "ISC", "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" @@ -1633,7 +1443,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, - "license": "ISC", "peer": true }, "node_modules/function-bind": { @@ -1646,15 +1455,15 @@ } }, "node_modules/glob": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", - "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.3.1", "jackspeak": "^4.1.1", - "minimatch": "^10.0.3", + "minimatch": "^10.1.1", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -1670,16 +1479,15 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "peer": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/glob-to-regexp": { @@ -1807,6 +1615,19 @@ "node": ">=10" } }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/html-tags": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", @@ -1833,9 +1654,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "peer": true, "engines": { @@ -1843,9 +1664,9 @@ } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "peer": true, "dependencies": { @@ -1880,9 +1701,9 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -1927,7 +1748,6 @@ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "peer": true, "dependencies": { "once": "^1.3.0", @@ -1939,7 +1759,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, - "license": "ISC", "peer": true }, "node_modules/ini": { @@ -1966,12 +1785,15 @@ "peer": true }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1991,6 +1813,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -2028,13 +1851,11 @@ } }, "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -2055,13 +1876,12 @@ } }, "node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", + "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", "dev": true, - "license": "BlueOak-1.0.0", "dependencies": { - "@isaacs/cliui": "^8.0.2" + "@isaacs/cliui": "^9.0.0" }, "engines": { "node": "20 || >=22" @@ -2084,6 +1904,21 @@ "node": ">= 10.13.0" } }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2092,9 +1927,9 @@ "peer": true }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "peer": true, "dependencies": { @@ -2118,9 +1953,9 @@ "dev": true }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "node_modules/json5": { @@ -2169,12 +2004,16 @@ "peer": true }, "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", "dev": true, "engines": { "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/loader-utils": { @@ -2192,15 +2031,19 @@ } }, "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "peer": true, "dependencies": { - "p-locate": "^4.1.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash.truncate": { @@ -2211,16 +2054,12 @@ "peer": true }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.3.3.tgz", + "integrity": "sha512-JvNw9Y81y33E+BEYPr0U7omo+U9AySnsMsEiXgwT6yqd31VQWTLNQqmT4ou5eqPFUrTfIDFta2wKhB1hyohtAQ==", "dev": true, - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": "20 || >=22" } }, "node_modules/map-obj": { @@ -2298,13 +2137,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "peer": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -2332,20 +2171,10 @@ "node": ">= 0.6" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/mini-css-extract-plugin": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz", - "integrity": "sha512-Zs1YsZVfemekSZG+44vBsYTLQORkPMwnlv+aehcxK/NLKC+EGhDB39/YePYYqx/sTk6NnYpuqikhSn7+JIevTA==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.10.2.tgz", + "integrity": "sha512-AOSS0IdEB95ayVkxn5oGzNQwqAi2J0Jb/kKm43t7H73s8+f5873g0yuj0PNvK4dO75mu5DHg4nlgp4k6Kga8eg==", "dev": true, "dependencies": { "schema-utils": "^4.0.0", @@ -2362,70 +2191,16 @@ "webpack": "^5.0.0" } }, - "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/minimatch": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", - "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, - "license": "ISC", "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "brace-expansion": "^5.0.5" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2447,26 +2222,25 @@ } }, "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, - "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "peer": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -2488,9 +2262,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.37", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz", + "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==", "dev": true }, "node_modules/normalize-package-data": { @@ -2523,37 +2297,41 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "peer": true, "dependencies": { "wrappy": "1" } }, "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "peer": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "peer": true, "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-try": { @@ -2569,8 +2347,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" + "dev": true }, "node_modules/parent-module": { "version": "1.0.1", @@ -2618,7 +2395,6 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" @@ -2640,32 +2416,21 @@ "dev": true }, "node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, - "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", - "dev": true, - "license": "ISC", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2677,15 +2442,15 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "peer": true, "engines": { @@ -2707,10 +2472,62 @@ "node": ">=8" } }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz", + "integrity": "sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==", "dev": true, "funding": [ { @@ -2727,9 +2544,9 @@ } ], "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -2754,13 +2571,13 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", - "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", "dev": true, "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -2771,12 +2588,12 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", - "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -2801,9 +2618,9 @@ } }, "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", "dev": true }, "node_modules/postcss-safe-parser": { @@ -2850,9 +2667,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", - "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -2957,71 +2774,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "peer": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "peer": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/rechoir": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", @@ -3061,18 +2813,21 @@ } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "dev": true, "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3099,9 +2854,9 @@ } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "peer": true, "engines": { @@ -3113,6 +2868,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "peer": true, "dependencies": { @@ -3125,13 +2881,30 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "peer": true + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/rimraf/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, - "license": "ISC", "peer": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -3149,11 +2922,10 @@ } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, - "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -3207,14 +2979,15 @@ ] }, "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" }, "engines": { "node": ">= 10.13.0" @@ -3225,9 +2998,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -3318,42 +3091,6 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3364,9 +3101,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3412,9 +3149,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", "dev": true, "peer": true }, @@ -3423,22 +3160,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", + "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -3453,20 +3175,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3475,14 +3184,11 @@ } }, "node_modules/strip-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", - "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz", + "integrity": "sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA==", "dev": true, "peer": true, - "dependencies": { - "min-indent": "^1.0.1" - }, "engines": { "node": ">=12" }, @@ -3647,46 +3353,64 @@ "stylelint": "^14.5.1 || ^15.0.0" } }, - "node_modules/stylelint/node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "node_modules/stylelint-scss/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, - "peer": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/stylelint/node_modules/@csstools/selector-specificity": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "peer": true, "engines": { - "node": ">=10" + "node": "^14 || ^16 || >=18" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "peerDependencies": { + "postcss-selector-parser": "^6.0.13" } }, - "node_modules/supports-hyperlinks": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", - "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true, + "peer": true + }, + "node_modules/stylelint/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "peer": true, "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" }, "engines": { - "node": ">=14.18" + "node": ">=4" } }, - "node_modules/supports-hyperlinks/node_modules/supports-color": { + "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", @@ -3699,6 +3423,23 @@ "node": ">=8" } }, + "node_modules/supports-hyperlinks": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz", + "integrity": "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/chalk/supports-hyperlinks?sponsor=1" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -3802,9 +3543,9 @@ } }, "node_modules/table": { - "version": "6.8.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", - "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", "dev": true, "peer": true, "dependencies": { @@ -3818,47 +3559,27 @@ "node": ">=10.0.0" } }, - "node_modules/table/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "peer": true - }, "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.2.tgz", + "integrity": "sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==", "dev": true, "engines": { "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/terser": { - "version": "5.31.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", - "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.1.tgz", + "integrity": "sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", + "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -3870,16 +3591,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz", + "integrity": "sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", + "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" + "schema-utils": "^4.3.0", + "terser": "^5.31.1" }, "engines": { "node": ">= 10.13.0" @@ -3904,14 +3624,13 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, - "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -3925,7 +3644,6 @@ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12.0.0" }, @@ -3939,11 +3657,10 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -3991,15 +3708,15 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", "dev": true }, "node_modules/update-browserslist-db": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", - "integrity": "sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "dev": true, "funding": [ { @@ -4016,8 +3733,8 @@ } ], "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -4053,9 +3770,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz", + "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -4066,35 +3783,36 @@ } }, "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.21.10", + "version": "5.106.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.106.0.tgz", + "integrity": "sha512-Pkx5joZ9RrdgO5LBkyX1L2ZAJeK/Taz3vqZ9CbcP0wS5LEMx5QkKsEwLl29QJfihZ+DKRBFldzy1O30pJ1MDpA==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.16.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", - "es-module-lexer": "^1.2.1", + "enhanced-resolve": "^5.20.0", + "es-module-lexer": "^2.0.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", + "loader-runner": "^4.3.1", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.3.17", + "watchpack": "^2.5.1", + "webpack-sources": "^3.3.4" }, "bin": { "webpack": "bin/webpack.js" @@ -4181,9 +3899,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.4.tgz", + "integrity": "sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==", "dev": true, "engines": { "node": ">=10.13.0" @@ -4210,152 +3928,11 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, - "license": "ISC", "peer": true }, "node_modules/write-file-atomic": { diff --git a/package.json b/package.json index 92f8e1fe..eb568d46 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "carbon", "description": "Measurement of carbon emissions of GLPI devices", "license": "GPL-3.0-or-later", - "version": "1.1.1", + "version": "1.2.0", "dependencies": { "apexcharts": "^3.49.0" }, diff --git a/phpunit.xml b/phpunit.xml index 6de88c45..b526f321 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,9 +7,11 @@ displayDetailsOnTestsThatTriggerNotices="true" displayDetailsOnTestsThatTriggerWarnings="true" displayDetailsOnPhpunitDeprecations="true" + processIsolation="true" backupGlobals="false" colors="true" - stderr="true"> + stderr="true" + requireCoverageMetadata="true"> src @@ -42,5 +44,8 @@ ./tests/upgrade/ + + ./tests/migration/ + diff --git a/plugin.xml b/plugin.xml index b4171775..4191b7a6 100644 --- a/plugin.xml +++ b/plugin.xml @@ -17,7 +17,7 @@ Carbon est un plugin permettant d'évaluer l'impact environnemental de votre inf - https://github.com/pluginsGLPI/carbon/ + https://pluginsglpi.github.io/carbon/ https://github.com/pluginsGLPI/carbon/releases https://github.com/pluginsGLPI/carbon/issues https://help.glpi-project.org/doc-plugins/carbon @@ -31,9 +31,29 @@ Carbon est un plugin permettant d'évaluer l'impact environnemental de votre inf https://github.com/pluginsGLPI/carbon/releases/download/1.2.0/glpi-carbon-1.2.0.tar.bz2 - 1.0.1 + 1.2.0-beta.2 + ~11.0 + https://github.com/pluginsGLPI/carbon/releases/download/1.2.0-beta.2/glpi-carbon-1.2.0-beta.2.tar.bz2 + + + 1.2.0-beta.1 + ~11.0 + https://github.com/pluginsGLPI/carbon/releases/download/1.2.0-beta.1/glpi-carbon-1.2.0-beta.1.tar.bz2 + + + 1.1.1 + ~11.0 + https://github.com/pluginsGLPI/carbon/releases/download/1.1.1/glpi-carbon-1.1.1.tar.bz2 + + + 1.1.0 + ~11.0 + https://github.com/pluginsGLPI/carbon/releases/download/1.1.0/glpi-carbon-1.1.0.tar.bz2 + + + 1.0.0 ~10.0.18 - https://github.com/pluginsGLPI/carbon/releases/download/1.0.1/glpi-carbon-1.0.1.tar.bz2 + https://github.com/pluginsGLPI/carbon/releases/download/1.0.0/glpi-carbon-1.0.0.tar.bz2 diff --git a/rector.php b/rector.php index 5c4c3656..69b3bb42 100644 --- a/rector.php +++ b/rector.php @@ -36,6 +36,8 @@ use Rector\DeadCode\Rector as DeadCode; use Rector\ValueObject\PhpVersion; +require_once __DIR__ . '/../../src/Plugin.php'; + return RectorConfig::configure() ->withPaths([ __DIR__ . '/ajax', @@ -45,13 +47,21 @@ __DIR__ . '/src', __DIR__ . '/tools', ]) + ->withSkipPath(__DIR__ . '/vendor') ->withPhpVersion(PhpVersion::PHP_82) ->withCache( sys_get_temp_dir() . '/rector', FileCacheStorage::class ) ->withParallel(300) + ->withRootFiles() + ->withImportNames(removeUnusedImports: true) // FIXME apply it in another PR, it generates a huge diff ->withImportNames() + // ->withPreparedSets( + // deadCode: true, + // codeQuality: true, + // codingStyle: true, + // ) ->withRules([ CodeQuality\Assign\CombinedAssignRector::class, CodeQuality\BooleanAnd\RemoveUselessIsObjectCheckRector::class, diff --git a/setup.php b/setup.php index 29673040..3a3614fe 100644 --- a/setup.php +++ b/setup.php @@ -31,27 +31,37 @@ */ use Config as GlpiConfig; -use GlpiPlugin\Carbon\Dashboard\Widget; +use CronTask as GlpiCronTask; use Glpi\Plugin\Hooks; use GlpiPlugin\Carbon\Config; -use GlpiPlugin\Carbon\UsageInfo; +use GlpiPlugin\Carbon\CronTask; +use GlpiPlugin\Carbon\Dashboard\Grid; +use GlpiPlugin\Carbon\Dashboard\Widget; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientFactory as CarbonIntensityClientFactory; +use GlpiPlugin\Carbon\DataSource\Lca\ClientFactory as LcaClientFactory; +use GlpiPlugin\Carbon\Location; use GlpiPlugin\Carbon\Profile; use GlpiPlugin\Carbon\Report; +use GlpiPlugin\Carbon\UsageInfo; use Location as GlpiLocation; use Profile as GlpiProfile; -use GlpiPlugin\Carbon\Dashboard\Grid; -define('PLUGIN_CARBON_VERSION', '1.1.1'); -define('PLUGIN_CARBON_SCHEMA_VERSION', '1.1.0'); +// Version of the plugin (major.minor.bugfix) +define('PLUGIN_CARBON_VERSION', '1.2.0'); +// Schema version of this version (major.minor.bugfix) +define('PLUGIN_CARBON_SCHEMA_VERSION', '1.2.0'); // Minimal GLPI version, inclusive -define("PLUGIN_CARBON_MIN_GLPI_VERSION", "11.0.0-beta"); +define("PLUGIN_CARBON_MIN_GLPI_VERSION", '11.0.0'); // Maximum GLPI version, exclusive -define("PLUGIN_CARBON_MAX_GLPI_VERSION", "12.0.0"); +define("PLUGIN_CARBON_MAX_GLPI_VERSION", '12.0.0'); define('PLUGIN_CARBON_DECIMALS', 3); // Plugin compatible itemtypes +/** + * @var array> $PLUGIN_CARBON_TYPES + */ define('PLUGIN_CARBON_TYPES', [ Computer::class, Monitor::class, @@ -88,9 +98,10 @@ function plugin_carbon_setupHooks() global $PLUGIN_HOOKS; // Secured config - $PLUGIN_HOOKS[Hooks::SECURED_CONFIGS]['carbon'] = [ - 'electricitymap_api_key', - ]; + $PLUGIN_HOOKS[Hooks::SECURED_CONFIGS]['carbon'] = array_merge( + CarbonIntensityClientFactory::getSecuredConfigs(), + LcaClientFactory::getSecuredConfigs() + ); // add new cards to the dashboard $PLUGIN_HOOKS[Hooks::DASHBOARD_CARDS]['carbon'] = [Grid::class, 'getDashboardCards']; @@ -113,7 +124,7 @@ function plugin_carbon_setupHooks() // asset's type $PLUGIN_HOOKS[Hooks::PRE_ITEM_PURGE]['carbon'][$itemtype . 'Type'] = 'plugin_carbon_hook_pre_purge_assettype'; } - $PLUGIN_HOOKS[Hooks::POST_ITEM_FORM]['carbon'] = 'plugin_carbon_postItemForm'; + // $PLUGIN_HOOKS[Hooks::POST_ITEM_FORM]['carbon'] = 'plugin_carbon_postItemForm'; // Actions taken on locations events $PLUGIN_HOOKS[Hooks::ITEM_ADD]['carbon'][GlpiLocation::class] = 'plugin_carbon_locationAdd'; @@ -125,6 +136,7 @@ function plugin_carbon_setupHooks() $PLUGIN_HOOKS[Hooks::PRE_ITEM_ADD]['carbon'][GlpiProfile::class] = 'plugin_carbon_profileAdd'; $PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT]['carbon'][] = 'lib/apexcharts.js'; + $PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT]['carbon'][] = 'lib/carbon.js'; // Import CSS $PLUGIN_HOOKS[Hooks::ADD_CSS]['carbon'][] = 'lib/carbon.css'; @@ -138,12 +150,19 @@ function plugin_carbon_registerClasses() { Plugin::registerClass(Config::class, ['addtabon' => GlpiConfig::class]); Plugin::registerClass(Profile::class, ['addtabon' => GlpiProfile::class]); + Plugin::registerClass(Location::class, ['addtabon' => GlpiLocation::class]); + Plugin::registerClass(CronTask::class, ['addtabon' => GlpiCronTask::class]); foreach (PLUGIN_CARBON_TYPES as $itemtype) { - $item_type_class = 'GlpiPlugin\\Carbon\\' . $itemtype . 'Type'; $core_type_class = $itemtype . 'Type'; + $item_type_class = 'GlpiPlugin\\Carbon\\' . $core_type_class; Plugin::registerClass($item_type_class, ['addtabon' => $core_type_class]); + Plugin::registerClass(UsageInfo::class, ['addtabon' => $itemtype]); + + $core_model_class = $itemtype . 'Model'; + $item_model_class = 'GlpiPlugin\\Carbon\\' . $core_model_class; + Plugin::registerClass($item_model_class, ['addtabon' => $core_model_class]); } } @@ -164,8 +183,8 @@ function plugin_version_carbon() 'requirements' => [ 'glpi' => [ 'min' => PLUGIN_CARBON_MIN_GLPI_VERSION, - ] - ] + ], + ], ]; $dev_version = strpos(PLUGIN_CARBON_VERSION, '-dev') !== false; @@ -179,7 +198,7 @@ function plugin_version_carbon() /** * Check plugin's prerequisites before installation * - * @return boolean + * @return bool */ function plugin_carbon_check_prerequisites() { @@ -199,6 +218,11 @@ function plugin_carbon_check_prerequisites() $prerequisitesSuccess = false; } + if ($DB->use_timezones !== true) { + echo "Enable timezones support
"; + $prerequisitesSuccess = false; + } + if (getenv('CI') === false) { // only when not under test $version_string = $DB->getVersion(); @@ -227,7 +251,7 @@ function plugin_carbon_check_prerequisites() */ function plugin_carbon_getSchemaPath(?string $version = null): ?string { - $version = $version ?? PLUGIN_CARBON_VERSION; + $version ??= PLUGIN_CARBON_VERSION; // Drop suffixes for alpha, beta, rc versions $matches = []; diff --git a/src/AbstractImpact.php b/src/AbstractImpact.php new file mode 100644 index 00000000..dbfc89f4 --- /dev/null +++ b/src/AbstractImpact.php @@ -0,0 +1,238 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon; + +use CommonDBChild; +use CommonDBTM; +use DBmysql; +use DBmysqlIterator; +use GlpiPlugin\Carbon\Impact\Type; +use LogicException; +use Toolbox as GlpiToolbox; + +abstract class AbstractImpact extends CommonDBChild +{ + public static $itemtype = 'itemtype'; + public static $items_id = 'items_id'; + + public static $rightname = 'carbon:report'; + + public function canEdit($ID): bool + { + return false; + } + + public function rawSearchOptions() + { + $tab = parent::rawSearchOptions(); + + $tab[] = [ + 'id' => '2', + 'table' => $this->getTable(), + 'field' => 'id', + 'name' => __('ID'), + 'massiveaction' => false, // implicit field is id + 'datatype' => 'number', + ]; + + $tab[] = [ + 'id' => '3', + 'table' => $this->getTable(), + 'field' => 'items_id', + 'name' => __('Associated item ID'), + 'massiveaction' => false, + 'datatype' => 'specific', + 'additionalfields' => ['itemtype'], + ]; + + $tab[] = [ + 'id' => '4', + 'table' => $this->getTable(), + 'field' => 'itemtype', + 'name' => _n('Type', 'Types', 1), + 'massiveaction' => false, + 'datatype' => 'itemtypename', + ]; + + $tab[] = [ + 'id' => '5', + 'table' => $this->getTable(), + 'field' => 'recalculate', + 'name' => __('', 'carbon'), + 'massiveaction' => false, + 'datatype' => 'bool', + ]; + + $id = SearchOptions::IMPACT_BASE; + foreach (Type::getImpactTypes() as $type_id => $type) { + $id = SearchOptions::IMPACT_BASE + $type_id * 2; + $tab[] = [ + 'id' => $id, + 'table' => $this->getTable(), + 'field' => $type, + 'name' => Type::getEmbodiedImpactLabel($type), + 'massiveaction' => false, + 'datatype' => 'decimal', + 'unit' => implode(' ', Type::getImpactUnit($type)), + ]; + $id++; + + $tab[] = [ + 'id' => $id, + 'table' => $this->getTable(), + 'field' => "{$type}_quality", + 'name' => Type::getEmbodiedImpactLabel($type), + 'massiveaction' => false, + 'datatype' => 'number', + 'unit' => implode(' ', Type::getImpactUnit($type)), + ]; + } + + $tab[] = [ + 'id' => SearchOptions::CALCULATION_DATE, + 'table' => self::getTable(), + 'field' => 'date_mod', + 'name' => __('Date of evaluation', 'carbon'), + ]; + + $tab[] = [ + 'id' => SearchOptions::CALCULATION_ENGINE, + 'table' => self::getTable(), + 'field' => 'engine', + 'name' => __('Engine', 'carbon'), + ]; + + $tab[] = [ + 'id' => SearchOptions::CALCULATION_ENGINE_VERSION, + 'table' => self::getTable(), + 'field' => 'engine_version', + 'name' => __('Engine version', 'carbon'), + ]; + + return $tab; + } + + /** + * Get iterator of items without known embodied impact for a specified itemtype + * + * @template T of CommonDBTM + * @param class-string $itemtype + * @param array $crit Criteria array of WHERE, ORDER, GROUP BY, LEFT JOIN, INNER JOIN, RIGHT JOIN, HAVING, LIMIT + * @return DBmysqlIterator + */ + public static function getItemsToEvaluate(string $itemtype, array $crit = []): DBmysqlIterator + { + /** @var DBmysql $DB */ + global $DB; + + // Check $itemtype inherits from CommonDBTM + if (!GlpiToolbox::isCommonDBTM($itemtype)) { + throw new LogicException('itemtype is not a CommonDBTM object'); + } + + // clean $crit array: remove mostly SELECT, FROM + $crit = array_intersect_key($crit, array_flip([ + 'WHERE', + 'ORDER', + 'GROUP BY', + 'LEFT JOIN', + 'INNER JOIN', + 'RIGHT JOIN', + 'HAVING', + 'LIMIT', + ])); + + $table = self::getTable(); + $glpi_item_type_table = getTableForItemType($itemtype . 'Type'); + $glpi_item_type_fk = getForeignKeyFieldForTable($glpi_item_type_table); + $item_type_table = getTableForItemType('GlpiPlugin\\Carbon\\' . $itemtype . 'Type'); + $item_table = $itemtype::getTable(); + + $iterator = $DB->request(array_merge_recursive([ + 'SELECT' => [ + $itemtype::getTableField('id'), + ], + 'FROM' => $item_table, + 'LEFT JOIN' => [ + $table => [ + 'FKEY' => [ + $table => 'items_id', + $item_table => 'id', + + ], + 'AND' => [ + 'itemtype' => $itemtype, + ], + ], + $item_type_table => [ + [ + 'FKEY' => [ + $item_type_table => $glpi_item_type_fk, + $item_table => $glpi_item_type_fk, + ], + ], + ], + ], + 'WHERE' => [ + [ + // No calculated data or data to recalculate + 'OR' => [ + self::getTableField('items_id') => null, + self::getTableField('recalculate') => 1, + ], + ], [ + // Item not marked to exclude from calculation + 'OR' => [ + $item_type_table . '.is_ignore' => 0, + $item_type_table . '.id' => null, + ], + ], + ], + ], $crit)); + + return $iterator; + } + + /** + * Get impact value in a human r eadable format, selecting the best unit + * + * @param string $field the field of the impact + */ + public function getHumanReadableImpact(string $field): string + { + return Toolbox::getHumanReadableValue( + $this->fields[$field], + Type::getImpactUnit($field) + ); + } +} diff --git a/src/AbstractModel.php b/src/AbstractModel.php new file mode 100644 index 00000000..54d0adc4 --- /dev/null +++ b/src/AbstractModel.php @@ -0,0 +1,206 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon; + +use CommonDBChild; +use CommonDBTM; +use CommonGLPI; +use Glpi\Application\View\TemplateRenderer; +use GlpiPlugin\Carbon\DataTracking\TrackedInt; +use GlpiPlugin\Carbon\Impact\Type; +use Session; + +class AbstractModel extends CommonDBChild +{ + public static $rightname = 'dropdown'; + + public static function getIcon(): string + { + return 'fa-solid fa-solar-panel'; + } + + public static function getTypeName($nb = 0) + { + return __('Environmental impact', 'carbon'); + } + + public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) + { + $tabName = ''; + if (!$withtemplate) { + if ($item->getType() == static::$itemtype) { + return self::createTabEntry(__('Carbon', 'carbon'), 0); + } + } + return $tabName; + } + + /** + * Undocumented function + * + * @param CommonGLPI $item + * @param int $tabnum + * @param int $withtemplate + * @return void + */ + public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) + { + /** @var CommonDBTM $item */ + if ($item->getType() !== static::$itemtype) { + return; + } + + $model = new static(); + $model->getOrCreate($item); + $model->showForItemType($model->getID()); + } + + public function prepareInputForUpdate($input) + { + $keys = Type::getImpactTypes(); + foreach ($keys as $key) { + $source_key = $key . '_source'; + $input[$source_key] = trim($input[$source_key] ?? ''); + } + + return parent::prepareInputForUpdate($input); + } + + /** + * Get the type for the item, creating it if it doesn't exist. + * + * @param CommonGLPI $item + * @return bool + */ + protected function getOrCreate(CommonGLPI $item): bool + { + /** @var CommonDBTM $item */ + $item_fk = $item->getForeignKeyField(); + $this->getFromDBByCrit([$item_fk => $item->getID()]); + if ($this->isNewItem()) { + $input = [ + $item_fk => $item->getID(), + ]; + $types = Type::getImpactTypes(); + foreach ($types as $type) { + $input[$type . '_quality'] = TrackedInt::DATA_QUALITY_UNSET_VALUE; + } + $this->add($input); + } + return $this->isNewItem(); + } + + public function showForItemType($ID, $withtemplate = '') + { + // TODO: Design a rights system for the whole plugin + $canedit = Session::haveRight(Config::$rightname, UPDATE); + + $options = [ + 'candel' => false, + 'can_edit' => $canedit, + ]; + $this->initForm($this->getID(), $options); + + $criteria = []; + foreach (Type::getImpactTypes() as $type_id => $type) { + $unit = '(' . str_replace(' ', ' ', implode(' ', Type::getImpactUnit($type))) . ')'; + + $criteria[$type] = [ + 'title' => Type::getEmbodiedImpactLabel($type), + 'label' => Type::getEmbodiedImpactLabel($type), + 'icon' => Type::getCriteriaIcon($type), + 'unit' => $unit, + ]; + } + + $template = strtolower(basename(str_replace('\\', '/', static::class))) . '.html.twig'; + TemplateRenderer::getInstance()->display('@carbon/' . $template, [ + 'params' => $options, + 'item' => $this, + 'criterias' => $criteria, + ]); + } + + public function rawSearchOptions() + { + $tab = parent::rawSearchOptions(); + $table = $this->getTable(); + + $tab[] = [ + 'id' => '2', + 'table' => $table, + 'field' => 'id', + 'name' => __('ID'), + 'massiveaction' => false, // implicit field is id + 'datatype' => 'number', + ]; + + $id = SearchOptions::IMPACT_BASE; + foreach (Type::getImpactTypes() as $type_id => $type) { + $id = SearchOptions::IMPACT_BASE + $type_id * 3; + $tab[] = [ + 'id' => $id, + 'table' => $table, + 'field' => $type, + 'name' => Type::getEmbodiedImpactLabel($type), + 'massiveaction' => false, + 'datatype' => 'decimal', + 'unit' => implode(' ', Type::getImpactUnit($type)), + ]; + $id++; + + $tab[] = [ + 'id' => $id, + 'table' => $this->getTable(), + 'field' => "{$type}_source", + 'name' => __('Source', 'carbon'), + 'massiveaction' => false, + 'datatype' => 'string', + 'unit' => implode(' ', Type::getImpactUnit($type)), + ]; + $id++; + + $tab[] = [ + 'id' => $id, + 'table' => $this->getTable(), + 'field' => "{$type}_quality", + 'name' => __('Quality', 'carbon'), + 'massiveaction' => false, + 'datatype' => 'int', + 'unit' => implode(' ', Type::getImpactUnit($type)), + ]; + } + + return $tab; + } +} diff --git a/src/AbstractType.php b/src/AbstractType.php index 06f09522..d82395a9 100644 --- a/src/AbstractType.php +++ b/src/AbstractType.php @@ -35,14 +35,13 @@ use CommonDBChild; use CommonDBTM; use CommonGLPI; -use Session; use Glpi\Application\View\TemplateRenderer; +use Session; abstract class AbstractType extends CommonDBChild { public static $rightname = 'dropdown'; - public static function getIcon(): string { return 'fa-solid fa-solar-panel'; @@ -53,7 +52,7 @@ public static function getIcon(): string */ public static function getTypeName($nb = 0) { - return _n("Power", "Powers", $nb, 'carbon'); + return __('Environmental impact', 'carbon'); } public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) @@ -71,8 +70,8 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) * Undocumented function * * @param CommonGLPI $item - * @param integer $tabnum - * @param integer $withtemplate + * @param int $tabnum + * @param int $withtemplate * @return void */ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) @@ -91,7 +90,7 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $ * Get the type for the item, creating it if it doesn't exist. * * @param CommonGLPI $item - * @return bool + * @return bool true if type object has been found or created */ protected function getOrCreate(CommonGLPI $item): bool { @@ -100,7 +99,7 @@ protected function getOrCreate(CommonGLPI $item): bool $this->getFromDBByCrit([$item_fk => $item->getID()]); if ($this->isNewItem()) { $this->add([ - $item_fk => $item->getID() + $item_fk => $item->getID(), ]); } return $this->isNewItem(); diff --git a/src/CarbonEmission.php b/src/CarbonEmission.php index 6c18544f..1bf70fac 100644 --- a/src/CarbonEmission.php +++ b/src/CarbonEmission.php @@ -33,8 +33,10 @@ namespace GlpiPlugin\Carbon; use CommonDBChild; +use CommonDBTM; use DateInterval; use DateTimeInterface; +use DBmysql; use Entity; use Location; @@ -67,7 +69,7 @@ public function rawSearchOptions() 'field' => 'id', 'name' => __('ID'), 'massiveaction' => false, // implicit field is id - 'datatype' => 'number' + 'datatype' => 'number', ]; $tab[] = [ @@ -77,7 +79,7 @@ public function rawSearchOptions() 'name' => __('Associated item ID'), 'massiveaction' => false, 'datatype' => 'specific', - 'additionalfields' => ['itemtype'] + 'additionalfields' => ['itemtype'], ]; $tab[] = [ @@ -93,7 +95,7 @@ public function rawSearchOptions() 'id' => '5', 'table' => self::getTable(), 'field' => 'entities_id', - 'name' => Entity::getTypeName(1) + 'name' => Entity::getTypeName(1), ]; $tab[] = [ @@ -109,7 +111,7 @@ public function rawSearchOptions() 'id' => SearchOptions::CARBON_EMISSION_DATE, 'table' => self::getTable(), 'field' => 'date', - 'name' => __('Date') + 'name' => __('Date'), ]; $tab[] = [ @@ -132,7 +134,7 @@ public function rawSearchOptions() 'id' => SearchOptions::CARBON_EMISSION_ENERGY_QUALITY, 'table' => self::getTable(), 'field' => 'energy_quality', - 'name' => __('Energy quality', 'carbon') + 'name' => __('Energy quality', 'carbon'), ]; @@ -140,28 +142,28 @@ public function rawSearchOptions() 'id' => SearchOptions::CARBON_EMISSION_EMISSION_QUALITY, 'table' => self::getTable(), 'field' => 'emission_quality', - 'name' => __('Emission quality', 'carbon') + 'name' => __('Emission quality', 'carbon'), ]; $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_CALC_DATE, + 'id' => SearchOptions::CALCULATION_DATE, 'table' => self::getTable(), 'field' => 'date_mod', - 'name' => __('Date of evaluation', 'carbon') + 'name' => __('Date of evaluation', 'carbon'), ]; $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_ENGINE, + 'id' => SearchOptions::CALCULATION_ENGINE, 'table' => self::getTable(), 'field' => 'engine', - 'name' => __('Engine', 'carbon') + 'name' => __('Engine', 'carbon'), ]; $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_ENGINE_VER, + 'id' => SearchOptions::CALCULATION_ENGINE_VERSION, 'table' => self::getTable(), 'field' => 'engine_version', - 'name' => __('Engine version', 'carbon') + 'name' => __('Engine version', 'carbon'), ]; return $tab; @@ -172,7 +174,9 @@ public function rawSearchOptions() * Gaps are returned as an array of start and end * where start is the 1st msising date and end is the last missing date * - * @param integer $id + * @template T of CommonDBTM + * @param class-string $itemtype + * @param int $id * @param DateTimeInterface|null $start * @param DateTimeInterface|null $stop * @return array @@ -186,4 +190,22 @@ public function findGaps(string $itemtype, int $id, ?DateTimeInterface $start, ? $interval = new DateInterval('P1D'); return Toolbox::findTemporalGapsInTable(self::getTable(), $start, $interval, $stop, $criteria); } + + public static function getTotalUsageEmissionForItem(CommonDBTM $item): ?float + { + /** @var DBmysql $DB */ + global $DB; + + $result = $DB->request([ + 'SELECT' => ['SUM' => 'emission_per_day as total_emissions'], + 'FROM' => self::getTable(), + 'WHERE' => [ + 'itemtype' => $item->getType(), + 'items_id' => $item->getID(), + ], + ]); + /** @var ?array $row */ + $row = $result->current(); + return $row['total_emissions'] ?? null; + } } diff --git a/src/CarbonIntensity.php b/src/CarbonIntensity.php index 34cac9f7..8d7a8e35 100644 --- a/src/CarbonIntensity.php +++ b/src/CarbonIntensity.php @@ -33,15 +33,14 @@ namespace GlpiPlugin\Carbon; use CommonDropdown; -use DateTime; use DateInterval; +use DateTime; use DateTimeImmutable; use DateTimeInterface; use DBmysql; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\Zone; -use GlpiPlugin\Carbon\DataSource\CarbonIntensityInterface; +use Exception; use Glpi\DBAL\QueryParam; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientInterface; use Symfony\Component\Console\Helper\ProgressBar; /** @@ -92,9 +91,9 @@ public function rawSearchOptions() $tab[] = [ 'id' => SearchOptions::CARBON_INTENSITY_SOURCE, - 'table' => CarbonIntensitySource::getTable(), + 'table' => Source::getTable(), 'field' => 'name', - 'name' => CarbonIntensitySource::getTypeName(1), + 'name' => Source::getTypeName(1), 'massiveaction' => false, // implicit field is id 'datatype' => 'dropdown', ]; @@ -115,7 +114,7 @@ public function rawSearchOptions() 'name' => __('Intensity', 'carbon'), 'massiveaction' => false, // implicit field is id 'datatype' => 'decimal', - 'unit' => 'gCO2eq/KWh', + 'unit' => 'gCO₂eq/KWh', ]; return $tab; @@ -124,35 +123,36 @@ public function rawSearchOptions() /** * get carbon intensity dates for a source and a zone * - * @param string $zone_name Zone to examinate - * @param string $source_name Source to examinate + * @param Source_Zone $source_zone Source_Zone to examinate * @return array */ - private function getKnownDatesQuery(string $zone_name, string $source_name) + private function getKnownDatesQuery(Source_Zone $source_zone) { $intensity_table = CarbonIntensity::getTable(); - $source_table = CarbonIntensitySource::getTable(); + $source_table = Source::getTable(); $zone_table = Zone::getTable(); + $source_fk = getForeignKeyFieldForItemType(Source::class); + $zone_fk = getForeignKeyFieldForItemType(Zone::class); return [ 'SELECT' => [$intensity_table => ['id', 'date']], 'FROM' => $intensity_table, 'INNER JOIN' => [ $source_table => [ 'FKEY' => [ - $intensity_table => CarbonIntensitySource::getForeignKeyField(), + $intensity_table => Source::getForeignKeyField(), $source_table => 'id', - ] + ], ], $zone_table => [ 'FKEY' => [ $intensity_table => Zone::getForeignKeyField(), $zone_table => 'id', - ] - ] + ], + ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('name') => $source_name, - Zone::getTableField('name') => $zone_name + $source_fk => $source_zone->fields[$source_fk], + $zone_fk => $source_zone->fields[$zone_fk], ], ]; } @@ -160,16 +160,15 @@ private function getKnownDatesQuery(string $zone_name, string $source_name) /** * Get the last known date of carbon emissiosn * - * @param string $zone_name Zone to examinate - * @param string $source_name Source to examinate + * @param Source_Zone $source_zone Source_Zone to examinate * @return DateTimeImmutable */ - public function getLastKnownDate(string $zone_name, string $source_name): ?DateTimeImmutable + public function getLastKnownDate(Source_Zone $source_zone): ?DateTimeImmutable { /** @var DBmysql $DB */ global $DB; - $request = $this->getKnownDatesQuery($zone_name, $source_name); + $request = $this->getKnownDatesQuery($source_zone); $request['ORDER'] = CarbonIntensity::getTableField('date') . ' DESC'; $request['LIMIT'] = '1'; $result = $DB->request($request)->current(); @@ -182,16 +181,15 @@ public function getLastKnownDate(string $zone_name, string $source_name): ?DateT /** * Get the first known date of carbon emissiosn * - * @param string $zone_name Zone to examinate - * @param string $source_name Source to examinate + * @param Source_Zone $source_zone * @return DateTimeImmutable */ - public function getFirstKnownDate(string $zone_name, string $source_name): ?DateTimeImmutable + public function getFirstKnownDate(Source_Zone $source_zone): ?DateTimeImmutable { /** @var DBmysql $DB */ global $DB; - $request = $this->getKnownDatesQuery($zone_name, $source_name); + $request = $this->getKnownDatesQuery($source_zone); $request['ORDER'] = CarbonIntensity::getTableField('date') . ' ASC'; $request['LIMIT'] = '1'; $result = $DB->request($request)->current(); @@ -205,30 +203,28 @@ public function getFirstKnownDate(string $zone_name, string $source_name): ?Date /** * Download data for a single zone * - * @param CarbonIntensityInterface $data_source - * @param string $zone_name zone name - * @param integer $limit maximum count of items to process + * @param ClientInterface $data_source + * @param Source_Zone $source_zone + * @param int $limit maximum count of items to process * @param ProgressBar $progress_bar progress bar to update (CLI mode only) - * @return integer count of item downloaded + * @return int count of item downloaded */ - public function downloadOneZone(CarbonIntensityInterface $data_source, string $zone_name, int $limit = 0, ?ProgressBar $progress_bar = null): int + public function downloadOneZone(ClientInterface $data_source, Source_Zone $source_zone, int $limit = 0, ?ProgressBar $progress_bar = null): int { - $start_date = $this->getDownloadStartDate($zone_name, $data_source); + $start_date = max($this->getDownloadStartDate(), $data_source->getHardStartDate()); $total_count = 0; // Check if there are gaps to fill - $source = new CarbonIntensitySource(); - $source->getFromDBByCrit(['name' => $data_source->getSourceName()]); - $zone = new Zone(); - $zone->getFromDBByCrit(['name' => $zone_name]); - $gaps = $this->findGaps($source->getID(), $zone->getID(), $start_date); + $gaps = $this->findGaps($source_zone, $start_date); if (count($gaps) === 0) { // Log a notice specifying the source and the zone + $zone = new Zone(); + $zone->getFromDBByCrit(['id' => $source_zone->fields[Zone::getForeignKeyField()]]); trigger_error(sprintf( "No gap to fill for source %s and zone %s between %s and %s", $data_source->getSourceName(), - $zone_name, + $zone->fields['name'], $start_date->format('Y-m-d'), 'now' ), E_USER_WARNING); @@ -249,41 +245,22 @@ public function downloadOneZone(CarbonIntensityInterface $data_source, string $z foreach ($gaps as $gap) { $gap_start = DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $gap['start']); $gap_end = DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $gap['end']); - $count = $data_source->fullDownload($zone_name, $gap_start, $gap_end, $this, $limit, $progress_bar); + $count = $data_source->fullDownload($source_zone, $gap_start, $gap_end, $this, $limit, $progress_bar); $total_count += $count; if ($total_count >= $limit) { return $total_count; } } - $first_known_intensity_date = $this->getFirstKnownDate($zone_name, $data_source->getSourceName()); - $incremental = false; - if ($first_known_intensity_date !== null) { - $incremental = ($start_date >= $first_known_intensity_date); - } - if ($first_known_intensity_date !== null && $first_known_intensity_date <= $data_source->getHardStartDate()) { - // Cannot download older data than absolute start date of the source, then switch to incremetal mode - $incremental = true; - } - if ($incremental) { - $start_date = max($data_source->getMaxIncrementalAge(), $this->getLastKnownDate($zone_name, $data_source->getSourceName())); - $start_date = $start_date->add(new DateInterval('PT1H')); - $count = $data_source->incrementalDownload($zone_name, $start_date, $this, $limit); - $total_count += $count; - return $total_count; - } - return $total_count; } /** * Get the oldest date where data are required * - * @param string $zone_name ignored for now; zone to examine - * @param CarbonIntensityInterface $data_source ignored for now; data source * @return DateTimeImmutable|null */ - public function getDownloadStartDate(string $zone_name, CarbonIntensityInterface $data_source): ?DateTimeImmutable + public function getDownloadStartDate(): ?DateTimeImmutable { // Get the default oldest date od data to download $start_date = new DateTime(self::MIN_HISTORY_LENGTH); @@ -300,65 +277,48 @@ public function getDownloadStartDate(string $zone_name, CarbonIntensityInterface return $start_date; } - /** - * Get date where data download shall end, excluding the incremental download mode for the specified data source - * - * @param string $zone_name zone to examine - * @param CarbonIntensityInterface $data_source data source - * @return DateTimeImmutable - */ - public function getDownloadStopDate(string $zone_name, CarbonIntensityInterface $data_source): DateTimeImmutable - { - $stop_date = $data_source->getMaxIncrementalAge(); - $first_known_intensity_date = $this->getFirstKnownDate($zone_name, $data_source->getSourceName()); - if ($first_known_intensity_date !== null) { - $first_known_intensity_date = $first_known_intensity_date->sub(new DateInterval('PT1H')); - $stop_date = min($stop_date, $first_known_intensity_date); - } - - return $stop_date; - } + // /** + // * Get date where data download shall end, excluding the incremental download mode for the specified data source + // * + // * @param string $zone_name zone to examine + // * @param ClientInterface $data_source data source + // * @return DateTimeImmutable + // */ + // public function getDownloadStopDate(string $zone_name, ClientInterface $data_source): DateTimeImmutable + // { + // $stop_date = $data_source->getMaxIncrementalAge(); + // $first_known_intensity_date = $this->getFirstKnownDate($zone_name, $data_source->getSourceName()); + // if ($first_known_intensity_date !== null) { + // $first_known_intensity_date = $first_known_intensity_date->sub(new DateInterval('PT1H')); + // $stop_date = min($stop_date, $first_known_intensity_date); + // } + + // return $stop_date; + // } /** * Save in database the carbon intensities * Give up on failures * - * @param string $zone_name name of the zone to store intensities - * @param string $source_name name of the source to store intensities + * @param Source_Zone $source_zone Source_zone * @param array $data as an array of arrays ['datetime' => string, 'intensity' => float] - * @return integer count of actually saved items, + * @return int count of actually saved items, */ - public function save(string $zone_name, string $source_name, array $data): int + public function save(Source_Zone $source_zone, array $data): int { /** @var DBmysql $DB */ global $DB; $count = 0; - $source = new CarbonIntensitySource(); - $source->getFromDBByCrit([ - 'name' => $source_name, - ]); - if ($source->isNewItem()) { - throw new \RuntimeException('Attempt to save carbon intensity with a source which is not in the database'); - // trigger_error('Attempt to save carbon intensity with a source which is not in the database', E_USER_ERROR); - // return 0; - } - $zone = new Zone(); - $zone->getFromDBByCrit([ - 'name' => $zone_name, - ]); - if ($zone->isNewItem()) { - throw new \RuntimeException('Attempt to save carbon intensity with a zone which is not in the database'); - // trigger_error('Attempt to save carbon intensity with a zone which is not in the database', E_USER_ERROR); - // return 0; - } + $source_fk = getForeignKeyFieldForItemType(Source::class); + $zone_fk = getForeignKeyFieldForItemType(Zone::class); $query = $DB->buildInsert( CarbonIntensity::getTable(), [ 'date' => new QueryParam(), - CarbonIntensitySource::getForeignKeyField() => new QueryParam(), - Zone::getForeignKeyField() => new QueryParam(), + $source_fk => new QueryParam(), + $zone_fk => new QueryParam(), 'intensity' => new QueryParam(), 'data_quality' => new QueryParam(), ], @@ -370,14 +330,14 @@ public function save(string $zone_name, string $source_name, array $data): int $stmt->bind_param( 'siidi', $intensity['datetime'], - $source->fields['id'], - $zone->fields['id'], + $source_zone->fields[$source_fk], + $source_zone->fields[$zone_fk], $intensity['intensity'], $intensity['data_quality'] ); $DB->executeStatement($stmt); $count++; - } catch (\RuntimeException $e) { + } catch (Exception $e) { $count++; continue; } @@ -390,17 +350,18 @@ public function save(string $zone_name, string $source_name, array $data): int /** * Gets date intervals where data are missing * - * @param integer $source_id - * @param integer $zone_id + * @param Source_Zone $source_zone * @param DateTimeInterface $start * @param DateTimeInterface|null $stop * @return array */ - public function findGaps(int $source_id, int $zone_id, DateTimeInterface $start, ?DateTimeInterface $stop = null): array + public function findGaps(Source_Zone $source_zone, DateTimeInterface $start, ?DateTimeInterface $stop = null): array { + $source_fk = getForeignKeyFieldForItemType(Source::class); + $zone_fk = getForeignKeyFieldForItemType(Zone::class); $criteria = [ - CarbonIntensitySource::getForeignKeyField() => $source_id, - Zone::getForeignKeyField() => $zone_id, + $source_fk => $source_zone->fields[$source_fk], + $zone_fk => $source_zone->fields[$zone_fk], ]; $interval = new DateInterval('PT1H'); return Toolbox::findTemporalGapsInTable(self::getTable(), $start, $interval, $stop, $criteria); diff --git a/src/Command/CollectCarbonIntensityCommand.php b/src/Command/CollectCarbonIntensityCommand.php index 509de364..62dec012 100644 --- a/src/Command/CollectCarbonIntensityCommand.php +++ b/src/Command/CollectCarbonIntensityCommand.php @@ -32,71 +32,145 @@ namespace GlpiPlugin\Carbon\Command; +use Config as GlpiConfig; use DateTimeImmutable; +use Glpi\Console\AbstractCommand; use GlpiPlugin\Carbon\CarbonIntensity; -use GlpiPlugin\Carbon\CarbonIntensitySource; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientFactory; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientInterface; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\Zone; -use GlpiPlugin\Carbon\DataSource\CarbonIntensityRTE; -use GlpiPlugin\Carbon\DataSource\RestApiClient; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\Question; // 6 months define('DATE_MIN', 'P6M'); -class CollectCarbonIntensityCommand extends Command +class CollectCarbonIntensityCommand extends AbstractCommand { /** @var int ID of the data source being processed */ - private int $source_id; - - private OutputInterface $output; + /** @var Source_Zone The relatin between a source and a zone to describe which data to download and save */ + private Source_Zone $source_zone; + private ?ClientInterface $client = null; + private array $zones = []; protected function configure() { $this - ->setName('plugin:carbon:collect_carbon_intensity') - ->setDescription("Read carbon dioxyde intensity from external sources"); + ->setName('plugins:carbon:collect_carbon_intensity') + ->setDescription(__('Read carbon dioxyde intensity from external sources', 'carbon')) + ->addArgument('source', InputArgument::REQUIRED, '') + ->addArgument('zone', InputArgument::REQUIRED, '') + ->addOption('cache', null, InputOption::VALUE_NEGATABLE, 'Use cache. Cache is not read is disabled, but still fed by requests.') + ; + } + + protected function interact(InputInterface $input, OutputInterface $output) + { + // Set data source argument if not provided + if (is_null($input->getArgument('source'))) { + $question_helper = new QuestionHelper(); + $choices = (new Source())->getDownloadableSources(); + $choices = ClientFactory::getClientNames(); + $question = new ChoiceQuestion(__('Source:', 'carbon'), array_values($choices)); + $value = $question_helper->ask($input, $output, $question); + $input->setArgument('source', $value); + } + + // Set data zone argument if not provided + if (is_null($input->getArgument('zone'))) { + $question_helper = new QuestionHelper(); + $this->zones = $this->getSupportedZones($input->getArgument('source')); + if (count($this->zones) === 0) { + // Try to find a zone from an address + $message = __('The selected source does not enumerates its supported zones. Trying to identify a zone from an address', 'carbon'); + $output->writeln("$message"); + $enabled = GlpiConfig::getConfigurationValue('plugin:carbon', 'geocoding_enabled'); + if ($enabled != '1') { + $message = __('Geocoding is not enabled. Cannot resolve an address into a zone', 'carbon'); + $output->writeln("$message"); + return; + } + $question_helper = new QuestionHelper(); + $question = new Question(__('Address:', 'carbon')); + $value = $question_helper->ask($input, $output, $question); + } elseif (count($this->zones) > 1) { + $question = new ChoiceQuestion(__('Zone:', 'carbon'), $this->zones); + $value = $question_helper->ask($input, $output, $question); + $input->setArgument('zone', $value); + } else { + $input->setArgument('zone', null); + } + } } protected function execute(InputInterface $input, OutputInterface $output) { - $this->output = $output; + if (count($this->zones) > 1 && $input->getArgument('zone') === null) { + // Null is not a valid key if there are several zones available for the source + return Command::FAILURE; + } - $message = __("Creating data source name", 'carbon'); + $message = __('Creating data source name', 'carbon'); $output->writeln("$message"); - // Create source if not exists - $data_source = new CarbonIntensitySource(); - $source_name = 'RTE'; + // Check the source exists + $data_source = new Source(); + $source_name = $input->getArgument('source'); if (!$data_source->getFromDBByCrit(['name' => $source_name])) { - $data_source->add([ - 'name' => $source_name, - ]); + $message = __("This source does not exist", 'casrbon'); + $output->writeln("$message"); + return Command::FAILURE; } - $this->source_id = $data_source->getID(); - $zone_name = 'France'; + $zone_code = $input->getArgument('zone'); + $use_cache = $input->getOption('cache'); $zone = new Zone(); - $zone->getFromDBByCrit(['name' => $zone_name]); - if (!$zone->getID()) { - $message = __("Zone not found", 'carbon'); + $zone->getFromDBByCrit(['name' => $this->zones[$zone_code]]); + $carbon_intensity = new CarbonIntensity(); + + // Check the relation between source and zone + $source_zone = new Source_Zone(); + $input = [ + $data_source::getForeignKeyField() => $data_source->getID(), + $zone::getForeignKeyField() => $zone->getID(), + ]; + $source_zone->getFromDbByCrit($input); + if ($source_zone->isNewItem()) { + $message = __("The zone is not handled by the data source", 'casrbon'); $output->writeln("$message"); return Command::FAILURE; } - $carbon_intensity = new CarbonIntensity(); + $this->source_zone = $source_zone; - $message = __("Reading eco2mix data...", 'carbon'); + $message = __("Reading data...", 'carbon'); $output->writeln("$message"); - $downloader = new CarbonIntensityRTE(new RestApiClient([])); + // Create the client + // May be created when asking some questions + if ($this->client === null) { + $this->client = ClientFactory::createByName($source_name); + } + if ($use_cache === false) { + $this->client->disableCache(); + } + + $carbon_intensity->downloadOneZone($this->client, $this->source_zone, 0, new ProgressBar($this->output)); - $carbon_intensity->downloadOneZone($downloader, $zone_name, 0, new ProgressBar($this->output)); + // Find start and stop dates to cover + $start_date = $carbon_intensity->getDownloadStartDate(); + $gaps = $carbon_intensity->findGaps($this->source_zone, $start_date); - $start_date = $carbon_intensity->getDownloadStartDate($zone_name, $downloader); - $gaps = $carbon_intensity->findGaps($this->source_id, $zone->getID(), $start_date); + // Count the hours not covered by any sample $not_downlaoded_hours = 0; foreach ($gaps as $gap) { $gap_start = DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $gap['start']); @@ -105,7 +179,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $not_downlaoded_hours += $diff->days * 24 + $diff->h; } - // Show message if some hours were not downloaded + // Show message if there are gaps if ($not_downlaoded_hours > 0) { $message = __("$not_downlaoded_hours hours were not downloaded", 'carbon'); $output->writeln("$message"); @@ -113,4 +187,12 @@ protected function execute(InputInterface $input, OutputInterface $output) return Command::SUCCESS; } + + protected function getSupportedZones(string $source_name) + { + if ($this->client === null) { + $this->client = ClientFactory::createByName($source_name); + } + return $this->client->getSupportedZones(); + } } diff --git a/src/Command/CreateFakeCarbonIntensityCommand.php b/src/Command/CreateFakeCarbonIntensityCommand.php index f3a79546..a99bfd18 100644 --- a/src/Command/CreateFakeCarbonIntensityCommand.php +++ b/src/Command/CreateFakeCarbonIntensityCommand.php @@ -32,12 +32,12 @@ namespace GlpiPlugin\Carbon\Command; -use DateTime; use DateInterval; +use DateTime; use DateTimeZone; use GlpiPlugin\Carbon\CarbonIntensity; +use GlpiPlugin\Carbon\Source; use GlpiPlugin\Carbon\Zone; -use GlpiPlugin\Carbon\CarbonIntensitySource; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; @@ -56,8 +56,8 @@ class CreateFakeCarbonIntensityCommand extends Command protected function configure() { $this - ->setName('plugin:carbon:create_carbon_intensity') - ->setDescription("Create fake carbon intenssity data"); + ->setName('plugins:carbon:create_carbon_intensity') + ->setDescription("Create fake carbon intensity data"); } protected function execute(InputInterface $input, OutputInterface $output) @@ -66,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $message = __("Creating data source name", 'carbon'); $output->writeln("$message"); - $dataSource = new CarbonIntensitySource(); + $dataSource = new Source(); $source_name = 'Fake data'; if (!$dataSource->getFromDBByCrit(['name' => $source_name])) { $dataSource->add([ @@ -117,7 +117,7 @@ protected function generateFakeData(DateTime $start_date, DateTime $end_date) $carbon_intensity = new CarbonIntensity(); foreach ($intensities as $date => $intensity) { $carbon_intensity->add([ - 'plugin_carbon_carbonintensitysources_id' => $this->source_id, + 'plugin_carbon_sources_id' => $this->source_id, 'plugin_carbon_zones_id' => $this->zone_id, 'date' => $date, // Eco2mix seems to provide datetime in 'intensity' => $intensity, diff --git a/src/Command/CreateTestInventoryCommand.php b/src/Command/CreateTestInventoryCommand.php index 3e106000..591ff29a 100644 --- a/src/Command/CreateTestInventoryCommand.php +++ b/src/Command/CreateTestInventoryCommand.php @@ -32,26 +32,25 @@ namespace GlpiPlugin\Carbon\Command; -use DateTime; use CommonDBTM; use Computer as GlpiComputer; -use ComputerType as GlpiComputerType; use ComputerModel as GlpiComputerModel; +use ComputerType as GlpiComputerType; use Entity; -use Location; use GlpiPlugin\Carbon\ComputerType; use GlpiPlugin\Carbon\ComputerUsageProfile; use GlpiPlugin\Carbon\UsageInfo; +use Location; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class CreateTestInventoryCommand extends Command { - const TEST_LOCATION_NAME = 'Test location'; - const TEST_LOCATION_COUNTRY = 'France'; - const TEST_INVENTORY_DATA = [ + public const TEST_LOCATION_NAME = 'Test location'; + public const TEST_LOCATION_COUNTRY = 'France'; + public const TEST_INVENTORY_DATA = [ 'Desktop' => [ 'usage_profile' => [ 'name' => 'Test desktop usage profile', @@ -127,7 +126,7 @@ class CreateTestInventoryCommand extends Command protected function configure() { $this - ->setName('plugin:carbon:create_test_inventory') + ->setName('plugins:carbon:create_test_inventory') ->setDescription('Create a test inventory') ->setHelp('This command creates an inventory for testing, using internal data.'); diff --git a/src/Command/ExportDashboardCommand.php b/src/Command/ExportDashboardCommand.php index 8db23673..44a9c232 100644 --- a/src/Command/ExportDashboardCommand.php +++ b/src/Command/ExportDashboardCommand.php @@ -38,7 +38,6 @@ use Glpi\Dashboard\Item; use Plugin; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -53,7 +52,7 @@ class ExportDashboardCommand extends Command protected function configure() { $this - ->setName('plugin:carbon:export_report_dashboard') + ->setName('plugins:carbon:export_report_dashboard') ->setDescription('exports the report dashboard description') ->setHelp('This command exports the report dashboard description to a JSON file'); } diff --git a/src/CommonAsset.php b/src/CommonAsset.php new file mode 100644 index 00000000..c9d257b8 --- /dev/null +++ b/src/CommonAsset.php @@ -0,0 +1,119 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon; + +use CommonDBTM; +use Html; +use MassiveAction; + +abstract class CommonAsset extends CommonDBTM +{ + public static function showMassiveActionsSubForm(MassiveAction $ma): bool + { + switch ($ma->getAction()) { + case 'MassDeleteAllImpacts': + echo '

' . Html::submit(_x('button', 'Post'), ['name' => 'massiveaction']); + return true; + } + + return parent::showMassiveActionsSubForm($ma); + } + + public static function processMassiveActionsForOneItemtype(MassiveAction $ma, CommonDBTM $item, array $ids) + { + switch ($ma->getAction()) { + case 'MassDeleteAllImpacts': + foreach ($ids as $id) { + $itemtype = get_class($item); + $asset = new $itemtype(); + $asset->getFromDb($id); + if (!$asset->canUpdateItem()) { + $ma->itemDone($itemtype, $id, MassiveAction::ACTION_KO); + continue; + } + $success = self::deleteAllImpacts($asset) ? MassiveAction::ACTION_OK : MassiveAction::ACTION_KO; + $ma->itemDone($itemtype, $id, $success); + } + } + } + + /** + * Delete all calculated environmental impacts for the given asset + * + * @param CommonDBTM $item + * @return bool + */ + public static function deleteAllImpacts(CommonDBTM $item): bool + { + $success = true; + $success = self::deleteEmbodiedImpact($item); + $success = $success && self::deleteUsageImpact($item); + return $success; + } + + /** + * Delete calculated embodied impact of an asset + * + * @param CommonDBTM $item + * @return bool + */ + public static function deleteEmbodiedImpact(CommonDBTM $item): bool + { + $embodied_impact = new EmbodiedImpact(); + return $embodied_impact->deleteByCriteria([ + 'itemtype' => get_class($item), + 'items_id' => $item->getID(), + ]); + } + + /** + * Delete calculated usage impact of an asset + * + * @param CommonDBTM $item + * @return bool + */ + public static function deleteUsageImpact(CommonDBTM $item): bool + { + $gwp_impact_class = '\\GlpiPlugin\\Carbon\\Impact\\History\\' . get_class($item); + $gwp_impact = new $gwp_impact_class(); + $success = $gwp_impact->resetForItem($item->getID()); + + $usage_impact = new UsageImpact(); + $success = $success && $usage_impact->deleteByCriteria([ + 'itemtype' => get_class($item), + 'items_id' => $item->getID(), + ]); + + return $success; + } +} diff --git a/src/ComputerModel.php b/src/ComputerModel.php new file mode 100644 index 00000000..f08fb727 --- /dev/null +++ b/src/ComputerModel.php @@ -0,0 +1,41 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon; + +use ComputerModel as GlpiComputerModel; + +class ComputerModel extends AbstractModel +{ + public static $itemtype = GlpiComputerModel::class; + public static $items_id = 'computermodels_id'; +} diff --git a/src/ComputerType.php b/src/ComputerType.php index 3143b5f2..54e7ce44 100644 --- a/src/ComputerType.php +++ b/src/ComputerType.php @@ -43,12 +43,12 @@ class ComputerType extends AbstractType public static $itemtype = GlpiComputerType::class; public static $items_id = 'computertypes_id'; - const CATEGORY_UNDEFINED = 0; - const CATEGORY_DESKTOP = 1; - const CATEGORY_SERVER = 2; - const CATEGORY_LAPTOP = 3; - const CATEGORY_TABLET = 4; - const CATEGORY_SMARTPHONE = 5; + public const CATEGORY_UNDEFINED = 0; + public const CATEGORY_DESKTOP = 1; + public const CATEGORY_SERVER = 2; + public const CATEGORY_LAPTOP = 3; + public const CATEGORY_TABLET = 4; + public const CATEGORY_SMARTPHONE = 5; public static function getCategories(): array { @@ -114,7 +114,7 @@ public static function processMassiveActionsForOneItemtype(MassiveAction $ma, Co * Update the power consumption associated to a computer type * * @param CommonDBTM $item Computer to update - * @param integer $power pwoer consumption to set + * @param int $power pwoer consumption to set * @return bool */ public static function updatePowerConsumption(CommonDBTM $item, int $power): bool @@ -142,7 +142,7 @@ public static function updatePowerConsumption(CommonDBTM $item, int $power): boo * Update the category of a computer * * @param CommonDBTM $item Computer to update - * @param integer $category pwoer consumption to set + * @param int $category pwoer consumption to set * @return bool */ public static function updateCategory(CommonDBTM $item, int $category): bool @@ -172,7 +172,7 @@ public static function updateCategory(CommonDBTM $item, int $category): bool * * @param string $name * @param array $options - * @return integer|string + * @return int|string */ public static function dropdownType(string $name, array $options = []) { @@ -184,6 +184,9 @@ public static function getSpecificValueToDisplay($field, $values, array $options { switch ($field) { case 'category': + if ($values['category'] === null) { + return ''; + } $categories = self::getCategories(); return $categories[$values['category']] ?? ''; } diff --git a/src/ComputerUsageProfile.php b/src/ComputerUsageProfile.php index 34c21a4c..20994f2b 100644 --- a/src/ComputerUsageProfile.php +++ b/src/ComputerUsageProfile.php @@ -34,7 +34,6 @@ use CommonDBTM; use CommonDropdown; -use CommonGLPI; use Computer as GlpiComputer; use Entity; use Glpi\Application\View\TemplateRenderer; @@ -62,24 +61,48 @@ public function showForm($ID, array $options = []) $this->initForm($ID, $options); $new_item = static::isNewID($ID); $in_modal = (bool) ($_GET['_in_modal'] ?? false); - $this->fields['time_start'] = $this->fields['time_start'] ?? '00:00:00'; - $this->fields['time_stop'] = $this->fields['time_stop'] ?? '00:00:00'; + $this->fields['time_start'] ??= '00:00:00'; + $this->fields['time_stop'] ??= '00:00:00'; TemplateRenderer::getInstance()->display('@carbon/computerusageprofile.html.twig', [ 'item' => $this, 'params' => $options, - 'no_header' => !$new_item && !$in_modal + 'no_header' => !$new_item && !$in_modal, ]); return true; } public function prepareInputForAdd($input) { - return $this->inputIntegrityCheck($input); + if (!$this->inputIntegrityCheck($input)) { + return []; + } + + for ($day_id = 0; $day_id < 7; $day_id++) { + $key = "day_{$day_id}"; + if (!isset($input[$key])) { + continue; + } + $input[$key] = ($input[$key] != 0) ? 1 : 0; + } + + return $input; } public function prepareInputForUpdate($input) { - return $this->inputIntegrityCheck($input); + if (!$this->inputIntegrityCheck($input)) { + return []; + } + + for ($day_id = 0; $day_id < 7; $day_id++) { + $key = "day_{$day_id}"; + if (!isset($input[$key])) { + continue; + } + $input[$key] = ($input[$key] != 0) ? 1 : 0; + } + + return $input; } /** @@ -107,11 +130,11 @@ protected function inputIntegrityCheck(array $input): array * Check format of time string against HH:MM:SS pattern * * @param string $time - * @return boolean + * @return bool */ protected function isValidTime(string $time): bool { - $time_pattern = '/^([01]\d|2[0-3]):[0-5]\d:[0-5]\d$/'; + $time_pattern = '/^(([01]\d|2[0-3]):[0-5]\d)|(24:00)$/'; $found = preg_match($time_pattern, $time, $matches); return ($found === 1); } @@ -123,14 +146,14 @@ public function getAdditionalFields() 'name' => 'time_start', 'type' => 'dropdownValue', 'label' => __('Start time', 'carbon'), - 'list' => false + 'list' => false, ], [ 'name' => 'time_stop', 'type' => 'parent', 'label' => __('As child of'), - 'list' => false - ] + 'list' => false, + ], ]; } @@ -289,4 +312,65 @@ public function assignToItem(CommonDBTM $item): bool $usage_profile_fk => $this->getID(), ]); } + + /** + * Count the days an asset is powered on + * + * @return int + */ + public function countRunningDays(): int + { + if ($this->isNewItem()) { + return 0; + } + $days = array_intersect_key($this->fields, array_flip([ + 'day_1', + 'day_2', + 'day_3', + 'day_4', + 'day_5', + 'day_6', + 'day_7', + ])); + $days_on = 0; + foreach ($days as $day) { + if ($day === 0) { + continue; + } + $days_on++; + } + + return $days_on; + } + + public function getPoweredOnRatio(): float + { + if ($this->isNewItem()) { + return 0.0; + } + + // Assume that start and stop times are HH:ii:ss + $seconds_start = explode(':', $this->fields['time_start']); + $seconds_stop = explode(':', $this->fields['time_stop']); + // Convert to integers + $seconds_start[0] = (int) $seconds_start[0]; + $seconds_start[1] = (int) $seconds_start[1]; + $seconds_start[2] = 0; + $seconds_stop[0] = (int) $seconds_stop[0]; + $seconds_stop[1] = (int) $seconds_stop[1]; + $seconds_stop[2] = 0; + + $seconds_start = $seconds_start[0] * 3600 + + $seconds_start[1] * 60 + + $seconds_start[2]; + $seconds_stop = $seconds_stop[0] * 3600 + + $seconds_stop[1] * 60 + + $seconds_stop[2]; + + // Count the days the asset is powered on + $days = $this->countRunningDays(); + $week_ratio = ($days * ($seconds_stop - $seconds_start)) / 604800; + + return $week_ratio; + } } diff --git a/src/Config.php b/src/Config.php index 8ec645de..1a5c6c85 100644 --- a/src/Config.php +++ b/src/Config.php @@ -32,23 +32,33 @@ namespace GlpiPlugin\Carbon; -use Config as GlpiConfig; use CommonDBTM; use CommonGLPI; use Computer as GlpiComputer; +use Config as GlpiConfig; use Geocoder\Geocoder; use Geocoder\Provider\Nominatim\Nominatim; use Geocoder\StatefulGeocoder; -use Monitor as GlpiMonitor; -use NetworkEquipment as GlpiNetworkEquipment; use Glpi\Application\View\TemplateRenderer; use GLPINetwork; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientFactory as CarbonIntensityClientFactory; +use GlpiPlugin\Carbon\DataSource\Lca\ClientFactory as LcaClientFactory; use GlpiPlugin\Carbon\Impact\Embodied\Engine; use GuzzleHttp\Client; +use Monitor as GlpiMonitor; +use NetworkEquipment as GlpiNetworkEquipment; use Session; +use Twig\Extension\StringLoaderExtension; class Config extends GlpiConfig { + /** + * Environment variable name to set the boaviztapi base URL + * If set, overrides the setting in the database + */ + public const ENV_BOAVIZTAPI_BASE_URL = 'GLPI_PLUGIN_CARBON_BOAVIZTAPI_BASE_URL'; + private const CONFIG_CONTEXT = 'plugin:carbon'; + public static function getTypeName($nb = 0) { return plugin_carbon_getFriendlyName(); @@ -69,8 +79,8 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) * Undocumented function * * @param CommonGLPI $item - * @param integer $tabnum - * @param integer $withtemplate + * @param int $tabnum + * @param int $withtemplate * @return void */ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) @@ -84,15 +94,39 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $ public function showForm($ID, $options = []) { - $current_config = GlpiConfig::getConfigurationValues('plugin:carbon'); - $current_config['geocoding_enabled'] = $current_config['geocoding_enabled'] ?? '0'; + $current_config = GlpiConfig::getConfigurationValues(self::CONFIG_CONTEXT); + $current_config['geocoding_enabled'] ??= '0'; $canedit = Session::haveRight(Config::$rightname, UPDATE); - TemplateRenderer::getInstance()->display('@carbon/config.html.twig', [ - 'can_edit' => $canedit, - 'current_config' => $current_config, - 'impact_engines' => Engine::getAvailableBackends(), - 'action' => (isset($options['plugin_config']) ? Config::getFormURL() : GlpiConfig::getFormURL()), + // Get config template foreach LCA data source + $secured_config = []; + $include_configs = []; + foreach (CarbonIntensityClientFactory::getConfigTypes() as $config_type) { + $config = new $config_type(); + $secured_config += $config->getSecuredConfigs(); + $include_configs[] = $config->getConfigTemplate(); + } + foreach (LcaClientFactory::getConfigTypes() as $config_type) { + $config = new $config_type(); + $secured_config += $config->getSecuredConfigs(); + $include_configs[] = $config->getConfigTemplate(); + } + + $current_config = array_diff_key($current_config, array_flip($secured_config)); + + $hide_boaviztapi_base_url = (getenv(self::ENV_BOAVIZTAPI_BASE_URL) !== false); + $renderer = TemplateRenderer::getInstance(); + $environment = $renderer->getEnvironment(); + if (!$environment->hasExtension(StringLoaderExtension::class)) { + $environment->addExtension(new StringLoaderExtension()); + } + $renderer->display('@carbon/config.html.twig', [ + 'can_edit' => $canedit, + 'current_config' => $current_config, + 'impact_engines' => Engine::getAvailableBackends(), + 'include_configs' => $include_configs, + 'hide_boaviztapi_base_url' => $hide_boaviztapi_base_url, + 'action' => (isset($options['plugin_config']) ? Config::getFormURL() : GlpiConfig::getFormURL()), ]); return true; @@ -117,27 +151,13 @@ public static function configUpdate(array $input): array } } - //Test Boavizta URL by acquiring zones - if (isset($input['boaviztapi_base_url']) && strlen($input['boaviztapi_base_url']) > 0) { - $old_url = GlpiConfig::getConfigurationValue('plugin:carbon', 'boaviztapi_base_url'); - if ($old_url != $input['boaviztapi_base_url']) { - $boavizta = new DataSource\Boaviztapi(new DataSource\RestApiClient(), $input['boaviztapi_base_url']); - $zones = []; - try { - $zones = $boavizta->queryZones(); - } catch (\Exception $e) { - unset($input['boaviztapi_base_url']); - Session::addMessageAfterRedirect(__('Invalid Boavizta API URL', 'carbon'), false, ERROR); - } - if (count($zones) > 0) { - // Create the source if it does not exists already - if ($boavizta->createSource()) { - // Save zones into database - $boavizta->saveZones($zones); - } - Session::addMessageAfterRedirect(__('Connection to Boavizta API established', 'carbon'), false, INFO); - } - } + foreach (CarbonIntensityClientFactory::getConfigTypes() as $config_type) { + $config = new $config_type(); + $input = $config->configUpdate($input); + } + foreach (LcaClientFactory::getConfigTypes() as $config_type) { + $config = new $config_type(); + $input = $config->configUpdate($input); } return $input; @@ -167,9 +187,9 @@ public static function getSupportedAssets(): array public static function getEmbodiedImpactEngine(): string { $default_engine = 'Boavizta'; - $engine = GlpiConfig::getConfigurationValue('plugin:carbon', 'impact_engines'); + $engine = GlpiConfig::getConfigurationValue(self::CONFIG_CONTEXT, 'impact_engines'); if ($engine === null || $engine === '') { - GlpiConfig::setConfigurationValues('plugin:carbon', ['impact_engines' => $default_engine]); + GlpiConfig::setConfigurationValues(self::CONFIG_CONTEXT, ['impact_engines' => $default_engine]); $engine = $default_engine; } @@ -184,9 +204,9 @@ public static function getEmbodiedImpactEngine(): string public static function getUsageImpactEngine(): string { $default_engine = 'Boavizta'; - $engine = GlpiConfig::getConfigurationValue('plugin:carbon', 'impact_engines'); + $engine = GlpiConfig::getConfigurationValue(self::CONFIG_CONTEXT, 'impact_engines'); if ($engine === null || $engine === '') { - GlpiConfig::setConfigurationValues('plugin:carbon', ['impact_engines' => $default_engine]); + GlpiConfig::setConfigurationValues(self::CONFIG_CONTEXT, ['impact_engines' => $default_engine]); $engine = $default_engine; } @@ -196,11 +216,11 @@ public static function getUsageImpactEngine(): string /** * Get demo mode status * - * @return boolean true if demo mode enabled + * @return bool true if demo mode enabled */ public static function isDemoMode(): bool { - $demo_mode = GlpiConfig::getConfigurationValue('plugin:carbon', 'demo'); + $demo_mode = GlpiConfig::getConfigurationValue(self::CONFIG_CONTEXT, 'demo'); return $demo_mode != 0; } @@ -212,7 +232,7 @@ public static function isDemoMode(): bool */ public static function exitDemoMode() { - GlpiConfig::deleteConfigurationValues('plugin:carbon', ['demo']); + GlpiConfig::deleteConfigurationValues(self::CONFIG_CONTEXT, ['demo']); } /** @@ -233,4 +253,43 @@ public static function getGeocoder(): Geocoder $geocoder = new StatefulGeocoder($provider, $locale); return $geocoder; } + + /** + * Get a plugin configuration value + * + * @param string $name The name of the configuration value to read + * @return null|string The configuration value + */ + public static function getPluginConfigurationValue(string $name): ?string + { + if ($name === 'boaviztapi_base_url') { + $value = getenv(self::ENV_BOAVIZTAPI_BASE_URL); + if ($value !== false) { + return $value; + } + } + return GlpiConfig::getConfigurationValue(self::CONFIG_CONTEXT, $name); + } + + /** + * Set a plugin configuration value + * + * @param array $values key => value pairs to set + * @return void + */ + public static function setPluginConfigurationValues(array $values = []): void + { + GlpiConfig::setConfigurationValues(self::CONFIG_CONTEXT, $values); + } + + /** + * Delete plugin configuration values + * + * @param array $values names of values to delete + * @return void + */ + public static function deletePluginConfigurationValues(array $values) + { + GlpiConfig::deleteConfigurationValues(self::CONFIG_CONTEXT, $values); + } } diff --git a/src/CronTask.php b/src/CronTask.php index e8526c75..fbc8d3a9 100644 --- a/src/CronTask.php +++ b/src/CronTask.php @@ -32,23 +32,59 @@ namespace GlpiPlugin\Carbon; -use CronTask as GlpiCronTask; +use CommonDBTM; +use CommonGLPI; use Config as GlpiConfig; -use Geocoder\Geocoder; -use GlpiPlugin\Carbon\DataSource\RestApiClient; -use GlpiPlugin\Carbon\DataSource\CarbonIntensityRTE; -use GlpiPlugin\Carbon\DataSource\CarbonIntensityElectricityMap; -use GlpiPlugin\Carbon\DataSource\CarbonIntensityInterface; +use CronTask as GlpiCronTask; +use Geocoder\Exception\QuotaExceeded; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientFactory; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\ClientInterface; +use GlpiPlugin\Carbon\DataSource\CronTaskProvider; use GlpiPlugin\Carbon\Impact\Embodied\Engine as EmbodiedEngine; -use GlpiPlugin\Carbon\Impact\Usage\UsageImpactInterface as UsageImpactInterface; +use GlpiPlugin\Carbon\Impact\History\AssetInterface; use GlpiPlugin\Carbon\Impact\Usage\Engine as UsageEngine; -use GlpiPlugin\Carbon\Toolbox; use Location as GlpiLocation; +use RuntimeException; -class CronTask +class CronTask extends CommonGLPI { private $getGeocoder = [Location::class, 'getGeocoder']; + public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) + { + // Delegate to the client's crontask class the tab name to return + // But keep here the logic to decide if a tab name shall be returned + // to reduce class loading + if (!$item instanceof GlpiCronTask) { + return ''; + } + if (!in_array($item->fields['itemtype'], CronTaskProvider::getCronTaskTypes())) { + return ''; + } + $client_cron_task = new $item->fields['itemtype'](); + return $client_cron_task->getTabNameForItem($item); + } + + public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) + { + if ($item instanceof GlpiCronTask) { + /** @var GlpiCronTask $item */ + $cron_task = new self(); + $cron_task->showForCronTask($item); + } + return true; + } + + public function showForCronTask(CommonDBTM $item) + { + $itemtype = $item->fields['itemtype']; + if (!in_array($itemtype, CronTaskProvider::getCronTaskTypes())) { + return; + } + $crontask = new $itemtype(); + $crontask->showForCronTask($item); + } + /** * Get description of an automatic action * @@ -65,26 +101,20 @@ public static function cronInfo(string $name) 'parameter' => __('Maximum number of locations to solve', 'carbon'), ]; - case 'DownloadRte': + case 'DownloadWatttime': return [ - 'description' => __('Download carbon emissions from RTE', 'carbon'), - 'parameter' => __('Maximum number of entries to download', 'carbon'), - ]; - - case 'DownloadElectricityMap': - return [ - 'description' => __('Download carbon emissions from ElectricityMap', 'carbon'), + 'description' => __('Download carbon emissions from Watttime', 'carbon'), 'parameter' => __('Maximum number of entries to download', 'carbon'), ]; case 'UsageImpact': return [ - 'description' => __('Compute usage environnemental impact for all assets', 'carbon'), + 'description' => __('Compute usage environmental impact for all assets', 'carbon'), 'parameter' => __('Maximum number of entries to calculate', 'carbon'), ]; case 'EmbodiedImpact': return [ - 'description' => __('Compute embodied environnemental impact for all assets', 'carbon'), + 'description' => __('Compute embodied environmental impact for all assets', 'carbon'), 'parameter' => __('Maximum number of entries to calculate', 'carbon'), ]; } @@ -95,39 +125,60 @@ public static function cronInfo(string $name) * Calculate usage impact for all assets * * @param GlpiCronTask $task - * @return integer + * @return int */ public static function cronUsageImpact(GlpiCronTask $task): int { $task->setVolume(0); // start with zero $usage_impacts = Toolbox::getGwpUsageImpactClasses(); + $task->setVolume(0); // start with zero $remaining = $task->fields['param']; $limit_per_type = (int) floor(($remaining) / count($usage_impacts)); // Half of job for GWP, the other half for other impacts $limit_per_type = max(1, floor($limit_per_type / 2)); + /** + * Huge quantity of SQL queries will be executed + * We NEED to check memory usage to avoid running out of memory + * @see DbMysql::doQuery() + */ + $memory_limit = Toolbox::getMemoryLimit(); + // Calculate GWP $count = 0; foreach ($usage_impacts as $usage_impact_type) { - /** @var UsageImpactInterface $usage_impact */ + /** @var AssetInterface $usage_impact */ $usage_impact = new $usage_impact_type(); $usage_impact->setLimit($limit_per_type); - $count = $usage_impact->evaluateItems(); + $count = $usage_impact->evaluateItems($usage_impact->getItemsToEvaluate()); $task->addVolume($count); } // Calculate other impacts - $usage_impacts = Toolbox::getUsageImpactClasses(); - foreach ($usage_impacts as $usage_impact_type) { - /** @ar UsageImpactInterface $usage_impact */ - $usage_impact = UsageEngine::getEngine($usage_impact_type); - if ($usage_impact === null) { - continue; + $limit = ['LIMIT' => $limit_per_type]; + foreach (PLUGIN_CARBON_TYPES as $itemtype) { + foreach (UsageImpact::getItemsToEvaluate($itemtype, $limit) as $row) { + $item = new $itemtype(); + if (!$item->getFromDB($row['id'])) { + continue; + } + $usage_impact = UsageEngine::getEngineFromItemtype($item); + if ($usage_impact === null) { + // An error occured while configuring the engine + continue; + } + if ($usage_impact->evaluateItem()) { + $count++; + } + + // Check free memory + if ($memory_limit && $memory_limit < memory_get_usage()) { + // 8 MB memory left, emergency exit + // Terminate the task + break 2; + } } - $usage_impact->setLimit($limit_per_type); - $count = $usage_impact->evaluateItems(); - $task->addVolume($count); } return ($count > 0 ? 1 : 0); @@ -137,58 +188,74 @@ public static function cronUsageImpact(GlpiCronTask $task): int * Calculate embodied impact for all assets * * @param GlpiCronTask $task - * @return integer + * @return int */ public static function cronEmbodiedImpact(GlpiCronTask $task): int { $count = 0; - $embodied_impacts = Toolbox::getEmbodiedImpactClasses(); $task->setVolume(0); // start with zero $remaining = $task->fields['param']; $limit_per_type = max(1, floor(($remaining) / count($embodied_impacts))); - foreach ($embodied_impacts as $embodied_impact_type) { - $embodied_impact = EmbodiedEngine::getEngine($embodied_impact_type); - if ($embodied_impact === null) { - // An error occured while configuring the engine - continue; + + /** + * Huge quantity of SQL queries will be executed + * We NEED to check memory usage to avoid running out of memory + * @see DbMysql::doQuery() + */ + $memory_limit = Toolbox::getMemoryLimit(); + + /** @var int $count count of successfully evaluated assets */ + $count = 0; + $limit = ['LIMIT' => $limit_per_type]; + foreach (PLUGIN_CARBON_TYPES as $itemtype) { + foreach (EmbodiedImpact::getItemsToEvaluate($itemtype, $limit) as $row) { + $item = new $itemtype(); + if (!$item->getFromDB($row['id'])) { + continue; + } + $embodied_impact = EmbodiedEngine::getEngineFromItemtype($item); + if ($embodied_impact === null) { + // An error occured while configuring the engine + continue; + } + if ($embodied_impact->evaluateItem()) { + $count++; + } + + // Check free memory + if ($memory_limit && $memory_limit < memory_get_usage()) { + // 8 MB memory left, emergency exit + // Terminate the task + break 2; + } } - $embodied_impact->setLimit($limit_per_type); - $count = $embodied_impact->evaluateItems(); - $task->addVolume($count); } - return ($count > 0 ? 1 : 0); - } - /** - * Automatic action for RTE datasource - * - * @return int - */ - public static function cronDownloadRte(GlpiCronTask $task): int - { - return self::downloadCarbonIntensityFromSource($task, new CarbonIntensityRTE(new RestApiClient([])), new CarbonIntensity()); + $task->addVolume($count); + return ($count > 0 ? 1 : 0); } /** - * Automatic action for ElectricityMap datasource + * Automatic action for Watttime datasource * * @return int */ - public static function cronDownloadElectricityMap(GlpiCronTask $task): int + public static function cronDownloadWatttime(GlpiCronTask $task): int { - return self::downloadCarbonIntensityFromSource($task, new CarbonIntensityElectricityMap(new RestApiClient([])), new CarbonIntensity()); + $client = ClientFactory::create('Watttime'); + return self::downloadCarbonIntensityFromSource($task, $client, new CarbonIntensity()); } /** * Download carbon intensity data from a 3rd party source * * @param GlpiCronTask $task - * @param CarbonIntensityInterface $data_source + * @param ClientInterface $data_source * @param CarbonIntensity $intensity - * @return integer + * @return int */ - protected static function downloadCarbonIntensityFromSource(GlpiCronTask $task, CarbonIntensityInterface $data_source, CarbonIntensity $intensity): int + public static function downloadCarbonIntensityFromSource(GlpiCronTask $task, ClientInterface $data_source, CarbonIntensity $intensity): int { $task->setVolume(0); // start with zero $remaining = $task->fields['param']; @@ -206,19 +273,19 @@ protected static function downloadCarbonIntensityFromSource(GlpiCronTask $task, $task->addVolume($done_count); } - $zones = $data_source->getZones(['is_download_enabled' => 1]); - if (count($zones) === 0) { + $rows = $data_source->getSourceZones(['is_download_enabled' => 1]); + if (count($rows) === 0) { trigger_error(__('No zone to download', 'carbon'), E_USER_WARNING); return 0; } - $limit_per_zone = max(1, floor(($remaining) / count($zones))); + $limit_per_zone = max(1, floor(($remaining) / count($rows))); $count = 0; - foreach ($zones as $zone) { - $zone_name = $zone['name']; + foreach ($rows as $row) { + $source_zone = Source_Zone::getById($row['id']); try { - $added = $intensity->downloadOneZone($data_source, $zone_name, $limit_per_zone); - } catch (\RuntimeException $e) { + $added = $intensity->downloadOneZone($data_source, $source_zone, $limit_per_zone); + } catch (RuntimeException $e) { trigger_error($e->getMessage(), E_USER_WARNING); continue; } @@ -273,10 +340,10 @@ public function fillIncompleteLocations(GlpiCronTask $task): int try { $location = new Location(); $country_code = $location->getCountryCode($glpi_location, $geocoder); - } catch (\Geocoder\Exception\QuotaExceeded $e) { + } catch (QuotaExceeded $e) { // If the quota is exceeded, stop the task break; - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { // If there is a runtime exception, log it and continue $failure = true; trigger_error($e->getMessage(), E_USER_WARNING); @@ -290,7 +357,7 @@ public function fillIncompleteLocations(GlpiCronTask $task): int // Set the country code in the location $success = $glpi_location->update([ 'id' => $glpi_location->getID(), - '_boavizta_zone' => $country_code + '_boavizta_zone' => $country_code, ]); if (!$success) { $failure = true; diff --git a/src/Dashboard/Dashboard.php b/src/Dashboard/Dashboard.php index e8e75cbc..b13b8d7f 100644 --- a/src/Dashboard/Dashboard.php +++ b/src/Dashboard/Dashboard.php @@ -33,21 +33,20 @@ namespace GlpiPlugin\Carbon\Dashboard; use ComputerModel; -use GlpiPlugin\Carbon\Toolbox; class Dashboard { /** - * Returns total carbon emission per computer type. + * Returns total usage carbon emission per computer type. * * @return array of: * - float 'number': total carbon emission of the type * - string 'url': url to redirect when clicking on the slice * - string 'label': name of the computer type */ - public static function getTotalCarbonEmissionPerType() + public static function getTotalUsageCarbonEmissionPerType() { - return Provider::getSumEmissionsPerType(); + return Provider::getSumUsageEmissionsPerType(); } /** diff --git a/src/Dashboard/DemoProvider.php b/src/Dashboard/DemoProvider.php index e8ca167d..183c1e46 100644 --- a/src/Dashboard/DemoProvider.php +++ b/src/Dashboard/DemoProvider.php @@ -36,6 +36,7 @@ use DateInterval; use DateTime; use DateTimeImmutable; +use GlpiPlugin\Carbon\Impact\Type; use GlpiPlugin\Carbon\Toolbox; use Monitor; use NetworkEquipment; @@ -43,69 +44,31 @@ class DemoProvider { - public static function getEmbodiedGlobalWarming(array $params = []): array - { - $value = 616000000; - $value = Toolbox::getWeight($value) . __('CO₂eq', 'carbon'); - - $params['icon'] = 'fa-solid fa-temperature-arrow-up'; - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - - public static function getEmbodiedPrimaryEnergy(array $params = []): array - { - $value = 491000000; - $value = Toolbox::getEnergy($value / 3600); - - $params['icon'] = 'fa-solid fa-fire-flame-simple'; - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - - public static function getEmbodiedAbioticDepletion(array $params = [], array $crit = []): array - { - $default_params = [ - 'label' => __('Embodied abiotic depletion potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', - ]; - $params = array_merge($default_params, $params); - - $value = 12.748; - $value = Toolbox::getWeight($value) . __('Sbeq', 'carbon'); - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - - public static function getUsageAbioticDepletion(array $params = [], array $crit = []): array - { - $default_params = [ - 'label' => __('Usage abiotic depletion potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', - ]; - $params = array_merge($default_params, $params); - - $value = 2.86; - $value = Toolbox::getWeight($value) . __('Sbeq', 'carbon'); - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } + /** @var array $impact_values Embodied and usage impact values*/ + private static array $impact_values = [ + 'gwp' => [616000000, 176483], + 'adp' => [12.748, 2.86], + 'pe' => [491000000, null], + 'gwppb' => [null, null], + 'gwppf' => [null, null], + 'gwpplu' => [null, null], + 'ir' => [null, null], + 'lu' => [-101, null], + 'odp' => [null, null], + 'pm' => [null, null], + 'pocp' => [null, null], + 'wu' => [null, null], + 'mips' => [null, null], + 'adpe' => [null, null], + 'adpf' => [null, null], + 'ap' => [null, null], + 'ctue' => [null, null], + // 'ctuh_c' => [null, null], + // 'ctuh_nc' => [null, null], + 'epf' => [null, null], + 'epm' => [null, null], + 'ept' => [null, null], + ]; public static function getUsageCarbonEmissionPerMonth(array $params = [], array $crit = []): array { @@ -115,7 +78,7 @@ public static function getUsageCarbonEmissionPerMonth(array $params = [], array ]; $params = array_merge($default_params, $params); - list($start_date, $end_date) = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); + [$start_date, $end_date] = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); $params['args']['apply_filters']['dates'][0] = $start_date->format('Y-m-d\TH:i:s.v\Z'); $params['args']['apply_filters']['dates'][1] = $end_date->format('Y-m-d\TH:i:s.v\Z'); @@ -240,10 +203,10 @@ public static function getUsageCarbonEmissionlastTwoMonths(array $params = []) 'data' => [ [ 'x' => 114.840, - 'y' => '2025-02' + 'y' => '2025-02', ], [ 'x' => 126.342, - 'y' => '2025-03' + 'y' => '2025-03', ], ], 'unit' => 'KWh', @@ -262,7 +225,7 @@ public static function getUsageCarbonEmissionlastTwoMonths(array $params = []) 'date_interval' => [ $start_date->format($date_format), $end_date->format($date_format), - ] + ], ]; return [ @@ -275,8 +238,8 @@ public static function getHandledAssetCount(string $itemtype, bool $handled, arr { $itemtype_name = $itemtype::getTypeName(Session::getPluralNumber()); $itemtype_name = strtolower($itemtype_name); - $label = $handled ? - __("plugin carbon - handled %s", 'carbon') + $label = $handled + ? __("plugin carbon - handled %s", 'carbon') : __("plugin carbon - unhandled %s", 'carbon'); $default_params = [ 'label' => sprintf($label, $itemtype_name), @@ -321,7 +284,7 @@ public static function getHandledAssetsCounts(array $params = []): array $data = [ 'labels' => [], - 'series' => [] + 'series' => [], ]; foreach ($itemtypes as $itemtype) { $itemtype_name = $itemtype::getTypeName(Session::getPluralNumber()); @@ -334,7 +297,7 @@ public static function getHandledAssetsCounts(array $params = []): array $data['series'][0]['name'] = __('Handled', 'carbon'); $data['series'][0]['data'][] = [ 'value' => $handled['number'], - 'url' => $handled['url'] + 'url' => $handled['url'], ]; $data['series'][1]['name'] = __('Unhandled', 'carbon'); $data['series'][1]['data'][] = [ @@ -395,28 +358,127 @@ public static function getSumUsageEmissionsPerModel(array $params = [], array $w ]; return [ - 'data' => $data + 'data' => $data, ]; } /** - * Get usage CO2 emissions + * Get the value of an impact criteria for the embodied scope * * @param array $params + * @param array $crit * @return array */ - public static function getUsageCarbonEmission(array $params = []): array + public static function getImpactOfEmbodiedCriteria(string $impact_type, array $params = [], array $crit = []): array { $default_params = [ - 'label' => __('plugin carbon - Usage carbon emission', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'icon' => Type::getCriteriaIcon($impact_type), + ]; + $params = array_merge($default_params, $params); + if (count($crit['itemtype'] ?? []) === 0) { + $crit['itemtype'] = PLUGIN_CARBON_TYPES; + } else { + $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); + } + + $value = self::$impact_values[$impact_type][0]; + if ($value === null) { + $value = 'N/A'; + } else { + $value = Toolbox::getHumanReadableValue( + $value, + Type::getImpactUnit($impact_type) + ); + } + + return [ + 'number' => $value, + 'label' => $params['label'], + 'icon' => $params['icon'], + 'tooltip' => Type::getCriteriaTooltip($impact_type), + 'pictogram_file' => Type::getCriteriaPictogram($impact_type), + 'doc_url' => Type::getCriteriaInfoLink($impact_type), + ]; + } + + /** + * Get the value of an impact criteria for the usage scope + * + * @param array $params + * @param array $crit + * @return array + */ + public static function getImpactOfUsageCriteria(string $impact_type, array $params = [], array $crit = []): array + { + $default_params = [ + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'icon' => Type::getCriteriaIcon($impact_type), + ]; + $params = array_merge($default_params, $params); + if (count($crit['itemtype'] ?? []) === 0) { + $crit['itemtype'] = PLUGIN_CARBON_TYPES; + } else { + $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); + } + + $value = self::$impact_values[$impact_type][1]; + if ($value === null) { + $value = 'N/A'; + } else { + $value = Toolbox::getHumanReadableValue( + $value, + Type::getImpactUnit($impact_type) + ); + } + + return [ + 'number' => $value, + 'label' => $params['label'], + 'icon' => $params['icon'], + 'tooltip' => Type::getCriteriaTooltip($impact_type), + 'pictogram_file' => Type::getCriteriaPictogram($impact_type), + 'doc_url' => Type::getCriteriaInfoLink($impact_type), + ]; + } + + /** + * Get the value of an impact criteria for the embodied + usage scopes + * + * @param array $params + * @param array $crit + * @return array + */ + public static function getImpactOfEmbodiedAndUsageCriteria(string $impact_type, array $params = [], array $crit = []): array + { + $default_params = [ + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'icon' => Type::getCriteriaIcon($impact_type), ]; $params = array_merge($default_params, $params); - $gwp = Toolbox::getWeight(176483) . __('CO₂eq', 'carbon'); + if (count($crit['itemtype'] ?? []) === 0) { + $crit['itemtype'] = PLUGIN_CARBON_TYPES; + } else { + $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); + } + + if (self::$impact_values[$impact_type][0] === null && self::$impact_values[$impact_type][1] === null) { + $value = 'N/A'; + } else { + $value = (self::$impact_values[$impact_type][0] ?? 0) + (self::$impact_values[$impact_type][1] ?? 0); + $value = Toolbox::getHumanReadableValue( + $value, + Type::getImpactUnit($impact_type) + ); + } + return [ - 'number' => $gwp, + 'number' => $value, 'label' => $params['label'], 'icon' => $params['icon'], + 'tooltip' => Type::getCriteriaTooltip($impact_type), + 'pictogram_file' => Type::getCriteriaPictogram($impact_type), + 'doc_url' => Type::getCriteriaInfoLink($impact_type), ]; } } diff --git a/src/Dashboard/Grid.php b/src/Dashboard/Grid.php index 15c32dd5..61c72174 100644 --- a/src/Dashboard/Grid.php +++ b/src/Dashboard/Grid.php @@ -33,26 +33,16 @@ namespace GlpiPlugin\Carbon\Dashboard; use Computer; -use DateTimeImmutable; use Glpi\Dashboard\Filter; -use GlpiPlugin\Carbon\CarbonIntensity; use GlpiPlugin\Carbon\Config; -use GlpiPlugin\Carbon\Toolbox; -use Monitor; -use NetworkEquipment; +use GlpiPlugin\Carbon\Impact\Type; use Session; class Grid { - /** - * Get the description of additional cards for the dashboard - * - * @param null|array $cards existing cards - * @return array - */ - public static function getDashboardCards($cards): array + public static function getDashboardCards(): array { - $cards = $cards ?? []; + $cards = []; // Declare the following cards only if we show / edit the quick report page of the plugin $in_carbon_report_page = self::in_carbon_report_page(); @@ -73,15 +63,15 @@ public static function getDashboardCards($cards): array 'label' => __('Handled assets ratio', 'carbon'), 'provider' => Provider::class . '::getHandledAssetsRatio', 'args' => [ - 'itemtypes' => PLUGIN_CARBON_TYPES - ] + 'itemtypes' => PLUGIN_CARBON_TYPES, + ], ], 'plugin_carbon_assets_completeness' => [ 'widgettype' => ['stackedbars'], 'group' => $group, 'label' => __('Handled assets count', 'carbon'), 'provider' => Provider::class . '::getHandledAssetsCounts', - ] + ], ]; if (Config::isDemoMode()) { @@ -100,7 +90,7 @@ public static function getDashboardCards($cards): array /** * Determine if the user is viewing or editing the reporting dashboard * - * @return boolean + * @return bool */ protected static function in_carbon_report_page(): bool { @@ -164,67 +154,64 @@ protected static function getStandardCards(): array ]; } - $new_cards += [ - // Usage impact - 'plugin_carbon_total_usage_power' => [ - 'widgettype' => ['bigNumber'], - 'group' => $group, - 'label' => __('Usage power consumption', 'carbon'), - 'provider' => Provider::class . '::getUsagePower', - ], - 'plugin_carbon_total_usage_carbon_emission' => [ - 'widgettype' => ['bigNumber'], - 'group' => $group, - 'label' => __('Usage carbon emission', 'carbon'), - 'provider' => Provider::class . '::getUsageCarbonEmission', - ], - 'plugin_carbon_total_usage_adp_impact' => [ - 'widgettype' => ['bigNumber'], - 'group' => $group, - 'label' => __('Usage abiotic depletion potential', 'carbon'), - 'provider' => Provider::class . '::getUsageAbioticDepletion', - ], + $impact_types = Type::getImpactTypes(); - // Embodied impact - 'plugin_carbon_embodied_gwp_impact' => [ - 'widgettype' => ['bigNumber'], - 'group' => $group, - 'label' => __('Embodied global warming potential', 'carbon'), - 'provider' => Provider::class . '::getEmbodiedGlobalWarming', - ], - 'plugin_carbon_embodied_pe_impact' => [ - 'widgettype' => ['bigNumber'], - 'group' => $group, - 'label' => __('Embodied primary energy consumed', 'carbon'), - 'provider' => Provider::class . '::getEmbodiedPrimaryEnergy', - ], - 'plugin_carbon_embodied_adp_impact' => [ + // Embodied impact + foreach ($impact_types as $impact_type) { + $key = "plugin_carbon_embodied_{$impact_type}_impact"; + if (isset($new_cards[$key])) { + trigger_error("The card $key already exists", E_USER_WARNING); + } + $new_cards[$key] = [ 'widgettype' => ['bigNumber'], 'group' => $group, - 'label' => __('Embodied abiotic depletion potential', 'carbon'), - 'provider' => Provider::class . '::getEmbodiedAbioticDepletion', - ], + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'provider' => Provider::class . '::getImpactOfEmbodiedCriteria', + 'args' => [ + 'impact_type' => $impact_type, + ], + ]; + } - // embodied + usage impact - 'plugin_carbon_total_gwp_impact' => [ + // Usage impact + foreach ($impact_types as $impact_type) { + $key = "plugin_carbon_usage_{$impact_type}_impact"; + if (isset($new_cards[$key])) { + trigger_error("The card $key already exists", E_USER_WARNING); + } + $new_cards[$key] = [ 'widgettype' => ['bigNumber'], 'group' => $group, - 'label' => __('Global warming potential', 'carbon'), - 'provider' => Provider::class . '::getTotalGlobalWarming', - ], - 'plugin_carbon_total_adp_impact' => [ + 'label' => Type::getUsageImpactLabel($impact_type), + 'provider' => Provider::class . '::getImpactOfUsageCriteria', + 'args' => [ + 'impact_type' => $impact_type, + ], + ]; + } + + // embodied + usage impact + foreach ($impact_types as $impact_type) { + $key = "plugin_carbon_all_scopes_{$impact_type}_impact"; + if (isset($new_cards[$key])) { + trigger_error("The card $key already exists", E_USER_WARNING); + } + $new_cards[$key] = [ 'widgettype' => ['bigNumber'], 'group' => $group, - 'label' => __('Abiotic depletion potential', 'carbon'), - 'provider' => Provider::class . '::getTotalAbioticDepletion', - ], - ]; + 'label' => Type::getEmbodiedAndUsageImpactLabel($impact_type), + 'provider' => Provider::class . '::getImpactOfEmbodiedAndUsageCriteria', + 'args' => [ + 'impact_type' => $impact_type, + ], + ]; + } return $new_cards; } /** - * getdescription of cards for dashboard in the reporting page of the plugin + * Get description of cards for dashboard in the reporting page of the plugin * * @return array */ @@ -244,13 +231,13 @@ protected static function getReportCards(): array 'group' => $group, 'label' => sprintf(__('Unhandled %s ratio', 'carbon'), $type_name), 'provider' => Provider::class . '::getHandledAssetsCounts', - 'args' => ['itemtypes' => $itemtype] + 'args' => ['itemtypes' => $itemtype], ], ]; } - // Usage impact $new_cards += [ + // Usage impact 'plugin_carbon_report_usage_carbon_emission_ytd' => [ 'widgettype' => ['usage_carbon_emission_ytd'], 'group' => $group, @@ -263,8 +250,8 @@ protected static function getReportCards(): array 'label' => __('Monthly carbon emission', 'carbon'), 'provider' => Provider::class . '::getUsageCarbonEmissionlastTwoMonths', 'args' => [ - 'crit' => [] - ] + 'crit' => [], + ], ], 'plugin_carbon_report_usage_carbon_emissions_graph' => [ 'widgettype' => ['usage_gwp_monthly'], @@ -272,8 +259,8 @@ protected static function getReportCards(): array 'label' => __('Usage global warming potential chart', 'carbon'), 'provider' => Provider::class . '::getUsageCarbonEmissionPerMonth', 'args' => [ - 'crit' => [] - ] + 'crit' => [], + ], ], 'plugin_carbon_report_biggest_gwp_per_model' => [ 'widgettype' => ['most_gwp_impacting_computer_models'], @@ -281,33 +268,54 @@ protected static function getReportCards(): array 'label' => __('Biggest monthly averaged carbon emission per model', 'carbon'), 'provider' => Provider::class . '::getSumUsageEmissionsPerModel', ], - 'plugin_carbon_report_usage_abiotic_depletion' => [ - 'widgettype' => ['usage_abiotic_depletion'], - 'group' => $group, - 'label' => __('Usage abiotic depletion potential', 'carbon'), - 'provider' => Provider::class . '::getUsageAbioticDepletion', - ], + ]; + foreach (Type::getImpactTypes() as $impact_type) { // Embodied impact - 'plugin_carbon_report_embodied_global_warming' => [ - 'widgettype' => ['embodied_global_warming'], + $key = "plugin_carbon_report_embodied_{$impact_type}_impact"; + if (isset($new_cards[$key])) { + trigger_error("The card $key already exists", E_USER_WARNING); + } + $new_cards[$key] = [ + 'widgettype' => ['impact_criteria_number'], 'group' => $group, - 'label' => __('Embodied global warming potential', 'carbon'), - 'provider' => Provider::class . '::getEmbodiedGlobalWarming', - ], - 'plugin_carbon_report_embodied_abiotic_depletion' => [ - 'widgettype' => ['embodied_abiotic_depletion'], + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'provider' => Provider::class . '::getImpactOfEmbodiedCriteria', + 'args' => [ + 'impact_type' => $impact_type, + ], + ]; + + // Usage impact + $key = "plugin_carbon_report_usage_{$impact_type}_impact"; + if (isset($new_cards[$key])) { + trigger_error("The card $key already exists", E_USER_WARNING); + } + $new_cards[$key] = [ + 'widgettype' => ['impact_criteria_number'], 'group' => $group, - 'label' => __('Embodied abiotic depletion potential', 'carbon'), - 'provider' => Provider::class . '::getEmbodiedAbioticDepletion', - ], - 'plugin_carbon_report_embodied_pe_impact' => [ - 'widgettype' => ['embodied_primary_energy'], + 'label' => Type::getUsageImpactLabel($impact_type), + 'provider' => Provider::class . '::getImpactOfUsageCriteria', + 'args' => [ + 'impact_type' => $impact_type, + ], + ]; + + // Embodied + Usage + $key = "plugin_carbon_all_scopes_{$impact_type}_impact"; + if (isset($new_cards[$key])) { + trigger_error("The card $key already exists", E_USER_WARNING); + } + $new_cards[$key] = [ + 'widgettype' => ['impact_criteria_number'], 'group' => $group, - 'label' => __('Embodied primary energy consumed', 'carbon'), - 'provider' => Provider::class . '::getEmbodiedPrimaryEnergy', - ], - ]; + 'label' => Type::getEmbodiedAndUsageImpactLabel($impact_type), + 'provider' => Provider::class . '::getImpactOfEmbodiedAndUsageCriteria', + 'args' => [ + 'impact_type' => $impact_type, + ], + ]; + } // Informational content $new_cards += [ @@ -319,7 +327,7 @@ protected static function getReportCards(): array 'plugin_carbon_report_methodology_information' => [ 'widgettype' => ['methodology_information'], 'group' => $group, - 'label' => __('Environmental impact methodology_information', 'carbon'), + 'label' => __('Environmental impact methodology information', 'carbon'), ], ]; diff --git a/src/Dashboard/Provider.php b/src/Dashboard/Provider.php index b30c10d0..6d928dc7 100644 --- a/src/Dashboard/Provider.php +++ b/src/Dashboard/Provider.php @@ -32,8 +32,9 @@ namespace GlpiPlugin\Carbon\Dashboard; -use Computer; -use ComputerModel; +use CommonDBTM; +use Computer as GlpiComputer; +use ComputerModel as GlpiComputerModel; use ComputerType as GlpiComputerType; use DateInterval; use DateTime; @@ -41,17 +42,19 @@ use DBmysql; use DbUtils; use Glpi\Dashboard\Filter; -use GlpiPlugin\Carbon\ComputerType; -use GlpiPlugin\Carbon\EmbodiedImpact; -use GlpiPlugin\Carbon\Toolbox; +use Glpi\DBAL\QueryExpression; +use Glpi\DBAL\QuerySubQuery; use GlpiPlugin\Carbon\CarbonEmission; use GlpiPlugin\Carbon\CarbonIntensity; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\Zone; +use GlpiPlugin\Carbon\ComputerType; +use GlpiPlugin\Carbon\EmbodiedImpact; +use GlpiPlugin\Carbon\Impact\Type; use GlpiPlugin\Carbon\SearchOptions; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Toolbox; use GlpiPlugin\Carbon\UsageImpact; -use Glpi\DBAL\QueryExpression; -use Glpi\DBAL\QuerySubQuery; +use GlpiPlugin\Carbon\Zone; +use RuntimeException; use Search; use Session; use Toolbox as GlpiToolbox; @@ -74,7 +77,7 @@ public static function getSum(string $table, string $field, array $params = [], $request = [ 'SELECT' => [ - 'SUM' => "$field AS total" + 'SUM' => "$field AS total", ], 'FROM' => $table, 'WHERE' => $crit, @@ -98,7 +101,6 @@ public static function getSum(string $table, string $field, array $params = [], * * @param array $params * @param array $where - * * @return array of: * - mixed 'number': sum for the model * - string 'url': url to redirect when clicking on the slice @@ -109,37 +111,59 @@ public static function getSumUsageEmissionsPerModel(array $params = [], array $w /** @var DBmysql $DB */ global $DB; - $computermodels_table = ComputerModel::getTable(); + $glpi_computermodels_table = GlpiComputerModel::getTable(); $carbonemissions_table = CarbonEmission::getTable(); + $glpi_computer_table = getTableForItemType(GlpiComputer::class); + $computer_type_table = getTableForItemType(ComputerType::class); $sql_year_month = "DATE_FORMAT(`date`, '%Y-%m')"; $entity_restrict = (new DbUtils())->getEntitiesRestrictCriteria($carbonemissions_table, '', '', 'auto'); $subrequest = [ 'SELECT' => [ - ComputerModel::getTableField('id'), - ComputerModel::getTableField('name'), - /** */ + GlpiComputerModel::getTableField('id'), + GlpiComputerModel::getTableField('name'), new QueryExpression("$sql_year_month as `date`"), 'SUM' => 'emission_per_day AS monthly_emission_per_model', new QueryExpression('COUNT(DISTINCT ' . CarbonEmission::getTableField('items_id') . ') AS nb_computers_per_model'), ], - 'FROM' => $computermodels_table, + 'FROM' => $glpi_computermodels_table, 'INNER JOIN' => [ $carbonemissions_table => [ 'FKEY' => [ $carbonemissions_table => 'models_id', - $computermodels_table => 'id' - ] + $glpi_computermodels_table => 'id', + ], + ], + $glpi_computer_table => [ + 'FKEY' => [ + $carbonemissions_table => 'items_id', + $glpi_computer_table => 'id', + [ + 'AND' => [CarbonEmission::getTableField('itemtype') => GlpiComputer::class], + ], + ], + ], + ], + 'LEFT JOIN' => [ + $computer_type_table => [ + 'FKEY' => [ + $glpi_computer_table => 'computertypes_id', + $computer_type_table => 'computertypes_id', + ], ], ], 'WHERE' => [ - CarbonEmission::getTableField('itemtype') => Computer::class + CarbonEmission::getTableField('itemtype') => GlpiComputer::class, + 'OR' => [ + [ComputerType::getTableField('is_ignore') => 0], + [ComputerType::getTableField('is_ignore') => null], + ], ] + $entity_restrict + $where, 'GROUPBY' => [ - ComputerModel::getTableField('id'), - new QueryExpression($sql_year_month) + GlpiComputerModel::getTableField('id'), + new QueryExpression($sql_year_month), ], - 'ORDER' => ComputerModel::getTableField('name'), + 'ORDER' => GlpiComputerModel::getTableField('name'), ]; $request = [ @@ -147,17 +171,17 @@ public static function getSumUsageEmissionsPerModel(array $params = [], array $w 'id', 'name', 'AVG' => 'monthly_emission_per_model AS total_per_model', - 'MAX' => 'nb_computers_per_model AS nb_computers_per_model' + 'MAX' => 'nb_computers_per_model AS nb_computers_per_model', ], 'FROM' => new QuerySubQuery($subrequest, 'montly_per_model'), 'WHERE' => [], 'GROUPBY' => ['id'], 'ORDERBY' => 'total_per_model DESC', - 'LIMIT' => $params['limit'] ?? 9999 + 'LIMIT' => $params['limit'] ?? 9999, ]; if ($where !== []) { - $filter_criteria = self::getFiltersCriteria(Computer::getTable(), []); + $filter_criteria = self::getFiltersCriteria(GlpiComputer::getTable(), []); $request['WHERE'] += $filter_criteria; } $result = $DB->request($request); @@ -168,17 +192,17 @@ public static function getSumUsageEmissionsPerModel(array $params = [], array $w } $co2eq = __('CO₂eq', 'carbon'); $units = [ - __('g', 'carbon') . ' ' . $co2eq, - __('Kg', 'carbon') . ' ' . $co2eq, - __('t', 'carbon') . ' ' . $co2eq, - __('Kt', 'carbon') . ' ' . $co2eq, - __('Mt', 'carbon') . ' ' . $co2eq, - __('Gt', 'carbon') . ' ' . $co2eq, - __('Tt', 'carbon') . ' ' . $co2eq, - __('Pt', 'carbon') . ' ' . $co2eq, - __('Et', 'carbon') . ' ' . $co2eq, - __('Zt', 'carbon') . ' ' . $co2eq, - __('Yt', 'carbon') . ' ' . $co2eq, + __('g', 'carbon') . ' ' . $co2eq, + __('Kg', 'carbon') . ' ' . $co2eq, + __('t', 'carbon') . ' ' . $co2eq, + __('Kt', 'carbon') . ' ' . $co2eq, + __('Mt', 'carbon') . ' ' . $co2eq, + __('Gt', 'carbon') . ' ' . $co2eq, + __('Tt', 'carbon') . ' ' . $co2eq, + __('Pt', 'carbon') . ' ' . $co2eq, + __('Et', 'carbon') . ' ' . $co2eq, + __('Zt', 'carbon') . ' ' . $co2eq, + __('Yt', 'carbon') . ' ' . $co2eq, ]; $emissions = Toolbox::scaleSerie($emissions, $units); $models_id = null; @@ -187,75 +211,148 @@ public static function getSumUsageEmissionsPerModel(array $params = [], array $w [ 'field' => 40, 'searchtype' => 'equals', - 'value' => &$models_id // Reference to $models_id ! + 'value' => &$models_id, // Reference to $models_id ! ], ], - 'reset' => 'reset' + 'reset' => 'reset', ]; foreach ($result as $row) { $count = $row['nb_computers_per_model']; $data['series'][] = (float) $emissions['serie'][$row['id']]; - $data['labels'][] = $row['name'] . " (" . $row['nb_computers_per_model'] . " " . Computer::getTypeName($count) . ")"; + $data['labels'][] = $row['name'] . " (" . $row['nb_computers_per_model'] . " " . GlpiComputer::getTypeName($count) . ")"; $models_id = $row['id']; - $data['url'][] = Computer::getSearchURL() . '?' . GlpiToolbox::append_params($search_criteria); + $data['url'][] = GlpiComputer::getSearchURL() . '?' . GlpiToolbox::append_params($search_criteria); } $data['unit'] = $emissions['unit']; return [ - 'data' => $data + 'data' => $data, ]; } - public static function getSumEmissionsPerType(array $where = []) + /** + * Undocumented function + * + * @param array $params + * @param array $where + * @return array + */ + public static function getSumUsageEmissionsPerType(array $params = [], array $where = []): array { /** @var DBmysql $DB */ global $DB; - $glpicomputertypes_table = GlpiComputerType::getTable(); + $glpi_computertypes_table = GlpiComputerType::getTable(); $carbonemissions_table = CarbonEmission::getTable(); + $computer_type_table = getTableForItemType(ComputerType::class); + $sql_year_month = "DATE_FORMAT(`date`, '%Y-%m')"; $entity_restrict = (new DbUtils())->getEntitiesRestrictCriteria($carbonemissions_table, '', '', 'auto'); - $request = [ + $subrequest = [ 'SELECT' => [ GlpiComputerType::getTableField('id'), GlpiComputerType::getTableField('name'), - 'SUM' => 'emission_per_day AS total_per_type', + new QueryExpression("$sql_year_month as `date`"), + 'SUM' => 'emission_per_day AS monthly_emission_per_type', new QueryExpression('COUNT(DISTINCT ' . CarbonEmission::getTableField('items_id') . ') AS nb_computers_per_type'), ], - 'FROM' => $glpicomputertypes_table, + 'FROM' => $glpi_computertypes_table, 'INNER JOIN' => [ $carbonemissions_table => [ 'FKEY' => [ $carbonemissions_table => 'types_id', - $glpicomputertypes_table => 'id' - ] + $glpi_computertypes_table => 'id', + ], + ], + ], + 'LEFT JOIN' => [ + $computer_type_table => [ + 'FKEY' => [ + $glpi_computertypes_table => 'id', + $computer_type_table => 'computertypes_id', + ], ], ], 'WHERE' => [ - CarbonEmission::getTableField('itemtype') => Computer::class - ] + $entity_restrict, - 'GROUPBY' => GlpiComputerType::getTableField('id'), + CarbonEmission::getTableField('itemtype') => GlpiComputer::class, + 'OR' => [ + [ComputerType::getTableField('is_ignore') => 0], + [ComputerType::getTableField('is_ignore') => null], + ], + ] + $entity_restrict + $where, + 'GROUPBY' => [ + GlpiComputerType::getTableField('id'), + new QueryExpression($sql_year_month), + ], 'ORDER' => GlpiComputerType::getTableField('name'), ]; + $request = [ + 'SELECT' => [ + 'id', + 'name', + 'AVG' => 'monthly_emission_per_type AS total_per_type', + 'MAX' => 'nb_computers_per_type AS nb_computers_per_type', + ], + 'FROM' => new QuerySubQuery($subrequest, 'montly_per_type'), + 'WHERE' => [], + 'GROUPBY' => ['id'], + 'ORDERBY' => 'total_per_type DESC', + 'LIMIT' => $params['limit'] ?? 9999, + ]; + if ($where !== []) { - $request['WHERE'] += $where; + $filter_criteria = self::getFiltersCriteria(GlpiComputer::getTable(), []); + $request['WHERE'] += $filter_criteria; } $result = $DB->request($request); - $data = []; + $emissions = []; + foreach ($result as $row) { + $emissions[$row['id']] = $row['total_per_type']; + } + $co2eq = __('CO₂eq', 'carbon'); + $units = [ + __('g', 'carbon') . ' ' . $co2eq, + __('Kg', 'carbon') . ' ' . $co2eq, + __('t', 'carbon') . ' ' . $co2eq, + __('Kt', 'carbon') . ' ' . $co2eq, + __('Mt', 'carbon') . ' ' . $co2eq, + __('Gt', 'carbon') . ' ' . $co2eq, + __('Tt', 'carbon') . ' ' . $co2eq, + __('Pt', 'carbon') . ' ' . $co2eq, + __('Et', 'carbon') . ' ' . $co2eq, + __('Zt', 'carbon') . ' ' . $co2eq, + __('Yt', 'carbon') . ' ' . $co2eq, + ]; + $emissions = Toolbox::scaleSerie($emissions, $units); + $types_id = null; + $search_criteria = [ + 'criteria' => [ + [ + 'field' => 40, + 'searchtype' => 'equals', + 'value' => &$types_id, // Reference to $types_id ! + ], + ], + 'reset' => 'reset', + ]; + foreach ($result as $row) { $count = $row['nb_computers_per_type']; - $data[] = [ - 'number' => number_format($row['total_per_type'], PLUGIN_CARBON_DECIMALS, ',', ''), - 'url' => GlpiComputerType::getFormURLWithID($row['id']), - 'label' => $row['name'] . " (" . $row['nb_computers_per_type'] . " " . Computer::getTypeName($count) . ")", - ]; + $data['series'][] = (float) $emissions['serie'][$row['id']]; + $data['labels'][] = $row['name'] . " (" . $row['nb_computers_per_type'] . " " . GlpiComputer::getTypeName($count) . ")"; + $types_id = $row['id']; + $data['url'][] = GlpiComputer::getSearchURL() . '?' . GlpiToolbox::append_params($search_criteria); } - return $data; + $data['unit'] = $emissions['unit']; + + return [ + 'data' => $data, + ]; } /** @@ -269,18 +366,18 @@ public static function getSumPowerPerModel(array $where = []) /** @var DBmysql $DB */ global $DB; - $computers_table = Computer::getTable(); - $computermodels_table = ComputerModel::getTable(); + $computers_table = GlpiComputer::getTable(); + $computermodels_table = GlpiComputerModel::getTable(); $glpiComputertypes_table = GlpiComputerType::getTable(); $computertype_table = ComputerType::getTable(); $entity_restrict = (new DbUtils())->getEntitiesRestrictCriteria($computers_table, '', '', 'auto'); $request = [ 'SELECT' => [ - ComputerModel::getTableField('id'), - ComputerModel::getTableField('name'), - 'SUM' => ComputerModel::getTableField('power_consumption') . ' AS total_per_model', - 'COUNT' => Computer::getTableField('id') . ' AS nb_computers_per_model', + GlpiComputerModel::getTableField('id'), + GlpiComputerModel::getTableField('name'), + 'SUM' => GlpiComputerModel::getTableField('power_consumption') . ' AS total_per_model', + 'COUNT' => GlpiComputer::getTableField('id') . ' AS nb_computers_per_model', ], 'FROM' => $computermodels_table, 'INNER JOIN' => [ @@ -288,24 +385,24 @@ public static function getSumPowerPerModel(array $where = []) 'FKEY' => [ $computermodels_table => 'id', $computers_table => 'computermodels_id', - ] + ], ], $glpiComputertypes_table => [ 'FKEY' => [ $computers_table => 'computertypes_id', $glpiComputertypes_table => 'id', - ] + ], ], $computertype_table => [ 'FKEY' => [ $glpiComputertypes_table => 'id', $computertype_table => 'computertypes_id', - ] - ] + ], + ], ], 'WHERE' => $entity_restrict, - 'GROUPBY' => ComputerModel::getTableField('id'), - 'ORDER' => ComputerModel::getTableField('name'), + 'GROUPBY' => GlpiComputerModel::getTableField('id'), + 'ORDER' => GlpiComputerModel::getTableField('name'), ]; if ($where !== []) { $request['WHERE'] += $where; @@ -316,7 +413,7 @@ public static function getSumPowerPerModel(array $where = []) foreach ($result as $row) { $data[] = [ 'number' => number_format($row['total_per_model'], PLUGIN_CARBON_DECIMALS), - 'url' => ComputerModel::getFormURLWithID($row['id']), + 'url' => GlpiComputerModel::getFormURLWithID($row['id']), 'label' => $row['name'] . " (" . $row['nb_computers_per_model'] . " computers)", ]; } @@ -365,7 +462,8 @@ public static function getHandledAssetsRatio(array $params = []) * * Handled assets are assets with enough data to calculate usage carbon emission * - * @param array|string $itemtypes types of asets to count + * @template T of CommonDBTM + * @param array[class-string]|class-string $itemtypes types of asets to count * @param array $params * @return array */ @@ -385,7 +483,7 @@ public static function getHandledAssetsCounts($itemtypes, array $params = []): a $data = [ 'labels' => [], - 'series' => [] + 'series' => [], ]; foreach ($itemtypes as $itemtype) { $itemtype_name = $itemtype::getTypeName(Session::getPluralNumber()); @@ -393,18 +491,24 @@ public static function getHandledAssetsCounts($itemtypes, array $params = []): a $handled = self::getHandledAssetCount($itemtype, true, $params); $unhandled = self::getHandledAssetCount($itemtype, false, $params); + $ignored = self::getIgnoredAssetCount($itemtype, $params); $data['labels'][] = $itemtype_name; $data['series'][0]['name'] = __('Handled', 'carbon'); $data['series'][0]['data'][] = [ 'value' => $handled['number'], - 'url' => $handled['url'] + 'url' => $handled['url'], ]; $data['series'][1]['name'] = __('Unhandled', 'carbon'); $data['series'][1]['data'][] = [ 'value' => $unhandled['number'], 'url' => $unhandled['url'], ]; + $data['series'][2]['name'] = __('Ignored', 'carbon'); + $data['series'][2]['data'][] = [ + 'value' => $ignored['number'], + 'url' => $ignored['url'], + ]; } return [ @@ -426,8 +530,8 @@ public static function getHandledAssetCount(string $itemtype, bool $handled, arr { $itemtype_name = $itemtype::getTypeName(Session::getPluralNumber()); $itemtype_name = strtolower($itemtype_name); - $label = $handled ? - __("plugin carbon - handled %s", 'carbon') + $label = $handled + ? __("plugin carbon - handled %s", 'carbon') : __("plugin carbon - unhandled %s", 'carbon'); $default_params = [ 'label' => sprintf($label, $itemtype_name), @@ -440,10 +544,59 @@ public static function getHandledAssetCount(string $itemtype, bool $handled, arr [ 'field' => SearchOptions::IS_HISTORIZABLE, 'searchtype' => 'equals', - 'value' => $handled ? 1 : 0 + 'value' => $handled ? 1 : 0, ], ], - 'reset' => 'reset' + 'reset' => 'reset', + ]; + $search_criteria['criteria'][] = [ + 'field' => SearchOptions::IS_IGNORED, + 'searchtype' => 'equals', + 'value' => 0, + ]; + $search_data = Search::prepareDatasForSearch($itemtype, $search_criteria); + Search::constructSQL($search_data); + Search::constructData($search_data, true); + + $search_url = GlpiToolbox::getItemTypeSearchURL($itemtype); + $count = $search_data['data']['totalcount'] ?? null; + $url = $search_url . '?' . GlpiToolbox::append_params($search_criteria); + + return [ + 'number' => $count, + 'url' => $url, + 'label' => $params['label'], + 'icon' => $params['icon'], + ]; + } + + /** + * Count the assets having all required data to compute carbon intensity + * + * @param string $itemtype the itemtype to count + * @param array $params + * @return array count of items + */ + public static function getIgnoredAssetCount(string $itemtype, array $params = []): array + { + $itemtype_name = $itemtype::getTypeName(Session::getPluralNumber()); + $itemtype_name = strtolower($itemtype_name); + $label = __("plugin carbon - ignored %s", 'carbon'); + $default_params = [ + 'label' => sprintf($label, $itemtype_name), + 'icon' => '', + ]; + $params = array_merge($default_params, $params); + + $search_criteria = [ + 'criteria' => [ + [ + 'field' => SearchOptions::IS_IGNORED, + 'searchtype' => 'equals', + 'value' => 1, + ], + ], + 'reset' => 'reset', ]; // $itemtype_table = (new DbUtils())->getTableForItemType($itemtype); // Exploit defaultWhere to inject WHERE criterias from dashboard filters @@ -498,15 +651,15 @@ public static function getUsagePower(array $params = []): array } $itemtype_type = 'GlpiPlugin\\Carbon\\' . $itemtype . 'Type'; $itemtype_model = $itemtype . 'Model'; - $model_power_field = DBMysql::quoteName($itemtype_model::getTableField('power_consumption')); - $type_power_field = DBMysql::quoteName($itemtype_type::getTableField('power_consumption')); + $model_power_field = DBmysql::quoteName($itemtype_model::getTableField('power_consumption')); + $type_power_field = DBmysql::quoteName($itemtype_type::getTableField('power_consumption')); $request = (new $type_history())->getEvaluableQuery(); // If a value is set in a model, it cannut be reset to NULL, then let's consoder 0 as NULL // and coalesce model, power and 0 to implement precedence $sum_coalesce = new QueryExpression( 'SUM(COALESCE(' . 'IF(' . $model_power_field . ' > 0, ' . $model_power_field . ', NULL),' - . 'IF(' . $type_power_field . ' > 0, ' . $type_power_field . ', NULL),' + . 'IF(' . $type_power_field . ' > 0, ' . $type_power_field . ', NULL),' . '0' . ')) AS total' ); @@ -538,32 +691,58 @@ public static function getUsagePower(array $params = []): array /** * Get usage CO2 emissions + * @deprecated 1.2.0 * * @param array $params * @return array */ public static function getUsageCarbonEmission(array $params = []): array + { + return self::getImpactOfUsageCriteria('gwp', $params, ['itemtype' => PLUGIN_CARBON_TYPES]); + } + + /** + * Get usage impact for the given criteria + * + * @param string $impact_type Impact type identifier + * @param array $params + * @param array $crit + * @return array + */ + public static function getImpactOfUsageCriteria(string $impact_type, array $params = [], array $crit = []): array { $default_params = [ - 'label' => __('plugin carbon - Usage carbon emission', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'icon' => Type::getCriteriaIcon($impact_type), ]; $params = array_merge($default_params, $params); - $crit = [ - 'itemtype' => PLUGIN_CARBON_TYPES, - ]; + if (count($crit['itemtype'] ?? []) === 0) { + $crit['itemtype'] = PLUGIN_CARBON_TYPES; + } else { + $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); + } - $gwp = self::getSum(CarbonEmission::getTable(), 'emission_per_day', $params, $crit); - if ($gwp === null) { - $gwp = 'N/A'; + if ($impact_type !== 'gwp') { + $value = self::getSum(getTableForItemType(UsageImpact::class), $impact_type, $params, $crit); + } else { + $value = self::getSum(getTableForItemType(CarbonEmission::class), 'emission_per_day', $params, $crit); + } + if ($value === null) { + $value = 'N/A'; } else { - $gwp = Toolbox::getWeight($gwp) . __('CO₂eq', 'carbon'); + $value = Toolbox::getHumanReadableValue( + $value, + Type::getImpactUnit($impact_type) + ); } return [ - 'number' => $gwp, + 'number' => $value, 'label' => $params['label'], 'icon' => $params['icon'], + 'tooltip' => Type::getCriteriaTooltip($impact_type), + 'pictogram_file' => Type::getCriteriaPictogram($impact_type), + 'doc_url' => Type::getCriteriaInfoLink($impact_type), ]; } @@ -575,12 +754,12 @@ public static function getUsageCarbonEmission(array $params = []): array */ public static function getUsageCarbonEmissionYearToDate(array $params = []): array { - list($start_date, $end_date) = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); + [$start_date, $end_date] = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); $params['apply_filters'] = [ 'dates' => [ $start_date->format('Y-m-d\TH:i:s.v\Z'), $end_date->format('Y-m-d\TH:i:s.v\Z'), - ] + ], ]; return self::getUsageCarbonEmission($params); } @@ -590,23 +769,23 @@ public static function getCarbonIntensity(array $params): array /** @var DBmysql $DB */ global $DB; - $source = new CarbonIntensitySource(); + $source = new Source(); $zone = new Zone(); $source->getFromDBByCrit([ - 'name' => 'RTE' + 'name' => 'RTE', ]); $zone->getFromDBByCrit([ - 'name' => 'France' + 'name' => 'France', ]); $request = [ // 'SELECT' => [ - // CarbonIntensity::getTableField('intensity'), - // CarbonIntensity::getTableField('date'), + // CarbonIntensity::getTableField('intensity'), + // CarbonIntensity::getTableField('date'), // ], 'FROM' => CarbonIntensity::getTable(), 'WHERE' => [ - CarbonIntensitySource::getForeignKeyField() => $source->getID(), + Source::getForeignKeyField() => $source->getID(), Zone::getForeignKeyField() => $zone->getID(), ], ]; @@ -623,7 +802,7 @@ public static function getCarbonIntensity(array $params): array $count_request['COUNT'] = 'c'; $count = $DB->request($count_request); if ($count->numrows() !== 1) { - throw new \RuntimeException("Failed to count carbon intensity samples"); + throw new RuntimeException("Failed to count carbon intensity samples"); } $date = CarbonIntensity::getTableField('date'); $intensity = CarbonIntensity::getTableField('intensity'); @@ -634,12 +813,12 @@ public static function getCarbonIntensity(array $params): array $intensity = ['AVG' => "$intensity AS `intensity`"]; $request['GROUPBY'] = new QueryExpression($date); $request['LIMIT'] = 10; - } else if ($count > 365 * 24) { + } elseif ($count > 365 * 24) { $date = $DB->quoteName($date); $date = "DATE_FORMAT($date, '%Y-%m')"; $intensity = ['AVG' => "$intensity AS `intensity`"]; $request['GROUPBY'] = new QueryExpression($date); - } else if ($count > 30 * 24) { + } elseif ($count > 30 * 24) { $date = $DB->quoteName($date); $date = "DATE_FORMAT($date, '%Y-%m-%d')"; $intensity = ['AVG' => "$intensity AS `intensity`"]; @@ -662,7 +841,7 @@ public static function getCarbonIntensity(array $params): array [ 'name' => sprintf('%s %s', $source->fields['name'], $zone->fields['name']), 'data' => [], - ] + ], ], ]; foreach ($rows as $row) { @@ -712,105 +891,19 @@ public static function getFiltersCriteria(string $table = "", array $apply_filte return $criteria; } - public static function getEmbodiedGlobalWarming(array $params = []): array - { - $default_params = [ - 'label' => __('Total embodied global warming potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', - ]; - $params = array_merge($default_params, $params); - - $crit = [ - 'itemtype' => PLUGIN_CARBON_TYPES, - ]; - $value = self::getSum(EmbodiedImpact::getTable(), 'gwp', $params, $crit); - if ($value === null) { - $value = 'N/A'; - } else { - $value = Toolbox::getWeight($value) . __('CO₂eq', 'carbon'); - } - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - - /** - * Get the primary energy consumed to build assets - * - * @param array $params - * @return array - */ - public static function getEmbodiedPrimaryEnergy(array $params = []): array - { - $crit = [ - 'itemtype' => PLUGIN_CARBON_TYPES, - ]; - $value = self::getSum(EmbodiedImpact::getTable(), 'pe', $params, $crit); - if ($value === null) { - $value = 'N/A'; - } else { - // Convert into Watt.hour - $value = Toolbox::getEnergy($value / 3600); - } - - $params['icon'] = 'fa-solid fa-fire-flame-simple'; - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - /** - * Total embodied abiotic depletion potential in antimony equivalent + * Total embodied impact for the given criteria * - * @param array $params - * @param array $crit - * @return array - */ - public static function getEmbodiedAbioticDepletion(array $params = [], array $crit = []): array - { - $default_params = [ - 'label' => __('Embodied abiotic depletion potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', - ]; - $params = array_merge($default_params, $params); - - if (count($crit['itemtype'] ?? []) === 0) { - $crit['itemtype'] = PLUGIN_CARBON_TYPES; - } else { - $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); - } - $value = self::getSum(EmbodiedImpact::getTable(), 'adp', $params, $crit); - if ($value === null) { - $value = 'N/A'; - } else { - $value = Toolbox::getWeight($value) . __('Sbeq', 'carbon'); - } - - return [ - 'number' => $value, - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - - /** - * Get usage abiotic depletion potential in antimony equivalent - * - * @param array $params - * @param array $crit + * @param string $impact_type Impact type identifier + * @param array $params + * @param array $crit * @return array */ - public static function getUsageAbioticDepletion(array $params = [], array $crit = []): array + public static function getImpactOfEmbodiedCriteria(string $impact_type, array $params = [], array $crit = []): array { $default_params = [ - 'label' => __('Usage abiotic depletion potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'icon' => Type::getCriteriaIcon($impact_type), ]; $params = array_merge($default_params, $params); if (count($crit['itemtype'] ?? []) === 0) { @@ -819,32 +912,39 @@ public static function getUsageAbioticDepletion(array $params = [], array $crit $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); } - $value = self::getSum(UsageImpact::getTable(), 'adp', $params, $crit); + $value = self::getSum(EmbodiedImpact::getTable(), $impact_type, $params, $crit); if ($value === null) { $value = 'N/A'; } else { - $value = Toolbox::getWeight($value) . __('Sbeq', 'carbon'); + $value = Toolbox::getHumanReadableValue( + $value, + Type::getImpactUnit($impact_type) + ); } return [ 'number' => $value, 'label' => $params['label'], 'icon' => $params['icon'], + 'tooltip' => Type::getCriteriaTooltip($impact_type), + 'pictogram_file' => Type::getCriteriaPictogram($impact_type), + 'doc_url' => Type::getCriteriaInfoLink($impact_type), ]; } /** - * get Total abiotic depletion potential + * Get the value of an impact criteria for the embodied + usage scopes * - * @param array $params - * @param array $crit + * @param string $impact_type Impact type identifier + * @param array $params + * @param array $crit * @return array */ - public static function getTotalAbioticDepletion(array $params = [], array $crit = []): array + public static function getImpactOfEmbodiedAndUsageCriteria(string $impact_type, array $params = [], array $crit = []): array { $default_params = [ - 'label' => __('Total abiotic depletion potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', + 'label' => Type::getEmbodiedImpactLabel($impact_type), + 'icon' => Type::getCriteriaIcon($impact_type), ]; $params = array_merge($default_params, $params); if (count($crit['itemtype'] ?? []) === 0) { @@ -853,52 +953,28 @@ public static function getTotalAbioticDepletion(array $params = [], array $crit $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); } - $embodied_value = self::getSum(EmbodiedImpact::getTable(), 'adp', $params, $crit); - $usage_value = self::getSum(UsageImpact::getTable(), 'adp', $params, $crit); - - return [ - 'data' => [ - [ - 'label' => __('Embodied abiotic depletion potential', 'carbon'), - 'number' => $embodied_value, - ], [ - 'label' => __('Total usage abiotic depletion potential', 'carbon'), - 'number' => $usage_value, - ], - ], - 'label' => $params['label'], - 'icon' => $params['icon'], - ]; - } - - public static function getTotalGlobalWarming(array $params = [], array $crit = []) - { - $default_params = [ - 'label' => __('Total global warming potential', 'carbon'), - 'icon' => 'fa-solid fa-temperature-arrow-up', - ]; - $params = array_merge($default_params, $params); - if (count($crit['itemtype'] ?? []) === 0) { - $crit['itemtype'] = PLUGIN_CARBON_TYPES; + $embodied = self::getSum(getTableForItemType(EmbodiedImpact::class), $impact_type, $params, $crit); + if ($impact_type !== 'gwp') { + $usage = self::getSum(getTableForItemType(UsageImpact::class), $impact_type, $params, $crit); } else { - $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); + $usage = self::getSum(getTableForItemType(CarbonEmission::class), 'emission_per_day', $params, $crit); + } + if ($embodied === null && $usage === null) { + $value = 'N/A'; + } else { + $value = Toolbox::getHumanReadableValue( + $embodied + $usage, + Type::getImpactUnit($impact_type) + ); } - - $embodied_value = self::getSum(EmbodiedImpact::getTable(), 'gwp', $params, $crit); - $usage_value = self::getSum(CarbonEmission::getTable(), 'emission_per_day', $params, $crit); return [ - 'data' => [ - [ - 'label' => __('Embodied global warming potential', 'carbon'), - 'number' => $embodied_value, - ], [ - 'label' => __('Total usage global warming potential', 'carbon'), - 'number' => $usage_value, - ], - ], - 'label' => $params['label'], - 'icon' => $params['icon'], + 'number' => $value, + 'label' => $params['label'], + 'icon' => $params['icon'], + 'tooltip' => Type::getCriteriaTooltip($impact_type), + 'pictogram_file' => Type::getCriteriaPictogram($impact_type), + 'doc_url' => Type::getCriteriaInfoLink($impact_type), ]; } @@ -923,13 +999,13 @@ public static function getUsageCarbonEmissionPerMonth(array $crit = [], array $p $params = array_merge($default_params, $params); if (!isset($crit['itemtype'])) { $crit['itemtype'] = PLUGIN_CARBON_TYPES; - } else if (is_string($crit['itemtype'])) { + } elseif (is_string($crit['itemtype'])) { $crit['itemtype'] = [$crit['itemtype']]; } $crit['itemtype'] = array_intersect($crit['itemtype'], PLUGIN_CARBON_TYPES); if (!isset($params['args']['apply_filters']['dates'][0]) || !isset($params['args']['apply_filters']['dates'][1])) { - list($start_date, $end_date) = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); + [$start_date, $end_date] = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); $params['args']['apply_filters']['dates'][0] = $start_date->format('Y-m-d\TH:i:s.v\Z'); $params['args']['apply_filters']['dates'][1] = $end_date->format('Y-m-d\TH:i:s.v\Z'); } else { @@ -941,7 +1017,7 @@ public static function getUsageCarbonEmissionPerMonth(array $crit = [], array $p 'AND' => [ ['date' => ['>=', $start_date->format('Y-m-d')]], ['date' => ['<', $end_date->format('Y-m-d')]], - ] + ], ]; $emissions_table = CarbonEmission::getTable(); @@ -953,9 +1029,9 @@ public static function getUsageCarbonEmissionPerMonth(array $crit = [], array $p 'SELECT' => [ 'SUM' => [ CarbonEmission::getTableField('emission_per_day') . ' AS total_emission_per_month', - CarbonEmission::getTableField('energy_per_day') . ' AS total_energy_per_month' + CarbonEmission::getTableField('energy_per_day') . ' AS total_energy_per_month', ], - new QueryExpression("$sql_year_month as `date`") + new QueryExpression("$sql_year_month as `date`"), ], 'FROM' => $emissions_table, 'GROUPBY' => new QueryExpression($sql_year_month), @@ -969,10 +1045,10 @@ public static function getUsageCarbonEmissionPerMonth(array $crit = [], array $p $data = [ 'series' => [ 0 => [ - 'data' => [] + 'data' => [], ], 1 => [ - 'data' => [] + 'data' => [], ], ], 'labels' => [], diff --git a/src/Dashboard/Widget.php b/src/Dashboard/Widget.php index dd639208..b0622e76 100644 --- a/src/Dashboard/Widget.php +++ b/src/Dashboard/Widget.php @@ -36,15 +36,13 @@ use DateInterval; use DateTime; use DateTimeImmutable; -use Html; use Glpi\Application\View\TemplateRenderer; use Glpi\Dashboard\Widget as GlpiDashboardWidget; -use GlpiPlugin\Carbon\Documentation; -use GlpiPlugin\Carbon\Report; +use GlpiPlugin\Carbon\Impact\Type; use GlpiPlugin\Carbon\Toolbox; +use Html; use Monitor; use NetworkEquipment; -use Plugin; use Toolbox as GlpiToolbox; class Widget extends GlpiDashboardWidget @@ -106,24 +104,9 @@ public static function WidgetTypes(): array 'height' => 3, ], - // Embodied impact - 'embodied_global_warming' => [ - 'label' => __('Embodied carbon emission', 'carbon'), - 'function' => self::class . '::displayEmbodiedCarbonEmission', - 'image' => '', - 'width' => 6, - 'height' => 3, - ], - 'embodied_abiotic_depletion' => [ - 'label' => __('Embodied abiotic depletion potential', 'carbon'), - 'function' => self::class . '::displayEmbodiedAbioticDepletion', - 'image' => '', - 'width' => 6, - 'height' => 3, - ], - 'embodied_primary_energy' => [ - 'label' => __('Embodied consumed primary energy', 'carbon'), - 'function' => self::class . '::displayEmbodiedPrimaryEnergy', + 'impact_criteria_number' => [ + 'label' => __('Impact criteria', 'carbon'), + 'function' => self::class . '::displayImpactCriteriaNumber', 'image' => '', 'width' => 6, 'height' => 3, @@ -172,7 +155,7 @@ public static function WidgetTypes(): array 'image' => '', 'width' => 4, 'height' => 4, - ] + ], ]; // 'graphpertype' => [ // 'label' => __('Carbon Emission Per Type', 'carbon'), @@ -521,7 +504,7 @@ public static function displayGraphUsageCarbonEmissionPerMonth(array $params = [ 'bar' => [ 'horizontal' => false, 'columnWidth' => '55%', - 'endingShape' => 'rounded' + 'endingShape' => 'rounded', ], ], 'dataLabels' => [ @@ -534,22 +517,22 @@ public static function displayGraphUsageCarbonEmissionPerMonth(array $params = [ 'labels' => [], 'stroke' => [ 'width' => [0, 4], - 'curve' => 'smooth' + 'curve' => 'smooth', ], 'series' => [ [ 'name' => __('Carbon emission', 'carbon'), 'type' => 'bar', - 'data' => [] + 'data' => [], ], [ 'name' => __('Consumed energy', 'carbon'), 'type' => 'line', - 'data' => [] + 'data' => [], ], ], 'xaxis' => [ - 'categories' => [] + 'categories' => [], ], 'yaxis' => [ [ @@ -557,7 +540,7 @@ public static function displayGraphUsageCarbonEmissionPerMonth(array $params = [ ], [ 'opposite' => true, 'title' => ['text' => __('Consumed energy', 'carbon')], - ] + ], ], 'markers' => [ 'size' => [3, 3], @@ -619,28 +602,28 @@ public static function displayGraphUsageCarbonEmissionPerModel(array $params = [ 'pie' => [ 'startAngle' => -90, 'endAngle' => 90, - 'offsetY' => 10 - ] + 'offsetY' => 10, + ], ], 'grid' => [ 'padding' => [ - 'bottom' => -80 - ] + 'bottom' => -80, + ], ], 'responsive' => [[ 'breakpoint' => 480, 'options' => [ 'chart' => [ - 'width' => 200 + 'width' => 200, ], 'legend' => [ - 'position' => 'bottom' - ] - ] - ] + 'position' => 'bottom', + ], + ], + ], ], 'subtitle' => [ - 'style' => [] + 'style' => [], ], 'series' => [], 'labels' => [], @@ -737,7 +720,7 @@ public static function displayMonthlyCarbonEmission(array $params = []): string $last_month['series'][0]['unit'] ); - $url = Documentation::getInfoLink('carbon_emission'); + $url = Type::getCriteriaInfoLink('gwp'); $tooltip = __('Evaluates the usage carbon emission in CO₂ equivalent during the last 2 months. %s More information %s', 'carbon'); $tooltip = sprintf($tooltip, '
', ''); $tooltip_html = Html::showToolTip($tooltip, [ @@ -790,7 +773,7 @@ public static function displayUsageCarbonEmissionYearToDate(array $params = []): 'filters' => [], // TODO: Not implemented yet (is this useful ?) ]; $p = array_merge($default, $params); - list($start_date, $end_date) = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); + [$start_date, $end_date] = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); $end_date->setDate((int) $end_date->format('Y'), (int) $end_date->format('m'), 0); $date_format = 'Y F'; switch ($_SESSION['glpidate_format'] ?? 0) { @@ -803,7 +786,7 @@ public static function displayUsageCarbonEmissionYearToDate(array $params = []): break; } - $url = Documentation::getInfoLink('carbon_emission'); + $url = Type::getCriteriaInfoLink('gwp'); $tooltip = __('Evaluates the usage carbon emission in CO₂ equivalent during the last 12 elapsed months. %s More information %s', 'carbon'); $tooltip = sprintf($tooltip, '
', ''); $tooltip_html = Html::showToolTip($tooltip, [ @@ -830,23 +813,24 @@ public static function displayUsageCarbonEmissionYearToDate(array $params = []): ]); } - public static function displayEmbodiedCarbonEmission(array $params = []): string + public static function displayImpactCriteriaNumber(array $params = []): string { $default = [ - 'number' => 0, 'url' => '', 'label' => '', 'alt' => '', 'color' => '', 'icon' => '', - 'id' => 'plugin_carbon_embodied_carbon_emission_' . mt_rand(), + 'id' => 'plugin_carbon_impact_criteria_' . mt_rand(), 'filters' => [], // TODO: Not implemented yet (is this useful ?) ]; $p = array_merge($default, $params); - $url = Documentation::getInfoLink('carbon_emission'); - $tooltip = __('Evaluates the carbon emission in CO₂ equivalent. %s More information %s', 'carbon'); - $tooltip = sprintf($tooltip, '
', ''); + $url = $p['doc_url']; + $tooltip = $p['tooltip']; + $tooltip .= '
' + . __('More information', 'carbon') + . ''; $tooltip_html = Html::showToolTip($tooltip, [ 'display' => false, 'applyto' => $p['id'] . '_tip', @@ -854,43 +838,7 @@ public static function displayEmbodiedCarbonEmission(array $params = []): string $label_color = '#626976'; $fg_color = GlpiToolbox::getFgColor($p['color']); - return TemplateRenderer::getInstance()->render('@carbon/dashboard/embodied-carbon-emission.html.twig', [ - 'id' => $p['id'], - 'color' => $p['color'], - 'fg_color' => $fg_color, - 'fg_hover_color' => GlpiToolbox::getFgColor($p['color'], 15), - 'fg_hover_border' => GlpiToolbox::getFgColor($p['color'], 30), - 'label_color' => Toolbox::getAdaptedFgColor($p['color'], $label_color, 4), - 'dark_label_color' => Toolbox::getAdaptedFgColor($fg_color, $label_color, 4), - 'number' => $p['number'], - 'tooltip_html' => $tooltip_html, - ]); - } - - public static function displayEmbodiedAbioticDepletion(array $params = []): string - { - $default = [ - 'number' => 0, - 'url' => '', - 'label' => '', - 'alt' => '', - 'color' => '', - 'icon' => '', - 'id' => 'plugin_carbon_embodied_abiotic_depletion_' . mt_rand(), - 'filters' => [], // TODO: Not implemented yet (is this useful ?) - ]; - $p = array_merge($default, $params); - $url = Documentation::getInfoLink('abiotic_depletion_impact'); - $tooltip = __('Evaluates the consumption of non renewable resources in Antimony equivalent. %s More information %s', 'carbon'); - $tooltip = sprintf($tooltip, '
', ''); - $tooltip_html = Html::showToolTip($tooltip, [ - 'display' => false, - 'applyto' => $p['id'] . '_tip', - ]); - - $label_color = '#626976'; - $fg_color = GlpiToolbox::getFgColor($p['color']); - return TemplateRenderer::getInstance()->render('@carbon/dashboard/embodied-abiotic-depletion.html.twig', [ + return TemplateRenderer::getInstance()->render('@carbon/dashboard/impact-criteria.html.twig', [ 'id' => $p['id'], 'color' => $p['color'], 'fg_color' => $fg_color, @@ -898,8 +846,10 @@ public static function displayEmbodiedAbioticDepletion(array $params = []): stri 'fg_hover_border' => GlpiToolbox::getFgColor($p['color'], 30), 'label_color' => Toolbox::getAdaptedFgColor($p['color'], $label_color, 4), 'dark_label_color' => Toolbox::getAdaptedFgColor($fg_color, $label_color, 4), + 'label' => $p['label'], 'number' => $p['number'], 'tooltip_html' => $tooltip_html, + 'pictogram_file' => $p['pictogram_file'], ]); } @@ -917,7 +867,7 @@ public static function displayUsageAbioticDepletion(array $params = []): string ]; $p = array_merge($default, $params); - $url = Documentation::getInfoLink('abiotic_depletion_impact'); + $url = Type::getCriteriaInfoLink('adp'); $tooltip = __('Evaluates the consumption of non renewable resources in Antimony equivalent. %s More information %s', 'carbon'); $tooltip = sprintf($tooltip, '
', ''); $tooltip_html = Html::showToolTip($tooltip, [ @@ -1085,42 +1035,6 @@ public static function displayInformationMethodology(array $params = []): string ]); } - public static function displayEmbodiedPrimaryEnergy(array $params = []): string - { - $default = [ - 'url' => '', - 'label' => __('Total embodied primary energy', 'carbon'), - 'alt' => '', - 'color' => '', - 'icon' => '', - 'id' => 'plugin_carbon_embodied_primary_energy_' . mt_rand(), - 'filters' => [], // TODO: Not implemented yet (is this useful ?) - ]; - $p = array_merge($default, $params); - - $url = Documentation::getInfoLink('primary_energy_impact'); - $tooltip = __('Evaluates the primary energy consumed. %s More information %s', 'carbon'); - $tooltip = sprintf($tooltip, '
', ''); - $tooltip_html = Html::showToolTip($tooltip, [ - 'display' => false, - 'applyto' => $p['id'] . '_tip', - ]); - - $label_color = '#626976'; - $fg_color = GlpiToolbox::getFgColor($p['color']); - return TemplateRenderer::getInstance()->render('@carbon/dashboard/embodied-primary-energy.html.twig', [ - 'id' => $p['id'], - 'color' => $p['color'], - 'fg_color' => $fg_color, - 'fg_hover_color' => GlpiToolbox::getFgColor($p['color'], 15), - 'fg_hover_border' => GlpiToolbox::getFgColor($p['color'], 30), - 'label_color' => Toolbox::getAdaptedFgColor($p['color'], $label_color, 4), - 'dark_label_color' => Toolbox::getAdaptedFgColor($fg_color, $label_color, 4), - 'number' => $p['number'], - 'tooltip_html' => $tooltip_html, - ]); - } - /** * Displays a widget with a radar (or web) chart * @@ -1143,7 +1057,7 @@ public static function apexRadar(array $params = []): string 'rand' => mt_rand(), ]; $p = array_merge($default, $params); - $p['cache_key'] = $p['cache_key'] ?? $p['rand']; + $p['cache_key'] ??= $p['rand']; $nodata = isset($p['data']['nodata']) && $p['data']['nodata']; @@ -1207,9 +1121,9 @@ public static function apexRadar(array $params = []): string 'text' => $p['label'], ], 'dataLabels' => [ - // 'style' => [ - // 'colors' => [$fg_color], - // ] + // 'style' => [ + // 'colors' => [$fg_color], + // ] 'background' => [ 'enabled' => true, 'foreColor' => $fg_color, diff --git a/src/DataSource/AbstractCronTask.php b/src/DataSource/AbstractCronTask.php new file mode 100644 index 00000000..b0d9f3af --- /dev/null +++ b/src/DataSource/AbstractCronTask.php @@ -0,0 +1,43 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource; + +use CommonGLPI; + +abstract class AbstractCronTask extends CommonGLPI implements CronTaskInterface +{ + public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) + { + return ''; + } +} diff --git a/src/DataSource/AbstractDataSource.php b/src/DataSource/AbstractDataSource.php new file mode 100644 index 00000000..e90770e3 --- /dev/null +++ b/src/DataSource/AbstractDataSource.php @@ -0,0 +1,35 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource; + +abstract class AbstractDataSource implements DataSourceInterface {} diff --git a/src/DataSource/AbortException.php b/src/DataSource/CarbonIntensity/AbortException.php similarity index 90% rename from src/DataSource/AbortException.php rename to src/DataSource/CarbonIntensity/AbortException.php index 92f198ff..f4b1ac64 100644 --- a/src/DataSource/AbortException.php +++ b/src/DataSource/CarbonIntensity/AbortException.php @@ -30,8 +30,8 @@ * ------------------------------------------------------------------------- */ -namespace GlpiPlugin\Carbon\DataSource; +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity; -class AbortException extends \RuntimeException -{ -} +use RuntimeException; + +class AbortException extends RuntimeException {} diff --git a/src/DataSource/AbstractCarbonIntensity.php b/src/DataSource/CarbonIntensity/AbstractClient.php similarity index 62% rename from src/DataSource/AbstractCarbonIntensity.php rename to src/DataSource/CarbonIntensity/AbstractClient.php index e0b27e59..1e545e9c 100644 --- a/src/DataSource/AbstractCarbonIntensity.php +++ b/src/DataSource/CarbonIntensity/AbstractClient.php @@ -30,73 +30,63 @@ * ------------------------------------------------------------------------- */ -namespace GlpiPlugin\Carbon\DataSource; +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity; use Config as GlpiConfig; -use DBmysql; use DateInterval; use DateTime; use DateTimeImmutable; -use Toolbox as GlpiToolbox; +use DateTimeZone; +use DBmysql; +use Generator; use GlpiPlugin\Carbon\CarbonIntensity; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; +use GlpiPlugin\Carbon\Toolbox; use GlpiPlugin\Carbon\Zone; use Symfony\Component\Console\Helper\ProgressBar; -abstract class AbstractCarbonIntensity implements CarbonIntensityInterface +abstract class AbstractClient implements ClientInterface { protected int $step; + protected bool $use_cache = true; + abstract public function getSourceName(): string; abstract public function getDataInterval(): string; abstract protected function formatOutput(array $response, int $step): array; - /** - * Create the source in the database - * Should not be called as it shall be created at plugin installation - * - * @return CarbonIntensitySource - */ - protected function getOrCreateSource(): ?CarbonIntensitySource - { - $source = new CarbonIntensitySource(); - if (!$source->getFromDBByCrit(['name' => $this->getSourceName()])) { - $source->add([ - 'name' => $this->getSourceName(), - ]); - if ($source->isNewItem()) { - return null; - } - } - - return $source; - } + abstract public function getHardStartDate(): DateTimeImmutable; /** * Download all data for a single day from the datasource * * @param DateTimeImmutable $day - * @param string $zone + * @param Source_Zone $source_zone * @return array * * @throws AbortException if an error requires to stop all subsequent fetches */ - abstract public function fetchDay(DateTimeImmutable $day, string $zone): array; + abstract public function fetchDay(DateTimeImmutable $day, Source_Zone $source_zone): array; /** * Download a range if data from the data source * * @param DateTimeImmutable $start * @param DateTimeImmutable $stop - * @param string $zone + * @param Source_Zone $source_zone * @return array * * @throws AbortException if an error requires to stop all subsequent fetches */ - abstract public function fetchRange(DateTimeImmutable $start, DateTimeImmutable $stop, string $zone): array; + abstract public function fetchRange(DateTimeImmutable $start, DateTimeImmutable $stop, Source_Zone $source_zone): array; + + public function disableCache() + { + $this->use_cache = false; + } /** * Key of the configuration value that indicates if the full download is complete @@ -146,68 +136,119 @@ public function getZones(array $crit = []): array /** @var DBmysql $DB */ global $DB; - $source_table = CarbonIntensitySource::getTable(); - $source_fk = CarbonIntensitySource::getForeignKeyField(); + $source_table = Source::getTable(); + $source_fk = Source::getForeignKeyField(); $zone_table = Zone::getTable(); $zone_fk = Zone::getForeignKeyField(); - $source_zone_table = CarbonIntensitySource_Zone::getTable(); + $source_zone_table = Source_Zone::getTable(); $iterator = $DB->request([ - 'SELECT' => Zone::getTableField('name'), + 'SELECT' => [ + Zone::getTableField('name'), + ], 'FROM' => $zone_table, 'INNER JOIN' => [ $source_zone_table => [ 'ON' => [ $zone_table => 'id', $source_zone_table => $zone_fk, - ] + ], ], $source_table => [ 'ON' => [ $source_table => 'id', $source_zone_table => $source_fk, - ] + ], ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('name') => $this->getSourceName(), + Source::getTableField('name') => $this->getSourceName(), ] + $crit, ]); return iterator_to_array($iterator); } - public function fullDownload(string $zone, DateTimeImmutable $start_date, DateTimeImmutable $stop_date, CarbonIntensity $intensity, int $limit = 0, ?ProgressBar $progress_bar = null): int + public function getSourceZones(array $crit = []): array { + /** @var DBmysql $DB */ + global $DB; + + $source_table = Source::getTable(); + $source_fk = Source::getForeignKeyField(); + $zone_table = Zone::getTable(); + $zone_fk = Zone::getForeignKeyField(); + $source_zone_table = Source_Zone::getTable(); + $iterator = $DB->request([ + 'SELECT' => [ + getTableForItemType(Source_Zone::class) . '.*', + ], + 'FROM' => $zone_table, + 'INNER JOIN' => [ + $source_zone_table => [ + 'ON' => [ + $zone_table => 'id', + $source_zone_table => $zone_fk, + ], + ], + $source_table => [ + 'ON' => [ + $source_table => 'id', + $source_zone_table => $source_fk, + ], + ], + ], + 'WHERE' => [ + Source::getTableField('name') => $this->getSourceName(), + ] + $crit, + ]); + + return iterator_to_array($iterator); + } + + public function fullDownload(Source_Zone $source_zone, DateTimeImmutable $start_date, DateTimeImmutable $stop_date, CarbonIntensity $intensity, int $limit = 0, ?ProgressBar $progress_bar = null): int + { + if ($start_date >= $stop_date) { + return 0; + } + // Round start date to beginning of month + $start_date = $start_date->setTime(0, 0, 0, 0)->setDate((int) $start_date->format('Y'), (int) $start_date->format('m'), 1); + $stop_date = $stop_date->setTime(0, 0, 0, 0)->setDate((int) $stop_date->format('Y'), (int) $stop_date->format('m'), 1); $count = 0; $saved = 0; + if ($start_date == $stop_date) { + $stop_date = $stop_date->add(new DateInterval('P1M')); + } /** * Huge quantity of SQL queries will be executed * We NEED to check memory usage to avoid running out of memory - * @see DbMysql::doQuery() + * @see DBmysql::doQuery() */ - $memory_limit = GlpiToolbox::getMemoryLimit() - 8 * 1024 * 1024; - if ($memory_limit < 0) { - // May happen in test seems that ini_get("memory_limits") returns - // enpty string in PHPUnit environment - $memory_limit = null; - } - foreach ($this->sliceDateRangeByMonth($start_date, $stop_date) as $slice) { + $memory_limit = Toolbox::getMemoryLimit(); + + // Traverse each month from start_date to end_date + $current_date = DateTime::createFromImmutable($start_date); + while ($current_date < $stop_date) { + $next_month = clone $current_date; + $next_month->add(new DateInterval('P1M')); try { - $data = $this->fetchRange($slice['start'], $slice['stop'], $zone); + $data = $this->fetchRange( + DateTimeImmutable::createFromMutable($current_date), + DateTimeImmutable::createFromMutable($next_month), + $source_zone + ); } catch (AbortException $e) { break; } - $data = $this->formatOutput($data, $this->step); - if (!isset($data[$zone])) { - break; - } - $saved = $intensity->save($zone, $this->getSourceName(), $data[$zone]); - if ($progress_bar) { - $progress_bar->advance($saved); + if (count($data) > 0) { + $data = $this->formatOutput($data, $this->step); + $saved = $intensity->save($source_zone, $data); + if ($progress_bar) { + $progress_bar->advance($saved); + } + + $count += abs($saved); } - - $count += abs($saved); if ($limit > 0 && $count >= $limit) { return $saved > 0 ? $count : -$count; } @@ -215,12 +256,12 @@ public function fullDownload(string $zone, DateTimeImmutable $start_date, DateTi // 8 MB memory left, emergency exit return $saved > 0 ? $count : -$count; } + $current_date = $next_month; } - return $saved > 0 ? $count : -$count; } - public function incrementalDownload(string $zone, DateTimeImmutable $start_date, CarbonIntensity $intensity, int $limit = 0): int + public function incrementalDownload(Source_Zone $source_zone, DateTimeImmutable $start_date, CarbonIntensity $intensity, int $limit = 0): int { $end_date = new DateTimeImmutable('now'); @@ -228,11 +269,12 @@ public function incrementalDownload(string $zone, DateTimeImmutable $start_date, $saved = 0; foreach ($this->sliceDateRangeByDay($start_date, $end_date) as $slice) { try { - $data = $this->fetchDay($slice, $zone); + $data = $this->fetchDay($slice, $source_zone); } catch (AbortException $e) { throw $e; } - $saved = $intensity->save($zone, $this->getSourceName(), $data[$zone]); + $data = $this->formatOutput($data, $this->step); + $saved = $intensity->save($source_zone, $data); $count += abs($saved); if ($limit > 0 && $count >= $limit) { return $saved > 0 ? $count : -$count; @@ -249,9 +291,9 @@ public function incrementalDownload(string $zone, DateTimeImmutable $start_date, * * @param DateTimeImmutable $start * @param DateTimeImmutable $stop - * @return \Generator + * @return Generator */ - protected function sliceDateRangeByMonth(DateTimeImmutable $start, DateTimeImmutable $stop): \Generator + protected function sliceDateRangeByMonth(DateTimeImmutable $start, DateTimeImmutable $stop): Generator { $real_start = $start->setTime((int) $start->format('H'), 0, 0, 0); $real_stop = $stop->setTime((int) $stop->format('H'), 0, 0, 0); @@ -295,14 +337,13 @@ protected function sliceDateRangeByMonth(DateTimeImmutable $start, DateTimeImmut * * @param DateTimeImmutable $start * @param DateTimeImmutable $stop - * @return \Generator + * @return Generator */ protected function sliceDateRangeByDay(DateTimeImmutable $start, DateTimeImmutable $stop) { - $real_start = $start; $real_stop = $stop->setTime((int) $stop->format('H'), 0, 0); - $current_date = DateTime::createFromImmutable($real_start); + $current_date = DateTime::createFromImmutable($start); while ($current_date <= $real_stop) { yield DateTimeImmutable::createFromMutable($current_date); $current_date->add(new DateInterval('P1D')); @@ -310,13 +351,26 @@ protected function sliceDateRangeByDay(DateTimeImmutable $start, DateTimeImmutab } } - protected function toggleZoneDownload(Zone $zone, CarbonIntensitySource $source, ?bool $state): bool + protected function toggleZoneDownload(Zone $zone, Source $source, ?bool $state): bool { - $source_zone = new CarbonIntensitySource_Zone(); + $source_zone = new Source_Zone(); $source_zone->getFromDBByCrit([ $zone->getForeignKeyField() => $zone->getID(), $source->getForeignKeyField() => $source->getID(), ]); return $source_zone->toggleZone($state); } + + protected function getCacheFilename(string $base_dir, DateTimeImmutable $start, DateTimeImmutable $end, DateTimeZone $timezone): string + { + $timezone_name = $timezone->getName(); + $timezone_name = str_replace('/', '-', $timezone_name); + return sprintf( + '%s/%s_%s_%s.json', + $base_dir, + $timezone_name, + $start->format('Y-m-d'), + $end->format('Y-m-d') + ); + } } diff --git a/src/DataSource/CarbonIntensity/AbstractCronTask.php b/src/DataSource/CarbonIntensity/AbstractCronTask.php new file mode 100644 index 00000000..5df751ad --- /dev/null +++ b/src/DataSource/CarbonIntensity/AbstractCronTask.php @@ -0,0 +1,169 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity; + +use CommonDBTM; +use CronTask as GlpiCronTask; +use Glpi\Application\View\TemplateRenderer; +use GlpiPlugin\Carbon\CarbonIntensity; +use GlpiPlugin\Carbon\CronTask; +use GlpiPlugin\Carbon\DataSource\AbstractCronTask as DatasourceAbstractCronTask; +use GlpiPlugin\Carbon\DataSource\CronTaskInterface; +use GlpiPlugin\Carbon\Source_Zone; +use GlpiPlugin\Carbon\Toolbox; +use GlpiPlugin\Carbon\Zone; +use RuntimeException; + +abstract class AbstractCronTask extends DatasourceAbstractCronTask implements CronTaskInterface +{ + protected static string $client_name; + + protected static string $downloadMethod; + + /** + * Filter out the gaps to remove fales gaps caused by DST switch + * Needed after a call to Toolbox::findTemporalGapsInTable() + * TODO: replace its inner implementation with this method on each call, when necessary + * In the SQL function DATE_ADD() we may do the following process + * DATE_ADD('2022-03-27 01:00:00', INTERVAL 1 HOUR) and '2022-03-27 01:00:00' + INTERVAL 1 HOUR + * while we use Europe/Paris timezone (or any timezone usinf DST) + * Both expressions return '2022-03-27 02:00:00' and it matches the exact time where we switch to summer time + * '2022-03-27 02:00:00' should be actually '2022-03-27 03:00:00', but this is not what happens with MySQL 8.0 + * Therefore when the date '2022-03-27 02:00:00' is converted into a DateTime object in PHP with Europe/Paris timezone + * it is converted into '2022-03-27 03:00:00'. + * When the start of a gap and the end of a gap, both converted into a DateTime object, are equal + * then this means that we are switching to summer time and the gap is irrelevant + * The code below tracks such intervals and filters them out + * + * @param array $gaps + * @param Source_Zone $source_zone + * @return array + */ + abstract protected function dstFilter(array $gaps, Source_Zone $source_zone): array; + + public function showForCronTask(CommonDBTM $item) + { + switch ($item->fields['name']) { + case static::$downloadMethod: + $this->showGapsReport(); + } + } + + public function showGapsReport() + { + $renderer = TemplateRenderer::getInstance(); + $template = <<{{ __('Only zones with download enabled are displayed.', 'carbon') }} +
 
+TWIG; + echo $renderer->renderFromStringTemplate($template); + $oldest_asset_date = (new Toolbox())->getOldestAssetDate(); + $client = ClientFactory::create(static::$client_name); + $source_name = $client->getSourceName(); + foreach ($client->getSupportedZones() as $zone_name) { + $source_zone = new Source_Zone(); + if (!$source_zone->getFromDbBySourceAndZone($source_name, $zone_name)) { + continue; + } + if (!$source_zone->fields['is_download_enabled']) { + continue; + } + $zone_id = $source_zone->fields['plugin_carbon_zones_id']; + $carbon_intensity = new CarbonIntensity(); + $entries = $carbon_intensity->findGaps( + $source_zone, + $oldest_asset_date + ); + $entries = $this->dstFilter($entries, $source_zone); + $total = count($entries); + $zone = Zone::getById($zone_id); + + $template = <<renderFromStringTemplate($template, ['zone_name' => $zone->fields['name']]); + $renderer->display('components/datatable.html.twig', [ + 'is_tab' => true, + 'nopager' => true, + 'nofilter' => true, + 'nosort' => true, + 'columns' => [ + 'start' => __('Start'), + 'end' => __('End', 'carbon'), + ], + 'footers' => [ + ['', '', '', __('Total'), $total, ''], + ], + 'footer_class' => 'fw-bold', + 'entries' => $entries, + 'total_number' => $total, + 'filtered_number' => $total, + 'showmassiveactions' => false, + 'massiveactionparams' => [ + 'num_displayed' => $total, + 'container' => 'mass' . static::class . mt_rand(), + ], + ]); + } + } + + /** + * Uniformize download method of carbon intensity clients + * The design of \CronTask requires that each cron task to use a unique method name, across itemtypes + * + * @param string $name + * @param array $arguments + * @return int + */ + public static function __callStatic($name, $arguments) + { + if ($name === 'cron' . static::$downloadMethod) { + return self::cronDownload(...$arguments); + } + throw new RuntimeException('Not implemented'); + } + + /** + * Automatic action to download carbon intensity from a data source + * + * @return int + */ + public static function cronDownload(GlpiCronTask $task): int + { + $client = ClientFactory::create(static::$client_name); + return CronTask::downloadCarbonIntensityFromSource($task, $client, new CarbonIntensity()); + } +} diff --git a/src/DataSource/CarbonIntensity/ClientFactory.php b/src/DataSource/CarbonIntensity/ClientFactory.php new file mode 100644 index 00000000..38c30aab --- /dev/null +++ b/src/DataSource/CarbonIntensity/ClientFactory.php @@ -0,0 +1,148 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity; + +use GlpiPlugin\Carbon\DataSource\ConfigInterface; +use GlpiPlugin\Carbon\DataSource\RestApiClient; +use InvalidArgumentException; + +class ClientFactory +{ + /** + * Get available client types + * + * @return class-string[] + */ + public static function getClientTypes(): array + { + $client_types = []; + foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) { + $dir = basename($dir); + $class_name = 'GlpiPlugin\\Carbon\\DataSource\\CarbonIntensity\\' . $dir . '\\Client'; + if (!class_exists($class_name)) { + continue; + } + if (!is_subclass_of($class_name, AbstractClient::class)) { + continue; + } + $client_types[$dir] = $class_name; + } + + return $client_types; + } + + /** + * Undocumented function + * + * @return class-string[] + */ + public static function getConfigTypes(): array + { + $config_types = []; + foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) { + $dir = basename($dir); + $class_name = 'GlpiPlugin\\Carbon\\DataSource\\CarbonIntensity\\' . $dir . '\\Config'; + if (!class_exists($class_name)) { + continue; + } + $config_types[$dir] = $class_name; + } + + return $config_types; + } + + /** + * Get name of clients + * + * @return array + */ + public static function getClientNames(): array + { + $names = []; + $types = self::getClientTypes(); + $api_client = new RestApiClient(); + foreach ($types as $type) { + $data_source_client = new $type($api_client); + $names[$type] = $data_source_client->getSourceName(); + } + + return $names; + } + + public static function getSecuredConfigs() + { + $secured_configs = []; + foreach (self::getConfigTypes() as $config_class) { + $config = new $config_class(); + $secured_configs = array_merge($secured_configs, $config->getSecuredConfigs()); + } + + return $secured_configs; + } + + /** + * Create an instance of a client + * + * @param string $type type of the client + * @return AbstractClient instantiated client + */ + public static function create(string $type): AbstractClient + { + $client_classes = self::getClientTypes(); + if (!isset($client_classes[$type])) { + throw new InvalidArgumentException("Unknown client type: $type"); + } + + $class_name = $client_classes[$type]; + $rest_api_client = new RestApiClient([]); + return new $class_name($rest_api_client); + } + + /** + * Create an instance of a client by using the name of the data source + * + * @param string $name + * @return AbstractClient + */ + public static function createByName(string $name): AbstractClient + { + $names = self::getClientNames(); + if (!in_array($name, $names)) { + throw new InvalidArgumentException("Unknown client type name: $name"); + } + + $class_name = array_search($name, $names); + $rest_api_client = new RestApiClient([]); + return new $class_name($rest_api_client); + } +} diff --git a/src/DataSource/CarbonIntensityInterface.php b/src/DataSource/CarbonIntensity/ClientInterface.php similarity index 75% rename from src/DataSource/CarbonIntensityInterface.php rename to src/DataSource/CarbonIntensity/ClientInterface.php index d213bfc0..16bdae9d 100644 --- a/src/DataSource/CarbonIntensityInterface.php +++ b/src/DataSource/CarbonIntensity/ClientInterface.php @@ -30,10 +30,11 @@ * ------------------------------------------------------------------------- */ -namespace GlpiPlugin\Carbon\DataSource; +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity; use DateTimeImmutable; use GlpiPlugin\Carbon\CarbonIntensity; +use GlpiPlugin\Carbon\Source_Zone; use Symfony\Component\Console\Helper\ProgressBar; /** @@ -84,7 +85,7 @@ * */ -interface CarbonIntensityInterface +interface ClientInterface { /** * Fetch carbon intensities from the source. @@ -96,7 +97,7 @@ interface CarbonIntensityInterface /** * Is the setup of zones complete ? * - * @return boolean + * @return bool */ public function isZoneSetupComplete(): bool; @@ -104,14 +105,14 @@ public function isZoneSetupComplete(): bool; * Is the download of the zone complete (except daily updates) * * @param string $zone_name - * @return boolean + * @return bool */ public function isZoneDownloadComplete(string $zone_name): bool; /** * are all zones fully downloaded (except dayli updates) * - * @return boolean + * @return bool */ // public function isDownloadComplete(): bool; @@ -125,10 +126,17 @@ public function getSourceName(): string; /** * Create zones handled by the data source * - * @return integer count if item processed + * @return int count if item processed */ public function createZones(): int; + /** + * Disable caching of data source + * + * @return void + */ + public function disableCache(); + /** * Get the absolute starrt date of data from the source * @@ -137,12 +145,31 @@ public function createZones(): int; public function getHardStartDate(): DateTimeImmutable; /** - * Get zones handled by the data source + * Get supported zones from the provider + * + * Returned zones are in the form: id => name in english + * If the array is empty then the datasource does not provide a way to + * enumerate the suppoted zones + * + * @return array + */ + public function getSupportedZones(): array; + + /** + * Get the zones handled by the data source * * @return array */ public function getZones(array $crit = []): array; + /** + * get relations between the source and the zones + * + * @param array $crit + * @return array + */ + public function getSourceZones(array $crit = []): array; + public function getMaxIncrementalAge(): DateTimeImmutable; /** @@ -157,24 +184,24 @@ public function getDataInterval(): string; * If the returned count is negative, then something went wrong * and the absolute value of the count tells how many items were saved * - * @param string $zone + * @param Source_Zone $source_zone * @param DateTimeImmutable $start_date date where the download must start * @param DateTimeImmutable $stop_date date where the download must start * @param CarbonIntensity $intensity Instance used to update the database - * @param integer $limit + * @param int $limit * @param ProgressBar $progress progress bar to update during the download (CLI) - * @return integer count of successfully saved items + * @return int count of successfully saved items */ - public function fullDownload(string $zone, DateTimeImmutable $start_date, DateTimeImmutable $stop_date, CarbonIntensity $intensity, int $limit = 0, ?ProgressBar $progress = null): int; + public function fullDownload(Source_Zone $source_zone, DateTimeImmutable $start_date, DateTimeImmutable $stop_date, CarbonIntensity $intensity, int $limit = 0, ?ProgressBar $progress = null): int; /** * Download recent carbon intensity data day by day * - * @param string $zone zone to process + * @param Source_Zone $source_zone * @param DateTimeImmutable $start_date DAte where the downlos must begin * @param CarbonIntensity $intensity Instance of CarbonIntensity to use to save data - * @param integer $limit maximum count of items to process - * @return integer count of processed items. Negative count on failure + * @param int $limit maximum count of items to process + * @return int count of processed items. Negative count on failure */ - public function incrementalDownload(string $zone, DateTimeImmutable $start_date, CarbonIntensity $intensity, int $limit = 0): int; + public function incrementalDownload(Source_Zone $source_zone, DateTimeImmutable $start_date, CarbonIntensity $intensity, int $limit = 0): int; } diff --git a/src/DataSource/CarbonIntensity/ElectricityMaps/Client.php b/src/DataSource/CarbonIntensity/ElectricityMaps/Client.php new file mode 100644 index 00000000..7272e151 --- /dev/null +++ b/src/DataSource/CarbonIntensity/ElectricityMaps/Client.php @@ -0,0 +1,479 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity\ElectricityMaps; + +use DateInterval; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use DBmysql; +use GLPIKey; +use GlpiPlugin\Carbon\CarbonIntensity; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\AbortException; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\AbstractClient; +use GlpiPlugin\Carbon\DataSource\RestApiClientInterface; +use GlpiPlugin\Carbon\DataTracking\AbstractTracked; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; +use GlpiPlugin\Carbon\Toolbox; +use GlpiPlugin\Carbon\Zone; +use RuntimeException; +use Safe\Exceptions\FilesystemException; +use Symfony\Component\Console\Helper\ProgressBar; + +/** + * Query carbon intensity data from Electricity map + * + * API documentation: + * @see https://static.electricitymaps.com/api/docs/index.html + */ +class Client extends AbstractClient +{ + public const HISTORY_URL = '/carbon-intensity/history'; + public const PAST_URL = '/carbon-intensity/past-range'; + public const ZONES_URL = '/zones'; // Do not send API token + + private RestApiClientInterface $client; + + private string $base_url; + + public function __construct(RestApiClientInterface $client, string $url = '') + { + $this->client = $client; + + $this->base_url = 'https://api.electricitymap.org/v3'; + if (!empty($url)) { + $this->base_url = $url; + } + } + + public function getSourceName(): string + { + return 'ElectricityMap'; + } + + public function getDataInterval(): string + { + return 'P60M'; + } + + public function getMaxIncrementalAge(): DateTimeImmutable + { + $recent_limit = new DateTime('1 day ago'); + $recent_limit->setTime(0, 0, 0); + + return DateTimeImmutable::createFromMutable($recent_limit); + } + + public function getHardStartDate(): DateTimeImmutable + { + return DateTimeImmutable::createFromFormat(DateTimeInterface::ATOM, '2021-01-01T00:00:00+00:00'); + } + + public function createZones(): int + { + $source = new Source(); + $source->getOrCreate([], [ + ['name' => $this->getSourceName()], + ]); + if ($source->isNewItem()) { + return -1; + } + $source_id = $source->getID(); + + try { + $zones = $this->queryZones(); + } catch (RuntimeException $e) { + return -1; + } + + $count = 0; + $failed = false; + foreach ($zones as $zone_key => $zone_spec) { + $zone = new Zone(); + $zone->getOrCreate([], [ + 'name' => $zone_spec['zoneName'], + ]); + if ($zone->isNewItem()) { + $failed = true; + continue; + } + $source_zone = new Source_Zone(); + $source_zone->getOrCreate([ + 'code' => $zone_key, + 'is_download_enabled' => Toolbox::isLocationExistForZone($zone->fields['name']), + ], [ + Source::getForeignKeyField() => $source_id, + Zone::getForeignKeyField() => $zone->getID(), + ]); + if ($source_zone->isNewItem()) { + $failed = true; + continue; + } + $count++; + } + + if ($failed) { + $count = -$count; + } else { + $this->setZoneSetupComplete(); + } + + return $count; + } + + private function getToken(): string + { + $glpi_key = new GLPIKey(); + $value = Config::getConfigurationValue('electricitymap_api_key'); + return $glpi_key->decrypt($value); + } + + /** + * Get zones from the provider + * + * @return array + */ + protected function queryZones(): array + { + $response = $this->client->request('GET', $this->base_url . self::ZONES_URL, []); + if (!$response) { + return []; + } + + if (isset($response['error'])) { + // An error ocured + trigger_error('' . $response['error'], E_USER_WARNING); + if ($response['error'] === 'Invalid auth-token') { + throw new AbortException('Invalid auth-token'); + } + return []; + } + + return $response; + } + + public function getSupportedZones(): array + { + $zones = []; + $raw_zones = $this->queryZones(); + foreach ($raw_zones as $id => $zone) { + $zones[$id] = $zone['zoneName']; + } + + return $zones; + } + + /** + * Fetch carbon intensities from Opendata Réseaux-Énergies using export dataset. + * + * See https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature + * + * The method fetches the intensities for the date range specified in argument. + */ + public function fetchDay(DateTimeImmutable $day, Source_Zone $source_zone): array + { + $zone_code = $source_zone->fields['code']; + + if ($zone_code === null) { + throw new AbortException('Invalid zone'); + } + + $params = [ + 'zone' => $zone_code, + ]; + + $options = [ + 'headers' => [ + 'auth-token' => $this->getToken(), + ], + 'query' => $params, + ]; + + $response = $this->client->request('GET', $this->base_url . self::HISTORY_URL, $options); + if (!$response) { + return []; + } + + if (isset($response['status']) && $response['status'] === 'error' || isset($response['error'])) { + // An error ocured + if ($response['message'] === 'Invalid auth-token') { + throw new AbortException('Invalid auth-token'); + } + if (preg_match("#^Zone '[^']*' does not exist.$#", $response['message']) !== false) { + throw new AbortException($response['message']); + } + return []; + } + + $intensities = []; + $timezone = new DateTimeZone('UTC'); + foreach ($response['history'] as $record) { + $datetime = DateTime::createFromFormat('Y-m-d\TH:i:s+', $record['datetime'], $timezone); + if (!$datetime instanceof DateTimeInterface) { + continue; + } + $data_quality = $this->getDataQuality($record); + $intensities[] = [ + 'datetime' => $datetime->format('Y-m-d\TH:i:s'), + 'intensity' => $record['carbonIntensity'], + 'data_quality' => $data_quality, + ]; + } + + // Filter out already existing entries + $carbon_intensity = new CarbonIntensity(); + $last_known_date = $carbon_intensity->getLastKnownDate($source_zone); + $intensities = array_filter($intensities, function ($intensity) use ($last_known_date) { + $intensity_date = DateTime::createFromFormat('Y-m-d\TH:i:s', $intensity['datetime']); + return $intensity_date > $last_known_date; + }); + + $zone = Zone::getById($source_zone->fields[getForeignKeyFieldForItemType(Zone::class)]); + $zone_name = $zone->fields['name']; + return [ + 'source' => $this->getSourceName(), + $zone_name => $intensities, + ]; + } + + public function fetchRange(DateTimeImmutable $start, DateTimeImmutable $stop, Source_Zone $source_zone): array + { + $this->step = 60; + $is_free_plan = Config::getConfigurationValue('electricitymap_fake_data') ?? 0; + $dataset = $is_free_plan ? 'fake' : 'real'; + $zone = new Zone(); + $zone->getFromDBByCrit(['id' => $source_zone->fields[Zone::getForeignKeyField()]]); + $base_path = GLPI_PLUGIN_DOC_DIR . '/carbon/carbon_intensity/' . $this->getSourceName() . '/' . $dataset . '/' . $zone->fields['name']; + $cache_file = $this->getCacheFilename( + $base_path, + $start, + $stop, + $start->getTimezone() + ); + // If cached file exists, use it + if (file_exists($cache_file)) { + $full_response = json_decode(file_get_contents($cache_file), true); + return $full_response['data']; + } else { + $cache_dir = dirname($cache_file); + if (!is_dir($cache_dir)) { + try { + mkdir($cache_dir, 0o755, true); + } catch (FilesystemException $e) { + trigger_error($e->getMessage(), E_USER_WARNING); + } + } + } + + // Set timezone to +00:00 and extend range by 12 hours on each side + $timezone_z = new DateTimeZone('+0000'); + $request_start = $start->setTimezone($timezone_z)->sub(new DateInterval('PT12H')); + $request_stop = $stop->setTimezone($timezone_z)->add(new DateInterval('PT14H')); + + // Prevent downloading in the future + $request_stop = min($request_stop, new DateTime('yesterday midnight', $timezone_z)); + if ($request_start > $request_stop) { + return []; + } + $headers = []; + + $this->step = 60; + + $step = new DateInterval('PT240H'); + $full_response = []; + $current_date = DateTime::createFromImmutable($request_start); + $glpikey = new GLPIKey(); + $api_key = Config::getConfigurationValue('electricitymap_api_key'); + $api_key = $glpikey->decrypt($api_key); + $format = 'Y-m-d\+H:ip'; + $headers['auth-token'] = $api_key; + while ($current_date < $request_stop) { + $stop = clone $current_date; + $stop->add($step); + // For some reason, passing the parameters as a query stringthrough Guzzle + // Makes the request malformed from the point of view of Electricitymaps + // Workarounded by building here the query string + // $params = [ + // 'zone' => $source_zone->fields['code'], + // 'start' => $current_date->format('Y-m-d\+H:i'), + // 'end' => $stop->format('Y-m-d\+H:i'), + // ]; + $url = $this->base_url . self::PAST_URL; + $url .= '?zone=' . $source_zone->fields['code']; + $url .= '&start=' . $current_date->format($format); + $url .= '&end=' . $stop->format($format); + $url .= '&temporalGranularity=' . 'hourly'; + $url .= '&emissionFactorType=' . 'lifecycle'; + $response = $this->client->request('GET', $url, [ + 'timeout' => 4, + /*'query' => $params,*/ + 'headers' => $headers, + ]); + if (isset($response['status']) && $response['status'] === 'error') { + trigger_error('Electricity maps API error: ' . $response['message'], E_USER_ERROR); + } + if (isset($response['error'])) { + trigger_error('Electricity maps API error: ' . $response['error'], E_USER_ERROR); + } + if (!$full_response) { + $full_response = $response; + } else { + $full_response['data'] = array_merge($full_response['data'], $response['data']); + } + $current_date = min($request_stop, $stop); + } + if (!$full_response) { + return []; + } + + if (isset($response['error'])) { + // An error ocured + trigger_error('' . $response['error'], E_USER_WARNING); + if ($response['error'] === 'Invalid auth-token') { + throw new AbortException('Invalid auth-token'); + } + return []; + } + + $downloaded_year_month = $start->format('Y-m'); + if (count($full_response) > 0 && $downloaded_year_month < date('Y-m')) { + $json = json_encode($full_response); + file_put_contents($cache_file, $json); + } + return $full_response['data']; + } + + protected function formatOutput(array $response, int $step): array + { + // Convert string dates into datetime objects, + // using timezone expressed as type Continent/City instead of offset + // This is needed to detect later the switching to winter time + $response = $this->shiftToLocalTimezone($response); + $intensities = []; + array_walk($response, function ($record) use (&$intensities) { + $data_quality = $this->getDataQuality($record); + $intensities[] = [ + 'datetime' => $record['datetime']->format('Y-m-d\TH:00:00'), + 'intensity' => $record['carbonIntensity'], + 'data_quality' => $data_quality, + ]; + }); + + return $intensities; + } + + /** + * convert dates to the timezone of GLPI + * + * @param array $response + * @return array array of records: ['datetime' => DateTime, 'carbonintensity' => number] + */ + protected function shiftToLocalTimezone(array $response): array + { + /** @var DBmysql $DB */ + global $DB; + + $shifted_response = []; + $local_timezone = new DateTimeZone($DB->guessTimezone()); + array_walk($response, function ($item, $key) use (&$shifted_response, $local_timezone) { + $shifted_date_object = DateTime::createFromFormat('Y-m-d\TH:i:s.vp', $item['datetime']) + ->setTimezone($local_timezone); + $shifted_date_string = $shifted_date_object->format('Y-m-d H:i:sP'); + if (isset($shifted_response[$shifted_date_string]) && $shifted_response['carbonIntensity'] !== $item['carbonIntensity']) { + trigger_error("Duplicate record with different carbon intensity detected."); + } + $item['datetime'] = $shifted_date_object; + $shifted_response[$shifted_date_string] = $item; + }); + + return $shifted_response; + } + + /** + * Try to determine the data quality of record + * + * @param array $record + * @return int see AbstractTracked::DATA_QUALITY_* constants + */ + protected function getDataQuality(array $record): int + { + $data_quality = $record['isEstimated'] ? AbstractTracked::DATA_QUALITY_ESTIMATED : AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT; + + return $data_quality; + } + + public function incrementalDownload(Source_Zone $source_zone, DateTimeImmutable $start_date, CarbonIntensity $intensity, int $limit = 0): int + { + $count = 0; + $saved = 0; + try { + $data = $this->fetchDay(new DateTimeImmutable(), $source_zone); + } catch (AbortException $e) { + throw $e; + } + $zone = Zone::getById($source_zone->fields[Zone::getForeignKeyField()]); + $saved = $intensity->save($source_zone, $data[$zone->fields['name']]); + $count += abs($saved); + + return $saved > 0 ? $count : -$count; + } + + public function fullDownload(Source_Zone $source_zone, DateTimeImmutable $start_date, DateTimeImmutable $stop_date, CarbonIntensity $intensity, int $limit = 0, ?ProgressBar $progress = null): int + { + $use_free_plan = (int) Config::getConfigurationValue('electricitymap_free_plan'); + if ($use_free_plan === 0) { + return parent::fullDownload($source_zone, $start_date, $stop_date, $intensity, $limit); + } + + // Disable full download because we miss documentation for PAST_URL endpoint + $start_date = new DateTime('24 hours ago'); + $start_date->setTime((int) $start_date->format('H'), 0, 0); + $start_date = DateTimeImmutable::createFromMutable($start_date); + return $this->incrementalDownload($source_zone, $start_date, $intensity, $limit); + } + + protected function sliceDateRangeByDay(DateTimeImmutable $start, DateTimeImmutable $stop) + { + $real_start = $start; + $real_stop = $stop->setTime(0, 0, 0); + + $current_date = DateTime::createFromImmutable($real_start); + while ($current_date <= $real_stop) { + yield DateTimeImmutable::createFromMutable($current_date); + $current_date->add(new DateInterval('P1D')); + $current_date->setTime(0, 0, 0); + } + } +} diff --git a/src/DataSource/CarbonIntensity/ElectricityMaps/Config.php b/src/DataSource/CarbonIntensity/ElectricityMaps/Config.php new file mode 100644 index 00000000..d35381d8 --- /dev/null +++ b/src/DataSource/CarbonIntensity/ElectricityMaps/Config.php @@ -0,0 +1,104 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity\ElectricityMaps; + +use GlpiPlugin\Carbon\Config as PluginConfig; +use GlpiPlugin\Carbon\DataSource\ConfigInterface; + +class Config implements ConfigInterface +{ + public static function getSecuredConfigs(): array + { + return [ + 'electricitymap_api_key', + ]; + } + + public function getConfigTemplate(): string + { + $commercial_url = 'https://www.electricitymaps.com/'; + $twig = << About + + {{ fields.passwordField( + 'electricitymap_api_key', + '', + __('Key for electricitymap.org API', 'carbon') + ) }} + + {{ fields.checkboxField( + 'electricitymap_free_plan', + current_config['electricitymap_free_plan'] ?? 0, + __('Free plan', 'carbon') + ) }} + + {{ fields.checkboxField( + 'electricitymap_fake_data', + current_config['electricitymap_fake_data'] ?? 0, + __('API key is development key (fake data)', 'carbon') + ) }} +TWIG; + + return $twig; + } + + public function configUpdate(array $input): array + { + $to_delete = []; + foreach (self::getSecuredConfigs() as $field) { + if (isset($input[$field]) && empty($input[$field])) { + unset($input[$field]); + } + if (($input['_blank_' . $field] ?? '') === 'on') { + $to_delete[] = $field; + } + } + if (count($to_delete)) { + PluginConfig::deletePluginConfigurationValues($to_delete); + } + + return $input; + } + + public static function getConfigurationValue(string $name) + { + return PluginConfig::getPluginConfigurationValue($name); + } +} diff --git a/src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php b/src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php new file mode 100644 index 00000000..ae26acfe --- /dev/null +++ b/src/DataSource/CarbonIntensity/ElectricityMaps/CronTask.php @@ -0,0 +1,101 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity\ElectricityMaps; + +use CommonGLPI; +use CronTask as GlpiCronTask; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\AbstractCronTask; +use GlpiPlugin\Carbon\DataSource\CronTaskInterface; +use GlpiPlugin\Carbon\Source_Zone; + +class CronTask extends AbstractCronTask implements CronTaskInterface +{ + protected static string $client_name = 'ElectricityMaps'; + + protected static string $downloadMethod = 'DownloadElectricityMaps'; + + public static function getIcon() + { + return 'fa-solid fa-gears'; + } + + public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) + { + return self::createTabEntry(__('Resource diagnosis', 'carbon'), 0); + } + + public static function enumerateTasks(): array + { + // TODO: This data shoud replace the occurrence in CronTask::cronInfo() + return [ + [ + 'itemtype' => self::class, + 'name' => self::$downloadMethod, + 'frequency' => DAY_TIMESTAMP / 2, + 'options' => [ + 'mode' => GlpiCronTask::MODE_EXTERNAL, + 'allowmode' => GlpiCronTask::MODE_INTERNAL + GlpiCronTask::MODE_EXTERNAL, + 'logs_lifetime' => 30, + 'comment' => __('Collect carbon intensities from Electricity Maps', 'carbon'), + 'param' => 10000, // Maximum rows to generate per execution + ], + ], + ]; + } + + /** + * Get description of an automatic action + * + * @param string $name + * @return array + */ + public static function cronInfo(string $name): array + { + switch ($name) { + case self::$downloadMethod: + return [ + 'description' => __('Download carbon emissions from Electricity Maps', 'carbon'), + 'parameter' => __('Maximum number of entries to download', 'carbon'), + ]; + } + return []; + } + + protected function dstFilter(array $gaps, Source_Zone $source_zone): array + { + // TODO: find a way to handle electricitymaps territory codes + // They don't match any norm (US-CAL, US-CAR) + // The codes with a 3rd name (US-CAL-CISO) seems to mention an energy distribution or production entity + return $gaps; + } +} diff --git a/src/DataSource/CarbonIntensity/Rte/Client.php b/src/DataSource/CarbonIntensity/Rte/Client.php new file mode 100644 index 00000000..f98fe488 --- /dev/null +++ b/src/DataSource/CarbonIntensity/Rte/Client.php @@ -0,0 +1,583 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity\Rte; + +use DateInterval; +use DateTime; +use DateTimeImmutable; +use DateTimeInterface; +use DateTimeZone; +use DBmysql; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\AbstractClient; +use GlpiPlugin\Carbon\DataSource\RestApiClientInterface; +use GlpiPlugin\Carbon\DataTracking\AbstractTracked; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; +use GlpiPlugin\Carbon\Toolbox; +use GlpiPlugin\Carbon\Zone; +use RuntimeException; +use Safe\Exceptions\FilesystemException; + +use function Safe\mkdir; + +/** + * Query carbon intensity data from Réseau de Transport d'Électricité (RTE) + * @see https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature + * + * API documentation + * @see https://help.opendatasoft.com/apis/ods-explore-v2/explore_v2.1.html + * + * About DST for this data source + * GLPI must be set up with timezones enabled + * If this requirement is not met, then dates here DST change occurs will cause problems + * Searching for gaps will find gaps that the algorithm will try to fill, but fail repeatidly. + * + * Queries to the provider uses dates intervals in the form [start, stop]. Those boundaries + * are expresses with timezone +00:00 (aka Z or UTC). An extra timezone parameter is given + * in the query and let the server respond with datetimes shifted to this timezone. + */ +class Client extends AbstractClient +{ + public const EXPORT_URL_REALTIME = '/eco2mix-national-tr/exports/json'; + public const EXPORT_URL_CONSOLIDATED = '/eco2mix-national-cons-def/exports/json'; + + public const DATASET_REALTIME = 0; + public const DATASET_CONSOLIDATED = 1; + + /** @var float Tolerance ratio of unknown samples */ + private const UNKNOWN_SAMPLES_WARNING = 0.05; + + private const REQUEST_TIMEZONE = 'Europe/Paris'; + + private RestApiClientInterface $client; + + private string $base_url; + + public function __construct(RestApiClientInterface $client, string $url = '') + { + $this->client = $client; + $this->base_url = 'https://odre.opendatasoft.com/api/explore/v2.1/catalog/datasets'; + if (!empty($url)) { + $this->base_url = $url; + } + } + + public function getSourceName(): string + { + return 'RTE'; + } + + public function getDataInterval(): string + { + return 'P15M'; + } + + public function getHardStartDate(): DateTimeImmutable + { + return DateTimeImmutable::createFromFormat(DateTimeInterface::ATOM, '2012-01-01T00:00:00+00:00'); + } + + public function getMaxIncrementalAge(): DateTimeImmutable + { + $recent_limit = new DateTime('15 days ago'); + $recent_limit->setTime(0, 0, 0); + + return DateTimeImmutable::createFromMutable($recent_limit); + } + + public function getSupportedZones(): array + { + return [ + null => 'France', + ]; + } + + public function createZones(): int + { + $source = new Source(); + $source->getOrCreate([], [ + 'name' => $this->getSourceName(), + ]); + if ($source->isNewItem()) { + return -1; + } + $source_id = $source->getID(); + + $zone = new Zone(); + $zone->getOrCreate([], [ + 'name' => 'France', + ]); + if ($zone->isNewItem()) { + return -1; + } + $zone_id = $zone->getID(); + + $source_zone = new Source_Zone(); + $source_zone->getOrCreate([ + 'code' => '', + 'is_download_enabled' => Toolbox::isLocationExistForZone($zone->fields['name']), + ], [ + Source::getForeignKeyField() => $source_id, + Zone::getForeignKeyField() => $zone_id, + ]); + if ($source_zone->isNewItem()) { + return -1; + } + $this->setZoneSetupComplete(); + return 1; + } + + /** + * Fetch carbon intensities from Opendata Réseaux-Énergies using real-time dataset. + * + * See https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature + * + * Dataset has a depth from MONTH-1 to HOUR-2. + * Note that the HOUR-2 seems to be not fully guaranted. + * + * @param DateTimeImmutable $day date to download from [00::00:00 to 24:00:00[ + * @param Source_Zone $source_zone + * @return array + */ + public function fetchDay(DateTimeImmutable $day, Source_Zone $source_zone): array + { + $stop = $day->add(new DateInterval('P1D')); + + $format = DateTime::ATOM; + $from = $day->format($format); + $to = $stop->format($format); + + $timezone = new DateTimeZone(self::REQUEST_TIMEZONE); + $params = [ + 'select' => 'date_heure,taux_co2', + 'where' => "date_heure IN [date'$from' TO date'$to'[", + 'order_by' => 'date_heure asc', + 'timezone' => $timezone->getName(), + ]; + + $url = $this->base_url . self::EXPORT_URL_REALTIME; + $response = $this->client->request('GET', $url, ['timeout' => 8, 'query' => $params]); + if (!$response) { + return []; + } + if (isset($response['error_code'])) { + trigger_error($this->formatError($response)); + return []; + } + + $this->step = $this->detectStep($response); + + // Drop data with no carbon intensity (may be returned by the provider) + $response = array_filter($response, function ($item) { + return $item['taux_co2'] != 0; + }); + + // Drop last rows until we reach + $safety_count = 0; + while (($last_item = end($response)) !== false) { + $time = DateTime::createFromFormat(DateTimeInterface::ATOM, $last_item['date_heure']); + if ($time->format('i') === '45') { + // We expect 15 minutes steps + break; + } + array_pop($response); + $safety_count++; + if ($safety_count > 3) { + break; + } + } + + return $response; + } + + /** + * Fetch range from cached data or online database. Assume that $start is the beginning of a month (Y-m-1 00:00:00) + * and $stop is the beginning of the next month (Y-m+1-1 00:00:00). + * + * @param DateTimeImmutable $start + * @param DateTimeImmutable $stop + * @param Source_Zone $source_zone + * @param int $dataset + * @return array + */ + public function fetchRange(DateTimeImmutable $start, DateTimeImmutable $stop, Source_Zone $source_zone, int $dataset = self::DATASET_REALTIME): array + { + // Build realtime and consolidated paths + $zone = new Zone(); + $zone->getFromDBByCrit(['id' => $source_zone->fields[Zone::getForeignKeyField()]]); + $base_path = GLPI_PLUGIN_DOC_DIR . '/carbon/carbon_intensity/' . $this->getSourceName() . '/' . $zone->fields['name']; + $consolidated_dir = $base_path . '/consolidated'; + $realtime_dir = $base_path . '/realtime'; + + // Set timezone to +00:00 and extend range by -12/+14 hours + $timezone_z = new DateTimeZone('+0000'); + $request_start = $start->setTimezone($timezone_z)->sub(new DateInterval('PT12H')); + $request_stop = $stop->setTimezone($timezone_z)->add(new DateInterval('PT14H')); + + // Prevent downloading in the future + $request_stop = min($request_stop, new DateTime('yesterday midnight', $timezone_z)); + if ($request_start > $request_stop) { + return []; + } + + $format = DateTime::ATOM; + $from = $request_start->format($format); + $to = $request_stop->format($format); + $interval = $request_stop->diff($request_start); + $expected_samples_hours = (int) ($interval->days * 24) + + (int) ($interval->h) + + (int) ($interval->i / 60) + - (($start->getOffset() - $stop->getOffset()) / 3600); + + // Choose URL + switch ($dataset) { + case self::DATASET_CONSOLIDATED: + $url = self::EXPORT_URL_CONSOLIDATED; + $cache_dir = $consolidated_dir; + break; + case self::DATASET_REALTIME: + default: + $url = self::EXPORT_URL_REALTIME; + $cache_dir = $realtime_dir; + break; + } + $query_timezone = new DateTimeZone(self::REQUEST_TIMEZONE); + $cache_file = $this->getCacheFilename( + $cache_dir, + $start, + $stop, + $query_timezone + ); + $url = $this->base_url . $url; + + // If a cached file exists, use it + if ($this->use_cache && file_exists($cache_file)) { + $response = json_decode(file_get_contents($cache_file), true); + $this->step = $this->detectStep($response); + return $response; + } else { + $cache_dir = dirname($cache_file); + if (!is_dir($cache_dir)) { + try { + mkdir($cache_dir, 0o755, true); + } catch (FilesystemException $e) { + trigger_error($e->getMessage(), E_USER_WARNING); + } + } + } + + // Prepare the HTTP request + // Optimal timezone for returned dates to reduce DST mess in the response + $where = "date_heure IN [date'$from' TO date'$to'["; + $params = [ + 'select' => 'date_heure,taux_co2', + 'where' => $where, + 'order_by' => 'date_heure asc', + 'timezone' => $query_timezone->getName(), + ]; + $headers = []; + try { + $response = $this->client->request('GET', $url, [ + 'timeout' => 8, + 'query' => $params, + 'headers' => $headers, + ]); + } catch (RuntimeException $e) { + return []; + } + $this->step = $this->detectStep($response); + $expected_samples_count = $expected_samples_hours * (60 / $this->step); + $expected_samples_count--; // End boundary is excluded, decreasing the expeected count by 1 + if (($dataset === self::DATASET_REALTIME && abs(count($response) - $expected_samples_count) > (60 / $this->step))) { + // Got less samples than expected, try again with consolidated data set + $alt_response = $this->fetchRange($start, $stop, $source_zone, self::DATASET_CONSOLIDATED); + if (!isset($alt_response['error_code']) && count($alt_response) > count($response)) { + // Use the alternative response if more samples than the original response + $response = $alt_response; + } + } else { + $downloaded_year_month = $start->format('Y-m'); + if ($downloaded_year_month < date('Y-m')) { + // Cache only if the month being processed is older than the month of now + $json = json_encode($response); + file_put_contents($cache_file, $json); + } + } + return $response; + } + + /** + * Format the records before saving them in DB + * It is assumed that the records are chronologically sorted + * + * @param array $response + * @param int $step + * @return array + */ + protected function formatOutput(array $response, int $step): array + { + $this->step = $this->detectStep($response); + // Convert string dates into datetime objects, + // using timezone expressed as type Continent/City instead of offset + // This is needed to detect later the switching to winter time + $response = $this->shiftToLocalTimezone($response); + + // Convert samples from to 1 hour + if ($this->step < 60) { + $intensities = $this->downsample($response, $this->step); + } else { + $intensities = []; + array_walk($response, function ($record) use (&$intensities) { + $intensities[] = [ + 'datetime' => $record['datetime']->format('Y-m-d\TH:00:00'), + 'intensity' => (float) $record['taux_co2'], + 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT, + ]; + }); + } + + return $intensities; + } + + /** + * convert dates to the timezone of GLPI + * + * @param array $response + * @return array array of records: ['date_heure' => string, 'taux_co2' => number, 'datetime' => DateTime] + */ + protected function shiftToLocalTimezone(array $response): array + { + /** @var DBmysql $DB */ + global $DB; + + $shifted_response = []; + $local_timezone = new DateTimeZone($DB->guessTimezone()); + array_walk($response, function ($item, $key) use (&$shifted_response, $local_timezone) { + $shifted_date_object = DateTime::createFromFormat('Y-m-d\TH:i:sP', $item['date_heure']) + ->setTimezone($local_timezone); + $shifted_date_string = $shifted_date_object->format('Y-m-d H:i:sP'); + if (isset($shifted_response[$shifted_date_string]) && $shifted_response['taux_co2'] !== $item['taux_co2']) { + trigger_error("Duplicate record with different carbon intensity detected."); + } + $item['datetime'] = $shifted_date_object; + $shifted_response[$shifted_date_string] = $item; + }); + + return $shifted_response; + } + + /** + * Deduplicates records + * + * @param array $records Records in the format ['date_heure' => DateTime, 'taux_co2' => number] + * @return array Array of records where key is the string formatted datetime and value is the carbon intensity + */ + protected function deduplicate(array $records): array + { + $deduplicated = []; + foreach ($records as $record) { + $date = $record['date_heure']; + if (key_exists($date, $deduplicated)) { + if ($deduplicated[$date]['taux_co2'] != $record['taux_co2']) { + // Inconsistency detected. What to do with this record? + continue; + } + continue; + } + + $deduplicated[$date] = $record; + } + + return $deduplicated; + } + + /** + * Get the temporal distance between records + * + * @param array $records + * @return int step in minutes + */ + protected function detectStep(array $records): ?int + { + if (count($records) < 2) { + return 60; + } + + $sample_1 = DateTime::createFromFormat(DateTime::ATOM, $records[0]['date_heure']); + $sample_2 = DateTime::createFromFormat(DateTime::ATOM, $records[1]['date_heure']); + $diff = $sample_1->diff($sample_2); + + if ($diff->h === 1) { + return 60; // 1 hour step + } + return $diff->i; // Return the minutes step + } + + /** + * Convert records to 1 hour + * + * @param array $records + * @param int $step : interval in minutes between 2 samples + * @return array + */ + protected function convertToHourly(array $records, int $step): array + { + if ($step === 60) { + return $records; + } + + $intensities = []; + $intensity = 0.0; + $count = 0; + $previous_record_date = null; + + foreach ($records as $record) { + $date = $record['date_heure']; + $intensity += $record['taux_co2']; + if ($record['taux_co2'] === null) { + continue; + } + $count++; + $minute = (int) $date->format('i'); + + if ($previous_record_date !== null) { + // Ensure that current date is $step minutes ahead than previous record date + $diff = $date->getTimestamp() - $previous_record_date->getTimestamp(); + if ($diff !== $step * 60) { + if ($this->switchToWinterTime(clone $previous_record_date, clone $date)) { + $filled_date = DateTime::createFromFormat('Y-m-d\TH:i:s', end($intensities)['datetime']); + $filled_date->add(new DateInterval('PT1H')); + $intensities[] = [ + 'datetime' => $filled_date->format('Y-m-d\TH:00:00'), + 'intensity' => (end($intensities)['intensity'] + $record['taux_co2']) / 2, + 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED, + ]; + } else { + // Unexpected gap in the records. What to do with this ? + $date_1 = $previous_record_date->format(DateTimeInterface::ATOM); + $date_2 = $date->format(DateTimeInterface::ATOM); + trigger_error("Inconsistent date time increment: $diff seconds between $date_1 and $date_2", E_USER_WARNING); + } + } + } + + if ($minute === (60 - $step)) { + // Finalizing an average of accumulated samples + $intensities[] = [ + 'datetime' => $date->format('Y-m-d\TH:00:00'), + 'intensity' => (float) $intensity / $count, + 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED, + ]; + $intensity = 0.0; + $count = 0; + } + + $previous_record_date = $date; + } + + return $intensities; + } + + /** + * Downsample records to a new set of records at the given frequency in minutes. + * The records may have irregular interval between samples due to filtered out null elements + * + * @param array $records The records to downsample + * @param int $step The step of output records in minutes + * @return array The downsampled records + */ + protected function downsample(array $records, int $step): array + { + $downsampled = []; + $intensity = 0.0; + $count = 0; + $null_count = 0; + $last_known_intensity = 0.0; + foreach ($records as $record) { + $date = $record['datetime']; + if ($record['taux_co2'] === null) { + $null_count++; + } else { + $last_known_intensity = $record['taux_co2']; + } + $intensity += $last_known_intensity; + $count++; + $minute = (int) $date->format('i'); + + if ($minute === (60 - $step)) { + // Finalizing an average of accumulated samples + $downsampled[] = [ + 'datetime' => $date->format('Y-m-d\TH:00:00'), + 'intensity' => (float) $intensity / $count, + 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED, + ]; + $intensity = 0.0; + $count = 0; + } + } + + // Warn if too many unknown records + if ($null_count / count($records) > self::UNKNOWN_SAMPLES_WARNING) { + $begin = reset($records)['datetime']->format('Y-m-d H:i:s'); + $end = end($records)['datetime']->format('Y-m-d H:i:s'); + trigger_error( + sprintf("Too many unknown carbon intensities between %s and %s", $begin, $end), + E_USER_WARNING + ); + } + + return $downsampled; + } + + /** + * Detect if the given datetime matches a switching ot winter time (DST) for France + * + * @return bool + */ + private function switchToWinterTime(DateTime $previous, DateTime $date): bool + { + $timezone = new DateTimeZone(self::REQUEST_TIMEZONE); + $previous->setTimezone($timezone); + $date->setTimezone($timezone); + $first_dst = $previous->format('I'); + $second_dst = $date->format('I'); + return $first_dst === '1' && $second_dst === '0'; + } + + private function formatError(array $response): string + { + $message = $message = $response['error_code'] + . ' ' . $response['message']; + return $message; + } +} diff --git a/src/DataSource/CarbonIntensity/Rte/Config.php b/src/DataSource/CarbonIntensity/Rte/Config.php new file mode 100644 index 00000000..47f577fd --- /dev/null +++ b/src/DataSource/CarbonIntensity/Rte/Config.php @@ -0,0 +1,53 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity\Rte; + +use GlpiPlugin\Carbon\DataSource\ConfigInterface; + +class Config implements ConfigInterface +{ + public static function getSecuredConfigs(): array + { + return []; + } + + public function getConfigTemplate(): string + { + return ''; + } + + public function configUpdate(array $input): array + { + return $input; + } +} diff --git a/src/DataSource/CarbonIntensity/Rte/CronTask.php b/src/DataSource/CarbonIntensity/Rte/CronTask.php new file mode 100644 index 00000000..293b3aaa --- /dev/null +++ b/src/DataSource/CarbonIntensity/Rte/CronTask.php @@ -0,0 +1,113 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\CarbonIntensity\Rte; + +use CommonGLPI; +use CronTask as GlpiCronTask; +use DateTime; +use DateTimeZone; +use GlpiPlugin\Carbon\DataSource\CarbonIntensity\AbstractCronTask; +use GlpiPlugin\Carbon\DataSource\CronTaskInterface; +use GlpiPlugin\Carbon\Source_Zone; + +/** + * @method int cronDownloadRte(GlpiCronTask $task) + */ +class CronTask extends AbstractCronTask implements CronTaskInterface +{ + protected static string $client_name = 'Rte'; + + protected static string $downloadMethod = 'DownloadRte'; + + public static function getIcon() + { + return 'fa-solid fa-gears'; + } + + public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) + { + return self::createTabEntry(__('Resource diagnosis', 'carbon'), 0); + } + + public static function enumerateTasks(): array + { + // TODO: This data shoud replace the occurrence in CronTask::cronInfo() + return [ + [ + 'itemtype' => self::class, + 'name' => self::$downloadMethod, + 'frequency' => DAY_TIMESTAMP, + 'options' => [ + 'mode' => GlpiCronTask::MODE_EXTERNAL, + 'allowmode' => GlpiCronTask::MODE_INTERNAL + GlpiCronTask::MODE_EXTERNAL, + 'logs_lifetime' => 30, + 'comment' => __('Collect carbon intensities from RTE', 'carbon'), + 'param' => 10000, // Maximum rows to generate per execution + ], + ], + ]; + } + + /** + * Get description of an automatic action + * + * @param string $name + * @return array + */ + public static function cronInfo(string $name): array + { + switch ($name) { + case self::$downloadMethod: + return [ + 'description' => __('Download carbon emissions from RTE', 'carbon'), + 'parameter' => __('Maximum number of entries to download', 'carbon'), + ]; + } + return []; + } + + protected function dstFilter(array $gaps, Source_Zone $source_zone): array + { + $tz = new DateTimeZone('Europe/Paris'); + $result = array_filter($gaps, function ($gap) use ($tz) { + // Use local timzeone + $a = DateTime::createFromFormat('Y-m-d H:i:s', $gap['start']); + $b = DateTime::createFromFormat('Y-m-d H:i:s', $gap['end']); + // switch to timezone of the data source (this shifts the hour if necessary) + $a->setTimezone($tz); + $b->setTimezone($tz); + return $a->format('Y-m-d H:i:s') != $b->format('Y-m-d H:i:s'); + }); + return $result; + } +} diff --git a/src/DataSource/CarbonIntensityElectricityMap.php b/src/DataSource/CarbonIntensityElectricityMap.php deleted file mode 100644 index 5564ba84..00000000 --- a/src/DataSource/CarbonIntensityElectricityMap.php +++ /dev/null @@ -1,368 +0,0 @@ -. - * - * ------------------------------------------------------------------------- - */ - -namespace GlpiPlugin\Carbon\DataSource; - -use DateInterval; -use DateTime; -use DateTimeInterface; -use DateTimeZone; -use DateTimeImmutable; -use GlpiPlugin\Carbon\CarbonIntensity; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\Zone; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; -use Config as GlpiConfig; -use GLPIKey; -use GlpiPlugin\Carbon\DataTracking\AbstractTracked; -use GlpiPlugin\Carbon\Toolbox; -use Symfony\Component\Console\Helper\ProgressBar; - -/** - * Query carbon intensity data from Electricity map - * - * API documentation: - * @see https://static.electricitymaps.com/api/docs/index.html - */ -class CarbonIntensityElectricityMap extends AbstractCarbonIntensity -{ - const HISTORY_URL = '/carbon-intensity/history'; - const PAST_URL = '/carbon-intensity/past-range'; - const ZONES_URL = '/zones'; // Do not send API token - - private RestApiClientInterface $client; - - private string $base_url; - - public function __construct(RestApiClientInterface $client, string $url = '') - { - $this->client = $client; - - $this->base_url = 'https://api.electricitymap.org/v3'; - if (!empty($url)) { - $this->base_url = $url; - } - } - - public function getSourceName(): string - { - return 'ElectricityMap'; - } - - public function getDataInterval(): string - { - return 'P60M'; - } - - public function getMaxIncrementalAge(): DateTimeImmutable - { - $recent_limit = new DateTime('1 day ago'); - $recent_limit->setTime(0, 0, 0); - - return DateTimeImmutable::createFromMutable($recent_limit); - } - - public function getHardStartDate(): DateTimeImmutable - { - return DateTimeImmutable::createFromFormat(DateTimeInterface::ATOM, '2021-01-01T00:00:00+00:00'); - } - - public function createZones(): int - { - $source = $this->getOrCreateSource(); - if ($source === null) { - return -1; - } - $source_id = $source->getID(); - - try { - $zones = $this->queryZones(); - } catch (\RuntimeException $e) { - return 0; - } - - $count = 0; - $failed = false; - foreach ($zones as $zone_key => $zone_spec) { - $zone_input = [ - 'name' => $zone_spec['zoneName'], - ]; - $zone = new Zone(); - if ($zone->getFromDbByCrit($zone_input) === false) { - if ($this->enableHistorical($zone_spec['zoneName'])) { - $zone_input['plugin_carbon_carbonintensitysources_id_historical'] = $source_id; - } - if ($zone->add($zone_input) === false) { - $failed = true; - continue; - } - } - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone->add([ - CarbonIntensitySource::getForeignKeyField() => $source_id, - Zone::getForeignKeyField() => $zone->getID(), - 'code' => $zone_key, - 'is_download_enabled' => Toolbox::isLocationExistForZone($zone->fields['name']), - ]); - $count++; - } - - if ($failed) { - $count = -$count; - } else { - $this->setZoneSetupComplete(); - } - - return $count; - } - - /** - * Enable historical for this source depending in the zone to configure - * - * @return boolean - */ - protected function enableHistorical($zone_name): bool - { - if (in_array($zone_name, ['France'])) { - // Prefer an other source for France - return false; - } - - return true; - } - - private function getToken(): string - { - $glpi_key = new GLPIKey(); - $value = GlpiConfig::getConfigurationValue('plugin:carbon', 'electricitymap_api_key'); - return $glpi_key->decrypt($value); - } - - protected function queryZones(): array - { - $response = $this->client->request('GET', $this->base_url . self::ZONES_URL, []); - if (!$response) { - return []; - } - - if (isset($response['error'])) { - // An error ocured - trigger_error('' . $response['error'], E_USER_WARNING); - if ($response['error'] === 'Invalid auth-token') { - throw new AbortException('Invalid auth-token'); - } - return []; - } - - return $response; - } - - /** - * Fetch carbon intensities from Opendata Réseaux-Énergies using export dataset. - * - * See https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature - * - * The method fetches the intensities for the date range specified in argument. - */ - public function fetchDay(DateTimeImmutable $day, string $zone): array - { - $source_zone = new CarbonIntensitySource_Zone(); - $zone_code = $source_zone->getFromDbBySourceAndZone($this->getSourceName(), $zone); - - if ($zone_code === null) { - throw new AbortException('Invalid zone'); - } - - $params = [ - 'zone' => $zone_code, - ]; - - $options = [ - 'headers' => [ - 'auth-token' => $this->getToken(), - ], - 'query' => $params - ]; - - $response = $this->client->request('GET', $this->base_url . self::HISTORY_URL, $options); - if (!$response) { - return []; - } - - if (isset($response['status']) && $response['status'] === 'error') { - // An error ocured - if ($response['message'] === 'Invalid auth-token') { - throw new AbortException('Invalid auth-token'); - } - if (preg_match("#^Zone '[^']*' does not exist.$#", $response['message']) !== false) { - throw new AbortException($response['message']); - } - return []; - } - - $intensities = []; - $timezone = new DateTimeZone('UTC'); - foreach ($response['history'] as $record) { - $datetime = DateTime::createFromFormat('Y-m-d\TH:i:s+', $record['datetime'], $timezone); - if (!$datetime instanceof DateTimeInterface) { - continue; - } - $data_quality = $this->getDataQuality($record); - $intensities[] = [ - 'datetime' => $datetime->format('Y-m-d\TH:i:s'), - 'intensity' => $record['carbonIntensity'], - 'data_quality' => $data_quality, - ]; - } - - // Filter out already existing entries - $carbon_intensity = new CarbonIntensity(); - $last_known_date = $carbon_intensity->getLastKnownDate($zone, $this->getSourceName()); - $intensities = array_filter($intensities, function ($intensity) use ($last_known_date) { - $intensity_date = DateTime::createFromFormat('Y-m-d\TH:i:s', $intensity['datetime']); - return $intensity_date > $last_known_date; - }); - - return [ - 'source' => $this->getSourceName(), - $zone => $intensities, - ]; - } - - public function fetchRange(DateTimeImmutable $start, DateTimeImmutable $stop, string $zone): array - { - - // TODO: get zones from GLPI locations - $params = [ - 'zone' => $zone, - ]; - - $this->step = 60; - - $response = $this->client->request('GET', $this->base_url . self::PAST_URL, ['query' => $params]); - if (!$response) { - return []; - } - - if (isset($response['error'])) { - // An error ocured - trigger_error('' . $response['error'], E_USER_WARNING); - if ($response['error'] === 'Invalid auth-token') { - throw new AbortException('Invalid auth-token'); - } - return []; - } - - return $$response['history']; - } - - protected function formatOutput(array $response, int $step): array - { - $intensities = []; - $timezone = new DateTimeZone('UTC'); - foreach ($response['history'] as $record) { - $datetime = DateTime::createFromFormat('Y-m-d\TH:i:s+', $record['datetime'], $timezone); - if (!$datetime instanceof DateTimeInterface) { - var_dump(DateTime::getLastErrors()); - continue; - } - $data_quality = $this->getDataQuality($record); - $intensities[] = [ - 'datetime' => $datetime->format(DateTime::ATOM), - 'intensity' => $record['carbonIntensity'], - 'data_quality' => $data_quality, - ]; - } - - return [ - 'source' => $this->getSourceName(), - $response['zone'] => $intensities, - ]; - } - - /** - * Try ti determine the data quality of record - * - * @param array $record - * @return integer - */ - protected function getDataQuality(array $record): int - { - $data_quality = 0; - if (!$record['isEstimated']) { - $data_quality = AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT; - } - - return $data_quality; - } - - public function incrementalDownload(string $zone, DateTimeImmutable $start_date, CarbonIntensity $intensity, int $limit = 0): int - { - $count = 0; - $saved = 0; - try { - $data = $this->fetchDay(new DateTimeImmutable(), $zone); - } catch (AbortException $e) { - throw $e; - } - $saved = $intensity->save($zone, $this->getSourceName(), $data[$zone]); - $count += abs($saved); - if ($limit > 0 && $count >= $limit) { - return $saved > 0 ? $count : -$count; - } - - return $saved > 0 ? $count : -$count; - } - - public function fullDownload(string $zone, DateTimeImmutable $start_date, DateTimeImmutable $stop_date, CarbonIntensity $intensity, int $limit = 0, ?ProgressBar $progress = null): int - { - // TODO : implement progress bar - // Disable full download because we miss documentation for PAST_URL endpoint - $start_date = new DateTime('24 hours ago'); - $start_date->setTime((int) $start_date->format('H'), 0, 0); - $start_date = DateTimeImmutable::createFromMutable($start_date); - return $this->incrementalDownload($zone, $start_date, $intensity, $limit); - } - - protected function sliceDateRangeByDay(DateTimeImmutable $start, DateTimeImmutable $stop) - { - $real_start = $start; - $real_stop = $stop->setTime(0, 0, 0); - - $current_date = DateTime::createFromImmutable($real_start); - while ($current_date <= $real_stop) { - yield DateTimeImmutable::createFromMutable($current_date); - $current_date->add(new DateInterval('P1D')); - $current_date->setTime(0, 0, 0); - } - } -} diff --git a/src/DataSource/CarbonIntensityRTE.php b/src/DataSource/CarbonIntensityRTE.php deleted file mode 100644 index 9b2be849..00000000 --- a/src/DataSource/CarbonIntensityRTE.php +++ /dev/null @@ -1,442 +0,0 @@ -. - * - * ------------------------------------------------------------------------- - */ - -namespace GlpiPlugin\Carbon\DataSource; - -use DateInterval; -use DateTime; -use DateTimeImmutable; -use DateTimeInterface; -use DateTimeZone; -use DBmysql; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; -use GlpiPlugin\Carbon\Zone; -use GlpiPlugin\Carbon\DataTracking\AbstractTracked; -use GlpiPlugin\Carbon\Toolbox; - -/** - * Query carbon intensity data from Réseau de Transport d'Électricité (RTE) - * @see https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature - * - * API documentation - * @see https://help.opendatasoft.com/apis/ods-explore-v2/explore_v2.1.html - */ -class CarbonIntensityRTE extends AbstractCarbonIntensity -{ - const RECORDS_URL = '/eco2mix-national-tr/records'; - const EXPORT_URL_REALTIME = '/eco2mix-national-tr/exports/json'; - const EXPORT_URL_CONSOLIDATED = '/eco2mix-national-cons-def/exports/json'; - - private RestApiClientInterface $client; - - private string $base_url; - - /** @var bool Use consolidated dataset (true) or realtime dataset (false) */ - private bool $use_consolidated = false; - - public function __construct(RestApiClientInterface $client, string $url = '') - { - $this->client = $client; - - $this->base_url = 'https://odre.opendatasoft.com/api/explore/v2.1/catalog/datasets'; - if (!empty($url)) { - $this->base_url = $url; - } - } - - public function getSourceName(): string - { - return 'RTE'; - } - - public function getDataInterval(): string - { - return 'P15M'; - } - - public function getHardStartDate(): DateTimeImmutable - { - return DateTimeImmutable::createFromFormat(DateTimeInterface::ATOM, '2012-01-01T00:00:00+00:00'); - } - - public function getMaxIncrementalAge(): DateTimeImmutable - { - $recent_limit = new DateTime('15 days ago'); - $recent_limit->setTime(0, 0, 0); - - return DateTimeImmutable::createFromMutable($recent_limit); - } - - public function createZones(): int - { - $source = $this->getOrCreateSource(); - if ($source === null) { - return -1; - } - $source_id = $source->getID(); - - $zone = new Zone(); - $input = [ - 'name' => 'France', - ]; - if ($zone->getFromDBByCrit($input) === false) { - $input['plugin_carbon_carbonintensitysources_id_historical'] = $source_id; - if (!$zone->add($input)) { - return -1; - } - } else { - if ($zone->fields['plugin_carbon_carbonintensitysources_id_historical'] == 0) { - $input['plugin_carbon_carbonintensitysources_id_historical'] = $source_id; - $input['id'] = $zone->getID(); - } - $zone->update($input); - } - - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone->add([ - CarbonIntensitySource::getForeignKeyField() => $source_id, - Zone::getForeignKeyField() => $zone->getID(), - 'is_download_enabled' => Toolbox::isLocationExistForZone($zone->fields['name']), - ]); - $this->setZoneSetupComplete(); - return 1; - } - - /** - * Fetch carbon intensities from Opendata Réseaux-Énergies using real-time dataset. - * - * See https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature - * - * Dataset has a depth from MONTH-1 to HOUR-2. - * Note that the HOUR-2 seems to be not fully guaranted. - * - * @param DateTimeImmutable $day date to download from [00::00:00 to 24:00:00[ - * @param string $zone - * @return array - */ - public function fetchDay(DateTimeImmutable $day, string $zone): array - { - /** @var DBmysql $DB */ - global $DB; - - $start = DateTime::createFromImmutable($day); - $stop = clone $start; - $stop->setTime(23, 59, 59); - - $format = DateTime::ATOM; - $timezone = $DB->guessTimezone(); - $from = $start->format($format); - $to = $stop->format($format); - - $params = [ - 'select' => 'taux_co2,date_heure', - 'where' => "date_heure IN [date'$from' TO date'$to']", - 'order_by' => 'date_heure asc', - 'limit' => 4 * 24, // 4 samples per hour = 4 * 24 hours - 'offset' => 0, - 'timezone' => $timezone, - ]; - - $response = $this->client->request('GET', $this->base_url . self::RECORDS_URL, ['timeout' => 8, 'query' => $params]); - if (!$response) { - return []; - } - if (isset($response['error_code'])) { - trigger_error($this->formatError($response)); - return []; - } - - // Drop data with no carbon intensity (may be returned by the provider) - $response['results'] = array_filter($response['results'], function ($item) { - return $item['taux_co2'] != 0; - }); - - // Drop last rows until we reach - $safety_count = 0; - while (($last_item = end($response['results'])) !== false) { - $time = DateTime::createFromFormat(DateTimeInterface::ATOM, $last_item['date_heure']); - if ($time->format('i') === '45') { - // We expect 15 minutes steps - break; - } - array_pop($response['results']); - $safety_count++; - if ($safety_count > 3) { - break; - } - } - - return $this->formatOutput($response['results'], 15); - } - - /** - * Fetch carbon intensities from Opendata Réseaux-Énergies using export dataset. - * - * See https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr/api/?disjunctive.nature - * - * The method fetches the intensities for the date range specified in argument. - * @param DateTimeImmutable $start - * @param DateTimeImmutable $stop - * @param string $zone - * @return array - */ - public function fetchRange(DateTimeImmutable $start, DateTimeImmutable $stop, string $zone): array - { - /** @var DBmysql $DB */ - global $DB; - - $format = DateTime::ATOM; - $from = $start->format($format); - $to = $stop->format($format); - - $timezone = $DB->guessTimezone(); - $interval = $stop->diff($start); - $where = "date_heure IN [date'$from' TO date'$to'"; - if ($interval->y === 0 && $interval->m === 0 && $interval->d === 0 && $interval->h === 1) { - $where .= ']'; - } else { - $where .= '['; - } - $params = [ - 'select' => 'taux_co2,date_heure', - 'where' => $where, - 'order_by' => 'date_heure asc', - 'timezone' => $timezone, - ]; - // convert to 15 minutes interval - if ($this->use_consolidated) { - $this->step = 60; - $url = $this->base_url . self::EXPORT_URL_CONSOLIDATED; - } else { - $this->step = 15; - $url = $this->base_url . self::EXPORT_URL_REALTIME; - } - $expected_samples_count = (int) ($interval->days * 24) - + (int) ($interval->h) - + (int) ($interval->i / 60); - - $alt_response = []; - $response = $this->client->request('GET', $url, ['timeout' => 8, 'query' => $params]); - if ($response) { - // Adjust step as consolidated dataset may return data for each 15 minutes ! - $this->step = $this->detectStep($response); - $expected_samples_count *= (60 / $this->step); - } - - // Tolerate DST switching issues with 15 minutes samples (4 missing samples or too many samples) - if (!$response || abs(count($response) - $expected_samples_count) > 4) { - // Retry with realtime dataset - if (!$this->use_consolidated) { - $this->use_consolidated = true; - $alt_response = $this->fetchRange($start, $stop, $zone); - - if (!isset($alt_response['error_code']) && count($alt_response) > count($response)) { - // Use the alternative response if more samples than the original response - $response = $alt_response; - } - } - } - - if (!$response) { - trigger_error('No response from RTE API for ' . $zone, E_USER_WARNING); - return []; - } - if (count($response) === 0) { - trigger_error('Empty response from RTE API for ' . $zone, E_USER_WARNING); - return []; - } - if (abs(count($response) - $expected_samples_count) > 4) { - trigger_error('Not enough samples from RTE API for ' . $zone . ' (expected: ' . $expected_samples_count . ', got: ' . count($response) . ')', E_USER_WARNING); - } - if (isset($response['error_code'])) { - trigger_error($this->formatError($response)); - } - - return $response; - } - - protected function formatOutput(array $response, int $step): array - { - /** @var DBMysql $DB */ - global $DB; - - // array sort records, just in case - usort($response, function ($a, $b) { - return $a['date_heure'] <=> $b['date_heure']; - }); - - $this->step = $this->detectStep($response); - // Deduplicate entries (solves switching from winter time to summer time) - // because there are 2 samples at same date time, during 1 hour - // Even if we use UTC timezone. - $filtered_response = $this->deduplicate($response); - - // Convert string dates into datetime objects, restoring timezone as type Continent/City instead of offset - // This is needed to detect later the switching to winter time - $timezone = new DateTimeZone($DB->guessTimezone()); - foreach ($filtered_response as &$record) { - $record['date_heure'] = DateTime::createFromFormat('Y-m-d\TH:i:s??????', $record['date_heure'], $timezone); - } - - // Convert samples from 15 min to 1 hour - if ($this->step < 60) { - $intensities = $this->convertToHourly($filtered_response, $this->step); - } else { - $intensities = []; - foreach ($filtered_response as $record) { - $intensities[] = [ - 'datetime' => $record['date_heure']->format('Y-m-d\TH:00:00'), - 'intensity' => (float) $record['taux_co2'], - 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT, - ]; - } - } - - return [ - 'source' => self::getSourceName(), - 'France' => $intensities, - ]; - } - - protected function deduplicate(array $records): array - { - $filtered_response = []; - foreach ($records as $record) { - if (isset($filtered_response[$record['date_heure']])) { - if ($filtered_response[$record['date_heure']]['taux_co2'] != $record['taux_co2']) { - // Inconsistency detected. What to do with this record? - continue; - } - continue; - } - - $filtered_response[$record['date_heure']] = $record; - } - - return $filtered_response; - } - - protected function detectStep(array $records): ?int - { - if (count($records) < 2) { - return 60; - } - - $sample_1 = DateTime::createFromFormat(DateTime::ATOM, $records[0]['date_heure']); - $sample_2 = DateTime::createFromFormat(DateTime::ATOM, $records[1]['date_heure']); - $diff = $sample_1->diff($sample_2); - - if ($diff->h === 1) { - return 60; // 1 hour step - } else { - return $diff->i; // Return the minutes step - } - } - - /** - * Convert records to 1 hour - * - * @param array $records - * @param int $step : interval in minutes between 2 samples - * @return array - */ - protected function convertToHourly(array $records, int $step): array - { - $intensities = []; - $intensity = 0.0; - $count = 0; - $previous_record_date = null; - - foreach ($records as $record) { - $date = $record['date_heure']; - $count++; - $intensity += $record['taux_co2']; - $minute = (int) $date->format('i'); - - if ($previous_record_date !== null) { - // Ensure that current date is $step minutes ahead than previous record date - $diff = $date->getTimestamp() - $previous_record_date->getTimestamp(); - if ($diff !== $step * 60) { - if ($diff == 4500 && $this->switchToWinterTime($previous_record_date, $date)) { - // 4500 = 1h + 15m - $filled_date = DateTime::createFromFormat('Y-m-d\TH:i:s', end($intensities)['datetime']); - $filled_date->add(new DateInterval('PT1H')); - $intensities[] = [ - 'datetime' => $filled_date->format('Y-m-d\TH:00:00'), - 'intensity' => (end($intensities)['intensity'] + $record['taux_co2']) / 2, - 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED, - ]; - } else { - // Unexpected gap in the records. What to do with this ? - $date_1 = $previous_record_date->format(DateTimeInterface::ATOM); - $date_2 = $date->format(DateTimeInterface::ATOM); - trigger_error("Inconsistent date time increment: $diff seconds between $date_1 and $date_2", E_USER_WARNING); - } - } - } - - if ($minute === (60 - $step)) { - $intensities[] = [ - 'datetime' => $date->format('Y-m-d\TH:00:00'), - 'intensity' => (float) $intensity / $count, - 'data_quality' => AbstractTracked::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED, - ]; - $intensity = 0.0; - $count = 0; - } - - $previous_record_date = $date; - } - - return $intensities; - } - - /** - * Detect if the given datetime matches a switching ot winter time (DST) - * - * @return bool - */ - private function switchToWinterTime(DateTime $previous, DateTime $date): bool - { - $first_dst = $previous->format('I'); - $second_dst = $date->format('I'); - return $first_dst === '1' && $second_dst === '0'; - } - - private function formatError(array $response): string - { - $message = $message = $response['error_code'] - . ' ' . $response['message']; - return $message; - } -} diff --git a/src/DataSource/ConfigInterface.php b/src/DataSource/ConfigInterface.php new file mode 100644 index 00000000..bcb1eba8 --- /dev/null +++ b/src/DataSource/ConfigInterface.php @@ -0,0 +1,47 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource; + +interface ConfigInterface +{ + /** + * Get array of secured config items + * + * @return array + */ + public static function getSecuredConfigs(): array; + + public function getConfigTemplate(): string; + + public function configUpdate(array $input): array; +} diff --git a/src/DataSource/CronTaskInterface.php b/src/DataSource/CronTaskInterface.php new file mode 100644 index 00000000..7fec58c5 --- /dev/null +++ b/src/DataSource/CronTaskInterface.php @@ -0,0 +1,38 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource; + +interface CronTaskInterface +{ + public static function enumerateTasks(): array; +} diff --git a/src/DataSource/CronTaskProvider.php b/src/DataSource/CronTaskProvider.php new file mode 100644 index 00000000..cf6166b7 --- /dev/null +++ b/src/DataSource/CronTaskProvider.php @@ -0,0 +1,58 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource; + +class CronTaskProvider +{ + public static function getCronTaskTypes(): array + { + $subdirs = ['CarbonIntensity', 'Lca']; + $types = []; + foreach ($subdirs as $subdir) { + foreach (glob(__DIR__ . '/' . $subdir . '/*', GLOB_ONLYDIR) as $connector_dir) { + $dir = basename($connector_dir); + $class_name = 'GlpiPlugin\\Carbon\\DataSource\\' . $subdir . '\\' + . $dir . '\\CronTask'; + if (!class_exists($class_name)) { + continue; + } + if (!is_subclass_of($class_name, CronTaskInterface::class)) { + continue; + } + $types[$dir] = $class_name; + } + } + + return $types; + } +} diff --git a/src/DataSource/DataSourceInterface.php b/src/DataSource/DataSourceInterface.php new file mode 100644 index 00000000..c305952f --- /dev/null +++ b/src/DataSource/DataSourceInterface.php @@ -0,0 +1,38 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource; + +interface DataSourceInterface +{ + public function getSourceName(): string; +} diff --git a/src/DataSource/Lca/AbstractClient.php b/src/DataSource/Lca/AbstractClient.php new file mode 100644 index 00000000..a9e05110 --- /dev/null +++ b/src/DataSource/Lca/AbstractClient.php @@ -0,0 +1,35 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\Lca; + +abstract class AbstractClient implements ClientInterface {} diff --git a/src/DataSource/Boaviztapi.php b/src/DataSource/Lca/Boaviztapi/Client.php similarity index 50% rename from src/DataSource/Boaviztapi.php rename to src/DataSource/Lca/Boaviztapi/Client.php index 4db15b7d..24b9f834 100644 --- a/src/DataSource/Boaviztapi.php +++ b/src/DataSource/Lca/Boaviztapi/Client.php @@ -30,31 +30,62 @@ * ------------------------------------------------------------------------- */ -namespace GlpiPlugin\Carbon\DataSource; +namespace GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi; -use Config; use DBmysql; use Dropdown; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; +use GlpiPlugin\Carbon\Config as CarbonConfig; +use GlpiPlugin\Carbon\DataSource\Lca\AbstractClient; +use GlpiPlugin\Carbon\DataSource\RestApiClientInterface; +use GlpiPlugin\Carbon\DataTracking\TrackedFloat; +use GlpiPlugin\Carbon\Impact\Type; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\Zone; +use RuntimeException; -class Boaviztapi +class Client extends AbstractClient { private RestApiClientInterface $client; private string $base_url; private static string $source_name = 'Boaviztapi'; + /** @var array Supported impact criterias and the multiplier unit of the value returned by Boaviztapi */ + protected array $criteria_units = [ + 'gwp' => 1000, // Kg + 'adp' => 1000, // Kg + 'pe' => 1000000, // MJ + 'gwppb' => 1000, // Kg + 'gwppf' => 1000, // Kg + 'gwpplu' => 1000, // Kg + 'ir' => 1000, // Kg + 'lu' => 1, // (no unit) + 'odp' => 1000, // Kg + 'pm' => 1, // (no unit) + 'pocp' => 1000, // Kg + 'wu' => 1, // M^3 + 'mips' => 1000, // Kg + 'adpe' => 1000, // Kg + 'adpf' => 1000000, // MJ + 'ap' => 1, // mol + 'ctue' => 1, // CTUe + // 'ctuh_c' => 1, // CTUh request fails when this criteria is added, not a URL encoding issue + // 'ctuh_nc' => 1, // CTUh request fails when this criteria is added, not a URL encoding issue + 'epf' => 1000, // Kg + 'epm' => 1000, // Kg + 'ept' => 1, // mol + ]; + public function __construct(RestApiClientInterface $client, string $url = '') { $this->client = $client; if (!empty($url)) { $this->base_url = $url; } else { - $url = Config::getConfigurationValue('plugin:carbon', 'boaviztapi_base_url'); + $url = CarbonConfig::getPluginConfigurationValue('boaviztapi_base_url'); if (!is_string($url) || $url === '') { - throw new \RuntimeException('Invalid Boaviztapi base URL'); + throw new RuntimeException('Invalid Boaviztapi base URL'); } $this->base_url = $url; } @@ -94,24 +125,33 @@ public function get(string $endpoint, array $options = []): array /** * Create Boavizeta source if it does not exists * - * @return boolean + * @return bool */ public function createSource(): bool { - $source_name = $this->getSourceName(); - // create a source in CarbonIntensitySource - $source = new CarbonIntensitySource(); - $source->getFromDBByCrit([ - 'name' => $source_name, - ]); - if ($source->isNewItem()) { - $id = $source->add([ - 'name' => $source_name, - ]); - return !$source->isNewID($id); - } + // create a source in Source + $source = new Source(); + $source->getOrCreate([], ['name' => $this->getSourceName()]); - return true; + return (!$source->isNewItem()); + } + + /** + * Get version of Boaviztapi + * + * @return string + */ + public function queryVersion(): string + { + $response = $this->get('utils/version'); + if (!isset($response[0]) || !is_string($response[0])) { + trigger_error(sprintf( + 'Invalid response from Boavizta API: %s', + json_encode($response[0] ?? '') + ), E_USER_WARNING); + return ''; + } + return $response[0]; } /** @@ -128,6 +168,11 @@ public function queryZones(): array return $response; } + public function getCriteriaUnits(): array + { + return $this->criteria_units; + } + /** * Save zones into database * @@ -136,50 +181,24 @@ public function queryZones(): array */ public function saveZones(array $zones): void { - $source = new CarbonIntensitySource(); - $source->getFromDBByCrit([ - 'name' => $this->getSourceName(), - ]); + $source = new Source(); + $source->getOrCreate([], ['name' => $this->getSourceName()]); if ($source->isNewItem()) { return; } - $source_id = $source->getID(); - $zone = new Zone(); foreach ($zones as $code => $name) { - $zone_id = $zone->getFromDBByCrit([ - 'name' => $name, - ]); - if ($zone_id === false) { - $zone_id = $zone->add([ - 'name' => $name, - ]); - if ($zone_id === false) { - // Failed to add the zone - continue; - } - } else { - $zone_id = $zone->getID(); - } - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone_id = $source_zone->getFromDBByCrit([ - 'plugin_carbon_carbonintensitysources_id' => $source_id, - 'plugin_carbon_zones_id' => $zone_id, - ]); - if ($source_zone_id === false) { - $source_zone_id = $source_zone->add([ - 'plugin_carbon_carbonintensitysources_id' => $source_id, - 'plugin_carbon_zones_id' => $zone_id, - ]); - if ($source_zone_id === false) { - continue; - } - } else { - $source_zone_id = $source_zone->getID(); + $zone = new Zone(); + $zone->getOrCreate([], ['name' => $name]); + if ($zone->isNewItem()) { + continue; } - $source_zone->update([ - 'id' => $source_zone_id, + $source_zone = new Source_Zone(); + $source_zone->getOrCreate([ 'code' => $code, + ], [ + 'plugin_carbon_sources_id' => $source->getID(), + 'plugin_carbon_zones_id' => $zone->getID(), ]); } } @@ -190,12 +209,12 @@ public static function getZones() global $DB; $zone_table = Zone::getTable(); - $source_table = CarbonIntensitySource::getTable(); - $source_zone_table = CarbonIntensitySource_Zone::getTable(); + $source_table = Source::getTable(); + $source_zone_table = Source_Zone::getTable(); $result = $DB->request([ 'SELECT' => [ Zone::getTableField('name'), - CarbonIntensitySource_Zone::getTableField('code'), + Source_Zone::getTableField('code'), ], 'FROM' => Zone::getTable(), 'INNER JOIN' => [ @@ -207,13 +226,13 @@ public static function getZones() ], $source_table => [ 'FKEY' => [ - $source_zone_table => 'plugin_carbon_carbonintensitysources_id', - CarbonIntensitySource::getTable() => 'id', + $source_zone_table => 'plugin_carbon_sources_id', + Source::getTable() => 'id', ], ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('name') => self::$source_name, + Source::getTableField('name') => self::$source_name, ], 'ORDER' => Zone::getTableField('name'), ]); @@ -226,6 +245,49 @@ public static function getZones() return $zones; } + /** + * Read the response to find the impacts provided by Boaviztapi + * + * @param array $response + * @param string $scope (must be either embedded or use) + * @return array + */ + public function parseResponse(array $response, string $scope): array + { + $impacts = []; + $types = Type::getImpactTypes(); + foreach ($response['impacts'] as $type => $impact) { + if (!in_array($type, $types)) { + trigger_error(sprintf('Unsupported impact type %s in class %s', $type, __CLASS__)); + continue; + } + $impact_id = Type::getImpactId($type); + if ($impact_id === false) { + continue; + } + $impacts[$impact_id] = $this->parseCriteria($type, $response['impacts'][$type][$scope]); + } + + return $impacts; + } + + protected function parseCriteria(string $name, $impact): ?TrackedFloat + { + if ($impact === 'not implemented') { + return null; + } + + /** @var array $impact */ + $unit_multiplier = $this->getCriteriaUnits()[$name]; + $value = new TrackedFloat( + $impact['value'] * $unit_multiplier, + null, + TrackedFloat::DATA_QUALITY_ESTIMATED + ); + + return $value; + } + /** * Show a dropdown of zones handleed by Boaviztapi * @@ -234,7 +296,6 @@ public static function getZones() */ public static function dropdownBoaviztaZone(string $name, array $options = []) { - return Dropdown::showFromArray($name, self::getZones(), $options); } } diff --git a/src/DataSource/Lca/Boaviztapi/ComputerModelizationAdapterTrait.php b/src/DataSource/Lca/Boaviztapi/ComputerModelizationAdapterTrait.php new file mode 100644 index 00000000..8fbd4a3c --- /dev/null +++ b/src/DataSource/Lca/Boaviztapi/ComputerModelizationAdapterTrait.php @@ -0,0 +1,210 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi; + +use DBmysql; +use DeviceHardDrive; +use DeviceHardDriveType; +use DeviceProcessor; +use InterfaceType; +use Item_DeviceHardDrive; +use Item_DeviceMemory; +use Item_DeviceProcessor; +use Item_Devices; +use Manufacturer; + +trait ComputerModelizationAdapterTrait +{ + /** + * Get a description of the computer for Boaviztapi + * + * @return array + */ + protected function analyzeHardware(): array + { + $configuration = []; + // Yes, string expected here. + $iterator = Item_Devices::getItemsAssociatedTo(get_class($this->item), (string) $this->item->getID()); + foreach ($iterator as $item_device) { + switch ($item_device->getType()) { + case Item_DeviceProcessor::class: + $cpu = DeviceProcessor::getById($item_device->fields['deviceprocessors_id']); + if ($cpu) { + if (isset($configuration['cpu'])) { + // The server does not support several CPU with different specifications + // then, just increment CPU count + $configuration['cpu']['units']++; + } else { + $configuration['cpu'] = [ + 'units' => 1, + 'name' => $cpu->fields['designation'], + ]; + if (isset($item_device->fields['nbcores'])) { + $configuration['cpu']['core_units'] = $item_device->fields['nbcores']; + } + } + } + break; + case Item_DeviceMemory::class: + $ram = [ + 'capacity' => ceil($item_device->fields['size'] / 1024), // Convert to GB + ]; + $manufacturer = $this->getDeviceManufacturer($item_device); + if (!empty($manufacturer)) { + $ram['manufacturer'] = $manufacturer; + } + $key_match = $this->arrayMatch($ram, $configuration['ram'] ?? []); + if ($key_match !== null) { + // increment the units count of the RAM + $configuration['ram'][$key_match]['units']++; + } else { + $ram['units'] = 1; + $configuration['ram'][] = $ram; + } + break; + case Item_DeviceHardDrive::class: + $hard_drive = [ + 'capacity' => ceil($item_device->fields['capacity'] / 1024), // Convert to GB + ]; + $type = 'hdd'; + $device_hard_drive = new DeviceHardDrive(); + $device_hard_drive->getFromDB($item_device->fields['deviceharddrives_id']); + if (!$device_hard_drive->isNewItem()) { + $device_hard_drive_type = DeviceHardDriveType::getById( + $device_hard_drive->fields[getForeignKeyFieldForItemType(DeviceHardDriveType::class)] + ); + if ($device_hard_drive_type !== false && $device_hard_drive_type->fields['name'] === 'removable') { + // Ignore removable storage (USB sticks, ...) + break; + } + $interface_type = new InterfaceType(); + $interface_type->getFromDB($device_hard_drive->fields['interfacetypes_id']); + if (!$interface_type->isNewItem()) { + if (in_array($interface_type->fields['name'], ['NVME'])) { + $type = 'ssd'; + $manufacturer = $this->getDeviceManufacturer($item_device); + if ($manufacturer !== null) { + $hard_drive['manufacturer'] = $manufacturer; + } + } + } + } + $hard_drive['type'] = $type; + $key_match = $this->arrayMatch($hard_drive, $configuration['disk'] ?? []); + if ($key_match !== null) { + // increment the units count of the disk + $configuration['disk'][$key_match]['units']++; + } else { + $hard_drive['units'] = 1; + $configuration['disk'][] = $hard_drive; + } + break; + } + } + + return $configuration; + } + + /** + * Checks if the array $needle matches any of the arrays in $haystack + * + * @param array $needle + * @param array $haystack + * @return mixed key the key of the component in $haystack if found, null otherwise + */ + private function arrayMatch(array $needle, array $haystack) + { + foreach ($haystack as $key => $item) { + // ignore units as it does not represents characteristics of a component + unset($item['units']); + if ($item === $needle) { + return $key; + } + } + + return null; + } + + /** + * Get the manufacturer of the device + * + * @param Item_Devices $item + * @return string|null + */ + private function getDeviceManufacturer(Item_Devices $item): ?string + { + /** @var DBmysql $DB */ + global $DB; + + // Get the manufacturer of the device + $table_device = getTableForItemType($item::$itemtype_2); + $table_device_item = getTableForItemType($item->getType()); + $table_manufacturer = getTableForItemType(Manufacturer::class); + $device_fk = getForeignKeyFieldForItemType($item::$itemtype_2); + $manufacturer_fk = getForeignKeyFieldForItemType(Manufacturer::class); + $request = [ + 'SELECT' => [ + $table_manufacturer => ['id', 'name'], + ], + 'FROM' => $table_device_item, + 'INNER JOIN' => [ + $table_device => [ + 'ON' => [ + $table_device_item => $device_fk, + $table_device => 'id', + ], + ], + $table_manufacturer => [ + 'ON' => [ + $table_manufacturer => 'id', + $table_device => $manufacturer_fk, + ], + ], + ], + 'WHERE' => [ + $item->getTableField('id') => $item->getID(), + ], + ]; + + $result = $DB->request($request); + if ($result->numRows() === 0) { + return null; + } + $data = $result->current(); + if (empty($data['name'])) { + return null; + } + + return $data['name']; + } +} diff --git a/src/DataSource/Lca/Boaviztapi/Config.php b/src/DataSource/Lca/Boaviztapi/Config.php new file mode 100644 index 00000000..07e61aaa --- /dev/null +++ b/src/DataSource/Lca/Boaviztapi/Config.php @@ -0,0 +1,127 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi; + +use Exception; +use GlpiPlugin\Carbon\Config as PluginConfig; +use GlpiPlugin\Carbon\DataSource\ConfigInterface; +use GlpiPlugin\Carbon\DataSource\RestApiClient; +use Session; + +class Config implements ConfigInterface +{ + public const ENV_BOAVIZTAPI_BASE_URL = 'GLPI_PLUGIN_CARBON_BOAVIZTAPI_BASE_URL'; + + public static function getSecuredConfigs(): array + { + return []; + } + + public function getConfigTemplate(): string + { + $hide_boaviztapi_base_url = (getenv(self::ENV_BOAVIZTAPI_BASE_URL) !== false); + $commercial_url = 'https://boavizta.org/'; + $twig = << About + +TWIG; + if (!$hide_boaviztapi_base_url) { + $twig .= << +

{{ __('Geocoding converts a location into a ISO 3166 (3 letters) country code. Boavizta needs this to determine usage impacts of assets. This feature sends the address stored in a location to nominatim.org service. If this is an issue, you can disable it below, and fill the coutry code manually.', 'carbon') }}

+ + + {{ fields.checkboxField( + 'geocoding_enabled', + current_config['geocoding_enabled'], + __('Enable geocoding', 'carbon') + ) }} +TWIG; + + return $twig; + } + + public function configUpdate(array $input): array + { + if (isset($input['boaviztapi_base_url']) && (string) $input['boaviztapi_base_url'] !== '') { + $old_url = PluginConfig::getPluginConfigurationValue('boaviztapi_base_url'); + if ($old_url != $input['boaviztapi_base_url']) { + $boavizta = new Client(new RestApiClient(), $input['boaviztapi_base_url']); + $zones = []; + try { + $zones = $boavizta->queryZones(); + } catch (Exception $e) { + unset($input['boaviztapi_base_url']); + Session::addMessageAfterRedirect(__('Invalid Boavizta API URL', 'carbon'), false, ERROR); + } + if (count($zones) > 0) { + // Create the source if it does not exists already + if ($boavizta->createSource()) { + // Save zones into database + $boavizta->saveZones($zones); + } + Session::addMessageAfterRedirect(__('Connection to Boavizta API established', 'carbon'), false, INFO); + } + } + } + + return $input; + } + + public static function getConfigurationValue(string $name) + { + if ($name === 'boaviztapi_base_url') { + $value = getenv(self::ENV_BOAVIZTAPI_BASE_URL); + if ($value !== false) { + return $value; + } + } + + return PluginConfig::getPluginConfigurationValue($name); + } +} diff --git a/src/DataSource/Lca/ClientFactory.php b/src/DataSource/Lca/ClientFactory.php new file mode 100644 index 00000000..6426e137 --- /dev/null +++ b/src/DataSource/Lca/ClientFactory.php @@ -0,0 +1,149 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\DataSource\Lca; + +use GlpiPlugin\Carbon\DataSource\ConfigInterface; +use GlpiPlugin\Carbon\DataSource\RestApiClient; +use InvalidArgumentException; + +class ClientFactory +{ + /** + * Get available client types + * + * @return class-string[] + */ + public static function getClientTypes(): array + { + $client_types = []; + foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) { + $dir = basename($dir); + $class_name = 'GlpiPlugin\\Carbon\\DataSource\\Lca\\' . $dir . '\\Client'; + if (!class_exists($class_name)) { + continue; + } + if (!is_subclass_of($class_name, AbstractClient::class)) { + continue; + } + $client_types[$dir] = $class_name; + } + + return $client_types; + } + + /** + * Undocumented function + * + * @return class-string[] + */ + public static function getConfigTypes(): array + { + $config_types = []; + foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) { + $dir = basename($dir); + $class_name = 'GlpiPlugin\\Carbon\\DataSource\\Lca\\' . $dir . '\\Config'; + if (!class_exists($class_name)) { + continue; + } + $config_types[$dir] = $class_name; + } + + return $config_types; + } + + public static function getSecuredConfigs() + { + $secured_configs = []; + foreach (self::getConfigTypes() as $config_class) { + $config = new $config_class(); + $secured_configs = array_merge($secured_configs, $config->getSecuredConfigs()); + } + + return $secured_configs; + } + + /** + * Get name of clients + * + * @return array + */ + public static function getClientNames(): array + { + $names = []; + $types = self::getClientTypes(); + $api_client = new RestApiClient(); + foreach ($types as $type) { + $data_source_client = new $type($api_client); + $names[$type] = $data_source_client->getSourceName(); + } + + return $names; + } + + /** + * Create an instance of a client + * + * @param class-string $type type of the client + * @return AbstractClient instantiated client + */ + public static function create(string $type): AbstractClient + { + $type .= 'Client'; + $client_classes = self::getClientTypes(); + if (!isset($client_classes[$type])) { + throw new InvalidArgumentException("Unknown client type: $type"); + } + + $class_name = $client_classes[$type]; + $rest_api_client = new RestApiClient([]); + return new $class_name($rest_api_client); + } + + /** + * Create an instance of a client by using the name of the data source + * + * @param string $name + * @return AbstractClient + */ + public static function createByName(string $name): AbstractClient + { + $names = self::getClientNames(); + if (!in_array($name, $names)) { + throw new InvalidArgumentException("Unknown client type name: $name"); + } + + $class_name = array_search($name, $names); + $rest_api_client = new RestApiClient([]); + return new $class_name($rest_api_client); + } +} diff --git a/src/Documentation.php b/src/DataSource/Lca/ClientInterface.php similarity index 56% rename from src/Documentation.php rename to src/DataSource/Lca/ClientInterface.php index 6b32cbff..ffc91352 100644 --- a/src/Documentation.php +++ b/src/DataSource/Lca/ClientInterface.php @@ -30,34 +30,22 @@ * ------------------------------------------------------------------------- */ -namespace GlpiPlugin\Carbon; +namespace GlpiPlugin\Carbon\DataSource\Lca; -class Documentation +/** + * The common interface for all classes implementing Life Cycle Assessment fetching from various sources. + * Sources are most of the time REST API, but this is not limitative. + * + * Depending on the source, the time range of the intensities may vary. + * + */ + +interface ClientInterface { - private const BASE_URL = 'https://glpi-plugins.readthedocs.io/%s/latest/carbon'; /** - * Get external URL to a detailed description of the given path + * Get the source name of the data source * - * @param string $object_descriptor * @return string */ - public static function getInfoLink(string $object_descriptor): string - { - // $lang = substr($_SESSION['glpilanguage'], 0, 2); - $lang = 'en'; - $base_url = sprintf( - self::BASE_URL, - $lang - ); - switch ($object_descriptor) { - case 'abiotic_depletion_impact': - return "$base_url/types_of_impact.html#antimony-equivalent"; - case 'primary_energy_impact': - return "$base_url/carbon/types_of_impact.html#primary-energy"; - case 'carbon_emission': - return "$base_url/carbon/types_of_impact.html#carbon-dioxyde-equivalent"; - } - - return ''; - } + public function getSourceName(): string; } diff --git a/src/DataSource/RestApiClient.php b/src/DataSource/RestApiClient.php index 6b68f45a..ba49ca66 100644 --- a/src/DataSource/RestApiClient.php +++ b/src/DataSource/RestApiClient.php @@ -34,17 +34,16 @@ use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7; -use Session; +use GuzzleHttp\Psr7\Message; use Toolbox; class RestApiClient implements RestApiClientInterface { - const DEFAULT_TIMEOUT = 5; - const DEFAULT_HEADERS = [ + public const DEFAULT_TIMEOUT = 5; + public const DEFAULT_HEADERS = [ 'Accept' => 'application/json; charset=utf-8', ]; - const DEFAULT_HTTP_VERSION = '2.0'; + public const DEFAULT_HTTP_VERSION = '2.0'; protected $api_client = null; protected $last_error = ''; @@ -69,15 +68,16 @@ public function __construct(array $params = []) public function request(string $method = 'GET', string $uri = '', array $options = []) { try { - $response = $this->api_client->request($method, $uri, $options); + $request = $this->api_client; + $response = $request->request($method, $uri, $options); } catch (RequestException $e) { $this->last_error = [ 'title' => "Plugins API error", 'exception' => $e->getMessage(), - 'request' => Psr7\Message::toString($e->getRequest()), + 'request' => Message::toString($e->getRequest()), ]; if ($e->hasResponse()) { - $this->last_error['response'] = Psr7\Message::toString($e->getResponse()); + $this->last_error['response'] = Message::toString($e->getResponse()); } Toolbox::logDebug($this->last_error); diff --git a/src/DataTracking/AbstractTracked.php b/src/DataTracking/AbstractTracked.php index 5b9dd680..c31902c7 100644 --- a/src/DataTracking/AbstractTracked.php +++ b/src/DataTracking/AbstractTracked.php @@ -32,6 +32,7 @@ namespace GlpiPlugin\Carbon\DataTracking; +use Dropdown; use LogicException; /** @@ -46,12 +47,14 @@ abstract class AbstractTracked /** * Quality of data, must be ordered from 0 (lowest quality) to highest quality */ + public const DATA_QUALITY_UNSET_VALUE = -1; public const DATA_QUALITY_UNSPECIFIED = 0; public const DATA_QUALITY_MANUAL = 1; public const DATA_QUALITY_ESTIMATED = 2; public const DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED = 3; public const DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT = 4; + /** @var array $sources Source qualities */ protected array $sources = []; abstract public function getValue(); @@ -64,6 +67,37 @@ public function __construct($source = null) $this->appendSource($source); } + /** + * Get name of data qualities + * + * @return array + */ + public static function getDataQualities(): array + { + return [ + self::DATA_QUALITY_UNSET_VALUE => __('Impact not evaluated', 'carbon'), + self::DATA_QUALITY_UNSPECIFIED => __('Unspecified quality', 'carbon'), + self::DATA_QUALITY_MANUAL => __('Manual data', 'carbon'), + self::DATA_QUALITY_ESTIMATED => __('Estimated data', 'carbon'), + self::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT_DOWNSAMPLED => __('Downsampled data', 'carbon'), + self::DATA_QUALITY_RAW_REAL_TIME_MEASUREMENT => __('Measured data', 'carbon'), + ]; + } + + /** + * Show or return HTML code displaying a dropdown of data qualities + * @see constants DATA_QUALITY_* + * + * @param string $name + * @param array $options + * @return int|string + */ + public static function dropdownQuality(string $name, array $options = []) + { + $items = self::getDataQualities(); + return Dropdown::showFromArray($name, $items, $options); + } + public function getSource(): array { return $this->sources; diff --git a/src/EmbodiedImpact.php b/src/EmbodiedImpact.php index 72062e13..f1ebcb9d 100644 --- a/src/EmbodiedImpact.php +++ b/src/EmbodiedImpact.php @@ -32,163 +32,16 @@ namespace GlpiPlugin\Carbon; -use CommonDBTM; -use DBmysql; -use DBmysqlIterator; -use Glpi\DBAL\QuerySubQuery; - /** * Embodied impact of assets * * Embodied impact is the impact of the asset while it is built and destroyed or recycled */ -class EmbodiedImpact extends CommonDBTM +class EmbodiedImpact extends AbstractImpact { - public static $rightname = 'carbon:report'; - - public function canEdit($ID): bool - { - return false; - } - - public function rawSearchOptions() + public static function getTypeName($nb = 0) { - $tab = parent::rawSearchOptions(); - - $tab[] = [ - 'id' => '2', - 'table' => $this->getTable(), - 'field' => 'id', - 'name' => __('ID'), - 'massiveaction' => false, // implicit field is id - 'datatype' => 'number' - ]; - - $tab[] = [ - 'id' => '3', - 'table' => $this->getTable(), - 'field' => 'items_id', - 'name' => __('Associated item ID'), - 'massiveaction' => false, - 'datatype' => 'specific', - 'additionalfields' => ['itemtype'] - ]; - - $tab[] = [ - 'id' => '4', - 'table' => $this->getTable(), - 'field' => 'itemtype', - 'name' => _n('Type', 'Types', 1), - 'massiveaction' => false, - 'datatype' => 'itemtypename', - ]; - - $tab[] = [ - 'id' => '5', - 'table' => $this->getTable(), - 'field' => 'gwp', - 'name' => __('Global Warming Potential', 'carbon'), - 'massiveaction' => false, - 'datatype' => 'number', - 'unit' => 'gCO2eq', - ]; - - $tab[] = [ - 'id' => '6', - 'table' => $this->getTable(), - 'field' => 'adp', - 'name' => __('Abiotic Depletion Potential', 'carbon'), - 'massiveaction' => false, - 'datatype' => 'number', - 'unit' => 'KgSbeq', - ]; - - $tab[] = [ - 'id' => '7', - 'table' => $this->getTable(), - 'field' => 'pe', - 'name' => __('Primary energy', 'carbon'), - 'massiveaction' => false, - 'datatype' => 'number', - 'unit' => 'J', - ]; - - $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_CALC_DATE, - 'table' => self::getTable(), - 'field' => 'date_mod', - 'name' => __('Date of evaluation', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_ENGINE, - 'table' => self::getTable(), - 'field' => 'engine', - 'name' => __('Engine', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_ENGINE_VER, - 'table' => self::getTable(), - 'field' => 'engine_version', - 'name' => __('Engine version', 'carbon') - ]; - - return $tab; - } - - /** - * Get iterator of items without known embodied impact for a specified itemtype - * - * @param string $itemtype - * @param array $crit Criteria array of WHERE, ORDER, GROUP BY, LEFT JOIN, INNER JOIN, RIGHT JOIN, HAVING, LIMIT - * @return DBmysqlIterator - */ - public static function getAssetsToCalculate(string $itemtype, array $crit = []): DBmysqlIterator - { - /** @var DBmysql $DB */ - global $DB; - - // Check $itemtype inherits from CommonDBTM - if (!is_subclass_of($itemtype, CommonDBTM::class)) { - throw new \LogicException('itemtype is not a CommonDBTM object'); - } - - // clean $crit array: remove mostly SELECT, FROM - $crit = array_intersect_key($crit, array_flip([ - 'WHERE', - 'ORDER', - 'GROUP BY', - 'LEFT JOIN', - 'INNER JOIN', - 'RIGHT JOIN', - 'HAVING', - 'LIMIT', - ])); - - // Add itemtype to criteria - $crit['WHERE']['itemtype'] = $itemtype; - - $table = self::getTable(); - $itemtype_table = $itemtype::getTable(); - // Prepare sub query to filter out items already calculated - $sub_query = [ - 'SELECT' => [ - 'items_id', - ], - 'FROM' => $table, - ] + $crit; - $iterator = $DB->request([ - 'SELECT' => [ - 'id', - ], - 'FROM' => $itemtype_table, - 'WHERE' => [ - ['NOT' => ['id' => new QuerySubQuery($sub_query)]], - ] - ]); - - return $iterator; + return _n("Embodied impact", "Embodied impacts", $nb, 'carbon'); } public function calculateImpact(string $lca_type, int $limit = 0): int @@ -197,7 +50,7 @@ public function calculateImpact(string $lca_type, int $limit = 0): int if ($limit > 0) { $crit['LIMIT'] = $limit; } - $iterator = $this->getAssetsToCalculate($lca_type::getItemtype(), $crit); + $iterator = self::getItemsToEvaluate($lca_type::getItemtype(), $crit); $count = 0; foreach ($iterator as $item) { $lca = new $lca_type($item['id']); @@ -207,21 +60,4 @@ public function calculateImpact(string $lca_type, int $limit = 0): int return $iterator->count(); } - - /** - * Get impact value in a human r eadable format, selecting the best unit - */ - public function getHumanReadableImpact(string $field): string - { - switch ($field) { - case 'gwp': - return Toolbox::getWeight($this->fields[$field]) . 'CO2eq'; - case 'adp': - return Toolbox::getWeight($this->fields[$field]) . 'Sbeq'; - case 'pe': - return Toolbox::getEnergy($this->fields[$field] / 3600); // Convert J into Wh - } - - return ''; - } } diff --git a/src/Engine/V1/AbstractAsset.php b/src/Engine/V1/AbstractAsset.php index 1c13efa9..c6e58b68 100644 --- a/src/Engine/V1/AbstractAsset.php +++ b/src/Engine/V1/AbstractAsset.php @@ -34,18 +34,18 @@ use CommonDBTM; use DateInterval; -use DateTime; -use DateTimeInterface; use DateTimeImmutable; +use DateTimeInterface; +use DBmysql; use DBmysqlIterator; use DbUtils; -use DBmysql; +use Glpi\DBAL\QueryExpression; use GlpiPlugin\Carbon\CarbonIntensity; -use GlpiPlugin\Carbon\CarbonIntensitySource; -use GlpiPlugin\Carbon\CarbonIntensitySource_Zone; use GlpiPlugin\Carbon\DataTracking\TrackedInt; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\Zone; -use Glpi\DBAL\QueryExpression; +use LogicException; abstract class AbstractAsset implements EngineInterface { @@ -66,10 +66,10 @@ public function __construct(CommonDBTM $item) ]; foreach ($types as $type) { if ($type === '') { - throw new \LogicException('Itemtype not set'); + throw new LogicException('Itemtype not set'); } if (!is_subclass_of($type, CommonDBTM::class)) { - throw new \LogicException('Itemtype does not inherits from ' . CommonDBTM::class); + throw new LogicException('Itemtype does not inherits from ' . CommonDBTM::class); } } @@ -81,10 +81,10 @@ public function __construct(CommonDBTM $item) * * @param DateTimeImmutable $start_time * @param DateInterval $length - * @param Zone $zone + * @param Source_Zone $source_zone * @return DBmysqlIterator */ - protected function requestCarbonIntensitiesPerDay(DateTimeImmutable $start_time, DateInterval $length, Zone $zone): DBmysqlIterator + protected function requestCarbonIntensitiesPerDay(DateTimeImmutable $start_time, DateInterval $length, Source_Zone $source_zone): DBmysqlIterator { /** @var DBmysql $DB */ global $DB; @@ -97,28 +97,25 @@ protected function requestCarbonIntensitiesPerDay(DateTimeImmutable $start_time, $stop_date = $stop_date->add($length); $stop_date_s = $stop_date->format('Y-m-d H:i:s'); // idem, may be can use directly concatenation - $intensities_table = CarbonIntensity::getTable(); - /** * Keep the lowest data quality of the set of intensities */ + $carbon_intensity_date_field = CarbonIntensity::getTableField('date'); $request = [ 'SELECT' => [ CarbonIntensity::getTableField('intensity') . ' AS intensity', - CarbonIntensity::getTableField('date') . ' AS date', - 'MIN' => CarbonIntensity::getTableField('data_quality') . ' AS data_quality' + $carbon_intensity_date_field . ' AS date', + 'MIN' => CarbonIntensity::getTableField('data_quality') . ' AS data_quality', ], - 'FROM' => $intensities_table, + 'FROM' => CarbonIntensity::getTable(), 'WHERE' => [ - 'AND' => [ - CarbonIntensity::getTableField('plugin_carbon_zones_id') => $zone->getID(), - CarbonIntensity::getTableField('plugin_carbon_carbonintensitysources_id') => $zone->fields['plugin_carbon_carbonintensitysources_id_historical'], - [CarbonIntensity::getTableField('date') => ['>=', $start_date_s]], - [CarbonIntensity::getTableField('date') => ['<', $stop_date_s]], - ], + CarbonIntensity::getTableField('plugin_carbon_zones_id') => $source_zone->fields['plugin_carbon_zones_id'], + CarbonIntensity::getTableField('plugin_carbon_sources_id') => $source_zone->fields['plugin_carbon_sources_id'], + [$carbon_intensity_date_field => ['>=', $start_date_s]], + [$carbon_intensity_date_field => ['<', $stop_date_s]], ], - 'GROUP' => [CarbonIntensity::getTableField('date')], - 'ORDER' => CarbonIntensity::getTableField('date') . ' ASC', + 'GROUP' => [$carbon_intensity_date_field], + 'ORDER' => $carbon_intensity_date_field . ' ASC', ]; return $DB->request($request); @@ -140,8 +137,8 @@ public function getPower(): TrackedInt $items_table = $itemtype::getTable(); $type_fk = static::$type_itemtype::getForeignKeyField(); $model_fk = static::$model_itemtype::getForeignKeyField(); - $model_power_consumption_field = DBMysql::QuoteName(CommonDBTM::getTableField('power_consumption', static::$model_itemtype)); - $type_power_consumption_field = DBMysql::QuoteName(CommonDBTM::getTableField('power_consumption', static::$plugin_type_itemtype)); + $model_power_consumption_field = DBmysql::QuoteName(CommonDBTM::getTableField('power_consumption', static::$model_itemtype)); + $type_power_consumption_field = DBmysql::QuoteName(CommonDBTM::getTableField('power_consumption', static::$plugin_type_itemtype)); $request = [ 'SELECT' => [ @@ -155,14 +152,14 @@ public function getPower(): TrackedInt 'FKEY' => [ $itemtype_plugin_types_table => $type_fk, $items_table => $type_fk, - ] + ], ], $itemtype_models_table => [ // Data for the model of the asset 'FKEY' => [ $items_table => $model_fk, $itemtype_models_table => 'id', - ] - ] + ], + ], ], 'WHERE' => [ $itemtype::getTableField('id') => $this->item->getID(), @@ -183,38 +180,25 @@ public function getPower(): TrackedInt * for the world. Use the latest value before the given date * * @param DateTimeInterface $day - * @param Zone $zone + * @param Source_Zone $source_zone * @return array|null */ - protected function getFallbackCarbonIntensity(DateTimeInterface $day, Zone $zone): ?array + protected function getFallbackCarbonIntensity(DateTimeInterface $day, Source_Zone $source_zone): ?array { /** @var DBmysql $DB */ global $DB; $carbon_intensity_table = CarbonIntensity::getTable(); - $carbon_intensity_source_zone_table = CarbonIntensitySource_Zone::getTable(); - $carbon_intensity_source_table = CarbonIntensitySource::getTable(); + // $carbon_intensity_source_zone_table = Source_Zone::getTable(); + // $carbon_intensity_source_table = Source::getTable(); + $source_fk = getForeignKeyFieldForItemType(Source::class); + $zone_fk = getForeignKeyFieldForItemType(Zone::class); $request = [ 'SELECT' => "$carbon_intensity_table.*", 'FROM' => $carbon_intensity_table, - 'INNER JOIN' => [ - $carbon_intensity_source_zone_table => [ - 'FKEY' => [ - $carbon_intensity_table => 'plugin_carbon_zones_id', - $carbon_intensity_source_zone_table => 'plugin_carbon_zones_id', - ] - ], - $carbon_intensity_source_table => [ - 'FKEY' => [ - $carbon_intensity_source_zone_table => 'plugin_carbon_carbonintensitysources_id', - $carbon_intensity_source_table => 'id', - ] - ] - ], 'WHERE' => [ - CarbonIntensitySource::getTableField('is_fallback') => 1, - 'NOT' => [CarbonIntensitySource::getTableField('name') => 'Ember - Energy Institute'], - CarbonIntensitySource_Zone::getTableField('plugin_carbon_zones_id') => $zone->getID(), + CarbonIntensity::getTableField($source_fk) => $source_zone->fields[$source_fk], + CarbonIntensity::getTableField($zone_fk) => $source_zone->fields[$zone_fk], CarbonIntensity::getTableField('date') => ['<=', $day->format('Y-m-d H:i:s')], ], 'ORDER' => CarbonIntensity::getTableField('date') . ' DESC', @@ -228,17 +212,17 @@ protected function getFallbackCarbonIntensity(DateTimeInterface $day, Zone $zone // No data for the zone, fallback again to carbon intensity for the whole world // We assume that electricity is (nearly) immediately consumed then worlwide and yearly // carbon intensity generation and consumption is the same - return $this->getFallbackCarbonIntensityFromEmber($day, $zone); + return $this->getFallbackCarbonIntensityFromEmber($day, $source_zone); } - protected function getFallbackCarbonIntensityFromEmber(DateTimeInterface $day, Zone $zone) + protected function getFallbackCarbonIntensityFromEmber(DateTimeInterface $day, Source_Zone $source_zone) { /** @var DBmysql $DB */ global $DB; $carbon_intensity_table = CarbonIntensity::getTable(); - $carbon_intensity_source_zone_table = CarbonIntensitySource_Zone::getTable(); - $carbon_intensity_source_table = CarbonIntensitySource::getTable(); + $carbon_intensity_source_zone_table = Source_Zone::getTable(); + $carbon_intensity_source_table = Source::getTable(); $request = [ 'SELECT' => "$carbon_intensity_table.*", 'FROM' => $carbon_intensity_table, @@ -247,19 +231,19 @@ protected function getFallbackCarbonIntensityFromEmber(DateTimeInterface $day, Z 'FKEY' => [ $carbon_intensity_table => 'plugin_carbon_zones_id', $carbon_intensity_source_zone_table => 'plugin_carbon_zones_id', - ] + ], ], $carbon_intensity_source_table => [ 'FKEY' => [ - $carbon_intensity_source_zone_table => 'plugin_carbon_carbonintensitysources_id', + $carbon_intensity_source_zone_table => 'plugin_carbon_sources_id', $carbon_intensity_source_table => 'id', - ] - ] + ], + ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('is_fallback') => 1, - CarbonIntensitySource::getTableField('name') => 'Ember - Energy Institute', - CarbonIntensitySource_Zone::getTableField('plugin_carbon_zones_id') => $zone->getID(), + Source::getTableField('fallback_level') => 2, + Source::getTableField('name') => 'Ember - Energy Institute', + Source_Zone::getTableField('plugin_carbon_zones_id') => $source_zone->fields[getForeignKeyFieldForItemType(Zone::class)], CarbonIntensity::getTableField('date') => ['<=', $day->format('Y-m-d H:i:s')], ], 'ORDER' => CarbonIntensity::getTableField('date') . ' DESC', @@ -271,14 +255,14 @@ protected function getFallbackCarbonIntensityFromEmber(DateTimeInterface $day, Z } // No result, try to find a zone by country - $zone = new Zone(); - $zone->getByItem($this->item, null, true); $result = $DB->request($request); if ($result->count() === 1) { return $result->current(); } // Still no result, fallback to the world carbon intensity + $zone = new Zone(); + $zone->getByAsset($this->item); return $this->getFallbackCarbonIntensityForEmberWorldwide($day, $zone); } @@ -288,8 +272,8 @@ public function getFallbackCarbonIntensityForEmberWorldwide(DateTimeInterface $d global $DB; $carbon_intensity_table = CarbonIntensity::getTable(); - $carbon_intensity_source_zone_table = CarbonIntensitySource_Zone::getTable(); - $carbon_intensity_source_table = CarbonIntensitySource::getTable(); + $carbon_intensity_source_zone_table = Source_Zone::getTable(); + $carbon_intensity_source_table = Source::getTable(); $carbon_intensity_zone_table = Zone::getTable(); $request = [ 'SELECT' => "$carbon_intensity_table.*", @@ -299,30 +283,30 @@ public function getFallbackCarbonIntensityForEmberWorldwide(DateTimeInterface $d 'FKEY' => [ $carbon_intensity_table => 'plugin_carbon_zones_id', $carbon_intensity_source_zone_table => 'plugin_carbon_zones_id', - ] + ], ], $carbon_intensity_source_table => [ 'FKEY' => [ - $carbon_intensity_source_zone_table => 'plugin_carbon_carbonintensitysources_id', + $carbon_intensity_source_zone_table => 'plugin_carbon_sources_id', $carbon_intensity_source_table => 'id', - ] + ], ], $carbon_intensity_zone_table => [ 'FKEY' => [ $carbon_intensity_table => 'plugin_carbon_zones_id', $carbon_intensity_zone_table => 'id', - ] + ], ], $carbon_intensity_source_table => [ 'FKEY' => [ - $carbon_intensity_table => 'plugin_carbon_carbonintensitysources_id', + $carbon_intensity_table => 'plugin_carbon_sources_id', $carbon_intensity_source_table => 'id', - ] + ], ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('is_fallback') => 1, - CarbonIntensitySource::getTableField('name') => 'Ember - Energy Institute', + Source::getTableField('fallback_level') => 2, + Source::getTableField('name') => 'Ember - Energy Institute', Zone::getTableField('name') => 'World', CarbonIntensity::getTableField('date') => ['<=', $day->format('Y-m-d H:i:s')], ], diff --git a/src/Engine/V1/AbstractPermanent.php b/src/Engine/V1/AbstractPermanent.php index 277d65b3..e7bc50a5 100644 --- a/src/Engine/V1/AbstractPermanent.php +++ b/src/Engine/V1/AbstractPermanent.php @@ -33,12 +33,12 @@ namespace GlpiPlugin\Carbon\Engine\V1; use ArrayObject; -use DateTime; +use DateInterval; use DateTimeImmutable; use DateTimeInterface; -use DateInterval; -use GlpiPlugin\Carbon\Zone; use GlpiPlugin\Carbon\DataTracking\TrackedFloat; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; abstract class AbstractPermanent extends AbstractAsset implements EngineInterface { @@ -64,22 +64,43 @@ public function getEnergyPerDay(DateTimeInterface $day): TrackedFloat ); } - public function getCarbonEmissionPerDay(DateTimeInterface $day, Zone $zone): ?TrackedFloat + public function getCarbonEmissionPerDay(DateTimeInterface $day, Source_Zone $source_zone): ?TrackedFloat { $power = $this->getPower(); $start_time = clone $day; $start_time->setTime(0, 0, 0, 0); $length = new DateInterval('PT' . 86400 . 'S'); // 24h = 86400 seconds - $iterator = $this->requestCarbonIntensitiesPerDay(DateTimeImmutable::createFromMutable($start_time), $length, $zone); - if ($iterator->count() === 0 && !$zone->hasHistoricalData()) { - // Fallback to the closest value available - $row = array_fill(0, 24, $this->getFallbackCarbonIntensity($day, $zone)); + $source = Source::getById($source_zone->fields['plugin_carbon_sources_id']); + $fallback_source_zone = null; + $iterator = null; + + // Try to read real time carbon intensities + if ($source->fields['fallback_level'] === 0) { + $iterator = $this->requestCarbonIntensitiesPerDay(DateTimeImmutable::createFromMutable($start_time), $length, $source_zone); + if ($iterator->count() === 0) { + // Need to fallback to an alternate source + $fallback_source_zone = new Source_Zone(); + if (!$fallback_source_zone->getFallbackFromDB($source_zone)) { + $fallback_source_zone = null; + } + } + } else { + // The source is already a fallback (exapmple: Quebec does has any realtime source) + $fallback_source_zone = $source_zone; + } + + $expected_count = 24; + + // Try a fallback source + if ($fallback_source_zone !== null) { + $row = array_fill(0, $expected_count, $this->getFallbackCarbonIntensity($start_time, $fallback_source_zone)); $iterator = new ArrayObject($row); $iterator = $iterator->getIterator(); } - $count = $iterator->count(); - if ($count != 24) { + + $count = $iterator ? $iterator->count() : 0; + if ($count != $expected_count) { trigger_error(sprintf( 'required count of carbon intensity %d samples not met. Got %d samples for date %s', 24, diff --git a/src/Engine/V1/AbstractSwitchable.php b/src/Engine/V1/AbstractSwitchable.php index 565a99bb..de07b51d 100644 --- a/src/Engine/V1/AbstractSwitchable.php +++ b/src/Engine/V1/AbstractSwitchable.php @@ -33,14 +33,15 @@ namespace GlpiPlugin\Carbon\Engine\V1; use ArrayObject; -use DateTime; use DateInterval; +use DateTime; use DateTimeImmutable; use DateTimeInterface; -use GlpiPlugin\Carbon\Zone; use GlpiPlugin\Carbon\ComputerUsageProfile; use GlpiPlugin\Carbon\DataTracking\TrackedFloat; use GlpiPlugin\Carbon\DataTracking\TrackedInt; +use GlpiPlugin\Carbon\Source; +use GlpiPlugin\Carbon\Source_Zone; abstract class AbstractSwitchable extends AbstractAsset implements SwitchableInterface { @@ -49,7 +50,7 @@ abstract class AbstractSwitchable extends AbstractAsset implements SwitchableInt * * @param ComputerUsageProfile $usage_profile * @param DateTimeInterface $dateTime - * @return boolean true if the asset is powered on + * @return bool true if the asset is powered on */ protected static function isUsageDay(ComputerUsageProfile $usage_profile, DateTimeInterface $dateTime): bool { @@ -77,8 +78,8 @@ public function getEnergyPerDay(DateTimeInterface $day): TrackedFloat $power = $this->getPower(); $day_s = $day->format('Y-m-d'); - $start_date = DateTime::createFromFormat('Y-m-d H:i:s', $day_s . ' ' . $usage_profile->fields['time_start']); - $stop_date = DateTime::createFromFormat('Y-m-d H:i:s', $day_s . ' ' . $usage_profile->fields['time_stop']); + $start_date = DateTime::createFromFormat('Y-m-d H:i:s', $day_s . ' ' . $usage_profile->fields['time_start'] . ':00'); + $stop_date = DateTime::createFromFormat('Y-m-d H:i:s', $day_s . ' ' . $usage_profile->fields['time_stop'] . ':00'); $delta_time = $stop_date->getTimestamp() - $start_date->getTimestamp(); // units: @@ -93,7 +94,7 @@ public function getEnergyPerDay(DateTimeInterface $day): TrackedFloat ); } - public function getCarbonEmissionPerDay(DateTimeInterface $day, Zone $zone): ?TrackedFloat + public function getCarbonEmissionPerDay(DateTimeInterface $day, Source_Zone $source_zone): ?TrackedFloat { $usage_profile = $this->getUsageProfile(); @@ -109,36 +110,61 @@ public function getCarbonEmissionPerDay(DateTimeInterface $day, Zone $zone): ?Tr // Convert to integers $seconds_start[0] = (int) $seconds_start[0]; $seconds_start[1] = (int) $seconds_start[1]; - $seconds_start[2] = (int) $seconds_start[2]; + $seconds_start[2] = 0; $seconds_stop[0] = (int) $seconds_stop[0]; $seconds_stop[1] = (int) $seconds_stop[1]; - $seconds_stop[2] = (int) $seconds_stop[2]; + $seconds_stop[2] = 0; $start_time = clone $day; $start_time->setTime($seconds_start[0], $seconds_start[1], $seconds_start[2]); - $seconds_start = $seconds_start[0] * 3600 + $seconds_start[1] * 60 + $seconds_start[2]; - $seconds_stop = $seconds_stop[0] * 3600 + $seconds_stop[1] * 60 + $seconds_stop[2]; + $seconds_start = $seconds_start[0] * 3600 + + $seconds_start[1] * 60 + + $seconds_start[2]; + $seconds_stop = $seconds_stop[0] * 3600 + + $seconds_stop[1] * 60 + + $seconds_stop[2]; $length = new DateInterval('PT' . ($seconds_stop - $seconds_start) . 'S'); $start_time = DateTimeImmutable::createFromMutable($start_time); - return $this->computeEmissionPerDay($start_time, $power, $length, $zone); + return $this->computeEmissionPerDay($start_time, $power, $length, $source_zone); } - protected function computeEmissionPerDay(DateTimeImmutable $start_time, TrackedInt $power, DateInterval $length, Zone $zone): ?TrackedFloat + protected function computeEmissionPerDay(DateTimeImmutable $start_time, TrackedInt $power, DateInterval $length, Source_Zone $source_zone): ?TrackedFloat { if ($power->getValue() === 0) { return new TrackedFloat(0); } + $source = Source::getById($source_zone->fields['plugin_carbon_sources_id']); + $fallback_source_zone = null; + $iterator = null; + + // Try to read real time carbon intensities + if ($source->fields['fallback_level'] === 0) { + $iterator = $this->requestCarbonIntensitiesPerDay($start_time, $length, $source_zone); + if ($iterator->count() === 0) { + // Need to fallback to an alternate source + $fallback_source_zone = new Source_Zone(); + if (!$fallback_source_zone->getFallbackFromDB($source_zone)) { + $fallback_source_zone = null; + } + } + } else { + // The source is already a fallback (exapmple: Quebec does has any realtime source) + $fallback_source_zone = $source_zone; + } + $total_seconds = (int) $length->format('%S'); $expected_count = (int) ceil($total_seconds / 3600); - $iterator = $this->requestCarbonIntensitiesPerDay($start_time, $length, $zone); - if ($iterator->count() === 0 && !$zone->hasHistoricalData()) { - $row = array_fill(0, $expected_count, $this->getFallbackCarbonIntensity($start_time, $zone)); + + // Try a fallback source + if ($fallback_source_zone !== null) { + $row = array_fill(0, $expected_count, $this->getFallbackCarbonIntensity($start_time, $fallback_source_zone)); $iterator = new ArrayObject($row); $iterator = $iterator->getIterator(); } - $count = $iterator->count(); - if ($iterator->count() != $expected_count) { + + $count = $iterator ? $iterator->count() : 0; + if ($count != $expected_count) { trigger_error(sprintf( "required count of carbon intensity %d samples not met. Got %d samples for date %s", $expected_count, diff --git a/src/Engine/V1/Computer.php b/src/Engine/V1/Computer.php index 86811c73..2170ceab 100644 --- a/src/Engine/V1/Computer.php +++ b/src/Engine/V1/Computer.php @@ -36,9 +36,9 @@ use ComputerModel; use ComputerType as GlpiComputerType; use DBmysql; +use GlpiPlugin\Carbon\ComputerType; use GlpiPlugin\Carbon\ComputerUsageProfile; use GlpiPlugin\Carbon\UsageInfo; -use GlpiPlugin\Carbon\ComputerType; /** * Compute CO2 emission of a computer @@ -71,16 +71,16 @@ public function getUsageProfile(): ?ComputerUsageProfile [ 'AND' => [ UsageInfo::getTableField('itemtype') => GlpiComputer::class, - ] - ] - ] + ], + ], + ], ], $computerUsageProfile_table => [ 'FKEY' => [ $usageinfo_table => 'plugin_carbon_computerusageprofiles_id', $computerUsageProfile_table => 'id', - ] - ] + ], + ], ], 'WHERE' => [ GlpiComputer::getTableField('id') => $this->item->getID(), diff --git a/src/Engine/V1/EngineInterface.php b/src/Engine/V1/EngineInterface.php index cb966ed0..33008eb9 100644 --- a/src/Engine/V1/EngineInterface.php +++ b/src/Engine/V1/EngineInterface.php @@ -33,9 +33,9 @@ namespace GlpiPlugin\Carbon\Engine\V1; use DateTime; -use GlpiPlugin\Carbon\Zone; use GlpiPlugin\Carbon\DataTracking\TrackedFloat; use GlpiPlugin\Carbon\DataTracking\TrackedInt; +use GlpiPlugin\Carbon\Source_Zone; /** * Compute environmental impact of a computer @@ -53,7 +53,7 @@ public function getPower(): TrackedInt; * Returns the carbon emission for the specified day. * * @param DateTime $day the day - * @param Zone $zone the zone where the asset is located at the given date + * @param Source_Zone $source_zone the source_zone where the asset is located at the given date * * @return TrackedFloat|null * @@ -62,7 +62,7 @@ public function getPower(): TrackedInt; * * Unit of returned value, if float, is grams of CO2 */ - public function getCarbonEmissionPerDay(DateTime $day, Zone $zone): ?TrackedFloat; + public function getCarbonEmissionPerDay(DateTime $day, Source_Zone $source_zone): ?TrackedFloat; /** * Returns the consumed energy for the specified day. diff --git a/src/Engine/V1/Inventory.php b/src/Engine/V1/Inventory.php index 93a51901..c543b575 100644 --- a/src/Engine/V1/Inventory.php +++ b/src/Engine/V1/Inventory.php @@ -32,13 +32,13 @@ namespace GlpiPlugin\Carbon\Engine\V1; -use DateTime; +use CommonDBTM; use Computer as GlpiComputer; +use DateTime; use DbUtils; -use GlpiPlugin\Carbon\Zone; use GlpiPlugin\Carbon\DataTracking\TrackedFloat; use GlpiPlugin\Carbon\DataTracking\TrackedInt; -use GlpiPlugin\Carbon\Tests\Engine\V1\EngineTestCase; +use GlpiPlugin\Carbon\Source_Zone; /** * Compute environmental impact of a whole inventory @@ -55,9 +55,10 @@ class Inventory implements EngineInterface /** * Check an item is already in the inventory * - * @param string $itemtype - * @param integer $items_id - * @return boolean + * @template T of CommonDBTM + * @param class-string $itemtype + * @param int $items_id + * @return bool */ public function hasItem(string $itemtype, int $items_id) { @@ -68,23 +69,25 @@ public function hasItem(string $itemtype, int $items_id) /** * Is the itemtype an asset ? * - * @param string $itemtype - * @return boolean + * @template T of CommonDBTM + * @param class-string $itemtype + * @return bool */ private static function isAsset(string $itemtype): bool { /** @var array $CFG_GLPI */ global $CFG_GLPI; - return in_array($itemtype, $CFG_GLPI["asset_types"]); + return in_array($itemtype, $CFG_GLPI["asset_types"]); } /** * Add an item to the inventory to be processed * - * @param string $itemtype - * @param integer $items_id - * @return boolean + * @template T of CommonDBTM + * @param class-string $itemtype + * @param int $items_id + * @return bool */ public function addItem(string $itemtype, int $items_id): bool { @@ -124,9 +127,10 @@ public function addItem(string $itemtype, int $items_id): bool /** * Add several items to the inventory by itemtype and a search criteria * - * @param string $itemtype itemtype of the items to add + * @template T of CommonDBTM + * @param class-string $itemtype itemtype of the items to add * @param array $crit search criteria of items to add - * @return boolean true if success + * @return bool true if success */ public function addItemsByCrit(string $itemtype, array $crit = []): bool { @@ -182,7 +186,7 @@ public function getEnergyPerDay(DateTime $day): TrackedFloat return $energy->setValue($total_energy); } - public function getCarbonEmissionPerDay(DateTime $day, Zone $zone): ?TrackedFloat + public function getCarbonEmissionPerDay(DateTime $day, Source_Zone $source_zone): ?TrackedFloat { $total_emission = 0; $emission = new TrackedFloat(); diff --git a/src/Engine/V1/Monitor.php b/src/Engine/V1/Monitor.php index bcf4bf28..b59098ed 100644 --- a/src/Engine/V1/Monitor.php +++ b/src/Engine/V1/Monitor.php @@ -33,14 +33,14 @@ namespace GlpiPlugin\Carbon\Engine\V1; use Computer as GlpiComputer; -use Glpi\Asset\Asset_PeripheralAsset; use DBmysql; -use Monitor as GlpiMonitor; -use MonitorType as GlpiMonitorType; -use MonitorModel; +use Glpi\Asset\Asset_PeripheralAsset; use GlpiPlugin\Carbon\ComputerUsageProfile; use GlpiPlugin\Carbon\MonitorType; use GlpiPlugin\Carbon\UsageInfo; +use Monitor as GlpiMonitor; +use MonitorModel; +use MonitorType as GlpiMonitorType; /** * Compute CO2 emission of a computer @@ -71,11 +71,11 @@ public function getUsageProfile(): ?ComputerUsageProfile $computer_item_table => 'items_id_asset', $computers_table => 'id', ['AND' => [ - Asset_PeripheralAsset::getTableField('itemtype_peripheral') => self::$itemtype + Asset_PeripheralAsset::getTableField('itemtype_peripheral') => self::$itemtype, ], Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class, ], - ] + ], ], $usageinfo_table => [ 'FKEY' => [ @@ -84,16 +84,16 @@ public function getUsageProfile(): ?ComputerUsageProfile [ 'AND' => [ UsageInfo::getTableField('itemtype') => GlpiComputer::class, - ] - ] - ] + ], + ], + ], ], $computerUsageProfile_table => [ 'FKEY' => [ $usageinfo_table => 'plugin_carbon_computerusageprofiles_id', $computerUsageProfile_table => 'id', - ] - ] + ], + ], ], 'WHERE' => [ Asset_PeripheralAsset::getTableField('items_id_peripheral') => $this->item->getID(), diff --git a/src/Engine/V1/NetworkEquipment.php b/src/Engine/V1/NetworkEquipment.php index 339a07f4..41563f13 100644 --- a/src/Engine/V1/NetworkEquipment.php +++ b/src/Engine/V1/NetworkEquipment.php @@ -32,10 +32,10 @@ namespace GlpiPlugin\Carbon\Engine\V1; +use GlpiPlugin\Carbon\NetworkEquipmentType; use NetworkEquipment as GlpiNetworkEquipment; -use NetworkEquipmentType as GlpiNetworkEquipmentType; use NetworkEquipmentModel; -use GlpiPlugin\Carbon\NetworkEquipmentType; +use NetworkEquipmentType as GlpiNetworkEquipmentType; class NetworkEquipment extends AbstractPermanent { diff --git a/src/Impact/Embodied/AbstractEmbodiedImpact.php b/src/Impact/Embodied/AbstractEmbodiedImpact.php index 029c60ff..1e563526 100644 --- a/src/Impact/Embodied/AbstractEmbodiedImpact.php +++ b/src/Impact/Embodied/AbstractEmbodiedImpact.php @@ -33,19 +33,23 @@ namespace GlpiPlugin\Carbon\Impact\Embodied; +use CommonDBTM; use DBmysql; +use DBmysqlIterator; use DbUtils; -use CommonDBTM; use GlpiPlugin\Carbon\DataTracking\AbstractTracked; +use GlpiPlugin\Carbon\DataTracking\TrackedFloat; use GlpiPlugin\Carbon\EmbodiedImpact; use GlpiPlugin\Carbon\Impact\Type; -use GlpiPlugin\Carbon\UsageImpact; -use Toolbox as GlpiToolbox; +use GuzzleHttp\Exception\ConnectException; +use LogicException; +use RuntimeException; +use Session; abstract class AbstractEmbodiedImpact implements EmbodiedImpactInterface { - /** @var string Handled itemtype */ - protected static string $itemtype = ''; + /** @var CommonDBTM Item to analyze */ + protected CommonDBTM $item; /** @var int maximum number of entries to build */ protected int $limit = 0; @@ -57,23 +61,29 @@ abstract class AbstractEmbodiedImpact implements EmbodiedImpactInterface protected string $engine = 'undefined'; /** @var string $engine_version Version of the calculation engine */ - protected string $engine_version = 'unknown'; + protected static string $engine_version = 'unknown'; /** @var array of TrackedFloat */ protected array $impacts = []; - public function __construct() + public function __construct(CommonDBTM $item) { + if ($item->isNewItem()) { + throw new LogicException("Given item is empty"); + } + $this->item = $item; foreach (array_flip(Type::getImpactTypes()) as $type) { $this->impacts[$type] = null; } } + abstract protected function getVersion(): string; + /** * Get the unit of an impact * - * @param integer $type - * @param boolean $short + * @param int $type + * @param bool $short * @return string|null */ final public function getUnit(int $type, bool $short = true): ?string @@ -90,88 +100,43 @@ final public function getUnit(int $type, bool $short = true): ?string return null; } - public static function getItemtype(): string - { - return static::$itemtype; - } - public function setLimit(int $limit) { $this->limit = $limit; } - public function evaluateItems(): int + public static function getItemsToEvaluate(string $itemtype, array $crit = []): DBmysqlIterator { /** @var DBmysql $DB */ global $DB; - $itemtype = static::$itemtype; - if ($itemtype === '') { - throw new \LogicException('Itemtype not set'); - } - if (!is_subclass_of($itemtype, CommonDBTM::class)) { - throw new \LogicException('Itemtype does not inherits from ' . CommonDBTM::class); - } - - /** - * Huge quantity of SQL queries will be executed - * We NEED to check memory usage to avoid running out of memory - * @see DbMysql::doQuery() - */ - $memory_limit = GlpiToolbox::getMemoryLimit() - 8 * 1024 * 1024; - if ($memory_limit < 0) { - // May happen in test seems that ini_get("memory_limits") returns - // enpty string in PHPUnit environment - $memory_limit = null; - } - - /** @var int $attempts_count count of evaluation attempts */ - $attempts_count = 0; - /** @var int $count count of successfully evaluated assets */ - $count = 0; - $iterator = $DB->request($this->getEvaluableQuery([], false)); - foreach ($iterator as $row) { - if ($this->evaluateItem($row['id'])) { - $count++; - } - $attempts_count++; - if ($this->limit !== 0 && $attempts_count >= $this->limit) { - $this->limit_reached = true; - break; - } - if ($memory_limit && $memory_limit < memory_get_usage()) { - // 8 MB memory left, emergency exit - $this->limit_reached = true; - break; - } - if ($this->limit_reached) { - break; - } - } + $crit[] = [ + 'OR' => [ + EmbodiedImpact::getTableField('id') => null, + EmbodiedImpact::getTableField('recalculate') => 1, + ], + ]; + $iterator = $DB->request(self::getEvaluableQuery($itemtype, $crit, false)); - return $count; + return $iterator; } - /** - * Evaluate and save tne environmental impact of an asset. - * - * @param integer $id - * @return bool true if sucess, false otherwise - */ - public function evaluateItem(int $id): bool + public function evaluateItem(): bool { - $itemtype = static::$itemtype; - $item = $itemtype::getById($id); - if ($item === false) { - return false; - } + $itemtype = get_class($this->item); + try { - $impacts = $this->doEvaluation($item); - } catch (\RuntimeException $e) { + $this->getVersion(); + $impacts = $this->doEvaluation(); + } catch (ConnectException $e) { + Session::addMessageAfterRedirect(__('Connection to Boavizta failed.', 'carbon'), false, ERROR); + return false; + } catch (RuntimeException $e) { + Session::addMessageAfterRedirect(__('Embodied impact evaluation falied.', 'carbon'), false, ERROR); return false; } - if ($impacts === null) { + if ($impacts === null || count($impacts) === 0) { // Nothing calculated return false; } @@ -179,14 +144,15 @@ public function evaluateItem(int $id): bool // Find an existing row, if any $input = [ 'itemtype' => $itemtype, - 'items_id' => $id, + 'items_id' => $this->item->getID(), ]; $embodied_impact = new EmbodiedImpact(); $embodied_impact->getFromDBByCrit($input); $impact_types = Type::getImpactTypes(); + $input['recalculate'] = 0; $input['engine'] = $this->engine; - $input['engine_version'] = $this->engine_version; + $input['engine_version'] = self::$engine_version; // Prepare inputs for add or update foreach ($impacts as $type => $value) { @@ -216,16 +182,20 @@ public function evaluateItem(int $id): bool return false; } - public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true): array + public static function getEvaluableQuery(string $itemtype, array $crit = [], bool $entity_restrict = true): array { - $itemtype = static::$itemtype; - $item_table = $itemtype::getTable(); + $item_table = getTableForItemType($itemtype); + $glpi_item_type_table = getTableForItemType($itemtype . 'Type'); + $glpi_item_type_fk = getForeignKeyFieldForTable($glpi_item_type_table); + $item_type_table = getTableForItemType('GlpiPlugin\\Carbon\\' . $itemtype . 'Type'); $embodied_impact_table = EmbodiedImpact::getTable(); - // $where = []; - // if (!$recalculate) { - // $where = [EmbodiedImpact::getTableField('id') => null]; - // } + $crit[] = [ + 'OR' => [ + $item_type_table . '.is_ignore' => 0, + $item_type_table . '.id' => null, + ], + ]; $request = [ 'SELECT' => [ @@ -237,10 +207,18 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true 'FKEY' => [ $embodied_impact_table => 'items_id', $item_table => 'id', - ['AND' => - [ + ['AND' + => [ EmbodiedImpact::getTableField('itemtype') => $itemtype, - ] + ], + ], + ], + ], + $item_type_table => [ + [ + 'FKEY' => [ + $item_type_table => $glpi_item_type_fk, + $item_table => $glpi_item_type_fk, ], ], ], @@ -259,23 +237,35 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true /** * Do the environmental impact evaluation of an asset * - * @param CommonDBTM $item * @return ?array */ - abstract protected function doEvaluation(CommonDBTM $item): ?array; + abstract protected function doEvaluation(): ?array; /** * Delete all calculated usage impact for an asset * - * @param integer $items_id - * @return boolean + * @param CommonDBTM $item + * @return bool */ - public function resetForItem(int $items_id): bool + public static function resetForItem(CommonDBTM $item): bool { - $usage_impact = new EmbodiedImpact(); - return $usage_impact->deleteByCriteria([ - 'itemtype' => static::getItemtype(), - 'items_id' => $items_id + $embodied_impact = new EmbodiedImpact(); + return $embodied_impact->deleteByCriteria([ + 'itemtype' => get_class($item), + 'items_id' => $item->getID(), ]); } + + protected function getModelImpacts(CommonDBTM $model): array + { + $impacts = []; + $types = Type::getImpactTypes(); + foreach ($types as $key => $type) { + if ($model->fields[$type] === null || $model->fields[$type . '_quality'] === AbstractTracked::DATA_QUALITY_UNSET_VALUE) { + continue; + } + $impacts[$key] = new TrackedFloat($model->fields[$type], null, $model->fields[$type . '_quality']); + }; + return $impacts; + } } diff --git a/src/Impact/Embodied/Boavizta/AbstractAsset.php b/src/Impact/Embodied/Boavizta/AbstractAsset.php index fef881e9..bc5fd944 100644 --- a/src/Impact/Embodied/Boavizta/AbstractAsset.php +++ b/src/Impact/Embodied/Boavizta/AbstractAsset.php @@ -33,11 +33,9 @@ namespace GlpiPlugin\Carbon\Impact\Embodied\Boavizta; -use CommonDBTM; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; -use GlpiPlugin\Carbon\DataTracking\TrackedFloat; -use GlpiPlugin\Carbon\Impact\Type; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client; use GlpiPlugin\Carbon\Impact\Embodied\AbstractEmbodiedImpact; +use RuntimeException; abstract class AbstractAsset extends AbstractEmbodiedImpact implements AssetInterface { @@ -45,7 +43,7 @@ abstract class AbstractAsset extends AbstractEmbodiedImpact implements AssetInte protected string $engine = 'Boavizta'; /** @var string $engine_version Version of the calculation engine */ - protected string $engine_version = 'unknown'; + // protected static string $engine_version = 'unknown'; /** @var string Endpoint to query for the itemtype, to be filled in child class */ protected string $endpoint = ''; @@ -53,36 +51,38 @@ abstract class AbstractAsset extends AbstractEmbodiedImpact implements AssetInte /** @var array $hardware hardware description for the request */ protected array $hardware = []; - /** @var Boaviztapi instance of the HTTP client */ - protected ?Boaviztapi $client = null; + /** @var Client instance of the HTTP client */ + protected ?Client $client = null; // abstract public static function getEngine(CommonDBTM $item): EngineInterface; /** * Analyze the hardware of the asset to prepare the request to the backend - * @param CommonDBTM $item asset to analyze * * @return void */ - abstract protected function analyzeHardware(CommonDBTM $item); + abstract protected function analyzeHardware(); /** * Set the REST API client to use for requests * - * @param Boaviztapi $client + * @param Client $client * @return void */ - public function setClient(Boaviztapi $client) + public function setClient(Client $client) { $this->client = $client; - $this->engine_version = $this->getVersion(); } protected function getVersion(): string { + if (self::$engine_version !== 'unknown') { + return self::$engine_version; + } + try { $response = $this->client->get('utils/version'); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } @@ -91,107 +91,40 @@ protected function getVersion(): string 'Invalid response from Boavizta API: %s', json_encode($response[0] ?? '') ), E_USER_WARNING); - throw new \RuntimeException('Invalid response from Boavizta API'); + throw new RuntimeException('Invalid response from Boavizta API'); } + self::$engine_version = $response[0]; + return self::$engine_version; + } - return $response[0]; + /** + * Get the query string specifying the impact criterias for the HTTP request + * + * @return string + */ + protected function getCriteriasQueryString(): string + { + $impact_criteria = array_keys($this->client->getCriteriaUnits()); + return 'criteria=' . implode('&criteria=', $impact_criteria); } - protected function query($description): array + /** + * Send a HTTP query + * + * @param array $description + * @return array + */ + protected function query(array $description): array { try { $response = $this->client->post($this->endpoint, [ 'json' => $description, ]); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } return $response; } - - /** - * Read the response to find the impacts provided by Boaviztapi - * - * @return array - */ - protected function parseResponse(array $response): array - { - $impacts = []; - foreach ($response['impacts'] as $type => $impact) { - if (!in_array($type, Type::getImpactTypes())) { - trigger_error(sprintf('Unsupported impact type %s in class %s', $type, __CLASS__)); - continue; - } - - switch ($type) { - case 'gwp': - $impacts[Type::IMPACT_GWP] = $this->parseGwp($response['impacts']['gwp']); - break; - case 'adp': - $impacts[Type::IMPACT_ADP] = $this->parseAdp($response['impacts']['adp']); - break; - case 'pe': - $impacts[Type::IMPACT_PE] = $this->parsePe($response['impacts']['pe']); - break; - } - } - - return $impacts; - } - - protected function parseGwp(array $impact): ?TrackedFloat - { - if ($impact['embedded'] === 'not implemented') { - return null; - } - - $value = new TrackedFloat( - $impact['embedded']['value'], - null, - TrackedFloat::DATA_QUALITY_ESTIMATED - ); - if ($impact['unit'] === 'kgCO2eq') { - $value->setValue($value->getValue() * 1000); - } - - return $value; - } - - protected function parseAdp(array $impact): ?TrackedFloat - { - if ($impact['embedded'] === 'not implemented') { - return null; - } - - $value = new TrackedFloat( - $impact['embedded']['value'], - null, - TrackedFloat::DATA_QUALITY_ESTIMATED - ); - if ($impact['unit'] === 'kgSbeq') { - $value->setValue($value->getValue() * 1000); - } - - return $value; - } - - protected function parsePe(array $impact): ?TrackedFloat - { - if ($impact['embedded'] === 'not implemented') { - return null; - } - - $value = new TrackedFloat( - $impact['embedded']['value'], - null, - TrackedFloat::DATA_QUALITY_ESTIMATED - ); - if ($impact['unit'] === 'MJ') { - $value->setValue($value->getValue() * (1000 ** 2)); - } - - return $value; - } } diff --git a/src/Impact/Embodied/Boavizta/AssetInterface.php b/src/Impact/Embodied/Boavizta/AssetInterface.php index a2801388..90f4f972 100644 --- a/src/Impact/Embodied/Boavizta/AssetInterface.php +++ b/src/Impact/Embodied/Boavizta/AssetInterface.php @@ -33,15 +33,15 @@ namespace GlpiPlugin\Carbon\Impact\Embodied\Boavizta; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client; interface AssetInterface { /** * Set the API client to use for HTTP requests * - * @param Boaviztapi $client + * @param Client $client * @return void */ - public function setClient(Boaviztapi $client); + public function setClient(Client $client); } diff --git a/src/Impact/Embodied/Boavizta/Computer.php b/src/Impact/Embodied/Boavizta/Computer.php index 542453d1..9cd62032 100644 --- a/src/Impact/Embodied/Boavizta/Computer.php +++ b/src/Impact/Embodied/Boavizta/Computer.php @@ -35,29 +35,24 @@ use CommonDBTM; use Computer as GlpiComputer; -use DBmysql; -use DeviceProcessor; -use GlpiPlugin\Carbon\ComputerType; use ComputerType as GlpiComputerType; -use DeviceHardDrive; -use InterfaceType; -use Item_DeviceHardDrive; -use Item_DeviceMemory; -use Item_DeviceProcessor; -use Item_Devices; -use Manufacturer; +use GlpiPlugin\Carbon\ComputerType; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\ComputerModelizationAdapterTrait; class Computer extends AbstractAsset { + use ComputerModelizationAdapterTrait; + protected static string $itemtype = GlpiComputer::class; protected string $endpoint = 'server'; - protected function doEvaluation(CommonDBTM $item): ?array + protected function doEvaluation(): ?array { // adapt $this->endpoint depending on the type of computer (server, laptop, ...) - $type = $this->getType($item); + $type = $this->getType($this->item); $this->endpoint = $this->getEndpoint($type); + $this->endpoint .= '?' . $this->getCriteriasQueryString(); // Ask for embodied impact only $handle_hardware = in_array($type, [ @@ -65,18 +60,18 @@ protected function doEvaluation(CommonDBTM $item): ?array ComputerType::CATEGORY_DESKTOP, ComputerType::CATEGORY_UNDEFINED, ]); - $configuration = $this->analyzeHardware($item); + $configuration = $this->analyzeHardware(); if ($handle_hardware && count($configuration) === 0) { return null; } $description = [ 'configuration' => $configuration, 'usage' => [ - 'avg_power' => 0 + 'avg_power' => 0, ], ]; $response = $this->query($description); - $impacts = $this->parseResponse($response); + $impacts = $this->client->parseResponse($response, 'embedded'); return $impacts; } @@ -98,18 +93,18 @@ protected function getType(CommonDBTM $item): int 'FKEY' => [ $computer_type_table => 'computertypes_id', $glpi_computer_type_table => 'id', - ] + ], ], $computer_table => [ 'FKEY' => [ $glpi_computer_type_table => 'id', - $computer_table => 'computertypes_id' + $computer_table => 'computertypes_id', ], ], ], 'WHERE' => [ GlpiComputer::getTableField('id') => $item->getID(), - ] + ], ]); if ($found === false) { return ComputerType::CATEGORY_UNDEFINED; @@ -138,156 +133,4 @@ protected function getEndpoint(int $type) // ComputerType::CATEGORY_DESKTOP return 'terminal/desktop'; } - - protected function analyzeHardware(CommonDBTM $item): array - { - $configuration = []; - // Yes, string expected here. - $iterator = Item_Devices::getItemsAssociatedTo($item->getType(), (string) $item->getID()); - foreach ($iterator as $item_device) { - switch ($item_device->getType()) { - case Item_DeviceProcessor::class: - $cpu = DeviceProcessor::getById($item_device->fields['deviceprocessors_id']); - if ($cpu) { - if (isset($configuration['cpu'])) { - // The server does not support several CPU with different specifications - // then, just increment CPU count - $configuration['cpu']['units']++; - } else { - $configuration['cpu'] = [ - 'units' => 1, - 'name' => $cpu->fields['designation'], - ]; - if (isset($item_device->fields['nbcores'])) { - $configuration['cpu']['core_units'] = $item_device->fields['nbcores']; - } - } - } - break; - case Item_DeviceMemory::class: - $ram = [ - 'capacity' => ceil($item_device->fields['size'] / 1024), // Convert to GB - ]; - $manufacturer = $this->getDeviceManufacturer($item_device); - if (!empty($manufacturer)) { - $ram['manufacturer'] = $manufacturer; - } - $key_match = $this->arrayMatch($ram, $configuration['ram'] ?? []); - if ($key_match !== null) { - // increment the units count of the RAM - $configuration['ram'][$key_match]['units']++; - } else { - $ram['units'] = 1; - $configuration['ram'][] = $ram; - } - break; - case Item_DeviceHardDrive::class: - $hard_drive = [ - 'capacity' => ceil($item_device->fields['capacity'] / 1024), // Convert to GB - ]; - $type = 'hdd'; - $device_hard_drive = new DeviceHardDrive(); - $device_hard_drive->getFromDB($item_device->fields['deviceharddrives_id']); - if (!$device_hard_drive->isNewItem()) { - $interface_type = new InterfaceType(); - $interface_type->getFromDB($device_hard_drive->fields['interfacetypes_id']); - if (!$interface_type->isNewItem()) { - if (in_array($interface_type->fields['name'], ['NVME'])) { - $type = 'ssd'; - $manufacturer = $this->getDeviceManufacturer($item_device); - if ($manufacturer !== null) { - $$hard_drive['manufacturer'] = $manufacturer; - } - $hard_drive['manufacturer'] = $manufacturer; - } - } - } - $hard_drive['type'] = $type; - $key_match = $this->arrayMatch($hard_drive, $configuration['disk'] ?? []); - if ($key_match !== null) { - // increment the units count of the disk - $configuration['disk'][$key_match]['units']++; - } else { - $hard_drive['units'] = 1; - $configuration['disk'][] = $hard_drive; - } - break; - } - } - - return $configuration; - } - - /** - * Checks if the array $needle matches any of the arrays in $haystack - * - * @param array $needle - * @param array $haystack - * @return mixed key the key of the component in $haystack if found, null otherwise - */ - private function arrayMatch(array $needle, array $haystack) - { - foreach ($haystack as $key => $item) { - // ignore units as it does not represents characteristics of a component - unset($item['units']); - if ($item === $needle) { - return $key; - } - } - - return null; - } - - /** - * Get the manufacturer of the device - * - * @param Item_Devices $item - * @return string|null - */ - private function getDeviceManufacturer(Item_Devices $item): ?string - { - /** @var DBmysql $DB */ - global $DB; - - // Get the manufacturer of the device - $table_device = getTableForItemType($item::$itemtype_2); - $table_device_item = getTableForItemType($item->getType()); - $table_manufacturer = getTableForItemType(Manufacturer::class); - $device_fk = getForeignKeyFieldForItemType($item::$itemtype_2); - $manufacturer_fk = getForeignKeyFieldForItemType(Manufacturer::class); - $request = [ - 'SELECT' => [ - $table_manufacturer => ['id', 'name'], - ], - 'FROM' => $table_device_item, - 'INNER JOIN' => [ - $table_device => [ - 'ON' => [ - $table_device_item => $device_fk, - $table_device => 'id', - ] - ], - $table_manufacturer => [ - 'ON' => [ - $table_manufacturer => 'id', - $table_device => $manufacturer_fk, - ] - ], - ], - 'WHERE' => [ - $item->getTableField('id') => $item->getID(), - ] - ]; - - $result = $DB->request($request); - if ($result->numRows() === 0) { - return null; - } - $data = $result->current(); - if (empty($data['name'])) { - return null; - } - - return $data['name']; - } } diff --git a/src/Impact/Embodied/Boavizta/Monitor.php b/src/Impact/Embodied/Boavizta/Monitor.php index 3b31127b..eeb83acb 100644 --- a/src/Impact/Embodied/Boavizta/Monitor.php +++ b/src/Impact/Embodied/Boavizta/Monitor.php @@ -33,7 +33,6 @@ namespace GlpiPlugin\Carbon\Impact\Embodied\Boavizta; -use CommonDBTM; use Monitor as GlpiMonitor; class Monitor extends AbstractAsset @@ -42,36 +41,29 @@ class Monitor extends AbstractAsset protected string $endpoint = 'peripheral/monitor'; - protected function doEvaluation(CommonDBTM $item): ?array + protected function doEvaluation(): ?array { - // TODO: determine if the computer is a server, a computer, a laptop, a tablet... - // then adapt $this->endpoint depending on the result + $this->endpoint .= '?' . $this->getCriteriasQueryString(); // Ask for embodied impact only - $configuration = $this->analyzeHardware($item); + $configuration = $this->analyzeHardware(); $description = [ 'configuration' => $configuration, 'usage' => [ - 'avg_power' => 0 + 'avg_power' => 0, ], ]; $response = $this->query($description); - $impacts = $this->parseResponse($response); + $impacts = $this->client->parseResponse($response, 'embedded'); return $impacts; } - protected function analyzeHardware(CommonDBTM $item): array + protected function analyzeHardware(): array { $configuration = []; - // Disable usage - $this->hardware['configuration'] = $configuration; - $this->hardware['usage'] = [ - 'avg_power' => 0 - ]; - return $configuration; } } diff --git a/src/Impact/Embodied/EmbodiedImpactInterface.php b/src/Impact/Embodied/EmbodiedImpactInterface.php index 27cc5fc1..1b0655b9 100644 --- a/src/Impact/Embodied/EmbodiedImpactInterface.php +++ b/src/Impact/Embodied/EmbodiedImpactInterface.php @@ -34,29 +34,14 @@ namespace GlpiPlugin\Carbon\Impact\Embodied; use CommonDBTM; -use GlpiPlugin\Carbon\Engine\V1\EngineInterface; +use DBmysqlIterator; interface EmbodiedImpactInterface { - /** - * Get an instance of the impact calculation engine for the itemtype of the analyzed object - * - * @param CommonDBTM $item - * @return EngineInterface - */ - // public static function getEngine(CommonDBTM $item): EngineInterface; - - /** - * Get the itemtype of the asset handled by this class - * - * @return string - */ - public static function getItemtype(): string; - /** * Set the maximum count of items to calculate with evaluateItems() * - * @param integer $limit + * @param int $limit * @return void */ public function setLimit(int $limit); @@ -64,24 +49,28 @@ public function setLimit(int $limit); /** * Get query to find items we can evaluate * + * @template T of CommonDBTM + * @param class-string $itemtype * @param array $crit - * @param boolean $entity_restrict + * @param bool $entity_restrict * @return array */ - public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true): array; + public static function getEvaluableQuery(string $itemtype, array $crit = [], bool $entity_restrict = true): array; /** - * Start the evaluation of all items + * Get an iterator of items to evaluate * - * @return int count of successfully evaluated assets + * @template T of CommonDBTM + * @param class-string $itemtype + * @param array $crit criteria + * @return DBmysqlIterator */ - public function evaluateItems(): int; + public static function getItemsToEvaluate(string $itemtype, array $crit = []): DBmysqlIterator; /** - * Evaluate all impacts of the asset + * Evaluate and save tne environmental impact of an asset * - * @param integer $id * @return bool true if success, false otherwise */ - public function evaluateItem(int $id): bool; + public function evaluateItem(): bool; } diff --git a/src/Impact/Embodied/Engine.php b/src/Impact/Embodied/Engine.php index 741d0ef5..ab250976 100644 --- a/src/Impact/Embodied/Engine.php +++ b/src/Impact/Embodied/Engine.php @@ -32,10 +32,17 @@ namespace GlpiPlugin\Carbon\Impact\Embodied; +use CommonDBTM; use CommonGLPI; +use DBmysql; +use GlpiPlugin\Carbon\AbstractModel; use GlpiPlugin\Carbon\Config; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client; use GlpiPlugin\Carbon\DataSource\RestApiClient; +use GlpiPlugin\Carbon\DataTracking\AbstractTracked; +use GlpiPlugin\Carbon\Impact\Embodied\Boavizta\AbstractAsset; +use GlpiPlugin\Carbon\Impact\Type; +use RuntimeException; class Engine extends CommonGLPI { @@ -54,39 +61,50 @@ public static function getAvailableBackends(): array * * Returns null if no engine found * - * @param string $itemtype itemtype of assets to analyze + * @param CommonDBTM $item item to analyze * @return EmbodiedImpactInterface|null an instance if an embodied impact calculation object or null on error */ - public static function getEngineFromItemtype(string $itemtype): ?EmbodiedImpactInterface + public static function getEngineFromItemtype(CommonDBTM $item): ?EmbodiedImpactInterface { + $itemtype = get_class($item); + + if (self::hasModelData($item)) { + return self::getInternalEngineFromItemtype($item); + } + $embodied_impact_namespace = Config::getEmbodiedImpactEngine(); $embodied_impact_class = $embodied_impact_namespace . '\\' . $itemtype; - if (!class_exists($embodied_impact_class) || !is_subclass_of($embodied_impact_class, AbstractEmbodiedImpact::class)) { - return null; + $must_implement = AbstractEmbodiedImpact::class; + if (!class_exists($embodied_impact_class) || !is_subclass_of($embodied_impact_class, $must_implement)) { + return self::getInternalEngineFromItemtype($item); } - $embodied_impact = new $embodied_impact_class(); + /** @var AbstractEmbodiedImpact $embodied_impact */ + $embodied_impact = new $embodied_impact_class($item); try { return self::configureEngine($embodied_impact); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { // If the engine cannot be configured, it is not usable return null; } } - public static function getEngine(string $engine_class): ?EmbodiedImpactInterface + /** + * Get an instance of the internal engine to calcilate impacts for the given itemtype + * This is a fallback engine + * + * @param CommonDBTM $item item to analyze + * @return ?EmbodiedImpactInterface + */ + public static function getInternalEngineFromItemtype(CommonDBTM $item): ?EmbodiedImpactInterface { - if (!is_subclass_of($engine_class, EmbodiedImpactInterface::class)) { - return null; - } - $embodied_impact = new $engine_class(); - - try { - return self::configureEngine($embodied_impact); - } catch (\RuntimeException $e) { - // If the engine cannot be configured, it is not usable + $itemtype = get_class($item); + $embodied_impact_class = 'GlpiPlugin\\Carbon\\Impact\\Embodied\Internal' . '\\' . $itemtype; + if (!class_exists($embodied_impact_class) || !is_subclass_of($embodied_impact_class, AbstractEmbodiedImpact::class)) { return null; } + $embodied_impact = new $embodied_impact_class($item); + return $embodied_impact; } /** @@ -100,10 +118,46 @@ protected static function configureEngine(EmbodiedImpactInterface $engine): Embo $embodied_impact_namespace = explode('\\', get_class($engine)); switch (array_slice($embodied_impact_namespace, -2, 1)[0]) { case 'Boavizta': - /** @var Boavizta\AbstractAsset $engine */ - $engine->setClient(new Boaviztapi(new RestApiClient())); + /** @var AbstractAsset $engine */ + $engine->setClient(new Client(new RestApiClient())); } return $engine; } + + /** + * Check if the asset has a model specific dmeodied impact data + * + * @param CommonDBTM $item + * @return bool + */ + private static function hasModelData(CommonDBTM $item): bool + { + /** @var DBmysql $DB */ + global $DB; + + $itemtype = get_class($item); + $glpi_model_class = $itemtype . 'Model'; + $glpi_model_class_fk = getForeignKeyFieldForItemType($glpi_model_class); + /** + * @var class-string $model_class + */ + $model_class = 'GlpiPlugin\\Carbon\\' . $glpi_model_class; + $model_table = getTableForItemType($model_class); + $glpi_model_id = $item->fields[$glpi_model_class_fk]; + $crit = [ + $glpi_model_class_fk => $glpi_model_id, + ]; + $types = Type::getImpactTypes(); + foreach ($types as $key => $type) { + if (!$DB->fieldExists($model_table, $type)) { + continue; + } + $crit['OR'][] = [ + $type . '_quality' => ['<>', AbstractTracked::DATA_QUALITY_UNSET_VALUE], + ]; + } + $model = new $model_class(); + return $model->getFromDBByCrit($crit); + } } diff --git a/src/Impact/Embodied/Internal/AbstractAsset.php b/src/Impact/Embodied/Internal/AbstractAsset.php new file mode 100644 index 00000000..349637f2 --- /dev/null +++ b/src/Impact/Embodied/Internal/AbstractAsset.php @@ -0,0 +1,88 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\Impact\Embodied\Internal; + +use CommonDBTM; +use GlpiPlugin\Carbon\DataTracking\TrackedFloat; +use GlpiPlugin\Carbon\Impact\Embodied\AbstractEmbodiedImpact; +use GlpiPlugin\Carbon\Impact\Type; + +abstract class AbstractAsset extends AbstractEmbodiedImpact +{ + protected static string $itemtype; + + /** @var string $engine Name of the calculation engine */ + protected string $engine = 'Internal'; + + /** @var string $engine_version Version of the calculation engine */ + protected static string $engine_version = '1'; + + protected function getVersion(): string + { + return self::$engine_version; + } + + protected function doEvaluation(): array + { + /** @var class-string */ + $glpi_model_itemtype = static::$itemtype . 'Model'; + $glpi_model_fk = getForeignKeyFieldForItemType($glpi_model_itemtype); + if ($glpi_model_itemtype::isNewID($this->item->fields[$glpi_model_fk])) { + return []; + } + + /** @var CommonDBTM $model */ + $model = getItemForItemtype($glpi_model_itemtype); + $model->getFromDBByCrit([ + $glpi_model_fk => $this->item->fields[$glpi_model_fk], + ]); + if ($model->isNewItem()) { + return []; + } + + $impacts = []; + $types = Type::getImpactTypes(); + foreach ($types as $type) { + if (!isset($model->fields[$type]) || empty($model->fields[$type])) { + continue; + } + $impacts[Type::getImpactId($type)] = new TrackedFloat( + $model->fields[$type], + null, + $model->fields["{$type}_quality"] + ); + } + + return $impacts; + } +} diff --git a/src/Impact/Embodied/Internal/Computer.php b/src/Impact/Embodied/Internal/Computer.php new file mode 100644 index 00000000..8403c4fe --- /dev/null +++ b/src/Impact/Embodied/Internal/Computer.php @@ -0,0 +1,43 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\Impact\Embodied\Internal; + +use Computer as GlpiComputer; + +/** + * This embodied impact + */ +class Computer extends AbstractAsset +{ + protected static string $itemtype = GlpiComputer::class; +} diff --git a/src/Impact/Embodied/Internal/Monitor.php b/src/Impact/Embodied/Internal/Monitor.php new file mode 100644 index 00000000..b8e48107 --- /dev/null +++ b/src/Impact/Embodied/Internal/Monitor.php @@ -0,0 +1,43 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\Impact\Embodied\Internal; + +use Monitor as GlpiMonitor; + +/** + * This embodied impact + */ +class Monitor extends AbstractAsset +{ + protected static string $itemtype = GlpiMonitor::class; +} diff --git a/src/Impact/Embodied/Internal/NetworkEquipment.php b/src/Impact/Embodied/Internal/NetworkEquipment.php new file mode 100644 index 00000000..cdcb6dfc --- /dev/null +++ b/src/Impact/Embodied/Internal/NetworkEquipment.php @@ -0,0 +1,43 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon\Impact\Embodied\Internal; + +use NetworkEquipment as GlpiNetworkEquipment; + +/** + * This embodied impact + */ +class NetworkEquipment extends AbstractAsset +{ + protected static string $itemtype = GlpiNetworkEquipment::class; +} diff --git a/src/Impact/History/AbstractAsset.php b/src/Impact/History/AbstractAsset.php index 5ecc706e..5f483a46 100644 --- a/src/Impact/History/AbstractAsset.php +++ b/src/Impact/History/AbstractAsset.php @@ -38,18 +38,16 @@ use DateTime; use DateTimeImmutable; use DateTimeInterface; -use DateTimeZone; use DBmysql; -use DbUtils; -use GlpiPlugin\Carbon\Zone; +use DBmysqlIterator; +use Exception; use GlpiPlugin\Carbon\CarbonEmission; use GlpiPlugin\Carbon\DataTracking\TrackedFloat; use GlpiPlugin\Carbon\Engine\V1\EngineInterface; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\Toolbox; -use Location as GlpiLocation; use LogicException; use Session; -use Toolbox as GlpiToolbox; abstract class AbstractAsset extends CommonDBTM implements AssetInterface { @@ -79,7 +77,7 @@ abstract class AbstractAsset extends CommonDBTM implements AssetInterface * Get request in Query builder format to find evaluable items * * @param array $crit - * @param boolean $entity_restrict + * @param bool $entity_restrict * @return array */ abstract public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true): array; @@ -91,24 +89,24 @@ public function getItemtype(): string return static::$itemtype; } - /** - * Is it possible to historize carbon emissions for the item - * @param int $id : ID of the item to examinate - * - * @return boolean - */ - public function canHistorize(int $id): bool - { - /** @var DBmysql $DB */ - global $DB; + // /** + // * Is it possible to historize carbon emissions for the item + // * @param int $id : ID of the item to examinate + // * + // * @return bool + // */ + // public function canHistorize(int $id): bool + // { + // /** @var DBmysql $DB */ + // global $DB; - $request = $this->getEvaluableQuery(); - $request['WHERE'][static::$itemtype::getTableField('id')] = $id; + // $request = $this->getEvaluableQuery(); + // $request['WHERE'][static::$itemtype::getTableField('id')] = $id; - $iterator = $DB->request($request); + // $iterator = $DB->request($request); - return $iterator->count() > 0; - } + // return $iterator->count() > 0; + // } public function setLimit(int $limit) { @@ -116,26 +114,37 @@ public function setLimit(int $limit) } /** - * Start the historization of all items + * Get an iterator of items to evaluate * - * @return int count of entries generated + * @param array $crit criterias + * @return DBmysqlIterator */ - public function evaluateItems(): int + public function getItemsToEvaluate(array $crit = []): DBmysqlIterator { /** @var DBmysql $DB */ global $DB; $itemtype = static::$itemtype; if ($itemtype === '') { - throw new \LogicException('Itemtype not set'); + throw new LogicException('Itemtype not set'); } if (!is_subclass_of($itemtype, CommonDBTM::class)) { - throw new \LogicException('Itemtype does not inherits from ' . CommonDBTM::class); + throw new LogicException('Itemtype does not inherits from ' . CommonDBTM::class); } + $iterator = $DB->request($this->getEvaluableQuery($crit, false)); - $count = 0; + return $iterator; + } - $iterator = $DB->request($this->getEvaluableQuery([], false)); + /** + * Start the historization of all items + * + * @return int count of entries generated + */ + public function evaluateItems(DBmysqlIterator $iterator): int + { + /** @var int $count count of successfully evaluated assets */ + $count = 0; foreach ($iterator as $row) { $count += $this->evaluateItem($row['id']); if ($this->limit_reached) { @@ -150,16 +159,13 @@ public function evaluateItems(): int * Historize environmental impact data of an asset * Days interval is [$start_date, $end_date[ * - * @param integer $id + * @param int $id * @param DateTime $start_date First date to compute (if not set, use the latest date found in DB) * @param DateTime $end_date Last date to compute (if not set use now - 1 day) * @return int count of generated entries */ public function evaluateItem(int $id, ?DateTime $start_date = null, ?DateTime $end_date = null): int { - /** @var DBmysql $DB */ - global $DB; - $itemtype = static::$itemtype; $item = $itemtype::getById($id); if ($item === false) { @@ -175,7 +181,7 @@ public function evaluateItem(int $id, ?DateTime $start_date = null, ?DateTime $e // Determine the last date to compute $last_available_date = $this->getStopDate($id); - $end_date = $end_date ?? $last_available_date ?? (new DateTime('now'))->sub(new DateInterval(self::$date_end_shift)); + $end_date ??= $last_available_date ?? (new DateTime('now'))->sub(new DateInterval(self::$date_end_shift)); $engine = static::getEngine($item); @@ -186,14 +192,10 @@ public function evaluateItem(int $id, ?DateTime $start_date = null, ?DateTime $e /** * Huge quantity of SQL queries will be executed * We NEED to check memory usage to avoid running out of memory - * @see DbMysql::doQuery() + * @see DBmysql::doQuery() */ - $memory_limit = GlpiToolbox::getMemoryLimit() - 8 * 1024 * 1024; - if ($memory_limit < 0) { - // May happen in test seems that ini_get("memory_limits") returns - // enpty string in PHPUnit environment - $memory_limit = null; - } + $memory_limit = Toolbox::getMemoryLimit(); + foreach ($gaps as $gap) { // $date_cursor = DateTime::createFromFormat('U', $gap['start']); // $date_cursor->setTimezone(new DateTimeZone($timezone)); @@ -203,6 +205,11 @@ public function evaluateItem(int $id, ?DateTime $start_date = null, ?DateTime $e $date_cursor = DateTime::createFromFormat('Y-m-d H:i:s', $gap['start'])->setTime(0, 0, 0, 0); $end_date = DateTime::createFromFormat('Y-m-d H:i:s', $gap['end'])->setTime(0, 0, 0, 0); while ($date_cursor < $end_date) { + if ($memory_limit && $memory_limit < memory_get_usage()) { + // 8 MB memory left, emergency exit + $this->limit_reached = true; + break 2; + } $success = $this->evaluateItemPerDay($item, $engine, $date_cursor); if ($success) { $count++; @@ -211,11 +218,6 @@ public function evaluateItem(int $id, ?DateTime $start_date = null, ?DateTime $e break 2; } } - if ($memory_limit && $memory_limit < memory_get_usage()) { - // 8 MB memory left, emergency exit - $this->limit_reached = true; - break 2; - } $date_cursor = $date_cursor->add(new DateInterval(static::$date_increment)); } } @@ -229,20 +231,24 @@ public function evaluateItem(int $id, ?DateTime $start_date = null, ?DateTime $e * @param CommonDBTM $item item to evaluate * @param EngineInterface $engine Calculation engine to use * @param DateTime $day Day to calculate - * @return boolean + * @return bool */ protected function evaluateItemPerDay(CommonDBTM $item, EngineInterface $engine, DateTimeInterface $day): bool { $energy = $engine->getEnergyPerDay($day); - $zone = new Zone(); - $zone->getByItem($item /* ,$date_cursor */); - if ($zone->isNewItem()) { + $source_zone = new Source_Zone(); + if (!$source_zone->getFromDbByItem($item)) { return false; } + // $zone = new Zone(); + + // if ($zone->getByAsset($item) === false) { + // return false; + // } $emission = new TrackedFloat(0, $energy); if ($energy->getValue() !== 0) { - $emission = $engine->getCarbonEmissionPerDay($day, $zone); + $emission = $engine->getCarbonEmissionPerDay($day, $source_zone); if ($emission === null) { return false; } @@ -273,7 +279,7 @@ protected function evaluateItemPerDay(CommonDBTM $item, EngineInterface $engine, /** * Find the date where daily computation must start * - * @param integer $id + * @param int $id * @return DateTimeImmutable|null */ protected function getStartDate(int $id): ?DateTimeImmutable @@ -285,7 +291,7 @@ protected function getStartDate(int $id): ?DateTimeImmutable /** * Find the most accurate date to determine the first use of an asset * - * @param integer $id id of the asset to examinate + * @param int $id id of the asset to examinate * @return DateTimeImmutable|null */ protected function getInventoryIncomingDate(int $id): ?DateTimeImmutable @@ -302,7 +308,7 @@ protected function getInventoryIncomingDate(int $id): ?DateTimeImmutable /** * Find the most accurate date to determine the end of use of an asset * - * @param integer $id + * @param int $id * @return DateTimeImmutable|null */ protected function getInventoryExitDate(int $id): ?DateTimeImmutable @@ -319,7 +325,7 @@ protected function getInventoryExitDate(int $id): ?DateTimeImmutable /** * Find the date where daily computation must stop * - * @param integer $id + * @param int $id * @return DateTimeImmutable|null */ protected function getStopDate(int $id): ?DateTimeImmutable @@ -330,8 +336,8 @@ protected function getStopDate(int $id): ?DateTimeImmutable /** * Ddelete all calculated usage impact for an asset * - * @param integer $items_id - * @return boolean + * @param int $items_id + * @return bool */ public function resetForItem(int $items_id): bool { @@ -343,7 +349,7 @@ public function resetForItem(int $items_id): bool CarbonEmission::getTable(), [ 'itemtype' => static::getItemtype(), - 'items_id' => $items_id + 'items_id' => $items_id, ] ); } @@ -351,14 +357,14 @@ public function resetForItem(int $items_id): bool /** * Calculate usage impact of an asset * - * @param integer $items_id - * @return boolean + * @param int $items_id + * @return bool */ public function calculateImpact(int $items_id): bool { try { $calculated = $this->evaluateItem($items_id); - } catch (\Exception $e) { + } catch (Exception $e) { trigger_error($e->getMessage(), E_USER_WARNING); Session::addMessageAfterRedirect( __('Error while calculating impact', 'carbon'), diff --git a/src/Impact/History/AssetInterface.php b/src/Impact/History/AssetInterface.php index 91d67aa3..766370f2 100644 --- a/src/Impact/History/AssetInterface.php +++ b/src/Impact/History/AssetInterface.php @@ -34,6 +34,7 @@ namespace GlpiPlugin\Carbon\Impact\History; use CommonDBTM; +use DBmysqlIterator; use GlpiPlugin\Carbon\Engine\V1\EngineInterface; interface AssetInterface @@ -42,7 +43,9 @@ public static function getEngine(CommonDBTM $item): EngineInterface; public function setLimit(int $limit); - public function evaluateItems(): int; + public function getItemsToEvaluate(array $crit = []): DBmysqlIterator; + + public function evaluateItems(DBmysqlIterator $iterator): int; public static function showHistorizableDiagnosis(CommonDBTM $item); diff --git a/src/Impact/History/Computer.php b/src/Impact/History/Computer.php index c0daf074..c0fb5160 100644 --- a/src/Impact/History/Computer.php +++ b/src/Impact/History/Computer.php @@ -34,21 +34,23 @@ namespace GlpiPlugin\Carbon\Impact\History; use CommonDBTM; -use GlpiPlugin\Carbon\Engine\V1\EngineInterface; -use GlpiPlugin\Carbon\Engine\V1\Computer as EngineComputer; use Computer as GlpiComputer; -use GlpiPlugin\Carbon\ComputerType; use ComputerModel as GlpiComputerModel; use ComputerType as GlpiComputerType; use DBmysql; use DbUtils; use Glpi\Application\View\TemplateRenderer; -use GlpiPlugin\Carbon\UsageInfo; +use GlpiPlugin\Carbon\ComputerType; use GlpiPlugin\Carbon\ComputerUsageProfile; -use GlpiPlugin\Carbon\Location as CarbonLocation; +use GlpiPlugin\Carbon\Engine\V1\Computer as EngineComputer; +use GlpiPlugin\Carbon\Engine\V1\EngineInterface; +use GlpiPlugin\Carbon\Location; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\UsageImpact; +use GlpiPlugin\Carbon\UsageInfo; +use GlpiPlugin\Carbon\Zone; use Infocom; -use Location; +use Location as GlpiLocation; class Computer extends AbstractAsset { @@ -67,7 +69,10 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true $item_model_table = self::$model_itemtype::getTable(); $glpi_computertypes_table = GlpiComputerType::getTable(); $computertypes_table = ComputerType::getTable(); + $glpi_location_table = GlpiLocation::getTable(); $location_table = Location::getTable(); + $source_zone_table = Source_Zone::getTable(); + $zone_table = Zone::getTable(); $usage_table = UsageInfo::getTable(); $computerUsageProfile_table = ComputerUsageProfile::getTable(); $infocom_table = Infocom::getTable(); @@ -78,11 +83,32 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true ], 'FROM' => $item_table, 'INNER JOIN' => [ - $location_table => [ + // TODO: remove this useless join + // Could be optimized by joining the asset and plugin's location + // with locations_id FK on both sides + $glpi_location_table => [ 'FKEY' => [ $item_table => 'locations_id', - $location_table => 'id', - ] + $glpi_location_table => 'id', + ], + ], + $location_table => [ + 'FKEY' => [ + $location_table => 'locations_id', + $glpi_location_table => 'id', + ], + ], + $source_zone_table => [ + 'FKEY' => [ + $location_table => 'plugin_carbon_sources_zones_id', + $source_zone_table => 'id', + ], + ], + $zone_table => [ + 'FKEY' => [ + $source_zone_table => 'plugin_carbon_zones_id', + $zone_table => 'id', + ], ], $usage_table => [ 'FKEY' => [ @@ -91,15 +117,15 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true [ 'AND' => [ UsageInfo::getTableField('itemtype') => GlpiComputer::class, - ] - ] - ] + ], + ], + ], ], $computerUsageProfile_table => [ 'FKEY' => [ $usage_table => 'plugin_carbon_computerusageprofiles_id', $computerUsageProfile_table => 'id', - ] + ], ], ], 'LEFT JOIN' => [ @@ -107,13 +133,13 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true 'FKEY' => [ $item_table => 'computermodels_id', $item_model_table => 'id', - ] + ], ], $glpi_computertypes_table => [ 'FKEY' => [ $item_table => 'computertypes_id', $glpi_computertypes_table => 'id', - ] + ], ], $computertypes_table => [ 'FKEY' => [ @@ -122,33 +148,26 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true [ 'AND' => [ 'NOT' => [GlpiComputerType::getTableField('id') => null], - ] - ] - ] + ], + ], + ], ], $infocom_table => [ 'FKEY' => [ $infocom_table => 'items_id', $item_table => 'id', ['AND' => [Infocom::getTableField('itemtype') => self::$itemtype]], - ] + ], ], ], 'WHERE' => [ 'AND' => [ self::$itemtype::getTableField('is_deleted') => 0, self::$itemtype::getTableField('is_template') => 0, - [ - 'OR' => [ - [ - ['NOT' => [Location::getTableField('country') => '']], - ['NOT' => [Location::getTableField('country') => null]], - ], - [ - ['NOT' => [Location::getTableField('state') => '']], - ['NOT' => [Location::getTableField('state') => null]], - ] - ] + Location::getTableField('plugin_carbon_sources_zones_id') => ['>', 0], + 'OR' => [ + [ComputerType::getTableField('is_ignore') => 0], + [ComputerType::getTableField('is_ignore') => null], ], [ 'OR' => [ @@ -160,12 +179,12 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true ['NOT' => [Infocom::getTableField('use_date') => null]], ['NOT' => [Infocom::getTableField('delivery_date') => null]], ['NOT' => [Infocom::getTableField('buy_date') => null]], - ['NOT' => [Infocom::getTableField('date_creation') => null]], - // ['NOT' => [Infocom::getTableField('date_mod') => null]], - ] - ] + ['NOT' => [self::$itemtype::getTableField('date_creation') => null]], + // ['NOT' => [self::$itemtype::getTableField('date_mod') => null]], + ], + ], ], - ] + $crit + ] + $crit, ]; if ($entity_restrict) { @@ -187,19 +206,20 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array $request['SELECT'] = [ self::$itemtype::getTableField('is_deleted'), self::$itemtype::getTableField('is_template'), - Location::getTableField('id as location_id'), - Location::getTableField('state'), - Location::getTableField('country'), + GlpiLocation::getTableField('id as locations_id'), + Zone::getTableField('id as plugin_carbon_zones_id'), GlpiComputerModel::getTableField('id as model_id'), GlpiComputerModel::getTableField('power_consumption as model_power_consumption'), GlpiComputerType::getTableField('id as type_id'), ComputerType::getTableField('id as plugin_carbon_type_id'), ComputerType::getTableField('power_consumption as type_power_consumption'), ComputerType::getTableField('category'), - UsageInfo::getTableField('plugin_carbon_computerusageprofiles_id'), + ComputerType::getTableField('is_ignore'), + ComputerUsageProfile::getTableField('id as plugin_carbon_computerusageprofiles_id'), Infocom::getTableField('use_date'), Infocom::getTableField('delivery_date'), Infocom::getTableField('buy_date'), + Infocom::getTableField('decommission_date'), self::$itemtype::getTableField('date_creation'), self::$itemtype::getTableField('date_mod'), ]; @@ -217,18 +237,20 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array return null; } - $glpi_location = new Location(); - $glpi_location->getFromDB($item->fields['locations_id']); - $location = new CarbonLocation(); + $glpi_location = new GlpiLocation(); + $glpi_location->getFromDB($data['locations_id']); + $location = new Location(); $is_carbon_intensity_download_enabled = $location->isCarbonIntensityDownloadEnabled($glpi_location); $is_carbon_intensity_fallback_available = $location->hasFallbackCarbonIntensityData($glpi_location); // Each state is analyzed, with bool results // false means that data is missing or invalid for historization + // TODO : rename is_deleted, is_template into is_not_deleted is_not_template $status['is_deleted'] = ($data['is_deleted'] === 0); $status['is_template'] = ($data['is_template'] === 0); - $status['has_location'] = !Location::isNewID($data['location_id']); - $status['has_state_or_country'] = (strlen($data['state'] ?? '') > 0) || (strlen($data['country'] ?? '') > 0); + $status['has_location'] = !GlpiLocation::isNewID($data['locations_id']); + // $status['has_state_or_country'] = (strlen($data['state'] ?? '') > 0) || (strlen($data['country'] ?? '') > 0); + $status['has_carbon_intensity_zone'] = (($data['plugin_carbon_zones_id'] ?? 0) !== 0); $status['has_model'] = !GlpiComputerModel::isNewID($data['model_id']); $status['has_model_power_consumption'] = (($data['model_power_consumption'] ?? 0) !== 0); $status['has_type'] = !GlpiComputerType::isNewID($data['type_id']); @@ -237,14 +259,16 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array $status['has_category'] = (($data['category'] ?? 0) !== ComputerType::CATEGORY_UNDEFINED); $status['ci_download_enabled'] = $is_carbon_intensity_download_enabled; $status['ci_fallback_available'] = $is_carbon_intensity_fallback_available; + $status['not_is_ignore'] = (($data['is_ignore'] ?? 0) === 0); - $item_oldest_date = $data['use_date'] + $item_oldest_date = $data['buy_date'] ?? $data['delivery_date'] - ?? $data['buy_date'] + ?? $data['use_date'] // ?? $data['date_creation'] // ?? $data['date_mod'] ?? null; $status['has_inventory_entry_date'] = ($item_oldest_date !== null); + $status['has_decommission_date'] = ($data['decommission_date'] !== null); return $status; } diff --git a/src/Impact/History/Monitor.php b/src/Impact/History/Monitor.php index d42f886e..38ca19b0 100644 --- a/src/Impact/History/Monitor.php +++ b/src/Impact/History/Monitor.php @@ -37,23 +37,22 @@ use Computer as GlpiComputer; use ComputerModel as GlpiComputerModel; use ComputerType as GlpiComputerType; -use Glpi\Asset\Asset_PeripheralAsset; use DBmysql; use DbUtils; use Glpi\Application\View\TemplateRenderer; +use Glpi\Asset\Asset_PeripheralAsset; use GlpiPlugin\Carbon\ComputerType; use GlpiPlugin\Carbon\ComputerUsageProfile; use GlpiPlugin\Carbon\Engine\V1\EngineInterface; use GlpiPlugin\Carbon\Engine\V1\Monitor as EngineMonitor; -use GlpiPlugin\Carbon\Location as CarbonLocation; +use GlpiPlugin\Carbon\Location; use GlpiPlugin\Carbon\MonitorType; use GlpiPlugin\Carbon\UsageImpact; -use GlpiPlugin\Carbon\UsageInfo; use Infocom; -use Location; +use Location as GlpiLocation; use Monitor as GlpiMonitor; -use MonitorType as GlpiMonitorType; use MonitorModel as GlpiMonitorModel; +use MonitorType as GlpiMonitorType; class Monitor extends AbstractAsset { @@ -73,7 +72,7 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true $item_table = self::$itemtype::getTable(); $item_model_table = self::$model_itemtype::getTable(); $computers_table = GlpiComputer::getTable(); - $computers_items_table = Asset_PeripheralAsset::getTable(); + $assets_items_table = Asset_PeripheralAsset::getTable(); $computer_model_table = GlpiComputerModel::getTable(); $glpi_monitor_types_table = GlpiMonitorType::getTable(); $glpi_monitor_types_fk = GlpiMonitorType::getForeignKeyField(); @@ -94,22 +93,23 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true // Add joins to reach monitor from computer $request['FROM'] = $item_table; - $request['LEFT JOIN'][$computers_items_table] = [ + $request['LEFT JOIN'][$assets_items_table] = [ 'FKEY' => [ - $computers_items_table => 'items_id_peripheral', + $assets_items_table => 'items_id_peripheral', $item_table => 'id', - ['AND' => [ - Asset_PeripheralAsset::getTableField('itemtype_peripheral') => self::$itemtype, - Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class, - ] + [ + 'AND' => [ + Asset_PeripheralAsset::getTableField('itemtype_peripheral') => self::$itemtype, + Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class, + ], ], - ] + ], ]; $request['INNER JOIN'][$computers_table] = [ 'FKEY' => [ $computers_table => 'id', - $computers_items_table => 'items_id_asset', - ['AND' => [Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class]] + $assets_items_table => 'items_id_asset', + ['AND' => [Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class]], ], ]; $request['LEFT JOIN'][$glpi_monitor_types_table] = [ @@ -135,7 +135,7 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true $infocom_table => 'items_id', $item_table => 'id', ['AND' => [Infocom::getTableField('itemtype') => self::$itemtype]], - ] + ], ]; // re-add inner joins of computer, after those for monitor @@ -153,23 +153,24 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true self::$itemtype::getTableField('is_template') => 0, // Check the monitor is located the same place as the attached computer // self::$itemtype::getTableField('locations_id') => new QueryExpression(DBmysql::quoteName(GlpiComputer::getTableField('locations_id'))), - [ - 'OR' => [ - [ - ['NOT' => [Location::getTableField('country') => '']], - ['NOT' => [Location::getTableField('country') => null]], - ], - [ - ['NOT' => [Location::getTableField('state') => '']], - ['NOT' => [Location::getTableField('state') => null]], - ] - ] + Location::getTableField('plugin_carbon_sources_zones_id') => ['>', 0], + 'OR' => [ + [MonitorType::getTableField('is_ignore') => 0], + [MonitorType::getTableField('is_ignore') => null], ], [ 'OR' => [ MonitorType::getTableField('power_consumption') => ['>', 0], self::$model_itemtype::getTableField('power_consumption') => ['>', 0], ], + // ], [ + // 'OR' => [ + // ['NOT' => [Infocom::getTableField('use_date') => null]], + // ['NOT' => [Infocom::getTableField('delivery_date') => null]], + // ['NOT' => [Infocom::getTableField('buy_date') => null]], + // ['NOT' => [self::$itemtype::getTableField('date_creation') => null]], + // // ['NOT' => [self::$itemtype::getTableField('date_mod') => null]], + // ], ], ], ] + $crit; @@ -194,18 +195,20 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array self::$itemtype::getTableField('is_deleted'), self::$itemtype::getTableField('is_template'), Asset_PeripheralAsset::getTableField('items_id_asset'), - UsageInfo::getTableField('plugin_carbon_computerusageprofiles_id'), - Location::getTableField('id as location_id'), - Location::getTableField('state'), - Location::getTableField('country'), + ComputerUsageProfile::getTableField('id as plugin_carbon_computerusageprofiles_id'), + GlpiLocation::getTableField('id as locations_id'), + Location::getTableField('plugin_carbon_sources_zones_id'), GlpiMonitorModel::getTableField('id as model_id'), GlpiMonitorModel::getTableField('power_consumption as model_power_consumption'), GlpiMonitorType::getTableField('id as type_id'), MonitorType::getTableField('id as plugin_carbon_type_id'), MonitorType::getTableField('power_consumption as type_power_consumption'), + MonitorType::getTableField('is_ignore'), Infocom::getTableField('use_date'), Infocom::getTableField('delivery_date'), Infocom::getTableField('buy_date'), + Infocom::getTableField('decommission_date'), + self::$itemtype::getTableField('date_creation'), ]; // Change inner joins into left joins to identify missing data // Warning : the order of the array merge below is important or the resulting SQL query will fail @@ -222,9 +225,9 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array return null; } - $glpi_location = new Location(); - $glpi_location->getFromDB($item->fields['locations_id']); - $location = new CarbonLocation(); + $glpi_location = new GlpiLocation(); + $glpi_location->getFromDB($data['locations_id']); + $location = new Location(); $is_carbon_intensity_download_enabled = $location->isCarbonIntensityDownloadEnabled($glpi_location); $is_carbon_intensity_fallback_available = $location->hasFallbackCarbonIntensityData($glpi_location); @@ -234,22 +237,26 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array $status['is_template'] = ($data['is_template'] === 0); // Actually the result is whether it is "not template" $status['has_computer'] = !GlpiComputer::isNewID($data['items_id_asset']); $status['has_usage_profile'] = !ComputerUsageProfile::isNewID($data['plugin_carbon_computerusageprofiles_id']); - $status['has_location'] = !Location::isNewID($data['location_id']); - $status['has_state_or_country'] = (strlen($data['state'] ?? '') > 0) || (strlen($data['country'] ?? '') > 0); + $status['has_location'] = !GlpiLocation::isNewID($data['locations_id']); + // $status['has_state_or_country'] = (strlen($data['state'] ?? '') > 0) || (strlen($data['country'] ?? '') > 0); + $status['has_carbon_intensity_zone'] = (($data['plugin_carbon_sources_zones_id'] ?? 0) !== 0); $status['has_model'] = !GlpiMonitorModel::isNewID($data['model_id']); $status['has_model_power_consumption'] = !GlpiMonitorType::isNewID($data['model_power_consumption']); $status['has_type'] = !GlpiMonitorType::isNewID($data['type_id']); $status['has_type_power_consumption'] = (($data['type_power_consumption'] ?? 0) !== 0); $status['ci_download_enabled'] = $is_carbon_intensity_download_enabled; $status['ci_fallback_available'] = $is_carbon_intensity_fallback_available; + $status['not_is_ignore'] = (($data['is_ignore'] ?? 0) === 0); - $item_oldest_date = $data['use_date'] - ?? $data['delivery_date'] + $item_oldest_date = $data['date_creation'] ?? $data['buy_date'] - ?? $data['date_creation'] + ?? $data['delivery_date'] + ?? $data['use_date'] + // ?? $data['date_creation'] // ?? $data['date_mod'] ?? null; $status['has_inventory_entry_date'] = ($item_oldest_date !== null); + $status['has_decommission_date'] = ($data['decommission_date'] !== null); return $status; } diff --git a/src/Impact/History/NetworkEquipment.php b/src/Impact/History/NetworkEquipment.php index ddf5f7ae..b7a9da29 100644 --- a/src/Impact/History/NetworkEquipment.php +++ b/src/Impact/History/NetworkEquipment.php @@ -37,16 +37,18 @@ use DBmysql; use DbUtils; use Glpi\Application\View\TemplateRenderer; -use Infocom; -use Location; -use NetworkEquipment as GlpiNetworkEquipment; -use NetworkEquipmentType as GlpiNetworkEquipmentType; -use NetworkEquipmentModel as GlpiNetworkEquipmentModel; use GlpiPlugin\Carbon\Engine\V1\EngineInterface; use GlpiPlugin\Carbon\Engine\V1\NetworkEquipment as EngineNetworkEquipment; -use GlpiPlugin\Carbon\Location as CarbonLocation; +use GlpiPlugin\Carbon\Location; use GlpiPlugin\Carbon\NetworkEquipmentType; +use GlpiPlugin\Carbon\Source_Zone; use GlpiPlugin\Carbon\UsageImpact; +use GlpiPlugin\Carbon\Zone; +use Infocom; +use Location as GlpiLocation; +use NetworkEquipment as GlpiNetworkEquipment; +use NetworkEquipmentModel as GlpiNetworkEquipmentModel; +use NetworkEquipmentType as GlpiNetworkEquipmentType; class NetworkEquipment extends AbstractAsset { @@ -65,6 +67,10 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true $item_model_table = self::$model_itemtype::getTable(); $item_glpitype_table = self::$type_itemtype::getTable(); $item_type_table = NetworkEquipmentType::getTable(); + $glpi_location_table = GlpiLocation::getTable(); + $location_table = Location::getTable(); + $source_zone_table = Source_Zone::getTable(); + $zone_table = Zone::getTable(); $location_table = Location::getTable(); $infocom_table = Infocom::getTable(); @@ -76,19 +82,37 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true 'FKEY' => [ $item_table => 'networkequipmentmodels_id', $item_model_table => 'id', - ] + ], ], - $location_table => [ + $glpi_location_table => [ 'FKEY' => [ $item_table => 'locations_id', - $location_table => 'id', - ] + $glpi_location_table => 'id', + ], + ], + $location_table => [ + 'FKEY' => [ + $location_table => 'locations_id', + $glpi_location_table => 'id', + ], + ], + $source_zone_table => [ + 'FKEY' => [ + $location_table => 'plugin_carbon_sources_zones_id', + $source_zone_table => 'id', + ], + ], + $zone_table => [ + 'FKEY' => [ + $source_zone_table => 'plugin_carbon_zones_id', + $zone_table => 'id', + ], ], $item_glpitype_table => [ 'FKEY' => [ $item_table => 'networkequipmenttypes_id', $item_glpitype_table => 'id', - ] + ], ], ], 'LEFT JOIN' => [ @@ -99,32 +123,25 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true [ 'AND' => [ 'NOT' => [GlpiNetworkEquipmentType::getTableField('id') => null], - ] - ] - ] + ], + ], + ], ], $infocom_table => [ 'FKEY' => [ $infocom_table => 'items_id', $item_table => 'id', - ['AND' => ['itemtype' => self::$itemtype]], - ] + ['AND' => [Infocom::getTableField('itemtype') => self::$itemtype]], + ], ], ], 'WHERE' => [ self::$itemtype::getTableField('is_deleted') => 0, self::$itemtype::getTableField('is_template') => 0, - [ - 'OR' => [ - [ - ['NOT' => [Location::getTableField('country') => '']], - ['NOT' => [Location::getTableField('country') => null]], - ], - [ - ['NOT' => [Location::getTableField('state') => '']], - ['NOT' => [Location::getTableField('state') => null]], - ] - ] + Location::getTableField('plugin_carbon_sources_zones_id') => ['>', 0], + 'OR' => [ + [NetworkEquipmentType::getTableField('is_ignore') => 0], + [NetworkEquipmentType::getTableField('is_ignore') => null], ], [ 'OR' => [ @@ -137,11 +154,11 @@ public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true ['NOT' => [Infocom::getTableField('use_date') => null]], ['NOT' => [Infocom::getTableField('delivery_date') => null]], ['NOT' => [Infocom::getTableField('buy_date') => null]], - ['NOT' => [Infocom::getTableField('date_creation') => null]], - // ['NOT' => [Infocom::getTableField('date_mod') => null]], - ] - ] - ] + $crit + ['NOT' => [self::$itemtype::getTableField('date_creation') => null]], + // ['NOT' => [self::$itemtype::getTableField('date_mod') => null]], + ], + ], + ] + $crit, ]; if ($entity_restrict) { @@ -164,29 +181,21 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array $request['SELECT'] = [ self::$itemtype::getTableField('is_deleted'), self::$itemtype::getTableField('is_template'), - Location::getTableField('id as location_id'), - Location::getTableField('state'), - Location::getTableField('country'), + GlpiLocation::getTableField('id as location_id'), + Location::getTableField('plugin_carbon_sources_zones_id'), GlpiNetworkEquipmentModel::getTableField('id as model_id'), GlpiNetworkEquipmentModel::getTableField('power_consumption as model_power_consumption'), GlpiNetworkEquipmentType::getTableField('id as type_id'), NetworkEquipmentType::getTableField('id as plugin_carbon_type_id'), NetworkEquipmentType::getTableField('power_consumption as type_power_consumption'), + NetworkEquipmentType::getTableField('is_ignore'), Infocom::getTableField('use_date'), Infocom::getTableField('delivery_date'), Infocom::getTableField('buy_date'), + Infocom::getTableField('decommission_date'), self::$itemtype::getTableField('date_creation'), self::$itemtype::getTableField('date_mod'), ]; - $infocom_table = Infocom::getTable(); - $item_table = self::$itemtype::getTable(); - $request['LEFT JOIN'][$infocom_table] = [ - 'FKEY' => [ - $infocom_table => 'items_id', - $item_table => 'id', - ['AND' => [Infocom::getTableField('itemtype') => self::$itemtype]], - ] - ]; // Change inner joins into left joins to identify missing data $request['LEFT JOIN'] = $request['INNER JOIN'] + $request['LEFT JOIN']; unset($request['INNER JOIN']); @@ -201,9 +210,9 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array return null; } - $glpi_location = new Location(); + $glpi_location = new GlpiLocation(); $glpi_location->getFromDB($item->fields['locations_id']); - $location = new CarbonLocation(); + $location = new Location(); $is_carbon_intensity_download_enabled = $location->isCarbonIntensityDownloadEnabled($glpi_location); $is_carbon_intensity_fallback_available = $location->hasFallbackCarbonIntensityData($glpi_location); @@ -211,22 +220,25 @@ public static function getHistorizableDiagnosis(CommonDBTM $item): ?array // false means that data is missing or invalid for historization $status['is_deleted'] = ($data['is_deleted'] === 0); $status['is_template'] = ($data['is_template'] === 0); - $status['has_location'] = !Location::isNewId($data['location_id']); - $status['has_state_or_country'] = (strlen($data['state'] ?? '') > 0) || (strlen($data['country'] ?? '') > 0); + $status['has_location'] = !GlpiLocation::isNewId($data['location_id']); + // $status['has_state_or_country'] = (strlen($data['state'] ?? '') > 0) || (strlen($data['country'] ?? '') > 0); + $status['has_carbon_intensity_zone'] = (($data['plugin_carbon_sources_zones_id'] ?? 0) !== 0); $status['has_model'] = !GlpiNetworkEquipmentModel::isNewId($data['model_id']); $status['has_model_power_consumption'] = (($data['model_power_consumption'] ?? 0) !== 0); $status['has_type'] = !GlpiNetworkEquipmentType::isNewId($data['type_id']); $status['has_type_power_consumption'] = (($data['type_power_consumption'] ?? 0) !== 0); $status['ci_download_enabled'] = $is_carbon_intensity_download_enabled; $status['ci_fallback_available'] = $is_carbon_intensity_fallback_available; + $status['not_is_ignore'] = (($data['is_ignore'] ?? 0) === 0); - $item_oldest_date = $data['use_date'] + $item_oldest_date = $data['buy_date'] ?? $data['delivery_date'] - ?? $data['buy_date'] + ?? $data['use_date'] // ?? $data['date_creation'] // ?? $data['date_mod'] ?? null; $status['has_inventory_entry_date'] = ($item_oldest_date !== null); + $status['has_decommission_date'] = ($data['decommission_date'] !== null); return $status; } diff --git a/src/Impact/Type.php b/src/Impact/Type.php index e2de07a6..3d6b6092 100644 --- a/src/Impact/Type.php +++ b/src/Impact/Type.php @@ -35,16 +35,370 @@ class Type { - const IMPACT_GWP = 0; // Global warming potential - const IMPACT_ADP = 1; // Abiotic Depletion Potential - const IMPACT_PE = 2; // Primary Energy + private const BASE_URL = 'https://glpi-plugins.readthedocs.io/%s/latest/carbon'; + public const IMPACT_GWP = 0; // Global warming potential + public const IMPACT_ADP = 1; // Abiotic Depletion Potential + public const IMPACT_PE = 2; // Primary Energy + public const IMPACT_GWPPB = 3; + public const IMPACT_GWPPF = 4; + public const IMPACT_GWPPLU = 5; + public const IMPACT_IR = 6; + public const IMPACT_LU = 7; + public const IMPACT_ODP = 8; + public const IMPACT_PM = 9; + public const IMPACT_POCP = 10; + public const IMPACT_WU = 11; + public const IMPACT_MIPS = 12; + public const IMPACT_ADPE = 13; + public const IMPACT_ADPF = 14; + public const IMPACT_AP = 15; + public const IMPACT_CTUE = 16; + // const IMPACT_CTUHC = 17; + // const IMPACT_CTUHNC = 18; + public const IMPACT_EPF = 19; + public const IMPACT_EPM = 20; + public const IMPACT_EPT = 21; + + private static array $impact_types = [ + self::IMPACT_GWP => 'gwp', + self::IMPACT_ADP => 'adp', + self::IMPACT_PE => 'pe', + self::IMPACT_GWPPB => 'gwppb', + self::IMPACT_GWPPF => 'gwppf', + self::IMPACT_GWPPLU => 'gwpplu', + self::IMPACT_IR => 'ir', + self::IMPACT_LU => 'lu', + self::IMPACT_ODP => 'odp', + self::IMPACT_PM => 'pm', + self::IMPACT_POCP => 'pocp', + self::IMPACT_WU => 'wu', + self::IMPACT_MIPS => 'mips', + self::IMPACT_ADPE => 'adpe', + self::IMPACT_ADPF => 'adpf', + self::IMPACT_AP => 'ap', + self::IMPACT_CTUE => 'ctue', + // self::IMPACT_CTUHC => 'ctuh_c', + // self::IMPACT_CTUHNC => 'ctuh_nc', + self::IMPACT_EPF => 'epf', + self::IMPACT_EPM => 'epm', + self::IMPACT_EPT => 'ept', + ]; + + /** + * Unit of impact criterias + * + * @var array + */ + private static array $impact_units = [ + 'gwp' => ['g', 'CO₂ eq'], + 'adp' => ['g', 'SB eq'], + 'pe' => ['J', ''], + 'gwppb' => ['g', 'CO₂ eq'], + 'gwppf' => ['g', 'CO₂ eq'], + 'gwpplu' => ['g', 'CO₂ eq'], + 'ir' => ['g', 'U235 eq'], + 'lu' => null, + 'odp' => ['g', 'CFC-11 eq'], + 'pm' => null, + 'pocp' => ['g', 'NMVOC eq'], + 'wu' => ['m³', ''], + 'mips' => ['g', ''], + 'adpe' => ['g', 'SB eq'], + 'adpf' => ['J', ''], + 'ap' => ['mol', 'H+ eq'], + 'ctue' => null, + // 'ctuh_c' => [null, 'CTUh'], + // 'ctuh_nc' => [null, 'CTUh'], + 'epf' => ['g', 'P eq'], + 'epm' => ['g', 'N eq'], + 'ept' => ['mol', 'N eq'], + ]; + + /** + * get an array of impact types + * + * @return array + */ public static function getImpactTypes(): array { - return [ - self::IMPACT_GWP => 'gwp', - self::IMPACT_ADP => 'adp', - self::IMPACT_PE => 'pe', - ]; + return self::$impact_types; + } + + /** + * get the ID of an impact type acronym + * + * @param string $type + * @return int|string|false + **/ + public static function getImpactId(string $type) + { + return array_search($type, self::$impact_types); + } + + /** + * Get the unit of an impact type + * + * @param string $type impact type name + * @return array + **/ + public static function getImpactUnit(string $type): array + { + return self::$impact_units[$type] ?? ['', '']; + } + + /** + * Get the unit of an impact type + * + * @param string $type impact type name + * @return string + **/ + public static function getEmbodiedImpactLabel(string $type): string + { + $label = match ($type) { + 'gwp' => __('Embodied Global warming potential', 'carbon'), + 'adp' => __('Embodied Abiotic depletion potential', 'carbon'), + 'pe' => __('Embodied Primary energy consumed', 'carbon'), + 'gwppb' => __('Embodied Climate change - Contribution of biogenic emissions', 'carbon'), + 'gwppf' => __('Embodied Climate change - Contribution of fossil fuel emissions', 'carbon'), + 'gwpplu' => __('Embodied Climate change - Contribution of emissions from land use change', 'carbon'), + 'ir' => __('Embodied Emissions of radionizing substances', 'carbon'), + 'lu' => __('Embodied Land use', 'carbon'), + 'odp' => __('Embodied Depletion of the ozone layer', 'carbon'), + 'pm' => __('Embodied Fine particle emissions', 'carbon'), + 'pocp' => __('Embodied Photochemical ozone formation', 'carbon'), + 'wu' => __('Embodied Use of water resources', 'carbon'), + 'mips' => __('Embodied Material input per unit of service', 'carbon'), + 'adpe' => __('Embodied Use of mineral and metal resources', 'carbon'), + 'adpf' => __('Embodied Use of fossil resources (including nuclear)', 'carbon'), + 'ap' => __('Embodied Acidification', 'carbon'), + 'ctue' => __('Embodied Freshwater ecotoxicity', 'carbon'), + // 'ctuh_c' => __('Embodied Human Toxicity - Carcinogenic Effects', 'carbon'), + // 'ctuh_nc' => __('Embodied Human toxicity - non-carcinogenic effects', 'carbon'), + 'epf' => __('Embodied Eutrophication of freshwater', 'carbon'), + 'epm' => __('Embodied Eutrophication of marine waters', 'carbon'), + 'ept' => __('Embodied Terrestrial eutrophication', 'carbon'), + default => '', + }; + return $label; + } + + /** + * Get the unit of an impact type + * + * @param string $type impact type name + * @return string + **/ + public static function getUsageImpactLabel(string $type): string + { + $label = match ($type) { + 'gwp' => __('Usage Global warming potential', 'carbon'), + 'adp' => __('Usage Abiotic depletion potential', 'carbon'), + 'pe' => __('Usage Primary energy consumed', 'carbon'), + 'gwppb' => __('Usage Climate change - Contribution of biogenic emissions', 'carbon'), + 'gwppf' => __('Usage Climate change - Contribution of fossil fuel emissions', 'carbon'), + 'gwpplu' => __('Usage Climate change - Contribution of emissions from land use change', 'carbon'), + 'ir' => __('Usage Emissions of radionizing substances', 'carbon'), + 'lu' => __('Usage Land use', 'carbon'), + 'odp' => __('Usage Depletion of the ozone layer', 'carbon'), + 'pm' => __('Usage Fine particle emissions', 'carbon'), + 'pocp' => __('Usage Photochemical ozone formation', 'carbon'), + 'wu' => __('Usage Use of water resources', 'carbon'), + 'mips' => __('Usage Material input per unit of service', 'carbon'), + 'adpe' => __('Usage Use of mineral and metal resources', 'carbon'), + 'adpf' => __('Usage Use of fossil resources (including nuclear)', 'carbon'), + 'ap' => __('Usage Acidification', 'carbon'), + 'ctue' => __('Usage Freshwater ecotoxicity', 'carbon'), + // 'ctuh_c' => __('Usage Human Toxicity - Carcinogenic Effects', 'carbon'), + // 'ctuh_nc' => __('Usage Human toxicity - non-carcinogenic effects', 'carbon'), + 'epf' => __('Usage Eutrophication of freshwater', 'carbon'), + 'epm' => __('Usage Eutrophication of marine waters', 'carbon'), + 'ept' => __('Usage Terrestrial eutrophication', 'carbon'), + default => '' + }; + return $label; + } + + /** + * Get the unit of an impact type + * + * @param string $type impact type name + * @return string + **/ + public static function getEmbodiedAndUsageImpactLabel(string $type): string + { + $label = match ($type) { + 'gwp' => __('Total Global warming potential', 'carbon'), + 'adp' => __('Total Abiotic depletion potential', 'carbon'), + 'pe' => __('Total Primary energy consumed', 'carbon'), + 'gwppb' => __('Total Climate change - Contribution of biogenic emissions', 'carbon'), + 'gwppf' => __('Total Climate change - Contribution of fossil fuel emissions', 'carbon'), + 'gwpplu' => __('Total Climate change - Contribution of emissions from land use change', 'carbon'), + 'ir' => __('Total Emissions of radionizing substances', 'carbon'), + 'lu' => __('Total Land use', 'carbon'), + 'odp' => __('Total Depletion of the ozone layer', 'carbon'), + 'pm' => __('Total Fine particle emissions', 'carbon'), + 'pocp' => __('Total Photochemical ozone formation', 'carbon'), + 'wu' => __('Total Use of water resources', 'carbon'), + 'mips' => __('Total Material input per unit of service', 'carbon'), + 'adpe' => __('Total Use of mineral and metal resources', 'carbon'), + 'adpf' => __('Total Use of fossil resources (including nuclear)', 'carbon'), + 'ap' => __('Total Acidification', 'carbon'), + 'ctue' => __('Total Freshwater ecotoxicity', 'carbon'), + // 'ctuh_c' => __('Total Human Toxicity - Carcinogenic Effects', 'carbon'), + // 'ctuh_nc' => __('Total Human toxicity - non-carcinogenic effects', 'carbon'), + 'epf' => __('Total Eutrophication of freshwater', 'carbon'), + 'epm' => __('Total Eutrophication of marine waters', 'carbon'), + 'ept' => __('Total Terrestrial eutrophication', 'carbon'), + default => '', + }; + return $label; + } + + public static function getCriteriaIcon(string $type): string + { + return match ($type) { + // Global Warming Potential + 'gwp', 'gwppb', 'gwppf', 'gwpplu' + => 'fa-solid fa-temperature-high', + + // Abiotic depletion (minerals / fossil) + 'adp', 'adpe' + => 'fa-solid fa-gem', + 'adpf' + => 'fa-solid fa-oil-can', + + // Primary energy + 'pe' + => 'fa-solid fa-bolt', + + // Ionising radiation + 'ir' + => 'fa-solid fa-radiation', + + // Land use + 'lu' + => 'fa-solid fa-tree', + + // Ozone depletion + 'odp' + => 'fa-solid fa-cloud', + + // Particulate matter + 'pm' + => 'fa-solid fa-smog', + + // Photochemical ozone creation + 'pocp' + => 'fa-solid fa-sun', + + // Water use + 'wu' + => 'fa-solid fa-droplet', + + // Material input per service unit + 'mips' + => 'fa-solid fa-boxes-stacked', + + // Acidification + 'ap' + => 'fa-solid fa-flask', + + // Ecotoxicity (freshwater, marine, terrestrial) + 'epf', 'epm', 'ept' + => 'fa-solid fa-fish', + + // Human toxicity / ecotoxicity + 'ctue', 'ctuh_c', 'ctuh_nc' + => 'fa-solid fa-skull-crossbones', + + default + => '', // or 'fa-solid fa-circle-question', + }; + } + + public static function getCriteriaTooltip(string $type): string + { + return match ($type) { + 'gwp' => __('Carbon emission in CO₂ equivalent', 'carbon'), + 'adp' => __('Consumption of non renewable resources in Antimony equivalent.', 'carbon'), + 'pe' => __('Primary energy consumed.', 'carbon'), + 'gwppb' => __('', 'carbon'), + 'gwppf' => __('', 'carbon'), + 'gwpplu' => __('', 'carbon'), + 'ir' => __('', 'carbon'), + 'lu' => __('', 'carbon'), + 'odp' => __('', 'carbon'), + 'pm' => __('Incidence of disease', 'carbon'), + 'pocp' => __('', 'carbon'), + 'wu' => __('', 'carbon'), + 'mips' => __('', 'carbon'), + 'adpe' => __('', 'carbon'), + 'adpf' => __('', 'carbon'), + 'ap' => __('', 'carbon'), + 'ctue' => __('', 'carbon'), + // 'ctuh_c' => __('', 'carbon'), + // 'ctuh_nc' => __('', 'carbon'), + 'epf' => __('Usage Eutrophication of freshwater', 'carbon'), + 'epm' => __('Usage Eutrophication of marine waters', 'carbon'), + 'ept' => __('Usage Terrestrial eutrophication', 'carbon'), + default => '' + }; + } + + public static function getCriteriaPictogram(string $type): string + { + $pictogram_file = match ($type) { + 'gwp' => 'icon-carbon-emission.svg', + 'adp' => 'icon-fossil-primary-energy.svg', + 'pe' => 'icon-pickaxe.svg', + 'gwppb' => '', + 'gwppf' => '', + 'gwpplu' => '', + 'ir' => '', + 'lu' => '', + 'odp' => '', + 'pm' => '', + 'pocp' => '', + 'wu' => '', + 'mips' => '', + 'adpe' => '', + 'adpf' => '', + 'ap' => '', + 'ctue' => '', + // 'ctuh_c' => '', + // 'ctuh_nc' => '', + 'epf' => '', + 'epm' => '', + 'ept' => '', + default => '' + }; + return $pictogram_file; + } + + /** + * Get external URL to a detailed description of the given path + * + * @param string $impact_type + * @return string + */ + public static function getCriteriaInfoLink(string $impact_type): string + { + // $lang = substr($_SESSION['glpilanguage'], 0, 2); + $lang = 'en'; + $base_url = sprintf( + self::BASE_URL, + $lang + ); + switch ($impact_type) { + case 'gwp': + return "$base_url/types_of_impact.html#carbon-dioxyde-equivalent"; + case 'adp': + return "$base_url/types_of_impact.html#antimony-equivalent"; + case 'pe': + return "$base_url/carbon/types_of_impact.html#primary-energy"; + } + + return ''; } } diff --git a/src/Impact/Usage/AbstractUsageImpact.php b/src/Impact/Usage/AbstractUsageImpact.php index 0a978501..d9cabbe7 100644 --- a/src/Impact/Usage/AbstractUsageImpact.php +++ b/src/Impact/Usage/AbstractUsageImpact.php @@ -33,19 +33,21 @@ namespace GlpiPlugin\Carbon\Impact\Usage; -use DBmysql; -use DbUtils; use CommonDBTM; +use DBmysql; +use DBmysqlIterator; use GlpiPlugin\Carbon\DataTracking\AbstractTracked; -use GlpiPlugin\Carbon\UsageImpact; use GlpiPlugin\Carbon\Impact\Type; -use Location as GlpiLocation; +use GlpiPlugin\Carbon\Toolbox; +use GlpiPlugin\Carbon\UsageImpact; +use LogicException; +use RuntimeException; use Toolbox as GlpiToolbox; abstract class AbstractUsageImpact implements UsageImpactInterface { - /** @var string Handled itemtype */ - protected static string $itemtype = ''; + /** @var CommonDBTM Item to analyze */ + protected CommonDBTM $item; /** @var int maximum number of entries to build */ protected int $limit = 0; @@ -57,23 +59,29 @@ abstract class AbstractUsageImpact implements UsageImpactInterface protected string $engine = 'undefined'; /** @var string $engine_version Version of the calculation engine */ - protected string $engine_version = 'unknown'; + protected static string $engine_version = 'unknown'; /** @var array of TrackedFloat */ protected array $impacts = []; - public function __construct() + public function __construct(CommonDBTM $item) { + if ($item->isNewItem()) { + throw new LogicException("Given item is empty"); + } + $this->item = $item; foreach (array_flip(Type::getImpactTypes()) as $type) { $this->impacts[$type] = null; } } + abstract protected function getVersion(): string; + /** * Get the unit of an impact * - * @param integer $type - * @param boolean $short + * @param int $type + * @param bool $short * @return string|null */ final public function getUnit(int $type, bool $short = true): ?string @@ -90,48 +98,46 @@ final public function getUnit(int $type, bool $short = true): ?string return null; } - public static function getItemtype(): string - { - return static::$itemtype; - } - public function setLimit(int $limit) { $this->limit = $limit; } - public function evaluateItems(): int + public function getItemsToEvaluate(string $itemtype, array $crit = []): DBmysqlIterator { /** @var DBmysql $DB */ global $DB; - $itemtype = static::$itemtype; - if ($itemtype === '') { - throw new \LogicException('Itemtype not set'); - } - if (!is_subclass_of($itemtype, CommonDBTM::class)) { - throw new \LogicException('Itemtype does not inherits from ' . CommonDBTM::class); + if (!GlpiToolbox::isCommonDBTM($itemtype)) { + throw new LogicException('Itemtype does not inherits from ' . CommonDBTM::class); } + $crit[] = [ + 'OR' => [ + UsageImpact::getTableField('id') => null, + UsageImpact::getTableField('recalculate') => 1, + ], + ]; + $iterator = $DB->request($this->getEvaluableQuery($itemtype, $crit)); + + return $iterator; + } + + public function evaluateItems(DBmysqlIterator $iterator): int + { /** * Huge quantity of SQL queries will be executed * We NEED to check memory usage to avoid running out of memory - * @see DbMysql::doQuery() + * @see DBmysql::doQuery() */ - $memory_limit = GlpiToolbox::getMemoryLimit() - 8 * 1024 * 1024; - if ($memory_limit < 0) { - // May happen in test seems that ini_get("memory_limits") returns - // enpty string in PHPUnit environment - $memory_limit = null; - } + $memory_limit = Toolbox::getMemoryLimit(); /** @var int $attempts_count count of evaluation attempts */ $attempts_count = 0; /** @var int $count count of successfully evaluated assets */ $count = 0; - $iterator = $DB->request($this->getEvaluableQuery()); foreach ($iterator as $row) { - if ($this->evaluateItem($row['id'])) { + if ($this->evaluateItem()) { $count++; } $attempts_count++; @@ -152,17 +158,14 @@ public function evaluateItems(): int return $count; } - public function evaluateItem(int $id): bool + public function evaluateItem(): bool { - $itemtype = static::$itemtype; - $item = $itemtype::getById($id); - if ($item === false) { - return false; - } + $itemtype = get_class($this->item); try { - $impacts = $this->doEvaluation($item); - } catch (\RuntimeException $e) { + $this->getVersion(); + $impacts = $this->doEvaluation($this->item); + } catch (RuntimeException $e) { return false; } @@ -174,14 +177,15 @@ public function evaluateItem(int $id): bool // Find an existing row, if any $input = [ 'itemtype' => $itemtype, - 'items_id' => $id, + 'items_id' => $this->item->getID(), ]; $usage_impact = new UsageImpact(); $usage_impact->getFromDBByCrit($input); $impact_types = Type::getImpactTypes(); + $input['recalculate'] = 0; $input['engine'] = $this->engine; - $input['engine_version'] = $this->engine_version; + $input['engine_version'] = self::$engine_version; // Prepare inputs for add or update foreach ($impacts as $type => $value) { @@ -211,55 +215,6 @@ public function evaluateItem(int $id): bool return false; } - public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true): array - { - $itemtype = static::$itemtype; - $item_table = $itemtype::getTable(); - $glpi_location_table = GlpiLocation::getTable(); - $usage_impact_table = UsageImpact::getTable(); - - // $where = []; - // if (!$recalculate) { - // $where = [UsageImpact::getTableField('id') => null]; - // } - - $request = [ - 'SELECT' => [ - $itemtype::getTableField('id'), - ], - 'FROM' => $item_table, - 'LEFT JOIN' => [ - $usage_impact_table => [ - 'FKEY' => [ - $usage_impact_table => 'items_id', - $item_table => 'id', - ['AND' => - [ - UsageImpact::getTableField('itemtype') => $itemtype, - ] - ], - ], - ], - $glpi_location_table => [ - 'FKEY' => [ - $glpi_location_table => 'id', - $item_table => 'locations_id', - ] - ], - ], - 'WHERE' => [ - ['NOT' => [GlpiLocation::getTableField('id') => null]], - ] + $crit, - ]; - - if ($entity_restrict) { - $entity_restrict = (new DbUtils())->getEntitiesRestrictCriteria($item_table, '', '', 'auto'); - $request['WHERE'] += $entity_restrict; - } - - return $request; - } - /** * Do the environmental impact evaluation of an asset * diff --git a/src/Impact/Usage/Boavizta/AbstractAsset.php b/src/Impact/Usage/Boavizta/AbstractAsset.php index 1cec4f59..1fb9e644 100644 --- a/src/Impact/Usage/Boavizta/AbstractAsset.php +++ b/src/Impact/Usage/Boavizta/AbstractAsset.php @@ -34,16 +34,15 @@ namespace GlpiPlugin\Carbon\Impact\Usage\Boavizta; use CommonDBTM; -use DateTime; +use DBmysql; use DbUtils; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; -use GlpiPlugin\Carbon\DataTracking\TrackedFloat; +use Glpi\DBAL\QueryExpression; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client; use GlpiPlugin\Carbon\Impact\Usage\AbstractUsageImpact; -use GlpiPlugin\Carbon\Impact\Type; use GlpiPlugin\Carbon\Location; -use GlpiPlugin\Carbon\Zone; -use Location as GlpiLocation; -use Glpi\DBAL\QueryExpression; +use GlpiPlugin\Carbon\UsageImpact; +use Infocom; +use RuntimeException; abstract class AbstractAsset extends AbstractUsageImpact implements AssetInterface { @@ -55,7 +54,7 @@ abstract class AbstractAsset extends AbstractUsageImpact implements AssetInterfa protected string $engine = 'Boavizta'; /** @var string $engine_version Version of the calculation engine */ - protected string $engine_version = 'unknown'; + // protected static string $engine_version = 'unknown'; /** @var string Endpoint to query for the itemtype, to be filled in child class */ protected string $endpoint = ''; @@ -63,18 +62,17 @@ abstract class AbstractAsset extends AbstractUsageImpact implements AssetInterfa /** @var array $hardware hardware description for the request */ protected array $hardware = []; - /** @var Boaviztapi instance of the HTTP client */ - protected ?Boaviztapi $client = null; + /** @var Client instance of the HTTP client */ + protected ?Client $client = null; // abstract public static function getEngine(CommonDBTM $item): EngineInterface; /** * Analyze the hardware of the asset to prepare the request to the backend - * @param CommonDBTM $item asset to analyze * * @return void */ - abstract protected function analyzeHardware(CommonDBTM $item); + abstract protected function analyzeHardware(); /** * Get the average power of the asset from the best source available (model or type) @@ -82,25 +80,28 @@ abstract protected function analyzeHardware(CommonDBTM $item); * @param int $id ID of the asset (itemtype determined from the class) * @return null|int average power in Watt */ - abstract protected function getAveragePower(int $id): ?int; + // abstract protected function getAveragePower(int $id): ?int; /** * Set the REST API client to use for requests * - * @param Boaviztapi $client + * @param Client $client * @return void */ - public function setClient(Boaviztapi $client) + public function setClient(Client $client) { $this->client = $client; - $this->engine_version = $this->getVersion(); } protected function getVersion(): string { + if (self::$engine_version !== 'unknown') { + return self::$engine_version; + } + try { $response = $this->client->get('utils/version'); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } @@ -109,10 +110,21 @@ protected function getVersion(): string 'Invalid response from Boavizta API: %s', json_encode($response[0] ?? '') ), E_USER_WARNING); - throw new \RuntimeException('Invalid response from Boavizta API'); + throw new RuntimeException('Invalid response from Boavizta API'); } + self::$engine_version = $response[0]; + return self::$engine_version; + } - return $response[0]; + /** + * Get the query string specifying the impact criterias for the HTTP request + * + * @return string + */ + protected function getCriteriasQueryString(): string + { + $impact_criteria = array_keys($this->client->getCriteriaUnits()); + return 'criteria=' . implode('&criteria=', $impact_criteria); } protected function query($description): array @@ -121,7 +133,7 @@ protected function query($description): array $response = $this->client->post($this->endpoint, [ 'json' => $description, ]); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { trigger_error($e->getMessage(), E_USER_WARNING); throw $e; } @@ -129,129 +141,174 @@ protected function query($description): array return $response; } - /** - * Read the response to find the impacts provided by Boaviztapi - * - * @return array - */ - protected function parseResponse(array $response): array + public function getEvaluableQuery(string $itemtype, array $crit = [], bool $entity_restrict = true): array { - $impacts = []; - foreach ($response['impacts'] as $type => $impact) { - if (!in_array($type, Type::getImpactTypes())) { - trigger_error(sprintf('Unsupported impact type %s in class %s', $type, __CLASS__)); - continue; - } - - switch ($type) { - case 'gwp': - // Disabled as Carbon calculates itself carbon emissions - // $impacts[Type::IMPACT_GWP] = $this->parseGwp($response['impacts']['gwp']); - $impacts[Type::IMPACT_GWP] = null; - break; - case 'adp': - $impacts[Type::IMPACT_ADP] = $this->parseAdp($response['impacts']['adp']); - break; - case 'pe': - $impacts[Type::IMPACT_PE] = $this->parsePe($response['impacts']['pe']); - break; - } - } - - return $impacts; - } - - protected function parseGwp(array $impact): ?TrackedFloat - { - if ($impact['use'] === 'not implemented') { - return null; - } - - $value = new TrackedFloat( - $impact['use']['value'], - null, - TrackedFloat::DATA_QUALITY_ESTIMATED - ); - if ($impact['unit'] === 'kgCO2eq') { - $value->setValue($value->getValue() * 1000); - } - - return $value; - } - - protected function parseAdp(array $impact): ?TrackedFloat - { - if ($impact['use'] === 'not implemented') { - return null; - } - - $value = new TrackedFloat( - $impact['use']['value'], - null, - TrackedFloat::DATA_QUALITY_ESTIMATED - ); - if ($impact['unit'] === 'kgSbeq') { - $value->setValue($value->getValue() * 1000); - } - - return $value; - } - - protected function parsePe(array $impact): ?TrackedFloat - { - if ($impact['use'] === 'not implemented') { - return null; - } + $item_table = getTableForItemType($itemtype); + $glpi_asset_type_itemtype = $itemtype . "Type"; + $glpi_asset_model_itemtype = $itemtype . "Model"; + $glpi_assettype_table = getTableForItemType($glpi_asset_type_itemtype); + $glpi_assetmodel_table = getTableForItemType($glpi_asset_model_itemtype); + $glpi_assets_types_fk = getForeignKeyFieldForItemType($glpi_asset_type_itemtype); + $glpi_assets_models_fk = getForeignKeyFieldForItemType($glpi_asset_model_itemtype); + $asset_type_itemtype = 'GlpiPlugin\\Carbon\\' . $glpi_asset_type_itemtype; + $assettype_table = getTableForItemType($asset_type_itemtype); + $location_table = Location::getTable(); + $infocom_table = Infocom::getTable(); + $usage_impact_table = UsageImpact::getTable(); + + $request = [ + 'SELECT' => [ + $itemtype::getTableField('id'), + ], + 'FROM' => $item_table, + 'INNER JOIN' => [ + $location_table => [ + 'FKEY' => [ + $item_table => 'locations_id', + $location_table => 'locations_id', + ], + ], + ], + 'LEFT JOIN' => [ + $usage_impact_table => [ + 'FKEY' => [ + $usage_impact_table => 'items_id', + $item_table => 'id', + ['AND' + => [ + UsageImpact::getTableField('itemtype') => $itemtype, + ], + ], + ], + ], + $glpi_assettype_table => [ + 'FKEY' => [ + $glpi_assettype_table => 'id', + $item_table => $glpi_assets_types_fk, + ], + ], + $assettype_table => [ + 'FKEY' => [ + $assettype_table => $glpi_assets_types_fk, + $glpi_assettype_table => 'id', + [ + 'AND' => [ + 'NOT' => [$glpi_assettype_table . '.id' => null], + ], + ], + ], + ], + $glpi_assetmodel_table => [ + 'FKEY' => [ + $glpi_assetmodel_table => 'id', + $item_table => $glpi_assets_models_fk, + ], + ], + $infocom_table => [ + 'FKEY' => [ + $infocom_table => 'items_id', + $item_table => 'id', + ['AND' => [Infocom::getTableField('itemtype') => $itemtype]], + ], + ], + ], + 'WHERE' => [ + 'AND' => [ + $itemtype::getTableField('is_deleted') => 0, + $itemtype::getTableField('is_template') => 0, + ['NOT' => [Location::getTableField('boavizta_zone') => '']], + ['NOT' => [Location::getTableField('boavizta_zone') => null]], + [ + 'OR' => [ + $asset_type_itemtype::getTableField('power_consumption') => ['>', 0], + $glpi_asset_model_itemtype::getTableField('power_consumption') => ['>', 0], + ], + ], [ + 'OR' => [ + ['NOT' => [Infocom::getTableField('use_date') => null]], + ['NOT' => [Infocom::getTableField('delivery_date') => null]], + ['NOT' => [Infocom::getTableField('buy_date') => null]], + // ['NOT' => [Infocom::getTableField('date_creation') => null]], + // ['NOT' => [Infocom::getTableField('date_mod') => null]], + ], + ], + ], + ] + $crit, + ]; - $value = new TrackedFloat( - $impact['use']['value'], - null, - TrackedFloat::DATA_QUALITY_ESTIMATED - ); - if ($impact['unit'] === 'MJ') { - $value->setValue($value->getValue() * (1000 ** 2)); + if ($entity_restrict) { + $entity_restrict = (new DbUtils())->getEntitiesRestrictCriteria($item_table, '', '', 'auto'); + $request['WHERE'] += $entity_restrict; } - return $value; + return $request; } /** - * Get the zone code the asset belongs to - * Location's country must match a zone name + * Get a representation of the typical asset load + * TODO: implement a real workload repartition, based on data we could collect in the future * - * @param CommonDBTM $item - * @param DateTime $date Date for which the zone must be found - * @return string|null + * @return array { +* list + * 'load_percentage': + * }> + * } */ - protected function getZoneCode(CommonDBTM $item, ?DateTime $date = null): ?string + protected function getWorkloadRepartition(): array { - // TODO: use date to find where was the asset at the given date - if ($date === null) { - $item_table = (new DbUtils())->getTableForItemType(static::$itemtype); - $glpi_location_table = GlpiLocation::getTable(); - $location_table = Location::getTable(); - $location = new Location(); - $found = $location->getFromDBByRequest([ - 'INNER JOIN' => [ - $glpi_location_table => [ - 'FKEY' => [ - $location_table => 'locations_id', - $glpi_location_table => 'id', - ], + return [[ + 'time_percentage' => 100, // 100% of the used time ratio ... + 'load_percentage' => 100, // ... the computer is at 100% load + ]]; + } + + protected function getAveragePower(int $id): ?int + { + /** @var DBmysql $DB */ + global $DB; + + $dbutil = new DbUtils(); + $itemtype = static::$itemtype; + $model_fk = static::$model_itemtype::getForeignKeyField(); + $item_table = $dbutil->getTableForItemType($itemtype); + $item_model_table = $dbutil->getTableForItemType(static::$model_itemtype); + $carbon_asset_type = 'GlpiPlugin\\Carbon\\' . static::$type_itemtype; + $asset_type_fk = getForeignKeyFieldForItemType(static::$type_itemtype); + $carbon_item_type_table = $dbutil->getTableForItemType($carbon_asset_type); + + $type_power = CommonDBTM::getTableField('power_consumption', $carbon_asset_type); + $type_power = DBmysql::quoteName($type_power); + $model_power = static::$model_itemtype::getTableField('power_consumption'); + $model_power = DBmysql::quoteName($model_power); + + $request = [ + 'SELECT' => new QueryExpression("COALESCE({$model_power}, {$type_power}, null) as `power`"), + 'FROM' => $item_table, + 'LEFT JOIN' => [ + $item_model_table => [ + 'FKEY' => [ + $item_table => $model_fk, + $item_model_table => 'id', ], ], - 'WHERE' => [ - GlpiLocation::getTableField('id') => $item->fields['locations_id'], - ] - ]); - - if ($found === false) { - return null; - } - - return $location->fields['boavizta_zone']; + $carbon_item_type_table => [ + 'FKEY' => [ + $item_table => $asset_type_fk, + $carbon_item_type_table => $asset_type_fk, + ], + ], + ], + 'WHERE' => [ + $itemtype::getTableField('id') => $id, + ], + ]; + + $result = $DB->request($request); + if ($result->count() === 0) { + return null; } - - throw new \LogicException('Not implemented yet'); + $power = $result->current()['power']; + return $power ?? 0; } } diff --git a/src/Impact/Usage/Boavizta/AssetInterface.php b/src/Impact/Usage/Boavizta/AssetInterface.php index ecb82a73..3a07ab91 100644 --- a/src/Impact/Usage/Boavizta/AssetInterface.php +++ b/src/Impact/Usage/Boavizta/AssetInterface.php @@ -33,15 +33,15 @@ namespace GlpiPlugin\Carbon\Impact\Usage\Boavizta; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client; interface AssetInterface { /** * Set the API client to use for HTTP requests * - * @param Boaviztapi $client + * @param Client $client * @return void */ - public function setClient(Boaviztapi $client); + public function setClient(Client $client); } diff --git a/src/Impact/Usage/Boavizta/Computer.php b/src/Impact/Usage/Boavizta/Computer.php index cb1d328c..045d75b2 100644 --- a/src/Impact/Usage/Boavizta/Computer.php +++ b/src/Impact/Usage/Boavizta/Computer.php @@ -37,166 +37,90 @@ use Computer as GlpiComputer; use ComputerModel as GlpiComputerModel; use ComputerType as GlpiComputerType; -use DeviceProcessor; -use GlpiPlugin\Carbon\UsageInfo; +use DBmysql; use GlpiPlugin\Carbon\ComputerType; use GlpiPlugin\Carbon\ComputerUsageProfile; -use DBmysql; -use DbUtils; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\ComputerModelizationAdapterTrait; use GlpiPlugin\Carbon\Location; -use Item_DeviceMemory; -use Item_DeviceProcessor; -use Item_Devices; -use Item_Disk; -use Infocom; -use Glpi\DBAL\QueryExpression; +use GlpiPlugin\Carbon\UsageInfo; class Computer extends AbstractAsset { + use ComputerModelizationAdapterTrait; + protected static string $itemtype = GlpiComputer::class; protected static string $type_itemtype = GlpiComputerType::class; protected static string $model_itemtype = GlpiComputerModel::class; protected string $endpoint = 'server'; - public function getEvaluableQuery(array $crit = [], bool $entity_restrict = true): array + public function getEvaluableQuery(string $itemtype, array $crit = [], bool $entity_restrict = true): array { - $item_table = self::$itemtype::getTable(); - $item_model_table = self::$model_itemtype::getTable(); - $glpi_computertypes_table = GlpiComputerType::getTable(); - $computertypes_table = ComputerType::getTable(); - $location_table = Location::getTable(); - $usage_info_table = UsageInfo::getTable(); - $computerUsageProfile_table = ComputerUsageProfile::getTable(); - $infocom_table = Infocom::getTable(); + $request = parent::getEvaluableQuery($itemtype); - $request = [ - 'SELECT' => [ - self::$itemtype::getTableField('id'), - ], - 'FROM' => $item_table, - 'INNER JOIN' => [ - $location_table => [ - 'FKEY' => [ - $item_table => 'locations_id', - $location_table => 'id', - ] - ], - $usage_info_table => [ - 'FKEY' => [ - $item_table => 'id', - $usage_info_table => 'items_id', - [ - 'AND' => [UsageInfo::getTableField('itemtype') => self::$itemtype] - ] - ] - ], - $computerUsageProfile_table => [ - 'FKEY' => [ - $usage_info_table => 'plugin_carbon_computerusageprofiles_id', - $computerUsageProfile_table => 'id', - ] + $item_table = getTableForItemType($itemtype); + $computerUsageProfile_table = ComputerUsageProfile::getTable(); + $usage_info_table = UsageInfo::getTable(); + $request['INNER JOIN'][$usage_info_table] = [ + 'FKEY' => [ + $item_table => 'id', + $usage_info_table => 'items_id', + [ + 'AND' => [UsageInfo::getTableField('itemtype') => self::$itemtype], ], ], - 'LEFT JOIN' => [ - $item_model_table => [ - 'FKEY' => [ - $item_table => 'computermodels_id', - $item_model_table => 'id', - ] - ], - $glpi_computertypes_table => [ - 'FKEY' => [ - $item_table => 'computertypes_id', - $glpi_computertypes_table => 'id', - ] - ], - $computertypes_table => [ - 'FKEY' => [ - $computertypes_table => 'computertypes_id', - $glpi_computertypes_table => 'id', - [ - 'AND' => [ - 'NOT' => [GlpiComputerType::getTableField('id') => null], - ] - ] - ] - ], - $infocom_table => [ - 'FKEY' => [ - $infocom_table => 'items_id', - $item_table => 'id', - ['AND' => [Infocom::getTableField('itemtype') => self::$itemtype]], - ] - ], + ]; + $request['INNER JOIN'][$computerUsageProfile_table] = [ + 'FKEY' => [ + $usage_info_table => ComputerUsageProfile::getForeignKeyField(), + $computerUsageProfile_table => 'id', ], - 'WHERE' => [ - 'AND' => [ - self::$itemtype::getTableField('is_deleted') => 0, - self::$itemtype::getTableField('is_template') => 0, - ['NOT' => [Location::getTableField('boavizta_zone') => '']], - ['NOT' => [Location::getTableField('boavizta_zone') => null]], - [ - 'OR' => [ - ComputerType::getTableField('power_consumption') => ['>', 0], - self::$model_itemtype::getTableField('power_consumption') => ['>', 0], - ], - ], [ - 'OR' => [ - ['NOT' => [Infocom::getTableField('use_date') => null]], - ['NOT' => [Infocom::getTableField('delivery_date') => null]], - ['NOT' => [Infocom::getTableField('buy_date') => null]], - ['NOT' => [Infocom::getTableField('date_creation') => null]], - ['NOT' => [Infocom::getTableField('date_mod') => null]], - ] - ], [ - 'AND' => [ - ['NOT' => [ComputerType::getTableField('category') => null]], - [ComputerType::getTableField('category') => ['>', 0]], - ] - ] - ], - ] + $crit ]; - - if ($entity_restrict) { - $entity_restrict = (new DbUtils())->getEntitiesRestrictCriteria($item_table, '', '', 'auto'); - $request['WHERE'] += $entity_restrict; - } + $request['WHERE'][] = [ + ['NOT' => [ComputerType::getTableField('category') => null]], + [ComputerType::getTableField('category') => ['>', 0]], + ]; + $request['WHERE'][] = $crit; return $request; } protected function doEvaluation(CommonDBTM $item): ?array { - // TODO: determine if the computer is a server, a computer, a laptop, a tablet... - // then adapt $this->endpoint depending on the result - $type = $this->getType($item); $this->endpoint = $this->getEndpoint($type); + $this->endpoint .= '?' . $this->getCriteriasQueryString(); - // Find boavizta zone code - $zone_code = $this->getZoneCode($item); + // Find boavizta zone code + $zone_code = Location::getZoneCode($item); if ($zone_code === null) { return null; } - $average_power = $this->getAveragePower($item->getID()); - - // Ask for embodied impact only - $configuration = $this->analyzeHardware($item); + // Ask for usage impact only + $configuration = $this->analyzeHardware(); if (count($configuration) === 0) { return null; } + $lifespan = (new UsageInfo())->getLifespanInHours($item); + if ($lifespan === null) { + return null; + } + $use_ratio = $this->getUseRatio(); + $time_workload = $this->getWorkloadRepartition(); + $description = [ 'configuration' => $configuration, 'usage' => [ 'usage_location' => $zone_code, - 'avg_power' => $average_power + 'hours_lifetime' => $lifespan, + 'avg_power' => $average_power, + 'use_time_ratio' => $use_ratio, + 'time_workload' => $time_workload, ], ]; $response = $this->query($description); - $impacts = $this->parseResponse($response); + $impacts = $this->client->parseResponse($response, 'use'); return $impacts; } @@ -222,18 +146,18 @@ protected function getType(CommonDBTM $item): int 'FKEY' => [ $computer_type_table => 'computertypes_id', $glpi_computer_type_table => 'id', - ] + ], ], $computer_table => [ 'FKEY' => [ $glpi_computer_type_table => 'id', - $computer_table => 'computertypes_id' + $computer_table => 'computertypes_id', ], ], ], 'WHERE' => [ GlpiComputer::getTableField('id') => $item->getID(), - ] + ], ]); $row_count = $result->count(); if ($row_count === 0) { @@ -266,101 +190,31 @@ protected function getEndpoint(int $type) return 'terminal/desktop'; } - protected function analyzeHardware(CommonDBTM $item): array - { - $configuration = []; - // Yes, string expected here. - $iterator = Item_Devices::getItemsAssociatedTo($item->getType(), (string) $item->getID()); - foreach ($iterator as $item_device) { - switch ($item_device->getType()) { - case Item_DeviceProcessor::class: - $cpu = DeviceProcessor::getById($item_device->fields['deviceprocessors_id']); - if ($cpu) { - if (isset($configuration['cpu'])) { - // The server does not support several CPU with different specifications - // then, just increment CPU count - $configuration['cpu']['units']++; - } else { - $configuration['cpu'] = [ - 'units' => 1, - 'name' => $cpu->fields['designation'], - ]; - if (isset($item_device->fields['nbcores'])) { - $configuration['cpu']['core_units'] = $item_device->fields['nbcores']; - } - } - } - break; - case Item_DeviceMemory::class: - $configuration['memory'][] = [ - 'units' => 1, - 'capacity' => ceil($item_device->fields['size'] / 1024), - ]; - break; - case Item_Disk::class: - $configuration['disk'][] = [ - 'units' => 1, - 'capacity' => ceil($item_device->fields['capacity'] / 1024), - ]; - break; - } - } - - return $configuration; - } - - protected function getAveragePower(int $id): ?int + /** + * Calculate the use time ratio from the usage profile + * + * @return float Ratio between 0 and 1 + */ + protected function getUseRatio(): float { - /** @var DBmysql $DB */ - global $DB; - - $dbutil = new DbUtils(); - $itemtype = static::$itemtype; - $glpi_type_fk = static::$type_itemtype::getForeignKeyField(); - $model_fk = static::$model_itemtype::getForeignKeyField(); - $item_table = $dbutil->getTableForItemType($itemtype); - $item_glpi_type_table = $dbutil->getTableForItemType(static::$type_itemtype); - $item_model_table = $dbutil->getTableForItemType(static::$model_itemtype); - $carbon_item_type_table = $dbutil->getTableForItemType(ComputerType::class); - - $type_power = ComputerType::getTableField('power_consumption'); - $type_power = DBmysql::quoteName($type_power); - $model_power = static::$model_itemtype::getTableField('power_consumption'); - $model_power = DBmysql::quoteName($model_power); - - $request = [ - 'SELECT' => new QueryExpression("COALESCE({$model_power}, {$type_power}, null) as `power`"), - 'FROM' => $item_table, - 'LEFT JOIN' => [ - $item_model_table => [ + $usage_profile = new ComputerUsageProfile(); + $usage_profile_table = ComputerUsageProfile::getTable(); + $usage_info_table = getTableForItemType(UsageInfo::class); + $usage_profile->getFromDBByRequest([ + 'INNER JOIN' => [ + $usage_info_table => [ 'FKEY' => [ - $item_table => $model_fk, - $item_model_table => 'id', + $usage_info_table => 'plugin_carbon_computerusageprofiles_id', + $usage_profile_table => 'id', ], ], - $item_glpi_type_table => [ - 'FKEY' => [ - $item_table => $glpi_type_fk, - $item_glpi_type_table => 'id', - ] - ], - $carbon_item_type_table => [ - 'FKEY' => [ - $item_glpi_type_table => 'id', - $carbon_item_type_table => 'computertypes_id', - ] - ] ], 'WHERE' => [ - $itemtype::getTableField('id') => $id - ] - ]; + UsageInfo::getTableField('itemtype') => static::$itemtype, + UsageInfo::getTableField('items_id') => $this->item->getID(), + ], + ]); - $result = $DB->request($request); - if ($result->count() === 0) { - return null; - } - $power = $result->current()['power']; - return $power ?? 0; + return $usage_profile->getPoweredOnRatio(); } } diff --git a/src/Impact/Usage/Boavizta/Monitor.php b/src/Impact/Usage/Boavizta/Monitor.php index d91f93ae..29fe0bed 100644 --- a/src/Impact/Usage/Boavizta/Monitor.php +++ b/src/Impact/Usage/Boavizta/Monitor.php @@ -33,13 +33,19 @@ namespace GlpiPlugin\Carbon\Impact\Usage\Boavizta; +use CommonDBTM; +use Computer as GlpiComputer; use DBmysql; use DbUtils; -use CommonDBTM; +use Glpi\Asset\Asset_PeripheralAsset; +use Glpi\DBAL\QueryExpression; +use GlpiPlugin\Carbon\ComputerUsageProfile; +use GlpiPlugin\Carbon\Location; +use GlpiPlugin\Carbon\MonitorType; +use GlpiPlugin\Carbon\UsageInfo; use Monitor as GlpiMonitor; -use MonitorType as GlpiMonitorType; use MonitorModel as GlpiMonitorModel; -use Glpi\DBAL\QueryExpression; +use MonitorType as GlpiMonitorType; class Monitor extends AbstractAsset { @@ -49,70 +55,139 @@ class Monitor extends AbstractAsset protected string $endpoint = 'peripheral/monitor'; - protected function doEvaluation(CommonDBTM $item): ?array + public function getEvaluableQuery(string $itemtype, array $crit = [], bool $entity_restrict = true): array { - // TODO: determine if the computer is a server, a computer, a laptop, a tablet... - // then adapt $this->endpoint depending on the result + // TODO : build the evaluable query from the computer evaluable query + // the location should behandled like done in History namespace + + $item_table = self::$itemtype::getTable(); + self::$model_itemtype::getTable(); + $assets_items_table = Asset_PeripheralAsset::getTable(); + $computers_table = GlpiComputer::getTable(); + + $request = parent::getEvaluableQuery($itemtype); + $parent_inner_joins = $request['INNER JOIN']; + $parent_left_joins = $request['LEFT JOIN']; + unset($request['INNER JOIN'], $request['LEFT JOIN']); + + $request['LEFT JOIN'][$assets_items_table] = [ + 'FKEY' => [ + $assets_items_table => 'items_id_peripheral', + $item_table => 'id', + [ + 'AND' => [ + Asset_PeripheralAsset::getTableField('itemtype_peripheral') => self::$itemtype, + Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class, + ], + ], + ], + ]; + $request['INNER JOIN'][$computers_table] = [ + 'FKEY' => [ + $computers_table => 'id', + $assets_items_table => 'items_id_asset', + [ + 'AND' => [Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class], + ], + ], + ]; + + // re-add inner joins of computer, after those for monitor + // Needed to join tables before theyr foreign keys are used + $request['INNER JOIN'] = array_merge($request['INNER JOIN'], $parent_inner_joins); + $request['LEFT JOIN'] = array_merge($request['LEFT JOIN'], $parent_left_joins); + + // Replace SELECT on computer by select on monitor + $request['SELECT'] = [ + self::$itemtype::getTableField('id'), + ]; + // Append criteria to the WHERE clause + $request['WHERE'][] = $crit; + + return $request; + } + + protected function doEvaluation(CommonDBTM $item): ?array + { // Ask for embodied impact only - $configuration = $this->analyzeHardware($item); + $configuration = $this->analyzeHardware(); + $this->endpoint .= '?' . $this->getCriteriasQueryString(); + + // Find boavizta zone code + $zone_code = Location::getZoneCode($item); + if ($zone_code === null) { + return null; + } + // Calculate the average power + $average_power = $this->getAveragePower($item->getID()); + $lifespan = (new UsageInfo())->getLifespanInHours($item); + if ($lifespan === null) { + return null; + } + $use_ratio = $this->getUseRatio(); + $time_workload = $this->getWorkloadRepartition(); $description = [ 'configuration' => $configuration, 'usage' => [ - 'avg_power' => 0 + 'avg_power' => $average_power, + 'usage_location' => $zone_code, + 'use_time_ratio' => $use_ratio, + 'hours_life_time' => $lifespan, + 'time_workload' => $time_workload, ], ]; $response = $this->query($description); - $impacts = $this->parseResponse($response); + $impacts = $this->client->parseResponse($response, 'use'); return $impacts; } - protected function analyzeHardware(CommonDBTM $item): array + protected function analyzeHardware(): array { $configuration = []; - // Disable usage - $this->hardware['configuration'] = $configuration; - $this->hardware['usage'] = [ - 'avg_power' => 0 - ]; - return $configuration; } - protected function getAveragePower(int $id): ?int + protected function getAveragePower_disabled(int $id): ?int { /** @var DBmysql $DB */ global $DB; $dbutil = new DbUtils(); $itemtype = static::$itemtype; - $glpi_type_fk = static::$type_itemtype::getForeignKeyField(); $model_fk = static::$model_itemtype::getForeignKeyField(); $item_table = $dbutil->getTableForItemType($itemtype); - $item_glpi_type_table = $dbutil->getTableForItemType(static::$type_itemtype); $item_model_table = $dbutil->getTableForItemType(static::$model_itemtype); + $carbon_item_type_table = $dbutil->getTableForItemType(MonitorType::class); + + $type_power = MonitorType::getTableField('power_consumption'); + $type_power = DBmysql::quoteName($type_power); + $model_power = static::$model_itemtype::getTableField('power_consumption'); + $model_power = DBmysql::quoteName($model_power); $request = [ - 'SELECT' => new QueryExpression('COALESCE() as `power`'), + 'SELECT' => new QueryExpression("COALESCE({$model_power}, {$type_power}, null) as `power`"), 'FROM' => $item_table, 'LEFT JOIN' => [ $item_model_table => [ - $item_table => $model_fk, - $item_model_table => 'id', + 'FKEY' => [ + $item_table => $model_fk, + $item_model_table => 'id', + ], ], - $item_glpi_type_table => [ + $carbon_item_type_table => [ 'FKEY' => [ - $item_table => $glpi_type_fk, - $item_glpi_type_table => 'id', - ] + $item_table => 'monitortypes_id', + $carbon_item_type_table => 'monitortypes_id', + ], ], ], 'WHERE' => [ - $itemtype::getTableField('id') => $id - ] + $itemtype::getTableField('id') => $id, + ], ]; $result = $DB->request($request); @@ -122,4 +197,45 @@ protected function getAveragePower(int $id): ?int $power = $result->current()['power']; return $power ?? 0; } + + /** + * Calculate the use time ratio from the usage profile + * + * @return float Ratio between 0 and 1 + */ + protected function getUseRatio(): float + { + $usage_profile = new ComputerUsageProfile(); + $usage_profile_table = ComputerUsageProfile::getTable(); + $usage_info_table = getTableForItemType(UsageInfo::class); + $assets_items_table = Asset_PeripheralAsset::getTable(); + $usage_profile->getFromDBByRequest([ + 'INNER JOIN' => [ + $usage_info_table => [ + 'FKEY' => [ + $usage_info_table => 'plugin_carbon_computerusageprofiles_id', + $usage_profile_table => 'id', + ], + ], + $assets_items_table => [ + 'FKEY' => [ + $assets_items_table => 'items_id_asset', + $usage_info_table => 'items_id', + [ + 'AND' => [ + Asset_PeripheralAsset::getTableField('itemtype_peripheral') => self::$itemtype, + Asset_PeripheralAsset::getTableField('itemtype_asset') => GlpiComputer::class, + ], + ], + ], + ], + ], + 'WHERE' => [ + UsageInfo::getTableField('itemtype') => GlpiComputer::class, + UsageInfo::getTableField('items_id') => $this->item->getID(), + ], + ]); + + return $usage_profile->getPoweredOnRatio(); + } } diff --git a/src/Impact/Usage/Engine.php b/src/Impact/Usage/Engine.php index 5806c9aa..ba7cecd6 100644 --- a/src/Impact/Usage/Engine.php +++ b/src/Impact/Usage/Engine.php @@ -32,10 +32,12 @@ namespace GlpiPlugin\Carbon\Impact\Usage; +use CommonDBTM; use CommonGLPI; use GlpiPlugin\Carbon\Config; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client as BoaviztapiClient; use GlpiPlugin\Carbon\DataSource\RestApiClient; +use RuntimeException; class Engine extends CommonGLPI { @@ -54,35 +56,24 @@ public static function getAvailableBackends(): array * * Returns null if no engine found * - * @param string $itemtype itemtype of assets to analyze + * @param CommonDBTM $item item to analyze * @return AbstractUsageImpact|null an instance if an embodied impact calculation object or null on error */ - public static function getEngineFromItemtype(string $itemtype): ?AbstractUsageImpact + public static function getEngineFromItemtype(CommonDBTM $item): ?AbstractUsageImpact { + $itemtype = get_class($item); + $usage_impact_namespace = Config::getUsageImpactEngine(); $usage_impact_class = $usage_impact_namespace . '\\' . $itemtype; if (!class_exists($usage_impact_class) || !is_subclass_of($usage_impact_class, AbstractUsageImpact::class)) { return null; } - $usage_impact = new $usage_impact_class(); + /** @var AbstractUsageImpact $usage_impact */ + $usage_impact = new $usage_impact_class($item); try { return self::configureEngine($usage_impact); - } catch (\RuntimeException $e) { - return null; - } - } - - public static function getEngine(string $engine_class): ?AbstractUsageImpact - { - if (!is_subclass_of($engine_class, AbstractUsageImpact::class)) { - return null; - } - $embodied_impact = new $engine_class(); - - try { - return self::configureEngine($embodied_impact); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { return null; } } @@ -99,7 +90,7 @@ protected static function configureEngine(AbstractUsageImpact $engine): Abstract switch (array_slice($embodied_impact_namespace, -2, 1)[0]) { case 'Boavizta': /** @var Boavizta\AbstractAsset $engine */ - $engine->setClient(new Boaviztapi(new RestApiClient())); + $engine->setClient(new BoaviztapiClient(new RestApiClient())); } return $engine; diff --git a/src/Impact/Usage/UsageImpactInterface.php b/src/Impact/Usage/UsageImpactInterface.php index a4d9b519..2d934ba1 100644 --- a/src/Impact/Usage/UsageImpactInterface.php +++ b/src/Impact/Usage/UsageImpactInterface.php @@ -34,7 +34,7 @@ namespace GlpiPlugin\Carbon\Impact\Usage; use CommonDBTM; -use GlpiPlugin\Carbon\Engine\V1\EngineInterface; +use DBmysqlIterator; interface UsageImpactInterface { @@ -46,41 +46,50 @@ interface UsageImpactInterface */ // public static function getEngine(CommonDBTM $item): EngineInterface; - /** - * Get the itemtype of the asset handled by this class - * - * @return string - */ - public static function getItemtype(): string; - /** * Set the maximum count of items to calculate with evaluateItems() * - * @param integer $limit + * @param int $limit * @return void */ public function setLimit(int $limit); /** * Get query to find items we can evaluate - * @param array $crit Criterias to aass to WHERE clause + * An evaluable item is an item with all required data + * + * @template T of CommonDBTM + * @param class-string $itemtype + * @param array $crit Criteria * * @return array */ - public function getEvaluableQuery(array $crit = []): array; + public function getEvaluableQuery(string $itemtype, array $crit = []): array; + + /** + * Get an iterator of items to evaluate + * An item to evaluate is an item with all required data for a successful evaluation + * and without any calculation result or with an invalidated calculation result + * + * @template T of CommonDBTM + * @param class-string $itemtype + * @param array $crit criteria + * @return DBmysqlIterator + */ + public function getItemsToEvaluate(string $itemtype, array $crit = []): DBmysqlIterator; /** * Start the evaluation of all items * + * @param DBmysqlIterator $iterator assets to evaluate providing their IDs * @return int count of successfully evaluated assets */ - public function evaluateItems(): int; + public function evaluateItems(DBmysqlIterator $iterator): int; /** * Evaluate all impacts of the asset * - * @param integer $id * @return bool true if success, false otherwise */ - public function evaluateItem(int $id): bool; + public function evaluateItem(): bool; } diff --git a/src/Location.php b/src/Location.php index c8e039d1..6dfb3b85 100644 --- a/src/Location.php +++ b/src/Location.php @@ -34,25 +34,27 @@ use CommonDBChild; use CommonDBTM; +use CommonGLPI; use Config as GlpiConfig; +use DateTime; use DBmysql; use DBmysqlIterator; +use DbUtils; +use Geocoder\Exception\Exception; +use Geocoder\Exception\QuotaExceeded; use Geocoder\Geocoder; -use Geocoder\Provider\Nominatim\Nominatim; use Geocoder\Query\GeocodeQuery; -use Geocoder\StatefulGeocoder; -use GuzzleHttp\Client; +use Glpi\Application\View\TemplateRenderer; +use Glpi\DBAL\QueryExpression; +use GlpiPlugin\Carbon\DataSource\Lca\Boaviztapi\Client as BoaviztapiClient; use Html; +use League\ISO3166\ISO3166; use Location as GlpiLocation; +use LogicException; use MassiveAction; -use Glpi\Application\View\TemplateRenderer; -use GLPINetwork; -use GlpiPlugin\Carbon\DataSource\Boaviztapi; -use League\ISO3166\ISO3166; -use Session; /** - * Additional data for a location + * Additional data for a location. Extends the Location object from GLPI with aditional fields */ class Location extends CommonDBChild { @@ -60,11 +62,113 @@ class Location extends CommonDBChild public static $itemtype = GlpiLocation::class; public static $items_id = 'locations_id'; - public function showForm($ID, array $options = []) + public static function getIcon() + { + return 'ti ti-map-2'; + } + + public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) + { + if ($item instanceof GlpiLocation) { + return self::createTabEntry(__('Environmental impact', 'carbon'), 0); + } + return ''; + } + + public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) + { + if ($item instanceof GlpiLocation) { + /** @var GlpiLocation $item */ + $location = new self(); + $location->showForLocation($item); + } + return true; + } + + public function prepareInputForAdd($input) + { + if (isset($input['plugin_carbon_sources_id']) && isset($input['plugin_carbon_zones_id'])) { + $source_zone = new Source_Zone(); + $source_zone->getFromDBByCrit([ + 'plugin_carbon_sources_id' => $input['plugin_carbon_sources_id'], + 'plugin_carbon_zones_id' => $input['plugin_carbon_zones_id'], + ]); + if (!$source_zone->isNewItem()) { + $input['plugin_carbon_sources_zones_id'] = $source_zone->getID(); + } + } + + return $input; + } + + public function prepareInputForUpdate($input) + { + if (isset($input['plugin_carbon_sources_id']) && isset($input['plugin_carbon_zones_id'])) { + $source_zone = new Source_Zone(); + $source_zone->getFromDBByCrit([ + 'plugin_carbon_sources_id' => $input['plugin_carbon_sources_id'], + 'plugin_carbon_zones_id' => $input['plugin_carbon_zones_id'], + ]); + if (!$source_zone->isNewItem()) { + $input['plugin_carbon_sources_zones_id'] = $source_zone->getID(); + } else { + $input['plugin_carbon_sources_zones_id'] = 0; + } + } + + if (($input['plugin_carbon_sources_id'] ?? 0) == 0) { + $input['plugin_carbon_sources_zones_id'] = 0; + } + + return $input; + } + + public function showForLocation(GlpiLocation $item, array $options = []) { - $this->getFromDB($ID); + /** @var DBmysql $DB */ + global $DB; + + $this->getFromDBByCrit(['locations_id' => $item->getID()]); + if ($this->isNewItem()) { + $this->add(['locations_id' => $item->getID()]); + } + + $source_zone_table = Source_Zone::getTable(); + $source_table = Source::getTable(); + $iterator = $DB->request([ + 'SELECT' => [ + Source_Zone::getTableField('plugin_carbon_sources_id') . ' AS sources_id', + Source_Zone::getTableField('plugin_carbon_zones_id') . ' AS zones_id', + ], + 'FROM' => $source_table, + 'LEFT JOIN' => [ + $source_zone_table => [ + 'FKEY' => [ + $source_zone_table => 'plugin_carbon_sources_id', + $source_table => 'id', + ], + ], + ], + 'WHERE' => [ + 'is_carbon_intensity_source' => 1, + Source_Zone::getTableField('id') => $this->fields['plugin_carbon_sources_zones_id'], + ], + ]); + $row = $iterator->current(); + $source_id = $row['sources_id'] ?? 0; + $zone_id = $row['zones_id'] ?? 0; + if ($source_id === 0) { + $zone_id = 0; + } + TemplateRenderer::getInstance()->display('@carbon/location.html.twig', [ 'item' => $this, + 'params' => [ + 'candel' => false, + ], + 'source_id' => $source_id, + 'zone_id' => $zone_id, + 'zone_condition' => Zone::getRestrictBySourceCondition($source_id), ]); return true; @@ -76,7 +180,19 @@ public static function showMassiveActionsSubForm(MassiveAction $ma) case 'MassUpdateBoaviztaZone': echo '
'; echo __('Boavizta zone', 'carbon') . ' '; - Boaviztapi::dropdownBoaviztaZone('_boavizta_zone'); + BoaviztapiClient::dropdownBoaviztaZone('_boavizta_zone'); + echo '
'; + echo '

' . Html::submit(_x('button', 'Post'), ['name' => 'massiveaction']); + return true; + case 'MassUpdateCarbonIntensityFeed': + echo '
'; + echo __('Carbon intensity source and zone', 'carbon') . ' '; + $template_renderer = TemplateRenderer::getInstance(); + $template_renderer->display('@carbon/components/form/source_zone_selector.html.twig', [ + 'source_id' => 0, + 'zone_id' => 0, + 'zone_condition' => [], + ]); echo '
'; echo '

' . Html::submit(_x('button', 'Post'), ['name' => 'massiveaction']); return true; @@ -97,6 +213,27 @@ public static function processMassiveActionsForOneItemtype(MassiveAction $ma, Co } } return; + case 'MassUpdateCarbonIntensityFeed': + $source_zone = new Source_Zone(); + $source_zone->getFromDBByCrit([ + 'plugin_carbon_sources_id' => $ma->POST['plugin_carbon_sources_id'] ?? 0, + 'plugin_carbon_zones_id' => $ma->POST['plugin_carbon_zones_id'] ?? 0, + ]); + if ($source_zone->isNewItem()) { + $input['plugin_carbon_sources_zones_id'] = $source_zone->getID(); + foreach ($ids as $id) { + $ma->itemDone(get_class($item), $id, MassiveAction::ACTION_KO); + } + return; + } + foreach ($ids as $id) { + if ($item->getFromDB($id) && self::updateCarbonIntensitySourceZone($item, $source_zone)) { + $ma->itemDone(get_class($item), $id, MassiveAction::ACTION_OK); + } else { + $ma->itemDone(get_class($item), $id, MassiveAction::ACTION_KO); + } + } + return; } } @@ -128,11 +265,19 @@ public static function updateBoaviztaZone(CommonDBTM $item, string $zone): bool } } + public static function updateCarbonIntensitySourceZone(CommonDBTM $item, Source_Zone $source_zone): bool + { + return $item->update([ + 'id' => $item->getID(), + '_plugin_carbon_sources_zones_id' => $source_zone->getID(), + ]); + } + public static function getSpecificValueToDisplay($field, $values, array $options = []) { switch ($field) { case 'boavizta_zone': - $categories = Boaviztapi::getZones(); + $categories = BoaviztapiClient::getZones(); return $categories[$values['boavizta_zone']] ?? ''; } @@ -141,8 +286,13 @@ public static function getSpecificValueToDisplay($field, $values, array $options public static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = []) { - $options['values'] = $values; - return Boaviztapi::dropdownBoaviztaZone($name, $options); + switch ($field) { + case 'boavizta_zone': + $options['values'] = $values; + return BoaviztapiClient::dropdownBoaviztaZone($name, $options); + } + + return ''; } /** @@ -154,13 +304,12 @@ public static function getSpecificValueToSelect($field, $name = '', $values = '' */ public function onGlpiLocationAdd(CommonDBTM $item, Geocoder $geocoder) { - $this->enableCarbonIntensityDownload($item); $enabled = GlpiConfig::getConfigurationValue('plugin:carbon', 'geocoding_enabled'); if (!empty($enabled)) { if (!isset($item->input['_boavizta_zone']) || $item->input['_boavizta_zone'] == '' || $item->input['_boavizta_zone'] == '0') { try { $item->input['_boavizta_zone'] = $this->getCountryCode($item, $geocoder); - } catch (\Geocoder\Exception\QuotaExceeded $e) { + } catch (QuotaExceeded $e) { trigger_error($e->getMessage(), E_USER_WARNING); } } @@ -193,12 +342,13 @@ public function onGlpiLocationPreUpdate(CommonDBTM $item, Geocoder $geocoder) if (!isset($item->input['_boavizta_zone']) || $item->input['_boavizta_zone'] == '0') { try { $item->input['_boavizta_zone'] = $this->getCountryCode($item, $geocoder); - } catch (\Geocoder\Exception\QuotaExceeded $e) { + } catch (QuotaExceeded $e) { trigger_error($e->getMessage(), E_USER_WARNING); } } } $this->setBoaviztaZone($item); + $this->setSourceZone($item); } /** @@ -209,18 +359,9 @@ public function onGlpiLocationPreUpdate(CommonDBTM $item, Geocoder $geocoder) */ protected function enableCarbonIntensityDownload(CommonDBTM $item): bool { - if (!in_array('country', array_keys($item->fields))) { - return false; - } - $zone = Zone::getByLocation($item); - if ($zone === null) { - return false; - } - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone->getFromDBByCrit([ - Zone::getForeignKeyField() => $zone->fields['id'], - CarbonIntensitySource::getForeignKeyField() => $zone->fields['plugin_carbon_carbonintensitysources_id_historical'], - ]); + $source_zone = new Source_Zone(); + /** @var GlpiLocation $item */ + $source_zone->getFromDbByItem($item); if ($source_zone->isNewItem()) { return false; } @@ -231,73 +372,127 @@ protected function enableCarbonIntensityDownload(CommonDBTM $item): bool * Tells if the carbon intensity download is enabled * * @param CommonDBTM $item - * @return boolean + * @return bool */ public function isCarbonIntensityDownloadEnabled(CommonDBTM $item): bool { - $zone = Zone::getByLocation($item); - if ($zone === null) { - return false; - } - $source_zone = new CarbonIntensitySource_Zone(); - $source_zone->getFromDBByCrit([ - Zone::getForeignKeyField() => $zone->fields['id'], - CarbonIntensitySource::getForeignKeyField() => $zone->fields['plugin_carbon_carbonintensitysources_id_historical'], - ]); - if ($source_zone->isNewItem()) { + $source_zone = new Source_Zone(); + /** @var GlpiLocation $item */ + if (!$source_zone->getFromDbByItem($item)) { return false; } return $source_zone->fields['is_download_enabled'] === 1; } /** - * Tells id a location has fallback carbon intensity data + * Get request to find carbon intensity sources * - * @param CommonDBTM $item - * @return boolean + * @param array $crit Criterias + * @return array */ - public function hasFallbackCarbonIntensityData(CommonDBTM $item): bool + public static function getCarbonIntensityDataSourceRequest(array $crit = []): array { - /** @var DBmysql $DB */ - global $DB; - - $zone = Zone::getByLocation($item); - if ($zone === null) { - return false; - } $carbon_intensity_table = CarbonIntensity::getTable(); - $carbon_intensity_source_zone_table = CarbonIntensitySource_Zone::getTable(); - $carbon_intensity_source_table = CarbonIntensitySource::getTable(); + $source_zone_table = Source_Zone::getTable(); + $source_table = Source::getTable(); + $location_table = Location::getTable(); + $source_zone_fk = Source_Zone::getForeignKeyField(); + $source_fk = Source::getForeignKeyField(); + $zone_fk = Zone::getForeignKeyField(); $request = [ 'COUNT' => 'count', - 'FROM' => $carbon_intensity_table, + 'FROM' => $location_table, 'INNER JOIN' => [ - $carbon_intensity_source_zone_table => [ - 'FKEY' => [ - $carbon_intensity_table => 'plugin_carbon_zones_id', - $carbon_intensity_source_zone_table => 'plugin_carbon_zones_id', - ] + $source_zone_table => [ + 'ON' => [ + $source_zone_table => 'id', + $location_table => $source_zone_fk, + ], + ], + $source_table => [ + 'ON' => [ + $source_table => 'id', + $source_zone_table => $source_fk, + [ + 'AND' => [ + Source::getTableField('is_carbon_intensity_source') => 1, + ], + ], + ], ], - $carbon_intensity_source_table => [ - 'FKEY' => [ - $carbon_intensity_source_zone_table => 'plugin_carbon_carbonintensitysources_id', - $carbon_intensity_source_table => 'id', - ] - ] ], - 'WHERE' => [ - CarbonIntensitySource::getTableField('is_fallback') => 1, - CarbonIntensitySource_Zone::getTableField('plugin_carbon_zones_id') => $zone->getID(), + 'LEFT JOIN' => [ + $source_zone_table . ' AS alternate_sources_zones' => [ + 'ON' => [ + $source_zone_table => 'plugin_carbon_zones_id', + 'alternate_sources_zones' => 'plugin_carbon_zones_id', + ], + ], + $source_table . ' AS alternate_sources' => [ + 'ON' => [ + 'alternate_sources' => 'id', + 'alternate_sources_zones' => $source_fk, + [ + 'AND' => [ + 'alternate_sources.is_carbon_intensity_source' => 1, + 'alternate_sources.fallback_level' => ['>', new QueryExpression(Source::getTableField('fallback_level'))], + ], + ], + ], + ], + $carbon_intensity_table => [ + 'ON' => [ + $carbon_intensity_table => $zone_fk, + $source_zone_table => $zone_fk, + [ + 'AND' => [ + 'OR' => [ + [CarbonIntensity::getTableField($source_fk) => new QueryExpression(Source_Zone::getTableField($source_fk))], + [CarbonIntensity::getTableField($source_fk) => new QueryExpression('alternate_sources_zones.' . $source_fk)], + ], + ], + ], + ], + ], ], - 'ORDER' => CarbonIntensity::getTableField('date') . ' DESC', - 'LIMIT' => 1, + 'WHERE' => $crit, ]; + + return $request; + } + + /** + * Tells if a location has fallback carbon intensity data + * + * @param CommonDBTM $item + * @return bool + */ + public function hasFallbackCarbonIntensityData(CommonDBTM $item): bool + { + /** @var DBmysql $DB */ + global $DB; + + if ($item->getType() === GlpiLocation::class) { + $location_id = $item->getID(); + } else { + $location_id = $item->fields['locations_id']; + } + + $request = self::getCarbonIntensityDataSourceRequest([ + Location::getTableField('locations_id') => $location_id, + 'OR' => [ + // Primary source is a fallback or alternate source is a fallback + 'NOT' => ['alternate_sources.id' => null], + Source::getTableField('fallback_level') => ['>', 0], + ], + ]); + $result = $DB->request($request); - return ($result->count() > 0); + return ($result->current()['count'] > 0); } /** - * Associate a zone for a location (added or updated), for Boavizta + * Associate a Boavizta zone for a location (added or updated) * * @param CommonDBTM $item * @return bool true if a zone has been set @@ -325,6 +520,31 @@ protected function setBoaviztaZone(CommonDBTM $item): bool ]); } + /** + * Associate a Source_Zone object for a location + */ + protected function setSourceZone(CommonDBTM $item): bool + { + if (!isset($item->input['_plugin_carbon_sources_zones_id'])) { + return false; + } + + $this->getFromDBByCrit([ + 'locations_id' => $item->getID(), + ]); + + if ($this->isNewItem()) { + return false !== $this->add([ + 'locations_id' => $item->getID(), + 'plugin_carbon_sources_zones_id' => $item->input['_plugin_carbon_sources_zones_id'], + ]); + } + return $this->update([ + 'id' => $this->getID(), + 'plugin_carbon_sources_zones_id' => $item->input['_plugin_carbon_sources_zones_id'], + ]); + } + public function onGlpiLocationPrePurge(CommonDBTM $item): bool { $this->getFromDBByCrit([ @@ -345,7 +565,7 @@ public function onGlpiLocationPrePurge(CommonDBTM $item): bool * @param Geocoder $geocoder * @return string * - * @throws \Geocoder\Exception\Exception + * @throws Exception */ public function getCountryCode(CommonDBTM $item, Geocoder $geocoder): string { @@ -362,9 +582,9 @@ public function getCountryCode(CommonDBTM $item, Geocoder $geocoder): string $location_string = implode(', ', $location_elements); try { $result = $geocoder->geocodeQuery(GeocodeQuery::create($location_string)); - } catch (\Geocoder\Exception\QuotaExceeded $e) { + } catch (QuotaExceeded $e) { throw $e; - } catch (\Geocoder\Exception\Exception $e) { + } catch (Exception $e) { trigger_error($e->getMessage(), E_USER_WARNING); return ''; } @@ -387,7 +607,7 @@ public function getCountryCode(CommonDBTM $item, Geocoder $geocoder): string */ public static function getIncompleteLocations(array $where = []): DBmysqlIterator { - /** @var DBmysql $DB */ + /** @var DBmysql $DB */ global $DB; $where = array_diff_key($where, [ @@ -411,21 +631,107 @@ public static function getIncompleteLocations(array $where = []): DBmysqlIterato 'ON' => [ $location_table => 'locations_id', $glpi_location_table => 'id', - ] - ] + ], + ], ], 'WHERE' => [ [ 'OR' => [ ['boavizta_zone' => null], ['boavizta_zone' => ''], - ] - ] - ] + ], + ], + ], ]; $request = array_merge_recursive($request, $where); $result = $DB->request($request); return $result; } + + public function getSourceZoneId(): int + { + /** @var DBmysql $DB */ + global $DB; + + if ($this->isNewItem()) { + return 0; + } + + if (!Source_Zone::isNewID($this->fields['plugin_carbon_sources_zones_id'])) { + return $this->fields['plugin_carbon_sources_zones_id']; + } + + $location_table = self::getTable(); + $glpi_location_table = GlpiLocation::getTable(); + $ancestors = (new DbUtils())->getAncestorsOf($glpi_location_table, $this->fields['locations_id']); + if (count($ancestors) === 0) { + return 0; + } + + $ancestors = array_values($ancestors); // Drop keys + $request = [ + 'SELECT' => self::getTableField('plugin_carbon_sources_zones_id'), + 'FROM' => $glpi_location_table, + 'INNER JOIN' => [ + $location_table => [ + 'FKEY' => [ + $glpi_location_table => 'id', + $location_table => 'locations_id', + ], + ], + ], + 'WHERE' => [ + GlpiLocation::getTableField('id') => $ancestors, + self::getTableField('plugin_carbon_sources_zones_id') => ['>', 0], + ], + 'ORDER' => 'level DESC', + 'LIMIT' => '1', + ]; + $iterator = $DB->request($request); + if ($iterator->count() === 0) { + return 0; + } + + return $iterator->current()['plugin_carbon_sources_zones_id']; + } + + /** + * Get the boavizta zone code the asset belongs to + * + * @param CommonDBTM $item + * @param DateTime $date Date for which the zone must be found + * @return string|null + */ + public static function getZoneCode(CommonDBTM $item, ?DateTime $date = null): ?string + { + // TODO: use date to find where was the asset at the given date + if ($date === null) { + $item_table = getTableForItemType($item::class); + $glpi_location_table = getTableForItemType(GlpiLocation::class); + $location_table = self::getTable(); + $location = new Location(); + $found = $location->getFromDBByRequest([ + 'INNER JOIN' => [ + $glpi_location_table => [ + 'FKEY' => [ + $location_table => 'locations_id', + $glpi_location_table => 'id', + ], + ], + ], + 'WHERE' => [ + GlpiLocation::getTableField('id') => $item->fields['locations_id'], + ], + ]); + + if ($found === false) { + return null; + } + + return $location->fields['boavizta_zone']; + } + + throw new LogicException('Not implemented yet'); + } } diff --git a/src/MonitorModel.php b/src/MonitorModel.php new file mode 100644 index 00000000..d929e3d2 --- /dev/null +++ b/src/MonitorModel.php @@ -0,0 +1,41 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon; + +use MonitorModel as GlpiMonitorModel; + +class MonitorModel extends AbstractModel +{ + public static $itemtype = GlpiMonitorModel::class; + public static $items_id = 'monitormodels_id'; +} diff --git a/src/MonitorType.php b/src/MonitorType.php index 55a1aec5..9d6153da 100644 --- a/src/MonitorType.php +++ b/src/MonitorType.php @@ -34,8 +34,8 @@ use CommonDBTM; use Html; -use MonitorType as GlpiMonitorType; use MassiveAction; +use MonitorType as GlpiMonitorType; class MonitorType extends AbstractType { @@ -78,7 +78,7 @@ public static function processMassiveActionsForOneItemtype(MassiveAction $ma, Co * Update the power consumption associated to a monitor type * * @param CommonDBTM $item Monitor to update - * @param integer $power pwoer consumption to set + * @param int $power pwoer consumption to set * @return bool */ public static function updatePowerConsumption(CommonDBTM $item, int $power) diff --git a/src/NetworkEquipmentModel.php b/src/NetworkEquipmentModel.php new file mode 100644 index 00000000..70bde975 --- /dev/null +++ b/src/NetworkEquipmentModel.php @@ -0,0 +1,41 @@ +. + * + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Carbon; + +use NetworkEquipmentModel as GlpiNetworkEquipmentModel; + +class NetworkEquipmentModel extends AbstractModel +{ + public static $itemtype = GlpiNetworkEquipmentModel::class; + public static $items_id = 'networkequipmentmodels_id'; +} diff --git a/src/NetworkEquipmentType.php b/src/NetworkEquipmentType.php index e6021180..cf361c25 100644 --- a/src/NetworkEquipmentType.php +++ b/src/NetworkEquipmentType.php @@ -57,7 +57,6 @@ public static function showMassiveActionsSubForm(MassiveAction $ma) return parent::showMassiveActionsSubForm($ma); } - public static function processMassiveActionsForOneItemtype(MassiveAction $ma, CommonDBTM $item, array $ids) { switch ($ma->getAction()) { @@ -78,7 +77,7 @@ public static function processMassiveActionsForOneItemtype(MassiveAction $ma, Co * Update the power consumption associated to a net equipment type * * @param CommonDBTM $item Monitor to update - * @param integer $power pwoer consumption to set + * @param int $power pwoer consumption to set * @return bool */ public static function updatePowerConsumption(CommonDBTM $item, int $power) diff --git a/src/Profile.php b/src/Profile.php index 6bfe9936..fadb615f 100644 --- a/src/Profile.php +++ b/src/Profile.php @@ -34,8 +34,8 @@ use CommonDBTM; use CommonGLPI; -use Profile as GlpiProfile; use Html; +use Profile as GlpiProfile; use Session; class Profile extends GlpiProfile diff --git a/src/Report.php b/src/Report.php index bbb6f8ed..662ae55d 100644 --- a/src/Report.php +++ b/src/Report.php @@ -36,9 +36,8 @@ use DateTime; use DateTimeImmutable; use Glpi\Application\View\TemplateRenderer; -use GlpiPlugin\Carbon\Dashboard\Provider; use Glpi\Dashboard\Grid as DashboardGrid; -use Plugin; +use GlpiPlugin\Carbon\Dashboard\Provider; class Report extends CommonDBTM { @@ -69,7 +68,7 @@ public static function getMenuContent() 'links' => [ 'search' => Report::getSearchURL(), 'lists' => '', - ] + ], ]; } @@ -121,7 +120,7 @@ public static function showInstantReport(): void public static function getUsageCarbonEmission(array $params = []): array { if (!isset($params['args']['apply_filters']['dates'][0]) || !isset($params['args']['apply_filters']['dates'][1])) { - list($start_date, $end_date) = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); + [$start_date, $end_date] = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); $params['apply_filters']['dates'][0] = $start_date->format('Y-m-d\TH:i:s.v\Z'); $params['apply_filters']['dates'][1] = $end_date->format('Y-m-d\TH:i:s.v\Z'); } else { @@ -129,7 +128,7 @@ public static function getUsageCarbonEmission(array $params = []): array $end_date = DateTime::createFromFormat('Y-m-d\TH:i:s.v\Z', $params['args']['apply_filters'][1]); } - $value = Provider::getUsageCarbonEmission($params)['number']; + $value = Provider::getImpactOfUsageCriteria('gwp', $params)['number']; // Prepare date format $date_format = 'Y F'; @@ -158,7 +157,7 @@ public static function getUsageCarbonEmission(array $params = []): array public static function getTotalEmbodiedCarbonEmission(array $params = []): array { if (!isset($params['args']['apply_filters']['dates'][0]) || !isset($params['args']['apply_filters']['dates'][1])) { - list($start_date, $end_date) = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); + [$start_date, $end_date] = (new Toolbox())->yearToLastMonth(new DateTimeImmutable('now')); $params['args']['apply_filters']['dates'][0] = $start_date->format('Y-m-d\TH:i:s.v\Z'); $params['args']['apply_filters']['dates'][1] = $end_date->format('Y-m-d\TH:i:s.v\Z'); } else { @@ -166,7 +165,7 @@ public static function getTotalEmbodiedCarbonEmission(array $params = []): array $end_date = DateTime::createFromFormat('Y-m-d\TH:i:s.v\Z', $params['args']['apply_filters'][1]); } - $value = Provider::getEmbodiedGlobalWarming($params); + $value = Provider::getImpactOfEmbodiedCriteria('gwp', $params); // Prepare date format $date_format = 'Y F'; diff --git a/src/SearchOptions.php b/src/SearchOptions.php index 4f278ed9..06df8939 100644 --- a/src/SearchOptions.php +++ b/src/SearchOptions.php @@ -33,18 +33,19 @@ namespace GlpiPlugin\Carbon; use CommonDBTM; -use Computer; -use Location as GlpiLocation; -use ComputerType as GlpiComputerType; +use Computer as GlpiComputer; use ComputerModel; -use Computer_Item; +use ComputerType as GlpiComputerType; use Glpi\Asset\Asset_PeripheralAsset; -use Monitor; -use MonitorType as GlpiMonitorType; +use Glpi\DBAL\QueryExpression; +use Glpi\DBAL\QuerySubQuery; +use Location as GlpiLocation; +use Monitor as GlpiMonitor; use MonitorModel; +use MonitorType as GlpiMonitorType; use NetworkEquipment; -use NetworkEquipmentType as GlpiNetworkEquipmentType; use NetworkEquipmentModel; +use NetworkEquipmentType as GlpiNetworkEquipmentType; /** * This file is *REQUIRED* in the whole life time of the plugin @@ -79,34 +80,50 @@ class SearchOptions public const CARBON_INTENSITY_INTENSITY = self::SEARCH_OPTION_BASE + 403; public const POWER_CONSUMPTION = self::SEARCH_OPTION_BASE + 500; - public const IS_HISTORIZABLE = self::SEARCH_OPTION_BASE + 502; public const USAGE_PROFILE = self::SEARCH_OPTION_BASE + 501; + public const IS_HISTORIZABLE = self::SEARCH_OPTION_BASE + 502; + public const IS_IGNORED = self::SEARCH_OPTION_BASE + 503; public const CARBON_EMISSION_DATE = self::SEARCH_OPTION_BASE + 600; public const CARBON_EMISSION_ENERGY_PER_DAY = self::SEARCH_OPTION_BASE + 601; public const CARBON_EMISSION_PER_DAY = self::SEARCH_OPTION_BASE + 602; public const CARBON_EMISSION_ENERGY_QUALITY = self::SEARCH_OPTION_BASE + 603; public const CARBON_EMISSION_EMISSION_QUALITY = self::SEARCH_OPTION_BASE + 604; - public const CARBON_EMISSION_CALC_DATE = self::SEARCH_OPTION_BASE + 605; - public const CARBON_EMISSION_ENGINE = self::SEARCH_OPTION_BASE + 606; - public const CARBON_EMISSION_ENGINE_VER = self::SEARCH_OPTION_BASE + 607; + public const CALCULATION_DATE = self::SEARCH_OPTION_BASE + 605; + public const CALCULATION_ENGINE = self::SEARCH_OPTION_BASE + 606; + public const CALCULATION_ENGINE_VERSION = self::SEARCH_OPTION_BASE + 607; - public const USAGE_IMPACT_DATE = self::SEARCH_OPTION_BASE + 700; - public const USAGE_IMPACT_GWP = self::SEARCH_OPTION_BASE + 701; - public const USAGE_IMPACT_GWP_QUALITY = self::SEARCH_OPTION_BASE + 702; - public const USAGE_IMPACT_ADP = self::SEARCH_OPTION_BASE + 703; - public const USAGE_IMPACT_ADP_QUALITY = self::SEARCH_OPTION_BASE + 704; - public const USAGE_IMPACT_PE = self::SEARCH_OPTION_BASE + 705; - public const USAGE_IMPACT_PE_QUALITY = self::SEARCH_OPTION_BASE + 706; - - public const COMPUTER_TYPE_CATEGORY = self::SEARCH_OPTION_BASE + 800; + public const COMPUTER_TYPE_CATEGORY = self::SEARCH_OPTION_BASE + 800; + public const COMPUTER_TYPE_IS_IGNORED = self::SEARCH_OPTION_BASE + 801; public const LOCATION_BOAVIZTA_ZONE = self::SEARCH_OPTION_BASE + 900; - /* + public const MONITOR_TYPE_IS_IGNORED = self::SEARCH_OPTION_BASE + 1000; + + public const NETEQUIP_TYPE_IS_IGNORED = self::SEARCH_OPTION_BASE + 1100; + + // First search option ID for all imapcts + // Impacts are numbered accross several consecutive IDs + // - impact type + // - impact quality + // @see AbstractImpact::rawSearchOption + public const IMPACT_BASE = self::SEARCH_OPTION_BASE + 1200; + + public const EMBODIED_IMPACT_GWP = self::SEARCH_OPTION_BASE + 1200; + public const EMBODIED_IMPACT_GWP_SOURCE = self::SEARCH_OPTION_BASE + 1201; + public const EMBODIED_IMPACT_GWP_QUALITY = self::SEARCH_OPTION_BASE + 1202; + public const EMBODIED_IMPACT_ADP = self::SEARCH_OPTION_BASE + 1203; + public const EMBODIED_IMPACT_ADP_SOURCE = self::SEARCH_OPTION_BASE + 1204; + public const EMBODIED_IMPACT_ADP_QUALITY = self::SEARCH_OPTION_BASE + 1205; + public const EMBODIED_IMPACT_PE = self::SEARCH_OPTION_BASE + 1206; + public const EMBODIED_IMPACT_PE_SOURCE = self::SEARCH_OPTION_BASE + 1207; + public const EMBODIED_IMPACT_PE_QUALITY = self::SEARCH_OPTION_BASE + 1208; + + /** * Get search options added to a core itemtype by the plugin * - * @param string $itemtype + * @template T of CommonDBTM + * @param class-string $itemtype * @return array */ public static function getCoreSearchOptions(string $itemtype): array @@ -135,9 +152,11 @@ public static function getCoreSearchOptions(string $itemtype): array /** @phpstan-ignore-next-line */ if (class_exists($item_type_class) && is_subclass_of($item_type_class, CommonDBTM::class)) { $itemtype_fk = $itemtype::getForeignKeyField(); + $item_type_table = getTableForItemType($item_type_class); + $glpi_item_type_table = getTableForItemType($glpi_item_type_class); $sopt[] = [ 'id' => SearchOptions::POWER_CONSUMPTION, - 'table' => getTableForItemType($item_type_class), + 'table' => $item_type_table, 'field' => 'power_consumption', 'name' => __('Power consumption', 'carbon'), 'datatype' => 'number', @@ -149,18 +168,38 @@ public static function getCoreSearchOptions(string $itemtype): array 'joinparams' => [ 'jointype' => 'child', 'beforejoin' => [ - 'table' => getTableForItemType($glpi_item_type_class), + 'table' => $glpi_item_type_table, + 'joinparams' => [ + 'jointype' => 'child', + ], + ], + ], + 'computation' => "COALESCE(TABLE.`power_consumption`, 0)", + ]; + + $sopt[] = [ + 'id' => SearchOptions::IS_IGNORED, + 'table' => $item_type_table, + 'field' => 'is_ignore', + 'name' => __('Ignore environmental impact', 'carbon'), + 'datatype' => 'bool', + 'massiveaction' => false, + 'linkfield' => $itemtype_fk, + 'joinparams' => [ + 'jointype' => 'child', + 'beforejoin' => [ + 'table' => $glpi_item_type_table, 'joinparams' => [ 'jointype' => 'child', - ] - ] + ], + ], ], - 'computation' => "IF(TABLE.`power_consumption` IS NULL, 0, TABLE.`power_consumption`)", + 'computation' => "COALESCE(TABLE.`is_ignore`, 0)", ]; } } - if ($itemtype === Computer::class && in_array($itemtype, PLUGIN_CARBON_TYPES)) { + if ($itemtype === GlpiComputer::class && in_array($itemtype, PLUGIN_CARBON_TYPES)) { $sopt[] = [ 'id' => SearchOptions::USAGE_PROFILE, 'table' => ComputerUsageProfile::getTable(), @@ -174,20 +213,26 @@ public static function getCoreSearchOptions(string $itemtype): array 'table' => UsageInfo::getTable(), 'joinparams' => [ 'jointype' => 'child', - ] - ] - ] + ], + ], + ], ]; - $computation = "IF(`glpi_computers_id_e1f6cdb2d63e8a0252da5d4cb339a927`.`is_deleted` = 0 - AND `glpi_computers_id_e1f6cdb2d63e8a0252da5d4cb339a927`.`is_template` = 0 - AND NOT `glpi_locations`.`country` = '' - AND NOT `glpi_locations`.`country` IS NULL - AND `glpi_plugin_carbon_computerusageprofiles_09f8403aa14af64cd70f350288a0331b`.`id` > 0 - AND ( + $fallback_carbon_intensity_subquery = Location::getCarbonIntensityDataSourceRequest([ + Location::getTableField('id') => new QueryExpression('glpi_plugin_carbon_locations_3d6da7fccf9233a3f1a4e41183391a41.id'), + ]); + $fallback_carbon_intensity_subquery = (new QuerySubQuery($fallback_carbon_intensity_subquery))->getQuery(); + $computation = "IF(`glpi_computers_id_963cd5e903dddc7ab00a3b70933369df`.`is_deleted` = 0 + AND `glpi_computers_id_963cd5e903dddc7ab00a3b70933369df`.`is_template` = 0 + AND `glpi_plugin_carbon_locations_3d6da7fccf9233a3f1a4e41183391a41`.`plugin_carbon_sources_zones_id` > 0 + AND `glpi_plugin_carbon_computerusageprofiles_09f8403aa14af64cd70f350288a0331b`.`id` > 0" + // Do not check if an asset is ignored + // . "AND COALESCE(`glpi_plugin_carbon_computertypes_a643ab3ffd70abf99533ed214da87d60`.`is_ignore`, 0) = 0" + . " AND ( `glpi_plugin_carbon_computertypes_a643ab3ffd70abf99533ed214da87d60`.`power_consumption` > 0 OR `glpi_computermodels`.`power_consumption` > 0 - ), 1, 0)"; + ) + AND ($fallback_carbon_intensity_subquery) > 0, 1, 0)"; $sopt[] = [ 'id' => SearchOptions::IS_HISTORIZABLE, 'table' => getTableForItemType($itemtype), @@ -200,11 +245,17 @@ public static function getCoreSearchOptions(string $itemtype): array 'jointype' => 'empty', 'beforejoin' => [ [ - 'table' => GlpiLocation::getTable(), + 'table' => Location::getTable(), 'joinparams' => [ - 'jointype' => 'empty', + 'jointype' => 'child', 'nolink' => true, - ] + 'beforejoin' => [ + 'table' => GlpiLocation::getTable(), + 'joinparams' => [ + 'jointype' => 'empty', + ], + ], + ], ], [ 'table' => ComputerType::getTable(), @@ -215,16 +266,16 @@ public static function getCoreSearchOptions(string $itemtype): array 'table' => GlpiComputerType::getTable(), 'joinparams' => [ 'jointype' => 'empty', - ] - ] - ] + ], + ], + ], ], [ 'table' => ComputerModel::getTable(), 'joinparams' => [ 'jointype' => 'empty', 'nolink' => true, - ] + ], ], [ 'table' => ComputerUsageProfile::getTable(), @@ -235,15 +286,16 @@ public static function getCoreSearchOptions(string $itemtype): array 'table' => UsageInfo::getTable(), 'joinparams' => [ 'jointype' => 'itemtype_item', - ] - ] - ] + ], + ], + ], ], ], ], 'computation' => $computation, ]; - } else if ($itemtype === GlpiComputerType::class && in_array(Computer::class, PLUGIN_CARBON_TYPES)) { + } elseif ($itemtype === GlpiComputerType::class && in_array(GlpiComputer::class, PLUGIN_CARBON_TYPES)) { + $computer_type_table = getTableForItemType(ComputerType::class); $sopt[] = [ 'id' => SearchOptions::COMPUTER_TYPE_CATEGORY, 'table' => getTableForItemType(ComputerType::class), @@ -253,15 +305,55 @@ public static function getCoreSearchOptions(string $itemtype): array 'searchtype' => ['equals', 'notequals'], 'massiveaction' => false, 'joinparams' => [ - 'jointype' => 'child' - ] + 'jointype' => 'child', + ], + ]; + + $sopt[] = [ + 'id' => SearchOptions::COMPUTER_TYPE_IS_IGNORED, + 'table' => $computer_type_table, + 'field' => 'is_ignore', + 'name' => __('Ignore environmental impact', 'carbon'), + 'datatype' => 'bool', + 'massiveaction' => false, + 'joinparams' => [ + 'jointype' => 'child', + ], + 'computation' => "COALESCE(TABLE.`is_ignore`, 0)", + ]; + } elseif ($itemtype === GlpiMonitorType::class && in_array(GlpiMonitor::class, PLUGIN_CARBON_TYPES)) { + $sopt[] = [ + 'id' => SearchOptions::MONITOR_TYPE_IS_IGNORED, + 'table' => getTableForItemType(MonitorType::class), + 'field' => 'is_ignore', + 'name' => __('Ignore environmental impact', 'carbon'), + 'datatype' => 'bool', + 'massiveaction' => false, + 'joinparams' => [ + 'jointype' => 'child', + ], + 'computation' => "COALESCE(TABLE.`is_ignore`, 0)", + ]; + } elseif ($itemtype === GlpiNetworkEquipmentType::class && in_array(NetworkEquipment::class, PLUGIN_CARBON_TYPES)) { + $sopt[] = [ + 'id' => SearchOptions::NETEQUIP_TYPE_IS_IGNORED, + 'table' => getTableForItemType(NetworkEquipmentType::class), + 'field' => 'is_ignore', + 'name' => __('Ignore environmental impact', 'carbon'), + 'datatype' => 'bool', + 'massiveaction' => false, + 'joinparams' => [ + 'jointype' => 'child', + ], + 'computation' => "COALESCE(TABLE.`is_ignore`, 0)", ]; - } else if ($itemtype === Monitor::class && in_array($itemtype, PLUGIN_CARBON_TYPES)) { - $computation = "IF(`glpi_monitors_id_fd9c1a8262e8f3b6e96bc8948f2a6226`.`is_deleted` = 0 - AND `glpi_monitors_id_fd9c1a8262e8f3b6e96bc8948f2a6226`.`is_template` = 0 - AND NOT `glpi_locations_fad8b1764dcda16e3822068239df73f2`.`country` = '' - AND NOT `glpi_locations_fad8b1764dcda16e3822068239df73f2`.`country` IS NULL - AND ( + } elseif ($itemtype === GlpiMonitor::class && in_array($itemtype, PLUGIN_CARBON_TYPES)) { + $computation = "IF(`glpi_monitors_id_b24d2115745b49f0b5cdaf2ebb5e9ffe`.`is_deleted` = 0 + AND `glpi_monitors_id_b24d2115745b49f0b5cdaf2ebb5e9ffe`.`is_template` = 0 + AND `glpi_plugin_carbon_locations_3d6da7fccf9233a3f1a4e41183391a41`.`plugin_carbon_sources_zones_id` > 0" + // Do not check if an asset is ignored + // . "AND `glpi_plugin_carbon_monitortypes_54b036337d1b9bbf4f13db0e1ae93bc9`.`is_ignore` = 0" + . " AND ( `glpi_plugin_carbon_monitortypes_54b036337d1b9bbf4f13db0e1ae93bc9`.`power_consumption` > 0 OR `glpi_monitormodels`.`power_consumption` > 0 ), 1, 0)"; @@ -277,64 +369,68 @@ public static function getCoreSearchOptions(string $itemtype): array 'jointype' => 'empty', 'beforejoin' => [ [ - 'table' => GlpiLocation::getTable(), + 'table' => Location::getTable(), 'joinparams' => [ - 'jointype' => 'empty', - 'nolink' => true, + 'jointype' => 'child', 'beforejoin' => [ - 'table' => Computer::getTable(), - 'linkfield' => 'items_id_peripheral', + 'table' => GlpiLocation::getTable(), 'joinparams' => [ 'jointype' => 'empty', 'beforejoin' => [ - 'table' => Asset_PeripheralAsset::getTable(), + 'table' => GlpiComputer::getTable(), + 'linkfield' => 'items_id_peripheral', 'joinparams' => [ - 'jointype' => 'custom_condition_only', - 'condition' => [ - 'ON' => [ - 'NEWTABLE' => 'items_id_peripheral', - 'REFTABLE' => 'id', + 'jointype' => 'empty', + 'beforejoin' => [ + 'table' => Asset_PeripheralAsset::getTable(), + 'joinparams' => [ + 'jointype' => 'custom_condition_only', + 'condition' => [ + 'ON' => [ + 'NEWTABLE' => 'items_id_peripheral', + 'REFTABLE' => 'id', + ], + 'AND' => [ + 'itemtype_peripheral' => GlpiMonitor::getType(), + ], + ], ], - 'AND' => [ - 'itemtype_peripheral' => Monitor::getType(), - ] ], - ] - ] - ] - ] - ] + ], + ], + ], + ], + ], ], [ 'table' => MonitorType::getTable(), 'joinparams' => [ 'jointype' => 'child', - 'nolink' => true, 'beforejoin' => [ 'table' => GlpiMonitorType::getTable(), 'joinparams' => [ 'jointype' => 'empty', - ] - ] - ] + ], + ], + ], ], [ 'table' => MonitorModel::getTable(), 'joinparams' => [ 'jointype' => 'empty', - 'nolink' => true, - ] + ], ], ], ], 'computation' => $computation, ]; - } else if ($itemtype === NetworkEquipment::class && in_array($itemtype, PLUGIN_CARBON_TYPES)) { - $computation = "IF(`glpi_networkequipments_id_aef00423a27f97ae31ca50f63fb1a6fb`.`is_deleted` = 0 - AND `glpi_networkequipments_id_aef00423a27f97ae31ca50f63fb1a6fb`.`is_template` = 0 - AND NOT `glpi_locations`.`country` = '' - AND NOT `glpi_locations`.`country` IS NULL - AND ( + } elseif ($itemtype === NetworkEquipment::class && in_array($itemtype, PLUGIN_CARBON_TYPES)) { + $computation = "IF(`glpi_networkequipments_id_401e18dd2eaa15834dcd21d0f6fc677c`.`is_deleted` = 0 + AND `glpi_networkequipments_id_401e18dd2eaa15834dcd21d0f6fc677c`.`is_template` = 0 + AND `glpi_plugin_carbon_locations_3d6da7fccf9233a3f1a4e41183391a41`.`plugin_carbon_sources_zones_id` > 0" + // Do not check if an asset is ignored + // . "AND `glpi_plugin_carbon_networkequipmenttypes_640a9703b62363e5d254356fb4df69ef`.`is_ignore` = 0 + . " AND ( `glpi_plugin_carbon_networkequipmenttypes_640a9703b62363e5d254356fb4df69ef`.`power_consumption` > 0 OR `glpi_networkequipmentmodels`.`power_consumption` > 0 ), 1, 0)"; @@ -350,11 +446,17 @@ public static function getCoreSearchOptions(string $itemtype): array 'jointype' => 'empty', 'beforejoin' => [ [ - 'table' => GlpiLocation::getTable(), + 'table' => Location::getTable(), 'joinparams' => [ - 'jointype' => 'empty', + 'jointype' => 'child', 'nolink' => true, - ] + 'beforejoin' => [ + 'table' => GlpiLocation::getTable(), + 'joinparams' => [ + 'jointype' => 'empty', + ], + ], + ], ], [ 'table' => NetworkEquipmentType::getTable(), @@ -365,16 +467,16 @@ public static function getCoreSearchOptions(string $itemtype): array 'table' => GlpiNetworkEquipmentType::getTable(), 'joinparams' => [ 'jointype' => 'empty', - ] - ] - ] + ], + ], + ], ], [ 'table' => NetworkEquipmentModel::getTable(), 'joinparams' => [ 'jointype' => 'empty', 'nolink' => true, - ] + ], ], ], ], diff --git a/src/CarbonIntensitySource.php b/src/Source.php similarity index 67% rename from src/CarbonIntensitySource.php rename to src/Source.php index 2fcfc6a3..a625e264 100644 --- a/src/CarbonIntensitySource.php +++ b/src/Source.php @@ -32,13 +32,14 @@ namespace GlpiPlugin\Carbon; -use CommonDropdown; use CommonDBTM; +use CommonDropdown; use CommonGLPI; +use DBmysql; use DbUtils; use Session; -class CarbonIntensitySource extends CommonDropdown +class Source extends CommonDropdown { public static function getTypeName($nb = 0) { @@ -81,7 +82,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) case Zone::class: if ($_SESSION['glpishow_count_on_tabs']) { $nb = (new DbUtils())->countElementsInTable( - CarbonIntensitySource_Zone::getTable(), + Source_Zone::getTable(), [self::getForeignKeyField() => $item->getID()] ); } @@ -97,7 +98,7 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $ /** @var CommonDBTM $item */ switch ($item->getType()) { case Zone::class: - CarbonIntensitySource_Zone::showForZone($item); + Source_Zone::showForZone($item); } return true; @@ -107,15 +108,64 @@ public function rawSearchOptions() { $tab = parent::rawSearchOptions(); + $table = self::getTable(); + $tab[] = [ 'id' => '3', - 'table' => $this->getTable(), - 'field' => 'is_fallback', + 'table' => $table, + 'field' => 'fallback_level', 'name' => __('Is a fallback source'), 'massiveaction' => false, 'datatype' => 'boolean', ]; + $tab[] = [ + 'id' => '4', + 'table' => $table, + 'field' => 'is_carbon_intensity_source', + 'name' => __('Is a carbon intensity source'), + 'massiveaction' => false, + 'datatype' => 'boolean', + ]; + return $tab; } + + /** + * Get an array of source names for downloadable data + * + * @return array + */ + public function getDownloadableSources(): array + { + /** @var DBmysql $DB */ + global $DB; + + $iterator = $DB->request([ + 'SELECT' => ['id', 'name'], + 'FROM' => self::getTable(), + 'WHERE' => [ + 'fallback_level' => 0, + ], + ]); + return iterator_to_array($iterator); + } + + /** + * get or create an item + * + * @param array $params + * @param array $where + * @return self|null + */ + public function getOrCreate(array $params, array $where): ?self + { + if (!$this->getFromDBByCrit($where)) { + $this->add(array_merge($where, $params)); + return $this; + } + + $this->update(array_merge($where, $params, ['id' => $this->getID()])); + return $this; + } } diff --git a/src/CarbonIntensitySource_Zone.php b/src/Source_Zone.php similarity index 58% rename from src/CarbonIntensitySource_Zone.php rename to src/Source_Zone.php index 10081e5f..0ac86eb6 100644 --- a/src/CarbonIntensitySource_Zone.php +++ b/src/Source_Zone.php @@ -33,18 +33,20 @@ namespace GlpiPlugin\Carbon; use CommonDBRelation; -use CommonGLPI; use CommonDBTM; +use CommonGLPI; use CronTask; use DBmysql; -use GlpiPlugin\Carbon\Application\View\Extension\DataHelpersExtension; use Glpi\Application\View\TemplateRenderer; +use Glpi\DBAL\QueryExpression; use Html; +use InvalidArgumentException; +use Location as GlpiLocation; -class CarbonIntensitySource_Zone extends CommonDBRelation +class Source_Zone extends CommonDBRelation { - public static $itemtype_1 = CarbonIntensitySource::class; // Type ref or field name (must start with itemtype) - public static $items_id_1 = 'plugin_carbon_carbonintensitysources_id'; // Field name + public static $itemtype_1 = Source::class; // Type ref or field name (must start with itemtype) + public static $items_id_1 = 'plugin_carbon_sources_id'; // Field name public static $checkItem_1_Rights = self::HAVE_SAME_RIGHT_ON_ITEM; public static $itemtype_2 = Zone::class; // Type ref or field name (must start with itemtype) @@ -53,10 +55,10 @@ class CarbonIntensitySource_Zone extends CommonDBRelation public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { - if ($item->getType() === CarbonIntensitySource::class) { + if ($item->getType() === Source::class) { return self::createTabEntry(Zone::getTypeName(), 0); } - return self::createTabEntry(CarbonIntensitySource::getTypeName(), 0); + return self::createTabEntry(Source::getTypeName(), 0); } public function rawSearchOptions() @@ -65,7 +67,7 @@ public function rawSearchOptions() $tab[] = [ 'id' => '5', - 'table' => CarbonIntensitySource::getTable(), + 'table' => Source::getTable(), 'field' => 'name', 'name' => __('Source name', 'carbon'), 'datatype' => 'dropdown', @@ -81,7 +83,7 @@ public function rawSearchOptions() $tab[] = [ 'id' => '7', - 'table' => CarbonIntensitySource::getTable(), + 'table' => Source::getTable(), 'field' => 'is_download_enabled', 'name' => __('Download enabled', 'carbon'), 'datatype' => 'bool', @@ -110,21 +112,21 @@ public static function showForSource(CommonDBTM $item) } $canedit = $item->canEdit($item_id); - $source_table = CarbonIntensitySource::getTable(); + $source_table = Source::getTable(); $zone_table = Zone::getTable(); $source_zone_table = self::getTable(); $iterator = $DB->request([ 'SELECT' => [ $zone_table => 'name', $source_zone_table => ['id', 'is_download_enabled'], - CarbonIntensitySource::getTableField('name') . ' AS historical_source_name', - $source_table => 'is_fallback' + Source::getTableField('name') . ' AS historical_source_name', + $source_table => 'fallback_level', ], 'FROM' => $source_zone_table, 'INNER JOIN' => [ $source_table => [ 'FKEY' => [ - $source_zone_table => 'plugin_carbon_carbonintensitysources_id', + $source_zone_table => 'plugin_carbon_sources_id', $source_table => 'id', ], ], @@ -136,7 +138,7 @@ public static function showForSource(CommonDBTM $item) ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('id') => $item_id, + Source::getTableField('id') => $item_id, ], 'ORDER' => ['name ASC'], ]); @@ -146,11 +148,11 @@ public static function showForSource(CommonDBTM $item) $entries = []; foreach ($iterator as $data) { $is_download_enabled = __('Not downloadable', 'carbon') . Html::showToolTip(__('This is a fallback source, there is no real-time data available', 'carbon'), ['display' => false]); - if ($data['is_fallback'] == 0) { + if ($data['fallback_level'] == 0) { $is_download_enabled = self::getToggleLink($data['id'], $data['is_download_enabled']); } $entries[] = [ - 'itemtype' => CarbonIntensitySource::class, + 'itemtype' => Source::class, 'id' => $item->getID(), 'name' => $data['name'], 'historical_source_name' => $data['historical_source_name'], @@ -173,7 +175,7 @@ public static function showForSource(CommonDBTM $item) 'is_download_enabled' => 'raw_html', ], 'footers' => [ - ['', '', '', __('Total'), $total, ''] + ['', '', '', __('Total'), $total, ''], ], 'footer_class' => 'fw-bold', 'entries' => $entries, @@ -213,25 +215,27 @@ public static function showForZone(CommonDBTM $item) } $canedit = $item->canEdit($item_id); - $source_table = CarbonIntensitySource::getTable(); + $source_table = Source::getTable(); + $source_fk = Source::getForeignKeyField(); $zone_table = Zone::getTable(); + $zone_fk = Zone::getForeignKeyField(); $source_zone_table = self::getTable(); $iterator = $DB->request([ 'SELECT' => [ $source_table => 'name', - $source_zone_table => ['id', 'is_download_enabled'] + $source_zone_table => ['id', 'is_download_enabled'], ], 'FROM' => $source_zone_table, 'INNER JOIN' => [ $source_table => [ 'FKEY' => [ - $source_zone_table => 'plugin_carbon_carbonintensitysources_id', + $source_zone_table => $source_fk, $source_table => 'id', ], ], $zone_table => [ 'FKEY' => [ - $source_zone_table => 'plugin_carbon_zones_id', + $source_zone_table => $zone_fk, $zone_table => 'id', ], ], @@ -246,7 +250,7 @@ public static function showForZone(CommonDBTM $item) $entries = []; foreach ($iterator as $data) { $entries[] = [ - 'itemtype' => CarbonIntensitySource::class, + 'itemtype' => Source::class, 'id' => $item->getID(), 'name' => $data['name'], 'is_download_enabled' => self::getToggleLink($data['id'], $data['is_download_enabled']), @@ -267,7 +271,7 @@ public static function showForZone(CommonDBTM $item) 'is_download_enabled' => 'raw_html', ], 'footers' => [ - ['', '', '', __('Total'), $total, ''] + ['', '', '', __('Total'), $total, ''], ], 'footer_class' => 'fw-bold', 'entries' => $entries, @@ -277,7 +281,7 @@ public static function showForZone(CommonDBTM $item) 'massiveactionparams' => [ 'num_displayed' => count($entries), 'container' => 'mass' . static::class . mt_rand(), - ] + ], ]); if (count($entries) !== 0) { @@ -299,49 +303,105 @@ public static function showForZone(CommonDBTM $item) * * @param string $source_name * @param string $zone_name - * @return string + * @return bool */ - public function getFromDbBySourceAndZone(string $source_name, string $zone_name): ?string + public function getFromDbBySourceAndZone(string $source_name, string $zone_name): bool { /** @var DBmysql $DB */ global $DB; $zone_table = Zone::getTable(); - $source_table = CarbonIntensitySource::getTable(); + $source_table = Source::getTable(); $source_zone_table = self::getTable(); $request = [ - 'SELECT' => CarbonIntensitySource_Zone::getTableField('code'), + 'SELECT' => Source_Zone::getTable() . '.id', 'FROM' => $source_zone_table, 'INNER JOIN' => [ $source_table => [ 'ON' => [ $source_table => 'id', - $source_zone_table => CarbonIntensitySource::getForeignKeyField(), - ] + $source_zone_table => Source::getForeignKeyField(), + ], ], $zone_table => [ 'ON' => [ $zone_table => 'id', $source_zone_table => Zone::getForeignKeyField(), - ] - ] + ], + ], ], 'WHERE' => [ - CarbonIntensitySource::getTableField('name') => $source_name, + Source::getTableField('name') => $source_name, Zone::getTableField('name') => $zone_name, ], - 'LIMIT' => '1' + 'LIMIT' => '1', ]; $iterator = $DB->request($request); - $zone_code = $iterator->current()['code'] ?? null; + if ($iterator->count() !== 1) { + return false; + } + $id = $iterator->current()['id']; + return $this->getFromDB($id); + } - return $zone_code; + /** + * get the source_zone with fallback source for the given source_zone + * excluding Ember - Energy Institute source + * + * @param Source_Zone $source_zone realtime source-zone + * @return bool + */ + public function getFallbackFromDB(Source_Zone $source_zone): bool + { + $source_zone_table = Source_Zone::getTable(); + $source_table = Source::getTable(); + $source_fk = Source::getForeignKeyField(); + $request = [ + 'SELECT' => 'id', + 'FROM' => $source_zone_table, + 'INNER JOIN' => [ + // the source_zone row matching the $source_zone argument + $source_zone_table . ' AS realtime_sources_zones' => [ + 'ON' => [ + $source_zone_table => 'plugin_carbon_zones_id', + 'realtime_sources_zones' => 'plugin_carbon_zones_id', + ['AND' => [$source_zone_table . '.id' => ['<>', new QueryExpression('`realtime_sources_zones`.`id`')]]], + ], + ], + // The source associated to the source_zone argument (to find the fallback_level) + $source_table . ' AS realtime_source' => [ + 'ON' => [ + 'realtime_sources_zones' => 'plugin_carbon_sources_id', + 'realtime_source' => 'id', + ], + ], + // The fallback source (to compare its fallback_level against the other source) + $source_table => [ + 'ON' => [ + $source_table => 'id', + $source_zone_table => $source_fk, + [ + 'AND' => [ + Source::getTableField('fallback_level') => ['>', new QueryExpression('`realtime_source`.`fallback_level`')], + ], + ], + ], + ], + ], + 'WHERE' => [ + 'realtime_sources_zones.id' => $source_zone->getID(), + ], + 'ORDER' => Source::getTableField('fallback_level'), + 'LIMIT' => 1, + ]; + + return $this->getFromDBByRequest($request); } /** * Get HTML link to enable / disable the download of carbon intensity data for a source and a zone * - * @param integer $zone_id + * @param int $zone_id * @param string|null $state * @return string */ @@ -355,15 +415,15 @@ protected static function getToggleLink(int $zone_id, ?string $state): string /** * Sets or toggles the download for a zone * - * @param boolean|null $state if not null, don't toggle and force the state of the download - * @return boolean true if the update succeeded + * @param bool|null $state if not null, don't toggle and force the state of the download + * @return bool true if the update succeeded */ public function toggleZone(?bool $state = null): bool { // Check if the source is a fallback source - $source = new CarbonIntensitySource(); - $source->getFromDB($this->fields['plugin_carbon_carbonintensitysources_id']); - if ($source->fields['is_fallback'] === 1) { + $source = new Source(); + $source->getFromDB($this->fields['plugin_carbon_sources_id']); + if ($source->fields['fallback_level'] > 0) { // Fallback sources cannot be toggled return false; } @@ -374,8 +434,120 @@ public function toggleZone(?bool $state = null): bool $input = [ 'id' => $this->getID(), - 'is_download_enabled' => $state + 'is_download_enabled' => $state, ]; return $this->update($input) !== false; } + + /** + * Get a source_zone by a item criteria. + * If the item is a location, get the source_zone by location relation + * If the item is something else, get the source_zone by its associated location + * + * @param CommonDBTM $item + * @return bool + */ + public function getFromDbByItem(CommonDBTM $item): bool + { + if ($item->isNewItem()) { + return false; + } + + // Prepare WHERE clause depending of the type of the item + $where = []; + if ($item->getType() === GlpiLocation::class) { + $where = [ + Location::getTableField('locations_id') => $item->getID(), + ]; + } elseif (isset($item->fields['locations_id'])) { + $where = [ + Location::getTableField('locations_id') => $item->fields['locations_id'], + ]; + } else { + throw new InvalidArgumentException('Invalid item'); + } + + $location_table = Location::getTable(); + $source_zone_table = Source_Zone::getTable(); + $request = [ + 'INNER JOIN' => [ + $location_table => [ + 'FKEY' => [ + $location_table => 'plugin_carbon_sources_zones_id', + $source_zone_table => 'id', + ], + ], + ], + 'WHERE' => $where, + ]; + + return $this->getFromDBByRequest($request); + } + + /** + * get or create an item + * + * @param array $params + * @param array $where + * @return self|null + */ + public function getOrCreate(array $params, array $where): ?self + { + if (!$this->getFromDBByCrit($where)) { + $this->add(array_merge($where, $params)); + return $this; + } + + $this->update(array_merge($where, $params, ['id' => $this->getID()])); + return $this; + } + + /** + * Show gaps in carbon intensities stored for the source and zone of the current instance + * + * @return void + */ + public function showGaps() + { + $canedit = false; + $oldest_asset_date = (new Toolbox())->getOldestAssetDate(); + $carbon_intensity = new CarbonIntensity(); + $zone_id = $this->fields['plugin_carbon_zones_id']; + $entries = $carbon_intensity->findGaps( + $this, + $oldest_asset_date + ); + + $total = count($entries); + $zone = Zone::getById($zone_id); + $renderer = TemplateRenderer::getInstance(); + + $template = <<renderFromStringTemplate($template, ['zone_name' => $zone->fields['name']]); + $renderer->display('components/datatable.html.twig', [ + 'is_tab' => true, + 'nopager' => true, + 'nofilter' => true, + 'nosort' => true, + 'columns' => [ + 'start' => __('Start'), + 'end' => __('End', 'carbon'), + ], + 'footers' => [ + ['', '', '', __('Total'), $total, ''], + ], + 'footer_class' => 'fw-bold', + 'entries' => $entries, + 'total_number' => $total, + 'filtered_number' => $total, + 'showmassiveactions' => $canedit, + 'massiveactionparams' => [ + 'num_displayed' => $total, + 'container' => 'mass' . static::class . mt_rand(), + ], + ]); + } } diff --git a/src/Toolbox.php b/src/Toolbox.php index 34c14086..eb0ae2d0 100644 --- a/src/Toolbox.php +++ b/src/Toolbox.php @@ -38,11 +38,14 @@ use DateTimeInterface; use DBmysql; use Glpi\Dashboard\Dashboard as GlpiDashboard; -use Infocom; -use Location; use Glpi\DBAL\QueryExpression; use Glpi\DBAL\QuerySubQuery; +use Glpi\DBAL\QueryUnion; +use Infocom; +use InvalidArgumentException; +use Location; use Mexitek\PHPColors\Color; +use Toolbox as GlpiToolbox; class Toolbox { @@ -65,41 +68,40 @@ public function getOldestAssetDate(array $crit = []): ?DateTimeImmutable $oldest_date = null; $infocom_table = Infocom::getTable(); foreach ($itemtypes as $itemtype) { - if (Infocom::canApplyOn($itemtype)) { - $item_table = getTableForItemType($itemtype); - $dates = $DB->request([ - 'SELECT' => [ - 'MIN' => [ - "$item_table.date_creation as date_creation", - "$item_table.date_mod as date_mod", - "$infocom_table.use_date as use_date", - "$infocom_table.delivery_date as delivery_date", - "$infocom_table.buy_date as buy_date", + if (!Infocom::canApplyOn($itemtype)) { + continue; + } + $item_table = getTableForItemType($itemtype); + $dates = $DB->request([ + 'SELECT' => [ + "$item_table.date_creation as date_creation", + // "$item_table.date_mod as date_mod", + "$infocom_table.use_date as use_date", + "$infocom_table.delivery_date as delivery_date", + "$infocom_table.buy_date as buy_date", + ], + 'FROM' => $item_table, + 'LEFT JOIN' => [ + $infocom_table => [ + 'FKEY' => [ + $infocom_table => 'items_id', + $item_table => 'id', + ['AND' => ['itemtype' => $itemtype]], ], ], - 'FROM' => $item_table, - 'LEFT JOIN' => [ - $infocom_table => [ - 'FKEY' => [ - $infocom_table => 'items_id', - $item_table => 'id', - ['AND' => ['itemtype' => $itemtype]], - ] - ] - ], - 'WHERE' => $crit, - ])->current(); - $itemtype_oldest_date = $dates['use_date'] - ?? $dates['delivery_date'] - ?? $dates['buy_date'] - ?? $dates['date_creation'] - ?? $dates['date_mod'] - ?? null; - if ($oldest_date === null) { - $oldest_date = $itemtype_oldest_date; - } else if ($itemtype_oldest_date !== null) { - $oldest_date = min($oldest_date, $itemtype_oldest_date); - } + ], + 'WHERE' => $crit, + ])->current(); + $itemtype_oldest_date = $dates['use_date'] + ?? $dates['delivery_date'] + ?? $dates['buy_date'] + ?? $dates['date_creation'] // Date creation of the asset + // ?? $dates['date_mod'] + ?? null; + if ($oldest_date === null) { + $oldest_date = $itemtype_oldest_date; + } elseif ($itemtype_oldest_date !== null) { + $oldest_date = min($oldest_date, $itemtype_oldest_date); } } if ($oldest_date === null) { @@ -115,7 +117,7 @@ public function getOldestAssetDate(array $crit = []): ?DateTimeImmutable } /** - * Find the date where an asset leaves the inventory + * Find the date where assets leave the inventory * * @param array $crit * @return DateTimeImmutable|null @@ -133,33 +135,31 @@ public function getLatestAssetDate(array $crit = []): ?DateTimeImmutable $latest_date = null; $infocom_table = Infocom::getTable(); foreach ($itemtypes as $itemtype) { - if (Infocom::canApplyOn($itemtype)) { - $item_table = getTableForItemType($itemtype); - $dates = $DB->request([ - 'SELECT' => [ - 'MIN' => [ - "$infocom_table.decommission_date as decommission_date", + if (!Infocom::canApplyOn($itemtype)) { + continue; + } + $item_table = getTableForItemType($itemtype); + $dates = $DB->request([ + 'SELECT' => [ + "$infocom_table.decommission_date as decommission_date", + ], + 'FROM' => $item_table, + 'LEFT JOIN' => [ + $infocom_table => [ + 'FKEY' => [ + $infocom_table => 'items_id', + $item_table => 'id', + ['AND' => ['itemtype' => $itemtype]], ], ], - 'FROM' => $item_table, - 'LEFT JOIN' => [ - $infocom_table => [ - 'FKEY' => [ - $infocom_table => 'items_id', - $item_table => 'id', - ['AND' => ['itemtype' => $itemtype]], - ] - ] - ], - 'WHERE' => $crit, - ])->current(); - $itemtype_latest_date = $dates['decommission_date'] - ?? null; - if ($latest_date === null) { - $latest_date = $itemtype_latest_date; - } else if ($itemtype_latest_date !== null) { - $latest_date = max($latest_date, $itemtype_latest_date); - } + ], + 'WHERE' => $crit, + ])->current(); + $itemtype_latest_date = $dates['decommission_date'] ?? null; + if ($latest_date === null) { + $latest_date = $itemtype_latest_date; + } elseif ($itemtype_latest_date !== null) { + $latest_date = max($latest_date, $itemtype_latest_date); } } if ($latest_date === null) { @@ -174,6 +174,48 @@ public function getLatestAssetDate(array $crit = []): ?DateTimeImmutable return $output; } + /** + * Get the lifespan of an asset from its infocom, in months + * + * @param Infocom $infocom + * @return int|null + */ + public static function getInfocomLifespanInMonth(Infocom $infocom): ?int + { + if ($infocom->isNewItem() || $infocom->fields['decommission_date'] === null) { + return null; + } + $start = $infocom->fields['buy_date'] + ?? $infocom->fields['delivery_date'] + ?? $infocom->fields['use_date'] + ?? null; + if ($start === null) { + // Fallback on asset date creation + $asset_itemtype = $infocom->fields['itemtype']; + if (!GlpiToolbox::isCommonDBTM($asset_itemtype)) { + return null; + } + $asset = $asset_itemtype::getById($infocom->fields['items_id']); + $start = $asset->fields['date_creation'] ?? null; + if ($start === null) { + // Give up + return null; + } + } + // Date_creation uses Y-m-d H:i:s and infocom dates use Y-m-d format + $start = new DateTime($start); + $stop = new DateTime($infocom->fields['decommission_date']); + + $interval = $stop->diff($start); + // convert interval into months + + $months = (int) round(12 * $interval->y + + $interval->m + + $interval->d / 30); // Assume a month is 30 days (not exact, but sufficient) + + return $months; + } + /** * Get default date where environnemental imapct should be known * when no inventory data is available @@ -196,7 +238,7 @@ public function getDefaultCarbonIntensityDownloadDate(): DateTimeImmutable **/ public static function getWeight(float $weight): string { - //TRANS: list of unit (o for octet) + //TRANS: list of unit (o for octet) $units = [ __('g', 'carbon'), __('Kg', 'carbon'), @@ -220,21 +262,8 @@ public static function getWeight(float $weight): string $weight = self::dynamicRound($weight); - //TRANS: %1$s is a number maybe float or string and %2$s the unit - return sprintf(__('%1$s %2$s'), $weight, $human_readable_unit); - } - - public static function dynamicRound(float $number): float - { - if ($number < 10) { - $number = round($number, 2); - } else if ($number < 100) { - $number = round($number, 1); - } else { - $number = round($number, 0); - } - - return $number; + //TRANS: %1$s is a number maybe float or string and %2$s the unit + return sprintf(__('%1$s %2$s'), $weight, $human_readable_unit); } /** @@ -246,7 +275,7 @@ public static function dynamicRound(float $number): float **/ public static function getPower(float $p): string { - //TRANS: list of unit (W for watt) + //TRANS: list of unit (W for watt) $units = [ __('W', 'carbon'), __('KW', 'carbon'), @@ -268,20 +297,20 @@ public static function getPower(float $p): string $p = self::dynamicRound($p); - //TRANS: %1$s is a number maybe float or string and %2$s the unit - return sprintf(__('%1$s %2$s'), $p, $human_readable_unit); + //TRANS: %1$s is a number maybe float or string and %2$s the unit + return sprintf(__('%1$s %2$s'), $p, $human_readable_unit); } /** - * Format a power passing a power in grams + * Format a energy in watt.hour * - * @param float $p Power in Watt + * @param float $p Energy in watt.hour * - * @return string formatted power + * @return string formatted energy **/ public static function getEnergy(float $p): string { - //TRANS: list of unit (W for watt) + //TRANS: list of unit (Wh for watt.hour) $units = [ __('Wh', 'carbon'), __('KWh', 'carbon'), @@ -303,8 +332,50 @@ public static function getEnergy(float $p): string $p = self::dynamicRound($p); - //TRANS: %1$s is a number maybe float or string and %2$s the unit - return sprintf(__('%1$s %2$s'), $p, $human_readable_unit); + //TRANS: %1$s is a number maybe float or string and %2$s the unit + return sprintf(__('%1$s %2$s'), $p, $human_readable_unit); + } + + public static function dynamicRound(float $number): float + { + if ($number < 10) { + $number = round($number, 2); + } elseif ($number < 100) { + $number = round($number, 1); + } else { + $number = round($number, 0); + } + + return $number; + } + + /** + * Convert a value and its unit into a human readable value + * + * Unit is an array i.e. ['g', 'CO2 eq'] for grams of carbondioxyde equivalent + * + * @param float $value value of the quantity to convert + * @param array $unit unit splitted into a standard unit and a qualification. + * @return string + */ + public static function getHumanReadableValue(float $value, array $unit): string + { + switch ($unit[0]) { + case 'g': + return self::getWeight($value) . $unit[1]; + case 'J': + // To be converted into watt.hour + return self::getEnergy($value / 3600) . $unit[1]; + case 'Wh': + return self::getEnergy($value) . $unit[1]; + case 'm³': + // Value is in m^3 + return sprintf(__('%1$s %2$s', 'carbon'), $value * 1000, 'L'); + case 'mol': + break; + } + + return sprintf(__('%1$s %2$s', 'carbon'), $value, implode(' ', $unit)); } /** @@ -324,7 +395,7 @@ public static function scaleSerie(array $serie, array $units): array foreach ($serie as $value) { if (is_scalar($value)) { $average += $value; - } else if (is_array($value)) { + } elseif (is_array($value)) { $average += $value['y']; } else { continue; @@ -347,7 +418,7 @@ public static function scaleSerie(array $serie, array $units): array foreach ($serie as &$number) { if (is_scalar($number)) { $number = number_format($number / ($multiple ** $power), PLUGIN_CARBON_DECIMALS, '.', ''); - } else if (is_array($number)) { + } elseif (is_array($number)) { $number['y'] = number_format($number['y'] / ($multiple ** $power), PLUGIN_CARBON_DECIMALS, '.', ''); } } @@ -367,7 +438,7 @@ public static function getGwpUsageImpactClasses(): array foreach (PLUGIN_CARBON_TYPES as $itemtype) { $type = implode('\\', [ $base_namespace, - $itemtype + $itemtype, ]); if (!class_exists($type)) { continue; @@ -391,7 +462,7 @@ public static function getUsageImpactClasses(): array foreach (PLUGIN_CARBON_TYPES as $itemtype) { $type = implode('\\', [ $base_namespace, - $itemtype + $itemtype, ]); if (!class_exists($type)) { continue; @@ -414,7 +485,7 @@ public static function getEmbodiedImpactClasses(): array foreach (PLUGIN_CARBON_TYPES as $itemtype) { $history_type = implode('\\', [ $base_namespace, - $itemtype + $itemtype, ]); if (!class_exists($history_type)) { continue; @@ -460,115 +531,127 @@ public static function isLocationExistForZone(string $name): bool /** * Gets date intervals where data are missing in a table * To use with Mysql 8.0+ or MariaDB 10.2+ + * Gaps are expressed as intervals like [X; Y[ + * X is the 1st missing row, and Y is the first existing row which ends the gap * - * @see https://bertwagner.com/posts/gaps-and-islands/ - * - * @param string $table table to search for gaps - * @param DateTimeInterface $start start date to search - * @param DateInterval $interval Interval between each data sample (do not use intervals in months or years) - * @param DateTimeInterface|null $stop stop date to search - * @return array list of gaps + * @param string $table Table to search for gaps + * @param DateTimeInterface $start Start date to search + * @param DateInterval $interval Interval between each data sample (do not use intervals in months or years) + * @param DateTimeInterface|null $stop Stop date to search + * @param array $criteria Criterias for the SQL query + * @return array list of gaps */ - public static function findTemporalGapsInTable(string $table, DateTimeInterface $start, DateInterval $interval, ?DateTimeInterface $stop = null, array $criteria = []) + public static function findTemporalGapsInTable(string $table, DateTimeInterface $start, DateInterval $interval, ?DateTimeInterface $stop = null, array $criteria = []): array { /** @var DBmysql $DB */ global $DB; if ($interval->m !== 0 || $interval->y !== 0) { - throw new \InvalidArgumentException('Interval must be in days, hours, minutes or seconds'); + throw new InvalidArgumentException('Interval must be in days, hours, minutes or seconds'); + } + if ($stop === null) { + // Assume stop date is yesterday at midnight + $stop = new DateTime('yesterday midnight'); } - // $interval_in_seconds = $interval->s + $interval->i * 60 + $interval->h * 3600 + $interval->d * 86400; $sql_interval = self::dateIntervalToMySQLInterval($interval); + $start_string = $start->format('Y-m-d H:i:s'); + $stop_string = $stop->format('Y-m-d H:i:s'); // Get start date as unix timestamp - $boundaries[] = new QueryExpression('`date` >= "' . $start->format('Y-m-d H:i:s') . '"'); + $boundaries[] = new QueryExpression('`date` >= "' . $start_string . '"'); + $boundaries[] = new QueryExpression('`date` < "' . $stop_string . '"'); - // get stop date as unix timestamp - if ($stop === null) { - // Assume stop date is yesterday at midnight - $stop = new DateTime(); - $stop->setTime(0, 0, 0); - $stop->sub(new DateInterval('P1D')); - } - $boundaries[] = new QueryExpression('`date` <= "' . $stop->format('Y-m-d H:i:s') . '"'); + $common_criterias = array_merge($boundaries, $criteria); - // prepare sub query to get start and end date of an atomic date range - // An atomic date range is set to 1 hour - // To reduce problems with DST, we use the unix timestamp of the date - $atomic_ranges_subquery = new QuerySubQuery([ + $records_query = new QuerySubQuery([ 'SELECT' => [ - new QueryExpression('`date` as `start_date`'), - new QueryExpression("DATE_ADD(`date`, $sql_interval) as `end_date`"), + 'date', + new QueryExpression('LAG(`date`) OVER (ORDER BY `date`) AS `prev_date`'), + ], + 'FROM' => $table, + 'WHERE' => $common_criterias, + ], 'records'); + + $request = new QueryUnion([ + // Internal gaps (between existing records in the requred interval) + [ + 'SELECT' => [ + new QueryExpression('`prev_date` + ' . $sql_interval . ' AS `start`'), + 'date AS `end`', + ], + 'FROM' => $records_query, + 'WHERE' => [ + 'NOT' => ['prev_date' => null], + new QueryExpression('DATE_ADD(`records`.`prev_date`, ' . $sql_interval . ') < `date`'), + ], ], - 'FROM' => $table, - 'WHERE' => $criteria + $boundaries, - ], 'atomic_ranges'); - // For each atomic date range, find the end date of previous atomic date range - $groups_subquery = new QuerySubQuery([ - 'SELECT' => [ - new QueryExpression('ROW_NUMBER() OVER (ORDER BY `start_date`, `end_date`) AS `row_number`'), - 'start_date', - 'end_date', - new QueryExpression('LAG(`end_date`, 1) OVER (ORDER BY `start_date`, `end_date`) AS `previous_end_date`') + // Gap before the beginning of the serie + [ + 'SELECT' => [ + new QueryExpression('\'' . $start_string . '\' AS start'), + new QueryExpression('MIN(`date`) AS `end`'), + ], + 'FROM' => $table, + 'WHERE' => $common_criterias, + 'HAVING' => [ + new QueryExpression("'" . $start_string . "' < MIN(`date`)"), + ], ], - 'FROM' => $atomic_ranges_subquery - ], 'groups'); - // For each atomic date range, find if it is the start of an island - $islands_subquery = new QuerySubQuery([ - 'SELECT' => [ - '*', - new QueryExpression('SUM(CASE WHEN `groups`.`previous_end_date` >= `start_date` THEN 0 ELSE 1 END) OVER (ORDER BY `groups`.`row_number`) AS `ìsland_id`') + // Gap after the end of the serie + [ + 'SELECT' => [ + new QueryExpression('MAX(`date`) + ' . $sql_interval . ' AS `start`'), + new QueryExpression('\'' . $stop_string . '\' AS `end`'), + ], + 'FROM' => $table, + 'WHERE' => $common_criterias, + 'HAVING' => [ + new QueryExpression("DATE_SUB('" . $stop_string . "', " . $sql_interval . ") > MAX(`date`)"), + ], ], - 'FROM' => $groups_subquery - ], 'islands'); - $request = [ - 'SELECT' => [ - 'MIN' => 'start_date as island_start_date', - 'MAX' => 'end_date as island_end_date', + // No record between the boundaries + [ + 'SELECT' => [ + new QueryExpression('\'' . $start_string . '\' AS `start`'), + new QueryExpression('\'' . $stop_string . '\' AS `end`'), + ], + 'FROM' => $table, + 'WHERE' => $common_criterias, + 'HAVING' => [ + new QueryExpression('COUNT(*) = 0'), + ], ], - 'FROM' => $islands_subquery, - 'GROUPBY' => ['ìsland_id'], - 'ORDER' => ['island_start_date'] - ]; + ], true); + + $result = $DB->request([ + 'FROM' => $request, + 'ORDER' => 'start', + ]); - $result = $DB->request($request); - if ($result->count() === 0) { - // No island at all, the whole range is a gap - return [ - [ - 'start' => $start->format('Y-m-d H:i:s'), - 'end' => $stop->format('Y-m-d H:i:s'), - ] - ]; - } - - // Find gaps from islands - $expected_start_date = $start; - $gaps = []; - foreach ($result as $row) { - if ($expected_start_date < new DateTimeImmutable($row['island_start_date'])) { - // The current island starts after the expected start date - // Then there is a gap - $gaps[] = [ - 'start' => $expected_start_date->format('Y-m-d H:i:s'), - 'end' => $row['island_start_date'], - ]; + // Filter out gaps caused by DST switch + // In the SQL function DATE_ADD() we may do the following process + // DATE_ADD('2022-03-27 01:00:00', INTERVAL 1 HOUR) and '2022-03-27 01:00:00' + INTERVAL 1 HOUR + // while we use Europe/Paris timezone (or any timezone usinf DST) + // Both expressions return '2022-03-27 02:00:00' and it matches the exact time where we switch to summer time + // '2022-03-27 02:00:00' should be actually '2022-03-27 03:00:00', but this is not what happens with MySQL 8.0 + // Therefore when the date '2022-03-27 02:00:00' is converted into a DateTime object in PHP with Europe/Paris timezone + // it is converted into '2022-03-27 03:00:00'. + // When the start of a gap and the end of a gap, both converted into a DateTime object, are equal + // then this means that we are switching to summer time and the gap is irrelevant + // The code below tracks such intervals and filters them out + $filtered_gaps = []; + foreach ($result as $gap) { + $gap_start = DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $gap['start']); + $gap_end = DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $gap['end']); + if ($gap_start == $gap_end) { + continue; } - $expected_start_date = new DateTimeImmutable($row['island_end_date']); - } - if ($expected_start_date < $stop) { - // The last island ends before the stop date - // Then there is a gap - $gaps[] = [ - 'start' => $expected_start_date->format('Y-m-d H:i:s'), - 'end' => $stop->format('Y-m-d H:i:s'), - ]; + $filtered_gaps[] = $gap; } - - return $gaps; + return $filtered_gaps; } /** @@ -625,7 +708,7 @@ public static function getDashboardId(): ?int * @param string $bg_color * @param string $fg_color * @param float $target_ratio - * @param integer $max_steps + * @param int $max_steps * @return string */ public static function getAdaptedFgColor(string $bg_color, string $fg_color, $target_ratio = 4.5, $max_steps = 100): string @@ -677,4 +760,15 @@ protected static function contrastRatio(Color $color_1, Color $color_2): float $l2 = self::relative_luminance($color_2); return ($l1 > $l2) ? ($l1 + 0.05) / ($l2 + 0.05) : ($l2 + 0.05) / ($l1 + 0.05); } + + public static function getMemoryLimit(): ?int + { + $memory_limit = GlpiToolbox::getMemoryLimit() - 8 * 1024 * 1024; + if ($memory_limit < 0) { + // May happen in test seems that ini_get("memory_limits") returns + // enpty string in PHPUnit environment + $memory_limit = null; + } + return $memory_limit; + } } diff --git a/src/UsageImpact.php b/src/UsageImpact.php index 5ee94260..de496b1b 100644 --- a/src/UsageImpact.php +++ b/src/UsageImpact.php @@ -32,19 +32,8 @@ namespace GlpiPlugin\Carbon; -use CommonDBChild; -use DateInterval; -use DateTimeInterface; -use Entity; -use Location; - -class UsageImpact extends CommonDBChild +class UsageImpact extends AbstractImpact { - public static $itemtype = 'itemtype'; - public static $items_id = 'items_id'; - - public static $rightname = 'carbon:report'; - public static function getTypeName($nb = 0) { return _n("Usage impact", "Usage impacts", $nb, 'carbon'); @@ -58,128 +47,4 @@ public function prepareInputForAdd($input) } return $input; } - - public function rawSearchOptions() - { - $tab = parent::rawSearchOptions(); - - $tab[] = [ - 'id' => '2', - 'table' => $this->getTable(), - 'field' => 'id', - 'name' => __('ID'), - 'massiveaction' => false, // implicit field is id - 'datatype' => 'number' - ]; - - $tab[] = [ - 'id' => '3', - 'table' => $this->getTable(), - 'field' => 'items_id', - 'name' => __('Associated item ID'), - 'massiveaction' => false, - 'datatype' => 'specific', - 'additionalfields' => ['itemtype'] - ]; - - $tab[] = [ - 'id' => '4', - 'table' => $this->getTable(), - 'field' => 'itemtype', - 'name' => _n('Type', 'Types', 1), - 'massiveaction' => false, - 'datatype' => 'itemtypename', - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_DATE, - 'table' => self::getTable(), - 'field' => 'date', - 'name' => __('Date') - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_GWP, - 'table' => self::getTable(), - 'field' => 'gwp', - 'name' => __('Global warming potential', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_GWP_QUALITY, - 'table' => self::getTable(), - 'field' => 'gwp_quality', - 'name' => __('Global warming potential quality', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_ADP, - 'table' => self::getTable(), - 'field' => 'adp', - 'name' => __('Abiotic depletion potential', 'carbon') - - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_ADP_QUALITY, - 'table' => self::getTable(), - 'field' => 'adp_quality', - 'name' => __('Abiotic depletion potential quality', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_PE, - 'table' => self::getTable(), - 'field' => 'pe', - 'name' => __('Primary energy quality', 'carbon') - - ]; - - $tab[] = [ - 'id' => SearchOptions::USAGE_IMPACT_PE_QUALITY, - 'table' => self::getTable(), - 'field' => 'pe_quality', - 'name' => __('Primary energy quality', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_CALC_DATE, - 'table' => self::getTable(), - 'field' => 'date_mod', - 'name' => __('Date of evaluation', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_ENGINE, - 'table' => self::getTable(), - 'field' => 'engine', - 'name' => __('Engine', 'carbon') - ]; - - $tab[] = [ - 'id' => SearchOptions::CARBON_EMISSION_ENGINE_VER, - 'table' => self::getTable(), - 'field' => 'engine_version', - 'name' => __('Engine version', 'carbon') - ]; - - return $tab; - } - - /** - * Get impact value in a human r eadable format, selecting the best unit - */ - public function getHumanReadableImpact(string $field): string - { - switch ($field) { - case 'gwp': - return Toolbox::getWeight($this->fields[$field]) . 'CO2eq'; - case 'adp': - return Toolbox::getWeight($this->fields[$field]) . 'Sbeq'; - case 'pe': - return Toolbox::getEnergy($this->fields[$field] / 3600); // Convert J into Wh - } - - return ''; - } } diff --git a/src/UsageInfo.php b/src/UsageInfo.php index 1f970100..deff32e6 100644 --- a/src/UsageInfo.php +++ b/src/UsageInfo.php @@ -32,17 +32,20 @@ namespace GlpiPlugin\Carbon; -use Computer; use CommonDBChild; use CommonDBTM; use CommonGLPI; +use Computer as GlpiComputer; +use DateTime; use Glpi\Application\View\TemplateRenderer; use GlpiPlugin\Carbon\Dashboard\Provider; use GlpiPlugin\Carbon\Dashboard\Widget; +use GlpiPlugin\Carbon\Impact\Type; use Html; -use Monitor; -use NetworkEquipment; -use Plugin; +use Infocom; +use Monitor as GlpiMonitor; +use NetworkEquipment as GlpiNetworkEquipment; +use Toolbox as GlpiToolbox; /** * Relation between a computer and a usage profile @@ -88,7 +91,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) $tabName = ''; if (!$withtemplate) { if (in_array($item->getType(), PLUGIN_CARBON_TYPES)) { - $tabName = __('Environmental impact', 'carbon'); + $tabName = self::createTabEntry(__('Environmental impact', 'carbon')); } } return $tabName; @@ -98,8 +101,8 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) * Undocumented function * * @param CommonGLPI $item - * @param integer $tabnum - * @param integer $withtemplate + * @param int $tabnum + * @param int $withtemplate * @return void */ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) @@ -110,13 +113,13 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $ $usage_info = new self(); $usage_info->getFromDBByCrit([ 'itemtype' => $item->getType(), - 'items_id' => $item->getID() + 'items_id' => $item->getID(), ]); if ($usage_info->isNewItem()) { $usage_info->add( [ 'itemtype' => $item->getType(), - 'items_id' => $item->getID() + 'items_id' => $item->getID(), ], [], false @@ -144,16 +147,29 @@ public function showForItem($ID, $withtemplate = '') $canedit = self::canUpdate(); $target = $CFG_GLPI['root_doc'] . '/plugins/carbon/front/usageimpact.form.php'; - $options = [ 'candel' => false, 'can_edit' => $canedit, 'target' => $target, ]; $this->initForm($this->getID(), $options); + $asset_itemtype = $this->fields['itemtype']; + if (!GlpiToolbox::isCommonDBTM($asset_itemtype)) { + return; + } + $asset = new $asset_itemtype(); + $asset::getById($this->fields['items_id']); + $infocom = new Infocom(); + $infocom->getFromDBByCrit([ + 'itemtype' => $asset_itemtype, + 'items_id' => $this->fields['items_id'], + ]); + TemplateRenderer::getInstance()->display('@carbon/usageinfo.html.twig', [ 'params' => $options, 'item' => $this, + 'asset' => $asset, + 'infocom' => $infocom, ]); } @@ -196,11 +212,15 @@ public static function showCharts(CommonDBTM $asset) 'itemtype' => $asset->getType(), 'items_id' => $asset->getID(), ]); - if (in_array($asset->getType(), [Computer::class, NetworkEquipment::class, Monitor::class])) { + if (in_array($asset->getType(), [GlpiComputer::class, GlpiNetworkEquipment::class, GlpiMonitor::class])) { // TODO: decide if we show or not this impact. - unset($usage_impact->fields['pe']); + unset($usage_impact->fields['gwp']); + unset($usage_impact->fields['gwpbb']); + unset($usage_impact->fields['gwppf']); + unset($usage_impact->fields['gwpplu']); } - $usage_carbon_emission_count = countElementsInTable(CarbonEmission::getTable(), [ + $usage_impact->fields['gwp'] = CarbonEmission::getTotalUsageEmissionForItem($asset); + $usage_carbon_emission_count = countElementsInTable(getTableForItemType(CarbonEmission::class), [ 'itemtype' => $asset->getType(), 'items_id' => $asset->getID(), ]); @@ -210,33 +230,35 @@ public static function showCharts(CommonDBTM $asset) 'items_id' => $asset->getID(), ]); - $url = Documentation::getInfoLink('carbon_emission'); - $tooltip = __('Evaluates the carbon emission in CO₂ equivalent. %s More information %s', 'carbon'); - $tooltip = sprintf($tooltip, '
', ''); - $carbon_emission_tooltip_html = Html::showToolTip($tooltip, [ - 'display' => false, - 'applyto' => 'carbon_emission_tip', - ]); - - $url = Documentation::getInfoLink('abiotic_depletion_impact'); - $tooltip = __('Evaluates the consumption of non renewable resources in Antimony equivalent. %s More information %s', 'carbon'); - $tooltip = sprintf($tooltip, '
', ''); - $usage_abiotic_depletion_tooltip_html = Html::showToolTip($tooltip, [ - 'display' => false, - 'applyto' => 'usage_abiotic_depletion_tip', - ]); - $embodied_abiotic_depletion_tooltip_html = Html::showToolTip($tooltip, [ - 'display' => false, - 'applyto' => 'embodied_abiotic_depletion_tip', - ]); - - $url = Documentation::getInfoLink('primary_energy'); - $tooltip = __('Evaluates the primary energy consumed. %s More information %s', 'carbon'); - $tooltip = sprintf($tooltip, '
', ''); - $embodied_primary_energy_tooltip_html = Html::showToolTip($tooltip, [ - 'display' => false, - 'applyto' => 'embodied_primary_energy_tip', - ]); + $embodied_tooltips = []; + $usage_tooltips = []; + $embodied_labels = []; + $usage_labels = []; + foreach (Type::getImpactTypes() as $impact_type) { + $tooltip = Type::getCriteriaTooltip($impact_type); + $url = Type::getCriteriaInfoLink($impact_type); + if ($url !== '') { + $tooltip = sprintf( + $tooltip . __('%s More information %s', 'carbon'), + '
', + '' + ); + } + $embodied_tooltips[$impact_type] = ''; + $usage_tooltips[$impact_type] = ''; + if ($tooltip !== '') { + $embodied_tooltips[$impact_type] = Html::showToolTip($tooltip, [ + 'display' => false, + 'applyto' => 'embodied_' . $impact_type . '_tip', + ]); + $usage_tooltips[$impact_type] = Html::showToolTip($tooltip, [ + 'display' => false, + 'applyto' => 'usage_' . $impact_type . '_tip', + ]); + } + $embodied_labels[$impact_type] = Type::getEmbodiedImpactLabel($impact_type); + $usage_labels[$impact_type] = Type::getUsageImpactLabel($impact_type); + } $usage_imapct_action_url = $CFG_GLPI['root_doc'] . '/plugins/carbon/front/usageimpact.form.php'; $embodied_impact_action_url = $CFG_GLPI['root_doc'] . '/plugins/carbon/front/embodiedimpact.form.php'; @@ -246,13 +268,57 @@ public static function showCharts(CommonDBTM $asset) 'usage_carbon_emission_count' => $usage_carbon_emission_count, 'embodied_impact' => $embodied_impact, 'usage_impact' => $usage_impact, + 'embodied_labels' => $embodied_labels, + 'usage_labels' => $usage_labels, + 'embodied_tooltips' => $embodied_tooltips, + 'usage_tooltips' => $usage_tooltips, 'usage_carbon_emission_graph' => Widget::DisplayGraphUsageCarbonEmissionPerMonth($data), - 'carbon_emission_tooltip_html' => $carbon_emission_tooltip_html, - 'usage_abiotic_depletion_tooltip_html' => $usage_abiotic_depletion_tooltip_html, - 'embodied_abiotic_depletion_tooltip_html' => $embodied_abiotic_depletion_tooltip_html, - 'embodied_primary_energy_tooltip_html' => $embodied_primary_energy_tooltip_html, 'usage_impact_action_url' => $usage_imapct_action_url, 'embodied_impact_action_url' => $embodied_impact_action_url, ]); } + + /** + * Get the lifespan of an asset from its infocom, in hours + * + * determine an interval between the best date for interval start and the decommission_date + * + * @param CommonDBTM $item + * @return int|null + */ + public static function getLifespanInHours(CommonDBTM $item): ?int + { + if ($item->isNewItem()) { + return null; + } + + $start_date = $item->fields['date_creation'] ?? null; + + $infocom = new Infocom(); + $infocom->getFromDBByCrit([ + 'itemtype' => get_class($item), + 'items_id' => $item->getID(), + ]); + $end_date = null; + if (!$infocom->isNewItem()) { + // update start date from infocom if use_date, delivery_date or buy_date are set, by precedence + $start_date = $infocom->fields['use_date'] + ?? $infocom->fields['delivery_date'] + ?? $infocom->fields['buy_date'] + ?? $start_date; + + if ($infocom->fields['decommission_date'] !== null) { + $end_date = new DateTime($infocom->fields['decommission_date']); + } + } + + if ($start_date === null || $end_date === null) { + //Failed to find any date to use as start date, then we can't calculate a lifespan, return null + return null; + } + + $interval = $end_date->diff(new DateTime($start_date)); + $lifespan_in_hours = $interval->days * 24 + $interval->h; + return $lifespan_in_hours; + } } diff --git a/src/Zone.php b/src/Zone.php index 542fa47d..35ca137c 100644 --- a/src/Zone.php +++ b/src/Zone.php @@ -32,14 +32,12 @@ namespace GlpiPlugin\Carbon; -use CommonDropdown; use CommonDBTM; +use CommonDropdown; use CommonGLPI; use DateTime; -use DBmysql; use DbUtils; -use Glpi\Toolbox\Sanitizer; -use Location; +use Location as GlpiLocation; use LogicException; use Session; @@ -76,7 +74,7 @@ public static function canPurge(): bool public function defineTabs($options = []) { $tabs = parent::defineTabs($options); - $this->addStandardTab(CarbonIntensitySource::class, $tabs, $options); + $this->addStandardTab(Source::class, $tabs, $options); return $tabs; } @@ -86,11 +84,11 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) $nb = 0; /** @var CommonDBTM $item */ switch ($item->getType()) { - case CarbonIntensitySource::class: + case Source::class: if ($_SESSION['glpishow_count_on_tabs']) { $nb = (new DbUtils())->countElementsInTable( - CarbonIntensitySource_Zone::getTable(), - [CarbonIntensitySource::getForeignKeyField() => $item->getID()] + Source_Zone::getTable(), + [Source::getForeignKeyField() => $item->getID()] ); } return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb); @@ -111,203 +109,183 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $ { /** @var CommonDBTM $item */ switch ($item->getType()) { - case CarbonIntensitySource::class: - CarbonIntensitySource_Zone::showForSource($item); + case Source::class: + Source_Zone::showForSource($item); } return true; } - public function getAdditionalFields() - { - return [ - [ - 'name' => 'plugin_carbon_carbonintensitysources_id_historical', - 'label' => __('Data source for historical calculation', 'carbon'), - 'type' => 'dropdownValue', - 'list' => true - ] - ]; - } - public function rawSearchOptions() { $tab = parent::rawSearchOptions(); - $tab[] = [ - 'id' => SearchOptions::HISTORICAL_DATA_SOURCE, - 'table' => CarbonIntensitySource::getTable(), - 'field' => 'name', - 'name' => __('Data source for historical calculation', 'carbon'), - 'datatype' => 'dropdown', - 'joinparams' => [ - 'beforejoin' => [ - 'table' => CarbonIntensitySource_Zone::getTable(), - 'joinparams' => [ - 'jointype' => 'child', - ], - ], - ], - ]; - $tab[] = [ 'id' => SearchOptions::HISTORICAL_DATA_DL_ENABLED, - 'table' => CarbonIntensitySource_Zone::getTable(), + 'table' => Source_Zone::getTable(), 'field' => 'is_download_enabled', 'name' => __('Download enabled', 'carbon'), 'datatype' => 'bool', + 'joinparams' => [ + 'jointype' => 'child', + ], ]; return $tab; } + // /** + // * Get a zone by a location criteria + // * + // * @param CommonDBTM $item + // * @return Zone|null + // * @todo : de-staticify the method + // */ + // public static function getByLocation(CommonDBTM $item): ?Zone + // { + // if ($item->isNewItem()) { + // return null; + // } + + // $request = self::getByLocationRequest(); + // $request['WHERE'] = [ + // Location::getTableField('locations_id') => $item->getID(), + // ]; + // $zone = new self(); + // if (!$zone->getFromDBByRequest($request)) { + // return null; + // } + + // return $zone; + // } + + // /** + // * Get the request fragment to find a zone by location + // * + // * @return array Request fragment + // */ + // private static function getByLocationRequest(): array + // { + // $location_table = Location::getTable(); + // $source_zone_table = Source_Zone::getTable(); + // $zone_table = Zone::getTable(); + // return [ + // 'INNER JOIN' => [ + // $source_zone_table => [ + // 'FKEY' => [ + // $zone_table => 'id', + // $source_zone_table => 'plugin_carbon_zones_id', + // ] + // ], + // $location_table => [ + // 'FKEY' => [ + // $location_table => 'plugin_carbon_sources_zones_id', + // $source_zone_table => 'id' + // ] + // ], + // ], + // ]; + // } + /** - * Get a zone by a location criteria - * - * @param CommonDBTM $item - * @return Zone|null + * Get the request fragment to find a zone by asset + * @template T of CommonDBTM + * @param class-string $itemtype asset type + * @return array Request fragment */ - public static function getByLocation(CommonDBTM $item): ?Zone + private static function getByAssetRequest(string $itemtype): array { - /** @var DBmysql $DB */ - global $DB; - - if ($item->isNewItem()) { - return null; - } - - if (($item->fields['country'] ?? '') == '' && ($item->fields['state'] ?? '') == '') { - return null; - } - - // TODO: support translations - $location_table = Location::getTable(); - $zone_table = Zone::getTable(); + $dbUtil = new DbUtils(); + $location_table = $dbUtil->getTableForItemType(Location::class); + $source_zone_table = $dbUtil->getTableForItemType(Source_Zone::class); + $zone_table = $dbUtil->getTableForItemType(Zone::class); + $itemtype_table = $dbUtil->getTableForItemType($itemtype); $request = [ - 'SELECT' => Zone::getTableField('id'), - 'FROM' => $zone_table, 'INNER JOIN' => [ + $source_zone_table => [ + 'FKEY' => [ + $zone_table => 'id', + $source_zone_table => 'plugin_carbon_zones_id', + ], + ], $location_table => [ 'FKEY' => [ - $location_table => 'state', - $zone_table => 'name', + $location_table => 'plugin_carbon_sources_zones_id', + $source_zone_table => 'id', + ], + ], + $itemtype_table => [ + 'FKEY' => [ + $itemtype_table => 'locations_id', + $location_table => 'locations_id', ], ], ], - 'WHERE' => [ - Location::getTableField('id') => $item->getID(), - ] ]; - $iterator = $DB->request($request); - - if ($iterator->count() !== 1) { - // no state found, fallback to country - $request['INNER JOIN'][$location_table]['FKEY'][$location_table] = 'country'; - $iterator = $DB->request($request); - if ($iterator->count() !== 1) { - // Give up - return null; - } - } - - $zone_id = $iterator->current()['id']; - $zone = Zone::getById($zone_id); - if ($zone === false) { - return null; - } - return $zone; + return $request; } /** * Get a zone by an asset criteria * * @param CommonDBTM $item - * @return Zone|null + * @return bool */ - public static function getByAsset(CommonDBTM $item): ?Zone + public function getByAsset(CommonDBTM $item): bool { - /** @var DBmysql $DB */ - global $DB; - - if (!isset($item->fields[Location::getForeignKeyField()])) { - return null; + if (!isset($item->fields[GlpiLocation::getForeignKeyField()])) { + return false; } if ($item->isNewItem()) { - return null; + return false; } - // TODO: support translations - $location_table = Location::getTable(); - $zone_table = Zone::getTable(); - $item_table = $item::getTable(); - $state_field = Location::getTableField('state'); - $request = [ - 'SELECT' => Zone::getTableField('id'), - 'FROM' => $zone_table, - 'INNER JOIN' => [ - $location_table => [ - 'FKEY' => [ - $location_table => 'state', - $zone_table => 'name', - ], - ], - $item_table => [ - 'FKEY' => [ - $item_table => 'locations_id', - $location_table => 'id', - ], - ], - ], - 'WHERE' => [ - $state_field => ['<>', ''], - $item::getTableField('id') => $item->getID(), - ] + $request = self::getByAssetRequest($item->getType()); + $request['WHERE'] = [ + $item::getTableField('id') => $item->getID(), ]; - $iterator = $DB->request($request); - - if ($iterator->count() !== 1) { - // no state found, fallback to country - $request['INNER JOIN'][$location_table]['FKEY'][$location_table] = 'country'; - unset($request['WHERE'][$state_field]); - $request['WHERE'][Location::getTableField('country')] = ['<>', '']; - $iterator = $DB->request($request); - if ($iterator->count() !== 1) { - // Give up - return null; - } - } - - $zone_id = $iterator->current()['id']; - $zone = Zone::getById($zone_id); - if ($zone === false) { - return null; - } - return $zone; + return $this->getFromDBByRequest($request); } /** - * Check if the zone has a historical data source + * Check if the zone has a historical data source. + * It does not checks if carbon intensity samples are available. * * @return bool */ - public function hasHistoricalData(): bool + public function hasHistoricalDataSource(): bool { if ($this->isNewItem()) { return false; } - if (!isset($this->fields['plugin_carbon_carbonintensitysources_id_historical'])) { - return false; - } - $source = new CarbonIntensitySource(); - if (!$source->getFromDB($this->fields['plugin_carbon_carbonintensitysources_id_historical'])) { - // source does not exists - return false; - } - - return $source->fields['is_fallback'] === 0; + $source_zone_table = getTableForItemType(Source_Zone::class); + $source_table = getTableForItemType(Source::class); + $zone_table = getTableForItemType(Zone::class); + $source = new Source(); + return $source->getFromDBByRequest([ + 'INNER JOIN' => [ + $source_zone_table => [ + 'ON' => [ + $source_table => 'id', + $source_zone_table => getForeignKeyFieldForItemType(Source::class), + ], + ], + $zone_table => [ + 'ON' => [ + $zone_table => 'id', + $source_zone_table => self::getForeignKeyField(), + ], + ], + ], + 'WHERE' => [ + self::getTableField('id') => $this->fields['id'], + Source::getTableField('is_carbon_intensity_source') => 1, + Source::getTableField('fallback_level') => 0, + ], + ]); } /** @@ -317,7 +295,7 @@ public function hasHistoricalData(): bool * @param CommonDBTM $item * @param null|DateTime $date Date for which the zone must be found * @param bool $use_country Do not search by state first - * @return bool + * @return bool true if found in DB, false otherwise */ public function getByItem(CommonDBTM $item, ?DateTime $date = null, bool $use_country = false): bool { @@ -328,27 +306,27 @@ public function getByItem(CommonDBTM $item, ?DateTime $date = null, bool $use_co // TODO: use date to find where was the asset at the given date if ($date === null) { $item_table = $item->getTable(); - $location_table = Location::getTable(); + $glpi_location_table = GlpiLocation::getTable(); $zone_table = Zone::getTable(); $request = [ 'INNER JOIN' => [ - $location_table => [ + $glpi_location_table => [ 'FKEY' => [ $zone_table => 'name', - $location_table => 'state', + $glpi_location_table => 'state', ], ], $item_table => [ 'FKEY' => [ - $item_table => Location::getForeignKeyField(), - $location_table => 'id', + $item_table => GlpiLocation::getForeignKeyField(), + $glpi_location_table => 'id', ], - ] + ], ], 'WHERE' => [ - $item_table . '.id' => $item->getID() - ] + $item_table . '.id' => $item->getID(), + ], ]; $found = false; if (!$use_country) { @@ -360,10 +338,53 @@ public function getByItem(CommonDBTM $item, ?DateTime $date = null, bool $use_co } // no state found, fallback to country - $request['INNER JOIN'][$location_table]['FKEY'][$location_table] = 'country'; + $request['INNER JOIN'][$glpi_location_table]['FKEY'][$glpi_location_table] = 'country'; return $this->getFromDBByRequest($request); } throw new LogicException('Not implemented yet'); } + + /** + * Undocumented function + * + * @param int $source_id + * @return array a request fragment + */ + public static function getRestrictBySourceCondition(int $source_id): array + { + $source_zone_table = Source_Zone::getTable(); + $zone_table = Zone::getTable(); + return [ + 'LEFT JOIN' => [ + $source_zone_table => [ + 'FKEY' => [ + $source_zone_table => 'plugin_carbon_zones_id', + $zone_table => 'id', + ], + ], + ], + 'WHERE' => [ + Source_Zone::getTableField('plugin_carbon_sources_id') => $source_id, + ], + ]; + } + + /** + * get or create an item + * + * @param array $params + * @param array $where + * @return self|null + */ + public function getOrCreate(array $params, array $where): ?self + { + if (!$this->getFromDBByCrit($where)) { + $this->add(array_merge($where, $params)); + return $this; + } + + $this->update(array_merge($where, $params, ['id' => $this->getID()])); + return $this; + } } diff --git a/templates/abstractmodel.html.twig b/templates/abstractmodel.html.twig new file mode 100644 index 00000000..3adf728b --- /dev/null +++ b/templates/abstractmodel.html.twig @@ -0,0 +1,78 @@ +{# + # ------------------------------------------------------------------------- + # Carbon plugin for GLPI + # + # @copyright Copyright (C) 2024-2025 Teclib' and contributors. + # @license https://www.gnu.org/licenses/gpl-3.0.txt GPLv3+ + # @license MIT https://opensource.org/licenses/mit-license.php + # @link https://github.com/pluginsGLPI/carbon + # + # ------------------------------------------------------------------------- + # + # LICENSE + # + # This file is part of Carbon plugin for GLPI. + # + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # + # ------------------------------------------------------------------------- + #} + +{% import "components/form/fields_macros.html.twig" as fields %} +{% import "@carbon/components/form/fields_macros.html.twig" as carbonFields %} +{% import 'components/form/basic_inputs_macros.html.twig' as _inputs %} + +
+ {{ __('The impacts below shall include the manufacturing, disposal and recycling processes only.', 'carbon') }} +
+
+ {{ __('Take care of the expected units before setting an impact.', 'carbon') }} +
+ +{% for key, field_description in criterias %} + {% set criteria = key %} + {% set criteria_source = key ~ '_source' %} + {% set criteria_quality = key ~ '_quality' %} + {% if item.fields[criteria] is defined %} + {{ fields.smallTitle(field_description.title) }} + + {% set checkbox = _inputs.checkbox(key, false) %} + + {{ fields.numberField(criteria, + item.fields[criteria], + field_description.label, { + min: 0, + label_class: 'col-xxl-8', + input_class: 'col-xxl-4', + tpl_mark: field_description.unit, + }) }} + + {{ carbonFields.dropdownDataQuaity(criteria_quality, + item.fields[criteria_quality], + __('Data quality', 'carbon'), { + min: 0, + label_class: 'col-xxl-8', + input_class: 'col-xxl-4', + }) }} + + {{ fields.textfield(criteria_source, + item.fields[criteria_source], + __('Data source', 'carbon'), { + field_class: 'col-12 col-sm-12', + label_class: 'col-xxl-4', + input_class: 'col-xxl-8', + }) }} + + {% endif %} +{% endfor %} \ No newline at end of file diff --git a/templates/components/form/fields_macros.html.twig b/templates/components/form/fields_macros.html.twig index fb7953e3..adf0054d 100644 --- a/templates/components/form/fields_macros.html.twig +++ b/templates/components/form/fields_macros.html.twig @@ -52,7 +52,7 @@ {% endif %} {% set field %} - {% do call('GlpiPlugin\\Carbon\\DataSource\\Boaviztapi::dropdownBoaviztaZone', [name, { + {% do call('GlpiPlugin\\Carbon\\DataSource\\Lca\\Boaviztapi\\Client::dropdownBoaviztaZone', [name, { 'value': value, 'rand': options.rand, 'width': '100%', @@ -97,3 +97,38 @@ {{ fields.field(name, field, label, options|merge({'id': 'dropdown_' ~ name ~ '_' ~ options.rand})) }} {% endif %} {% endmacro %} + +{% macro dropdownDataQuaity(name, value, label = '', options = {}) %} + {% import 'components/form/fields_macros.html.twig' as fields %} + + {% if options.multiple ?? false %} + {# Needed for empty value as the input wont be sent in this case... we need something to know the input was displayed AND empty #} + {% set defined_input_name = "_#{name}_defined" %} + + + {# Multiple values will be set, input need to be an array #} + {% set name = "#{name}[]" %} + {% endif %} + {% set options = { + 'rand': random(), + 'disabled': false, + }|merge(options) %} + {% if options.fields_template.isMandatoryField(name)|default(false) %} + {% set options = {'specific_tags': {'required': true}}|merge(options) %} + {% endif %} + + {% if options.disabled %} + {% set options = options|merge({specific_tags: {'disabled': 'disabled'}}) %} + {% endif %} + + {% set field %} + {% do call('GlpiPlugin\\Carbon\\DataTracking\\TrackedInt::dropdownQuality', [name, { + 'value': value, + 'rand': options.rand, + 'width': '100%', + }|merge(options)]) %} + {% endset %} + {% if field|trim is not empty %} + {{ fields.field(name, field, label, options|merge({'id': 'dropdown_' ~ name ~ '_' ~ options.rand})) }} + {% endif %} +{% endmacro %} diff --git a/templates/components/form/source_zone_selector.html.twig b/templates/components/form/source_zone_selector.html.twig new file mode 100644 index 00000000..ec64aa7b --- /dev/null +++ b/templates/components/form/source_zone_selector.html.twig @@ -0,0 +1,73 @@ +{# + # ------------------------------------------------------------------------- + # Carbon plugin for GLPI + # + # @copyright Copyright (C) 2024-2025 Teclib' and contributors. + # @license https://www.gnu.org/licenses/gpl-3.0.txt GPLv3+ + # @license MIT https://opensource.org/licenses/mit-license.php + # @link https://github.com/pluginsGLPI/carbon + # + # ------------------------------------------------------------------------- + # + # LICENSE + # + # This file is part of Carbon plugin for GLPI. + # + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # + # ------------------------------------------------------------------------- + #} + +{% import 'components/form/fields_macros.html.twig' as fields %} + +{% set plugin_carbon_zones_rand = random() %} +{{ fields.dropdownField('GlpiPlugin\\Carbon\\Source', + 'plugin_carbon_sources_id', + source_id, + __('Source', 'carbon'), + { + display_emptychoice: true, + multiple: false, + disabled: false, + condition: { + fallback_level: ['<=', '2'], + is_carbon_intensity_source: 1 + }, + order: 'fallback_level' + }) }} + + + +{{ fields.dropdownField('GlpiPlugin\\Carbon\\Zone', + 'plugin_carbon_zones_id', + zone_id, + _n('Carbon intensity zone', 'Carbon intensity zones', 1, 'carbon'), + { + rand: plugin_carbon_zones_rand, + display_emptychoice: true, + condition: zone_condition, + disabled: (source_id == 0) + }) }} diff --git a/templates/computermodel.html.twig b/templates/computermodel.html.twig new file mode 100644 index 00000000..f5308366 --- /dev/null +++ b/templates/computermodel.html.twig @@ -0,0 +1,36 @@ +{# + # ------------------------------------------------------------------------- + # Carbon plugin for GLPI + # + # @copyright Copyright (C) 2024-2025 Teclib' and contributors. + # @license https://www.gnu.org/licenses/gpl-3.0.txt GPLv3+ + # @license MIT https://opensource.org/licenses/mit-license.php + # @link https://github.com/pluginsGLPI/carbon + # + # ------------------------------------------------------------------------- + # + # LICENSE + # + # This file is part of Carbon plugin for GLPI. + # + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # + # ------------------------------------------------------------------------- + #} + +{% extends "generic_show_form.html.twig" %} + +{% block form_fields %} +{% include('@carbon/abstractmodel.html.twig') %} +{% endblock %} diff --git a/templates/computertype.html.twig b/templates/computertype.html.twig index 4e336f28..1a9a0a19 100644 --- a/templates/computertype.html.twig +++ b/templates/computertype.html.twig @@ -47,4 +47,10 @@ display_emptychoice: true } ) }} + + {{ fields.dropdownYesNo( + 'is_ignore', + item.fields['is_ignore'], + __('Do not evaluate', 'carbon'), + ) }} {% endblock %} diff --git a/templates/config.html.twig b/templates/config.html.twig index e1e999de..65dde58d 100644 --- a/templates/config.html.twig +++ b/templates/config.html.twig @@ -37,7 +37,7 @@ - {{ fields.largeTitle( + {# {{ fields.largeTitle( __('Electricity maps', 'carbon'), 'fas fa-gears' ) }} @@ -46,7 +46,7 @@ 'electricitymap_api_key', current_config['electricitymap_api_key'], __('Key for electricitymap.org API', 'carbon') - ) }} + ) }} #} {{ fields.largeTitle( __('Impact engine', 'carbon'), @@ -64,26 +64,9 @@ __('Impact engine', 'carbon') ) }} - {{ fields.largeTitle( - __('Boavizta', 'carbon'), - 'fas fa-gears' - ) }} - - {{ fields.textField( - 'boaviztapi_base_url', - current_config['boaviztapi_base_url'], - __('Base URL to the Boaviztapi instance', 'carbon') - ) }} - -
-

{{ __('Geocoding converts a location into a ISO 3166 (3 letters) code. Boavizta needs this to determine usage impacts of assets. This feature sends the address stored in a location to nominatim.org service. If this is an issue, you can disable it below, and fill the coutry code manually.', 'carbon') }}

-
- - {{ fields.checkboxField( - 'geocoding_enabled', - current_config['geocoding_enabled'], - __('Enable geocoding', 'carbon') - ) }} + {% for include_config in include_configs %} + {{ include(template_from_string(include_config)) }} + {% endfor %}