Skip to content

Commit

Permalink
Fix invalid cast from SecureIndexClient to NodeClient (#8)
Browse files Browse the repository at this point in the history
* Fix invalid cast from SecureIndexClient to NodeClient

* Add labels to issue templates
  • Loading branch information
AlexRuiz7 committed Nov 15, 2024
1 parent eddffc3 commit 8eba4e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: 🐛 Bug report
about: Create a report to help us improve
title: '[BUG]'
labels: 'bug, untriaged'
labels: ["type/bug", "level/task"]
assignees: ''
---

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: 🎆 Feature request
about: Request a feature in this project
title: '[FEATURE]'
labels: 'enhancement, untriaged'
title: ''
labels: ["type/enhancement", "level/task"]
assignees: ''
---
**Is your feature request related to a problem?**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import org.opensearch.reportsscheduler.index.ReportInstancesIndex
import org.opensearch.reportsscheduler.model.ReportDefinitionDetails
import org.opensearch.reportsscheduler.model.ReportInstance
import org.opensearch.reportsscheduler.util.NotificationApiUtils.getNotificationConfigInfo
import org.opensearch.reportsscheduler.util.SecureIndexClient
import org.opensearch.reportsscheduler.util.buildReportLink
import org.opensearch.reportsscheduler.util.logger
import org.opensearch.reportsscheduler.util.sendNotificationWithHTML
Expand All @@ -43,7 +42,7 @@ internal object ReportDefinitionJobRunner : ScheduledJobRunner {
* @param clusterService The ES cluster service
*/
fun initialize(client: Client, clusterService: ClusterService) {
this.client = SecureIndexClient(client)
this.client = client
this.clusterService = clusterService
}

Expand All @@ -65,7 +64,7 @@ internal object ReportDefinitionJobRunner : ScheduledJobRunner {
val htmlWithURL: String? =
htmlMessage?.replace("{{urlDefinition}}", urlDefinition)?.replace("{{hits}}", hits.toString())

log.info("esto es el mensaje html $htmlMessage")
log.debug("HTML message: $htmlMessage") // TODO remove
configInfo.sendNotificationWithHTML(
this.client,
title,
Expand Down

0 comments on commit 8eba4e3

Please sign in to comment.