From 93838e6cc96de0d823772f61f2da3ee9defea10d Mon Sep 17 00:00:00 2001 From: Leonardo Menezes <mail@lmenezes.com> Date: Mon, 16 Oct 2017 11:01:09 +0200 Subject: [PATCH] removed unnecessary call from overview data service --- .../overview/OverviewDataService.scala | 6 ++---- .../overview/ClusterInitializingShards.scala | 19 +------------------ test/models/overview/ClusterStub.scala | 4 +--- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/app/services/overview/OverviewDataService.scala b/app/services/overview/OverviewDataService.scala index aa6b1df..9a5bbea 100644 --- a/app/services/overview/OverviewDataService.scala +++ b/app/services/overview/OverviewDataService.scala @@ -20,8 +20,7 @@ class OverviewDataService @Inject()(client: ElasticClient) { "_cluster/settings", "_aliases", "_cluster/health", - s"_nodes/_all/os,jvm?human=true", - "" + s"_nodes/_all/os,jvm?human=true" ) val start = System.currentTimeMillis() @@ -39,8 +38,7 @@ class OverviewDataService @Inject()(client: ElasticClient) { responses(3).body, responses(4).body, responses(5).body, - responses(6).body, - responses(7).body + responses(6).body ) println(s"Requesting took [${end - start}]") overview diff --git a/test/models/overview/ClusterInitializingShards.scala b/test/models/overview/ClusterInitializingShards.scala index 5fba37a..2c62fc9 100644 --- a/test/models/overview/ClusterInitializingShards.scala +++ b/test/models/overview/ClusterInitializingShards.scala @@ -4,7 +4,7 @@ import play.api.libs.json.Json object ClusterInitializingShards { - def apply() = ClusterOverview(clusterState, nodesStats, indicesStats, clusterSettings, aliases, clusterHealth, nodes, main) + def apply() = ClusterOverview(clusterState, nodesStats, indicesStats, clusterSettings, aliases, clusterHealth, nodes) val clusterState = Json.parse( """ @@ -701,21 +701,4 @@ object ClusterInitializingShards { """.stripMargin ) - val main = Json.parse( - """ - |{ - | "name" : "Cecilia Reyes", - | "cluster_name" : "elasticsearch", - | "version" : { - | "number" : "2.1.0", - | "build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87", - | "build_timestamp" : "2015-11-18T22:40:03Z", - | "build_snapshot" : false, - | "lucene_version" : "5.3.1" - | }, - | "tagline" : "You Know, for Search" - |} - """.stripMargin - ) - } diff --git a/test/models/overview/ClusterStub.scala b/test/models/overview/ClusterStub.scala index 650b87d..caaed94 100644 --- a/test/models/overview/ClusterStub.scala +++ b/test/models/overview/ClusterStub.scala @@ -4,7 +4,7 @@ import play.api.libs.json.JsValue trait ClusterStub { - def apply() = ClusterOverview(clusterState, nodesStats, indicesStats, clusterSettings, aliases, clusterHealth, nodes, main) + def apply() = ClusterOverview(clusterState, nodesStats, indicesStats, clusterSettings, aliases, clusterHealth, nodes) val clusterState: JsValue @@ -20,6 +20,4 @@ trait ClusterStub { val nodes: JsValue - val main: JsValue - } -- GitLab