File tree 1 file changed +5
-1
lines changed
api-nodes/Http/Controllers
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 9
9
use Illuminate \Http \Request ;
10
10
use Illuminate \Http \Response ;
11
11
use Illuminate \Log \Logger ;
12
+ use Illuminate \Support \Str ;
12
13
13
14
class MetricsController
14
15
{
@@ -46,7 +47,10 @@ class MetricsController
46
47
public function __invoke (Request $ request , Logger $ log , Node $ node )
47
48
{
48
49
// TODO: cache this with the new Laravel cache system (stale-while-revalidate from the recent release)
49
- $ interfaces = collect ($ node ->data ->host ->networks )->pluck ('if_name ' )->unique ()->toArray ();
50
+ $ interfaces = collect ($ node ->data ->host ->networks )->pluck ('if_name ' )->filter (function ($ interface ) {
51
+ // Collect only the interfaces that start with 'eth' for now
52
+ return Str::startsWith ($ interface , 'eth ' );
53
+ })->unique ()->toArray ();
50
54
51
55
$ services = $ node ->team ->services ->mapWithKeys (function ($ service ) {
52
56
$ processes = collect ($ service ->latestDeployment ->data ->processes );
You can’t perform that action at this time.
0 commit comments