test_class.declarator: grafanaClient
test_class.modifier: private
test_class.original_string: private GrafanaClient grafanaClient;
test_class.type: GrafanaClient
test_class.var_name: grafanaClient
test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/grafana/GrafanaClientTest.java
test_class.identifier: GrafanaClientTest
test_case.body: @Test
  	public void sendGrafanaDashboardAsync() throws Exception {
  		final JsonNode dashboard = grafanaClient.getGrafanaDashboard("grafana/ElasticsearchCustomMetricsDashboard.json");
  		boolean intervalFound = false;
  		for (JsonNode template : dashboard.get("templating").get("list")) {
  			if ("Interval".equals(template.get("name").textValue())) {
  				intervalFound = true;
  				assertEquals("60s", template.get("auto_min").textValue());
  			}
  		}
  		assertTrue(intervalFound);
  	}
test_case.class_method_signature: GrafanaClientTest.sendGrafanaDashboardAsync()
test_case.full_signature: @Test public void sendGrafanaDashboardAsync()
test_case.identifier: sendGrafanaDashboardAsync
test_case.invocations: getGrafanaDashboard get get equals textValue get assertEquals textValue get assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void sendGrafanaDashboardAsync()
focal_class.declarator: ES_STAGEMONITOR_DS_NAME = "ES stagemonitor"
focal_class.modifier: private static final
focal_class.original_string: private static final String ES_STAGEMONITOR_DS_NAME = "ES stagemonitor";
focal_class.type: String
focal_class.var_name: ES_STAGEMONITOR_DS_NAME
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: asyncRestPool
focal_class.modifier: private final
focal_class.original_string: private final ThreadPoolExecutor asyncRestPool;
focal_class.type: ThreadPoolExecutor
focal_class.var_name: asyncRestPool
focal_class.declarator: corePlugin
focal_class.modifier: private final
focal_class.original_string: private final CorePlugin corePlugin;
focal_class.type: CorePlugin
focal_class.var_name: corePlugin
focal_class.declarator: httpClient
focal_class.modifier: private final
focal_class.original_string: private final HttpClient httpClient;
focal_class.type: HttpClient
focal_class.var_name: httpClient
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/grafana/GrafanaClient.java
focal_class.identifier: GrafanaClient
focal_class.class_method_signature: GrafanaClient.GrafanaClient(CorePlugin corePlugin)
focal_class.full_signature: public  GrafanaClient(CorePlugin corePlugin)
focal_class.identifier: GrafanaClient
focal_class.modifiers: public
focal_class.parameters: (CorePlugin corePlugin)
focal_class.signature:  GrafanaClient(CorePlugin corePlugin)
focal_class.class_method_signature: GrafanaClient.GrafanaClient(CorePlugin corePlugin, HttpClient httpClient)
focal_class.full_signature: public  GrafanaClient(CorePlugin corePlugin, HttpClient httpClient)
focal_class.identifier: GrafanaClient
focal_class.modifiers: public
focal_class.parameters: (CorePlugin corePlugin, HttpClient httpClient)
focal_class.signature:  GrafanaClient(CorePlugin corePlugin, HttpClient httpClient)
focal_class.class_method_signature: GrafanaClient.createElasticsearchDatasource(final URL elasticsearchUrl)
focal_class.full_signature: public void createElasticsearchDatasource(final URL elasticsearchUrl)
focal_class.identifier: createElasticsearchDatasource
focal_class.modifiers: public
focal_class.parameters: (final URL elasticsearchUrl)
focal_class.return: void
focal_class.signature: void createElasticsearchDatasource(final URL elasticsearchUrl)
focal_class.class_method_signature: GrafanaClient.sendGrafanaDashboardAsync(final String classPathLocation)
focal_class.full_signature: public void sendGrafanaDashboardAsync(final String classPathLocation)
focal_class.identifier: sendGrafanaDashboardAsync
focal_class.modifiers: public
focal_class.parameters: (final String classPathLocation)
focal_class.return: void
focal_class.signature: void sendGrafanaDashboardAsync(final String classPathLocation)
focal_class.class_method_signature: GrafanaClient.getGrafanaDashboard(String classPathLocation)
focal_class.full_signature:  ObjectNode getGrafanaDashboard(String classPathLocation)
focal_class.identifier: getGrafanaDashboard
focal_class.parameters: (String classPathLocation)
focal_class.return: ObjectNode
focal_class.signature: ObjectNode getGrafanaDashboard(String classPathLocation)
focal_class.class_method_signature: GrafanaClient.addMinIntervalToPanels(ObjectNode dashboard, String interval)
focal_class.full_signature: private void addMinIntervalToPanels(ObjectNode dashboard, String interval)
focal_class.identifier: addMinIntervalToPanels
focal_class.modifiers: private
focal_class.parameters: (ObjectNode dashboard, String interval)
focal_class.return: void
focal_class.signature: void addMinIntervalToPanels(ObjectNode dashboard, String interval)
focal_class.class_method_signature: GrafanaClient.asyncGrafanaRequest(final String method, final String path, final Object requestBody)
focal_class.full_signature: private void asyncGrafanaRequest(final String method, final String path, final Object requestBody)
focal_class.identifier: asyncGrafanaRequest
focal_class.modifiers: private
focal_class.parameters: (final String method, final String path, final Object requestBody)
focal_class.return: void
focal_class.signature: void asyncGrafanaRequest(final String method, final String path, final Object requestBody)
focal_class.class_method_signature: GrafanaClient.isGrafanaConfigured(String grafanaUrl, String apiToken)
focal_class.full_signature: private boolean isGrafanaConfigured(String grafanaUrl, String apiToken)
focal_class.identifier: isGrafanaConfigured
focal_class.modifiers: private
focal_class.parameters: (String grafanaUrl, String apiToken)
focal_class.return: boolean
focal_class.signature: boolean isGrafanaConfigured(String grafanaUrl, String apiToken)
focal_class.class_method_signature: GrafanaClient.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: GrafanaClient.waitForCompletion()
focal_class.full_signature: public void waitForCompletion()
focal_class.identifier: waitForCompletion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void waitForCompletion()
focal_method.body: public void sendGrafanaDashboardAsync(final String classPathLocation) {
  		if (!corePlugin.isReportToElasticsearch()) {
  			return;
  		}
  
  		try {
  			final ObjectNode dashboard = getGrafanaDashboard(classPathLocation);
  			Map<String, Object> body = new HashMap<String, Object>();
  			body.put("dashboard", dashboard);
  			body.put("overwrite", true);
  			asyncGrafanaRequest("POST", "/api/dashboards/db", body);
  		} catch (IOException e) {
  			logger.warn(e.getMessage(), e);
  		}
  	}
focal_method.class_method_signature: GrafanaClient.sendGrafanaDashboardAsync(final String classPathLocation)
focal_method.full_signature: public void sendGrafanaDashboardAsync(final String classPathLocation)
focal_method.identifier: sendGrafanaDashboardAsync
focal_method.invocations: isReportToElasticsearch getGrafanaDashboard put put asyncGrafanaRequest warn getMessage
focal_method.modifiers: public
focal_method.parameters: (final String classPathLocation)
focal_method.return: void
focal_method.signature: void sendGrafanaDashboardAsync(final String classPathLocation)