Skip to content

Commit

Permalink
[#1900] add config for Configuration API (#1901)
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoo-jung authored Jul 12, 2016
1 parent dd05b0a commit 8c61c72
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class ConfigProperties {

@Value("#{pinpointWebProps['config.show.activeThread'] ?: false}")
private boolean showActiveThread;

@Value("#{pinpointWebProps['config.openSource'] ?: true}")
private boolean openSource;

public boolean getEditUserInfo() {
return editUserInfo;
Expand All @@ -43,7 +46,11 @@ public boolean getSendUsage() {
}

public boolean isShowActiveThread() {
return showActiveThread;
return this.showActiveThread;
}

public boolean isOpenSource() {
return this.openSource;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public Map<String, Object> getProperties(@RequestHeader(value="SSO_USER", requir
result.put("sendUsage", webProperties.getSendUsage());
result.put("editUserInfo", webProperties.getEditUserInfo());
result.put("showActiveThread", webProperties.isShowActiveThread());
result.put("openSource", webProperties.isOpenSource());

if (!StringUtils.isEmpty(userId)) {
User user = userService.selectUserByUserId(userId);
Expand Down
1 change: 1 addition & 0 deletions web/src/main/resources/pinpoint-web.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ admin.password=admin
# Configuration
config.sendUsage=true
config.editUserInfo=true
config.openSource=true

web.hbase.selectSpans.limit=500
web.hbase.selectAllSpans.limit=500
Expand Down

0 comments on commit 8c61c72

Please # to comment.