Skip to content

Commit

Permalink
Finished fixes and testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidASeibert committed Nov 14, 2018
1 parent bb719e9 commit 7fc76fe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ FROM openjdk:8
EXPOSE 8080

WORKDIR /usr/src/app
COPY build/libs/ecs-browser-1.0.0rc2.jar ./
COPY build/libs/ecs-browser-1.0.0rc3.jar ./

CMD [ "java", "-jar", "ecs-browser-1.0.0rc2.jar" ]
CMD [ "java", "-jar", "ecs-browser-1.0.0rc3.jar" ]
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description = "ECS browser website"
group = 'com.emc.ecs'
version = '1.0.0rc2'
version = '1.0.0rc3'

ext.licenseName = ''
ext.licenseUrl = ''
Expand Down Expand Up @@ -30,7 +30,7 @@ defaultTasks 'build'

jar {
baseName = 'ecs-browser'
version = '1.0.0rc2'
version = '1.0.0rc3'
into('META-INF/dependency-license') {
from 'build/reports/dependency-license'
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/javascript/ConfigPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ConfigPage.prototype.showUidPage = function() {
var s3 = new EcsS3({endpoint: $endpoint.val(), accessKeyId: $uid.val(),secretAccessKey: $secret.val(), s3ForcePathStyle: true});
s3.getServiceInformation( function( result ) {
var messageKey;
if ( result.successful ) {
if ( result && result.successful ) {
messageKey = 'uidSuccessPrompt';
} else {
messageKey = 'uidFailurePrompt';
Expand Down
16 changes: 12 additions & 4 deletions src/main/resources/static/javascript/ecs-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,27 @@ function isNonEmptyString(theString) {
return (theString && theString.trim() && (theString != ""));
};

function startsWith( theString, thePrefix ) {
return theString && ( theString.substring(0, thePrefix.length) == thePrefix );
};

function endsWith( theString, theSuffix ) {
return theString && ( theString.substring(theString.length - theSuffix.length) == theSuffix );
};

function combineWithDelimiter( part1, part2 ) {
var combination;
if (!isNonEmptyString(part2)) {
combination = part1;
} else if (!isNonEmptyString(part1)) {
combination = part2;
} else if (part2.startsWith(_s3Delimiter)) {
if (part1.endsWith(_s3Delimiter)) {
} else if ( startsWith( part2, _s3Delimiter ) ) {
if ( endsWith( part1, _s3Delimiter ) ) {
combination = part1 + part2.substring(1);
} else {
combination = part1 + part2;
}
} else if (part1.endsWith(_s3Delimiter)) {
} else if ( endsWith( part1, _s3Delimiter ) ) {
combination = part1 + part2;
} else {
combination = part1 + _s3Delimiter + part2;
Expand Down Expand Up @@ -116,7 +124,7 @@ function makeMetaData( data ) {
if ( data && data.headers ) {
for ( var key in data.headers ) {
if ( data.headers.hasOwnProperty( key ) ) {
if ( !key.toLowerCase().startsWith( _metadataStart ) ) {
if ( !startsWith( key.toLowerCase(), _metadataStart ) ) {
metaData[ keyProcessor( key ) ] = data.headers[ key ];
} else {
if ( !metaData.Metadata ) {
Expand Down

0 comments on commit 7fc76fe

Please sign in to comment.