private String getDashboardRestApiUrl ( final HttpServletRequest request , final String dashboardName ) { String contextPath = request . getContextPath ( ) ; if ( contextPath == null ) { contextPath = "" ; } if ( ! contextPath . endsWith ( "/" ) ) { contextPath += "/" ; } return contextPath + "moskito-inspect-rest/dashboards/" + dashboardName ; }
Creates Dashboard REST API url for given dashboard . Used at UI .