diff --git a/SingularityBase/src/main/java/com/hubspot/mesos/SingularityMesosArtifact.java b/SingularityBase/src/main/java/com/hubspot/mesos/SingularityMesosArtifact.java index 3fcb58dde1..8e07b1de3e 100644 --- a/SingularityBase/src/main/java/com/hubspot/mesos/SingularityMesosArtifact.java +++ b/SingularityBase/src/main/java/com/hubspot/mesos/SingularityMesosArtifact.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.base.Optional; public class SingularityMesosArtifact { private final String uri; @@ -11,18 +12,18 @@ public class SingularityMesosArtifact { @JsonCreator public static SingularityMesosArtifact fromString(String uri) { - return new SingularityMesosArtifact(uri, false, false, false); + return new SingularityMesosArtifact(uri, Optional.absent(), Optional.absent(), Optional.absent()); } @JsonCreator public SingularityMesosArtifact(@JsonProperty("uri") String uri, - @JsonProperty("cache") boolean cache, - @JsonProperty("executable") boolean executable, - @JsonProperty("extract") boolean extract) { + @JsonProperty("cache") Optional cache, + @JsonProperty("executable") Optional executable, + @JsonProperty("extract") Optional extract) { this.uri = uri; - this.cache = cache; - this.executable = executable; - this.extract = extract; + this.cache = cache.or(false); + this.executable = executable.or(true); + this.extract = extract.or(false); } public String getUri() { diff --git a/SingularityUI/app/components/newDeployForm/NewDeployForm.jsx b/SingularityUI/app/components/newDeployForm/NewDeployForm.jsx index 7b2d90c8a3..d54c231d61 100644 --- a/SingularityUI/app/components/newDeployForm/NewDeployForm.jsx +++ b/SingularityUI/app/components/newDeployForm/NewDeployForm.jsx @@ -553,7 +553,7 @@ class NewDeployForm extends Component {
- diff --git a/SingularityUI/app/components/newDeployForm/fields.es6 b/SingularityUI/app/components/newDeployForm/fields.es6 index 049459d09a..f8390684a5 100644 --- a/SingularityUI/app/components/newDeployForm/fields.es6 +++ b/SingularityUI/app/components/newDeployForm/fields.es6 @@ -104,7 +104,7 @@ export const MESOS_ARTIFACT_FIELDS = [ {id: 'uri', type: 'text', required: true}, {id: 'cache', type: 'text'}, {id: 'executable', type: 'text'}, - {id: 'extract', type: 'text'} + {id: 'extract', type: 'text', default: true} ]; export const ARTIFACT_FIELDS = {