We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a141960 commit 9720c66Copy full SHA for 9720c66
src/Commands/Env/MetricsCommand.php
@@ -84,6 +84,12 @@ public function metrics(
84
'datapoints' => 'auto',
85
]
86
) {
87
+ $site = $this->getSiteById($site_env);
88
+ if ($site->isNodejs()) {
89
+ throw new TerminusException(
90
+ 'Metrics are not yet available for Node.js sites.'
91
+ );
92
+ }
93
$env = $this->getOptionalEnv($site_env);
94
if (null !== $env) {
95
$metrics = $env->getEnvironmentMetrics()
@@ -95,8 +101,7 @@ public function metrics(
101
)
96
102
->serialize();
97
103
} else {
98
- $metrics = $this->getSiteById($site_env)
99
- ->getSiteMetrics()
104
+ $metrics = $site->getSiteMetrics()
100
105
->setDuration(
106
$this->selectDatapoints(
107
$options['datapoints'],
0 commit comments