Skip to content

Commit

Permalink
ENTESB-12268 Integration uptime doesn't contain any data
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio4j committed Nov 14, 2019
1 parent 914e125 commit a96e272
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package io.syndesis.server.metrics.prometheus;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.time.Duration;
import java.time.Instant;
import java.util.Comparator;
Expand All @@ -26,6 +24,8 @@
import java.util.function.BinaryOperator;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import io.fabric8.kubernetes.api.model.LabelSelector;
import io.fabric8.kubernetes.api.model.Pod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public final class Utils {
.registerModules(new Jdk8Module(), new EpochMillisTimeModule(), new JavaTimeModule())
.setPropertyInclusion(JsonInclude.Value.construct(JsonInclude.Include.NON_EMPTY, JsonInclude.Include.NON_EMPTY))
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
// disable read as nanoseconds as the values are read as integers from prometheus, with no nano part
.disable(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING)
.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)
.disable(JsonParser.Feature.AUTO_CLOSE_SOURCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class IntegrationDetailMetrics extends React.Component<
> {
public render() {
const okMessagesCount = this.props.messages! - this.props.errors!;
const startAsDate = new Date(this.props.start!);
const startAsDate = new Date(this.props.start! * 1000);
const startAsHuman = this.props.i18nSince + startAsDate.toLocaleString();
return (
<PageSection className="integration-detail-metrics">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class MetricsPage extends React.Component {
parseInt(
metricsData.lastProcessed,
10
)
) * 1000
).toLocaleString()
: t('metrics.NoDataAvailable')
}
Expand Down

0 comments on commit a96e272

Please sign in to comment.