Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topics per cluster graph defect #1988

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package io.aiven.klaw.helpers.db.rdbms;

import static io.aiven.klaw.helpers.KwConstants.*;
import static org.reflections.Reflections.log;
import static io.aiven.klaw.helpers.KwConstants.DATE_TIME_DDMMMYYYY_HHMMSS_FORMATTER;
import static io.aiven.klaw.helpers.KwConstants.REQUESTOR_SUBSCRIPTIONS;

import com.google.common.collect.Lists;
import io.aiven.klaw.dao.*;
Expand Down Expand Up @@ -1284,14 +1285,15 @@ public List<CommonUtilsService.ChartsOverviewItem<Integer, Integer>> selectAclsC

Map<String, Env> name2envsFromDb =
StreamSupport.stream(selectEnvsDetails(envIds.keySet(), tenantId).spliterator(), false)
.collect(Collectors.toMap(Env::getName, Function.identity()));
.collect(Collectors.toMap(Env::getId, Function.identity()));

for (var envIdEntry : envIds.entrySet()) {
if (!name2envsFromDb.containsKey(envIdEntry.getKey())) {
log.error("Error: Environment not found for env {}", envIdEntry.getKey());
} else {
totalTopicCount.add(
CommonUtilsService.ChartsOverviewItem.of(envIdEntry.getKey(), envIdEntry.getValue()));
CommonUtilsService.ChartsOverviewItem.of(
name2envsFromDb.get(envIdEntry.getKey()).getName(), envIdEntry.getValue()));
}
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ public <X> ChartsJsOverview getChartsJsOverview(
List<String> labels = new ArrayList<>(size);
List<String> colors = new ArrayList<>(size);

data.add(0);
labels.add("");
if (activityCountList.isEmpty()) {
data.add(0);
labels.add("");
}

int totalCount = 0;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ <h4 class="mb-3">Shortcuts</h4>
</p>
</div>
</div>

</div>
<div class="row">
<!-- col -->

Expand Down