Skip to content

Commit

Permalink
#1 merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Feb 22, 2019
1 parent bb7fa52 commit ec98c3d
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 19 deletions.
1 change: 1 addition & 0 deletions emc-metalnx-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
metalnx.enable.upload.rules=${metalnx.enable.upload.rules}
metalnx.download.limit=${metalnx.download.limit}
access.proxy=true
metalnx.enable.dashboard=true


irodsext.dataprofiler.retrieve.tickets=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,17 @@ public class ConfigServiceImpl implements ConfigService {
@Value("${irods.auth.scheme}")
private String defaultIrodsAuthScheme;

@Value("${metalnx.enable.dashboard}")
private boolean dashboardEnabled;

@Override
public GlobalConfig getGlobalConfig() {
logger.info("getGlobalConfig()");
GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setTicketsEnabled(this.isTicketsEnabled());
globalConfig.setUploadRulesEnabled(isUploadRulesEnabled());
globalConfig.setHandleNoAccessViaProxy(handleNoAccessViaProxy);
globalConfig.setDashboardEnabled(dashboardEnabled);
logger.debug("globalConfig:{}", globalConfig);
return globalConfig;
}
Expand Down Expand Up @@ -184,6 +188,9 @@ public String toString() {
.append(", irodsPort=").append(irodsPort).append(", irodsZone=").append(irodsZone)
.append(", irodsJobUser=").append(irodsJobUser).append(", irodsAuthScheme=").append(irodsAuthScheme)
.append(", populateMsiEnabled=").append(populateMsiEnabled).append(", ticketsEnabled=")
if (defaultIrodsAuthScheme != null) {
builder.append("defaultIrodsAuthScheme=").append(defaultIrodsAuthScheme).append(", ");
}
.append(ticketsEnabled).append(", uploadRulesEnabled=").append(uploadRulesEnabled)
.append(", downloadLimit=").append(downloadLimit).append(", handleNoAccessViaProxy=")
.append(handleNoAccessViaProxy).append(", defaultIrodsAuthScheme=").append(defaultIrodsAuthScheme)
Expand Down Expand Up @@ -242,4 +249,13 @@ public String getDefaultIrodsAuthScheme() {
public void setDefaultIrodsAuthScheme(String defaultIrodsAuthScheme) {
this.defaultIrodsAuthScheme = defaultIrodsAuthScheme;
}

@Override
public boolean isDashboardEnabled() {
return dashboardEnabled;
}

public void setDashboardEnabled(boolean dashboardEnabled) {
this.dashboardEnabled = dashboardEnabled;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
*
*
*/
package com.emc.metalnx.services.configuration;

Expand All @@ -8,7 +8,7 @@
/**
* DTO from {@link ConfigService} that can pass global config information to
* pages and controller
*
*
* @author Mike Conway - NIEHS
*
*/
Expand All @@ -24,10 +24,15 @@ public class GlobalConfig {
*/
private boolean uploadRulesEnabled = false;

/**
* Turn the dashboard admin view on and off
*/
private boolean dashboardEnabled = false;

/**
* Turn on or off the ability to generate no-access pages for files and
* collections
*
*
* @return {@code boolean} of {@code true} if no-access pages are enabled
*/
private boolean handleNoAccessViaProxy = false;
Expand Down Expand Up @@ -65,4 +70,19 @@ public void setHandleNoAccessViaProxy(boolean handleNoAccessViaProxy) {
this.handleNoAccessViaProxy = handleNoAccessViaProxy;
}

/**
* @return the dashboardEnabled
*/
public boolean isDashboardEnabled() {
return dashboardEnabled;
}

/**
* @param dashboardEnabled
* the dashboardEnabled to set
*/
public void setDashboardEnabled(boolean dashboardEnabled) {
this.dashboardEnabled = dashboardEnabled;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,95 +13,103 @@
* Service used to retrieve all configurable parameters from *.properties files.
*/
public interface ConfigService {

/**
* Indicates whether the admin dashboard is enabled
*
* @return {@code boolean} of {@code true} if the dashboard function is
* implemented
*/
boolean isDashboardEnabled();
/**
* Finds the MSI API version supported by the current version of Metalnx.
*
*
* @return string representing the version
*/
String getMsiAPIVersionSupported();

/**
* Finds the list of all expected Metalnx microservices.
*
*
* @return list of all Metalnx microservices.
*/
List<String> getMlxMSIsExpected();

/**
* Finds the list of all expected iRODS 4.1.X microservices.
*
*
* @return list of all iRODS 4.1.X microservices.
*/
List<String> getIrods41MSIsExpected();

/**
* Finds the list of all expected irods 4.2.X microservices.
*
*
* @return list of all irods 4.2.X microservices.
*/
List<String> getIrods42MSIsExpected();

/**
* Finds the list of all third-party microservices.
*
*
* @return list of all third-party microservices.
*/
List<String> getOtherMSIsExpected();

/**
* Find the iCAT hostname.
*
*
* @return String representing the iCAT machine's hostname.
*/
String getIrodsHost();

/**
* Find the irods port number.
*
*
* @return String representing irods port number.
*/
String getIrodsPort();

/**
* Find the irods default zone.
*
*
* @return String representing the irods default zone.
*/
String getIrodsZone();

/**
* Find the jobs username.
*
*
* @return String representing the username used for synchronizing Metalnx and
* iRODS.
*/
String getIrodsJobUser();

/**
* Find the jobs password.
*
*
* @return String representing the password used for synchronizing Metalnx and
* iRODS.
*/
String getIrodsJobPassword();

/**
* Find the authentication scheme used for authenticating against iRODS.
*
*
* @return String representing the authentication scheme.
*/
String getIrodsAuthScheme();

/**
* Find file download limit
*
*
* @return long representing the download limit in Megabytes
*/
long getDownloadLimit();

/**
* Checks whether or not the populate MSI flag is enabled
*
*
* @return True, if populate is enabled. False, otherwise.
*/
boolean isPopulateMsiEnabled();
Expand All @@ -110,7 +118,7 @@ public interface ConfigService {
* Get a summary config object of global behavior settings, these can be
* injected into templates to control the layout of pages and exposing/hiding
* functionality
*
*
* @return {@link GlobalConfig} with system-wide optional settings that control
* appearance and behavior
*/
Expand All @@ -119,15 +127,15 @@ public interface ConfigService {
/**
* Global setting turning on or off the application of rules based on file type
* during upload
*
*
* @return <code>boolean</code> that is <code>true</code> when upload rules are
* applied based on file type
*/
boolean isUploadRulesEnabled();

/**
* Default auth scheme used at login time by the user on the login form
*
*
* @return {@code String} with the stringified representation of the jargon
* {@link AuthScheme}
*/
Expand Down

0 comments on commit ec98c3d

Please sign in to comment.