Remove UI leftover and small improvements (#1784)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-07-25 13:47:59 +03:00
committed by GitHub
parent 3189531162
commit 859cd130f2
3 changed files with 12 additions and 10 deletions

View File

@@ -31,8 +31,7 @@ public interface MgmtDownloadRestApi {
* *
* @param tenant the download belongs to * @param tenant the download belongs to
* @param downloadId the generated download id * @param downloadId the generated download id
* @return {@link ResponseEntity} with status {@link HttpStatus#OK} if * @return {@link ResponseEntity} with status {@link HttpStatus#OK} if successful
* successful
*/ */
@GetMapping(value = MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE @GetMapping(value = MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE
+ MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING) + MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING)

View File

@@ -9,10 +9,13 @@
*/ */
package org.eclipse.hawkbit.mgmt.rest.api; package org.eclipse.hawkbit.mgmt.rest.api;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
/** /**
* Constants for RESTful API. * Constants for RESTful API.
*
*/ */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class MgmtRestConstants { public final class MgmtRestConstants {
/** /**
@@ -23,7 +26,12 @@ public final class MgmtRestConstants {
/** /**
* The base URL mapping of the SP rest resources. * The base URL mapping of the SP rest resources.
*/ */
public static final String BASE_V1_REQUEST_MAPPING = "/rest/v1"; public static final String BASE_REST_MAPPING = "/rest";
/**
* The base URL mapping of the SP rest resources.
*/
public static final String BASE_V1_REQUEST_MAPPING = BASE_REST_MAPPING + "/v1";
/** /**
* String representation of * String representation of
@@ -276,9 +284,4 @@ public final class MgmtRestConstants {
* Request parameter if the artifact url handler should be used * Request parameter if the artifact url handler should be used
*/ */
public static final String REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER = "useartifacturlhandler"; public static final String REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER = "useartifacturlhandler";
// constant class, private constructor.
private MgmtRestConstants() {
}
} }

View File

@@ -82,7 +82,7 @@ public class RestConfiguration {
// in the ShallowEtagHeaderFilter, just using the SH1 hash of the // in the ShallowEtagHeaderFilter, just using the SH1 hash of the
// artifact itself as 'ETag', because otherwise the file will be copied // artifact itself as 'ETag', because otherwise the file will be copied
// in memory! // in memory!
filterRegBean.setFilter(new ExcludePathAwareShallowETagFilter("/UI/**", filterRegBean.setFilter(new ExcludePathAwareShallowETagFilter(
"/rest/v1/softwaremodules/{smId}/artifacts/{artId}/download", "/rest/v1/softwaremodules/{smId}/artifacts/{artId}/download",
"/{tenant}/controller/v1/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/**", "/{tenant}/controller/v1/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/**",
"/api/v1/downloadserver/**")); "/api/v1/downloadserver/**"));