diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-09-19 13:35:38 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-09-26 23:49:37 +0200 |
commit | 9c2a9a75fff56e56799273e4a61364ed51870b7e (patch) | |
tree | c74c878f8757355e9d25a1c37ab8b2e886876c15 /server/sonar-process | |
parent | 74c8a8ac5e83144fab7291b9ad57c14742fe8bbf (diff) | |
download | sonarqube-9c2a9a75fff56e56799273e4a61364ed51870b7e.tar.gz sonarqube-9c2a9a75fff56e56799273e4a61364ed51870b7e.zip |
SONAR-9839 return health in api/system/info
Diffstat (limited to 'server/sonar-process')
-rw-r--r-- | server/sonar-process/src/main/java/org/sonar/process/systeminfo/SystemInfoUtils.java | 10 | ||||
-rw-r--r-- | server/sonar-process/src/main/protobuf/process_system_info.proto | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/systeminfo/SystemInfoUtils.java b/server/sonar-process/src/main/java/org/sonar/process/systeminfo/SystemInfoUtils.java index 738329480ff..63dbdec055d 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/systeminfo/SystemInfoUtils.java +++ b/server/sonar-process/src/main/java/org/sonar/process/systeminfo/SystemInfoUtils.java @@ -19,6 +19,7 @@ */ package org.sonar.process.systeminfo; +import java.util.Collection; import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo; @@ -38,6 +39,15 @@ public class SystemInfoUtils { } } + public static void setAttribute(ProtobufSystemInfo.Section.Builder section, String key, @Nullable Collection<String> values) { + if (values != null) { + section.addAttributesBuilder() + .setKey(key) + .addAllStringValues(values) + .build(); + } + } + public static void setAttribute(ProtobufSystemInfo.Section.Builder section, String key, boolean value) { section.addAttributesBuilder() .setKey(key) diff --git a/server/sonar-process/src/main/protobuf/process_system_info.proto b/server/sonar-process/src/main/protobuf/process_system_info.proto index 8780b677596..e1d4daad792 100644 --- a/server/sonar-process/src/main/protobuf/process_system_info.proto +++ b/server/sonar-process/src/main/protobuf/process_system_info.proto @@ -40,4 +40,5 @@ message Attribute { double double_value = 4; string string_value = 5; } + repeated string string_values = 6; } |