You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2022/08/17 08:26:57 UTC
[brooklyn-server] branch master updated: tidy names of function feeds
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
The following commit(s) were added to refs/heads/master by this push:
new 45d015dd5e tidy names of function feeds
45d015dd5e is described below
commit 45d015dd5e3149c9f40e073a36232e5704028bcf
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Wed Aug 17 09:26:27 2022 +0100
tidy names of function feeds
don't include sensor name twice
---
.../java/org/apache/brooklyn/core/feed/AttributePollHandler.java | 5 ++++-
core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/core/src/main/java/org/apache/brooklyn/core/feed/AttributePollHandler.java b/core/src/main/java/org/apache/brooklyn/core/feed/AttributePollHandler.java
index 84e4d852ba..e651198876 100644
--- a/core/src/main/java/org/apache/brooklyn/core/feed/AttributePollHandler.java
+++ b/core/src/main/java/org/apache/brooklyn/core/feed/AttributePollHandler.java
@@ -233,7 +233,10 @@ public class AttributePollHandler<V> implements PollHandler<V> {
@Override
public String getDescription() {
- return sensor.getName() + " " /*+entity.getId()*/ +" <- " + config;
+ return
+ // we used to show the sensor name, but it was redundant with info on the FeedConfig
+ //sensor.getName() + " " /*+entity.getId()*/ +" <- " +
+ "" + config;
}
protected String getBriefDescription() {
diff --git a/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java b/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java
index 7e7a5b062d..c71f88dbba 100644
--- a/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java
+++ b/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java
@@ -275,11 +275,11 @@ public class FeedConfig<V, T, F extends FeedConfig<V, T, F>> {
Object source = toStringPollSource();
AttributeSensor<T> s = getSensor();
if (Strings.isNonBlank(Strings.toString(source))) {
- result.append(Strings.toUniqueString(source, 40));
if (s!=null) {
- result.append("->");
result.append(s.getName());
+ result.append(" <- ");
}
+ result.append(Strings.toUniqueString(source, 40));
contents = true;
} else if (s!=null) {
result.append(s.getName());
@@ -289,7 +289,7 @@ public class FeedConfig<V, T, F extends FeedConfig<V, T, F>> {
if (fields!=null) {
for (Object field: fields) {
if (Strings.isNonBlank(Strings.toString(field))) {
- if (contents) result.append(";");
+ if (contents) result.append("; ");
contents = true;
result.append(field);
}