Skip to content

Commit

Permalink
Merge pull request #361 from nitram509/feature-fallback-on-missing-va…
Browse files Browse the repository at this point in the history
…riables-in-templates

feat(ui): show ⍰ as default value in case of missing variables in mustache templates
  • Loading branch information
saig0 authored Jan 28, 2022
2 parents 5676c89 + 80016b2 commit 352d884
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/io/zeebe/monitor/ZeebeSimpleMonitorApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package io.zeebe.monitor;

import com.samskivert.mustache.Mustache;
import io.camunda.zeebe.spring.client.EnableZeebeClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down Expand Up @@ -53,4 +54,10 @@ public Executor asyncExecutor() {
executor.initialize();
return executor;
}

@Bean
public Mustache.Compiler configureFallbackValueForMissingVariablesInMustacheTemplates(
Mustache.TemplateLoader templateLoader) {
return Mustache.compiler().defaultValue("⍰").withLoader(templateLoader);
}
}

0 comments on commit 352d884

Please sign in to comment.