Skip to content

Commit

Permalink
Cleanup after UI migration, updated docs, fixed retransmission bug (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
szczygiel-m authored Nov 29, 2023
1 parent ff1614b commit fb7aa8d
Show file tree
Hide file tree
Showing 416 changed files with 332 additions and 7,464 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./hermes-console-vue
working-directory: ./hermes-console
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
14 changes: 6 additions & 8 deletions docs/docs/configuration/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ dashboard.docs | link to documentation, available on Console home page

## Metric Store integration

Hermes Console can be integrated with Metric Store. This means, that metrics shown in Console can link to actual graphs
plotted by Metric Store. At the moment only Graphite is supported.

Option | Description
----------------------- | ---------------------------------------------------------------------------
metrics.type | type of metrics storage to link to (currently only `graphite` is supported)
metrics.graphite.url | URL to graphite
metrics.graphite.prefix | prefix to graphite metrics
Hermes console could have a button on the topics and subscriptions view that takes you to a dashboard with metrics.
In order to make it work you have to provide an implementation of `pl.allegro.tech.hermes.management.domain.MetricsDashboardUrlService`.

Option | Description
-------------------------------------|--------------------------------------------------------------------------------------
metrics.fetchingDashboardUrlEnabled | enable fetching dashboard url from hermes-management and show the referring UI button

## Authorization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,54 @@
import pl.allegro.tech.hermes.api.jackson.InstantIsoSerializer;

import java.time.Instant;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.List;

public class OfflineRetransmissionRequest {

private static final List<DateTimeFormatter> formatters = List.of(
DateTimeFormatter.ISO_INSTANT,
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm'Z'").withZone(ZoneId.of("UTC"))
);

@NotEmpty
private final String sourceTopic;
@NotEmpty
private final String targetTopic;
@NotNull
private final Instant startTimestamp;
private Instant startTimestamp;
@NotNull
private final Instant endTimestamp;
private Instant endTimestamp;

@JsonCreator
public OfflineRetransmissionRequest(
@JsonProperty("sourceTopic") String sourceTopic,
@JsonProperty("targetTopic") String targetTopic,
@JsonProperty("startTimestamp") Instant startTimestamp,
@JsonProperty("endTimestamp") Instant endTimestamp) {
@JsonProperty("startTimestamp") String startTimestamp,
@JsonProperty("endTimestamp") String endTimestamp) {
this.sourceTopic = sourceTopic;
this.targetTopic = targetTopic;
this.startTimestamp = startTimestamp;
this.endTimestamp = endTimestamp;
initializeTimestamps(startTimestamp, endTimestamp);
}

private void initializeTimestamps(String startTimestamp, String endTimestamp) {
if (startTimestamp == null || endTimestamp == null) {
this.startTimestamp = null;
this.endTimestamp = null;
return;
}

for (DateTimeFormatter formatter : formatters) {
try {
this.startTimestamp = formatter.parse(startTimestamp, Instant::from);
this.endTimestamp = formatter.parse(endTimestamp, Instant::from);
break;
} catch (DateTimeParseException e) {
// ignore
}
}
}

public String getSourceTopic() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public OfflineRetransmissionTask(
@JsonProperty("startTimestamp") Instant startTimestamp,
@JsonProperty("endTimestamp") Instant endTimestamp,
@JsonProperty("createdAt") Instant createdAt) {
this(taskId, new OfflineRetransmissionRequest(sourceTopic, targetTopic, startTimestamp, endTimestamp), createdAt);
this(taskId, new OfflineRetransmissionRequest(
sourceTopic,
targetTopic,
startTimestamp.toString(),
endTimestamp.toString()),
createdAt);
}

public OfflineRetransmissionTask(String taskId, OfflineRetransmissionRequest request, Instant createdAt) {
Expand Down
50 changes: 0 additions & 50 deletions hermes-console-vue/README.md

This file was deleted.

65 changes: 0 additions & 65 deletions hermes-console-vue/package.json

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions hermes-console/.bowerrc

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions hermes-console/.jshintrc

This file was deleted.

File renamed without changes.
File renamed without changes.
30 changes: 0 additions & 30 deletions hermes-console/Gruntfile.js

This file was deleted.

Loading

0 comments on commit fb7aa8d

Please sign in to comment.