Skip to content

Commit

Permalink
Merge f1c8a14 into f9dbe81
Browse files Browse the repository at this point in the history
  • Loading branch information
cedbossneo committed Jul 5, 2017
2 parents f9dbe81 + f1c8a14 commit 300d264
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/js/stores/schemes/appScheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AppTypes from "../../constants/AppTypes";
const appScheme = {
cmd: null,
constraints: [],
acceptedResourceRoles: [],
acceptedResourceRoles: null,
container: null,
cpus: null,
dependencies: [],
Expand Down
9 changes: 0 additions & 9 deletions src/js/stores/transforms/AppFormModelPostProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ function hasOnlyEmptyValues(obj) {
}

const AppFormModelPostProcess = {
acceptedResourceRoles: (app) => {
var acceptedResourceRoles = app.acceptedResourceRoles;

if (acceptedResourceRoles != null &&
Util.isArray(acceptedResourceRoles) &&
acceptedResourceRoles.length === 0) {
app.acceptedResourceRoles = ["*"];
}
},
container: (app) => {
var container = app.container;
if (container == null) {
Expand Down
10 changes: 0 additions & 10 deletions src/test/units/AppFormModelPostProcess.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ import ContainerConstants from "../../js/constants/ContainerConstants";

describe("App Form Model Post Process", function () {

it("empty accepted resource roles defaults to '*'", function () {
var app = {
acceptedResourceRoles: []
};

AppFormModelPostProcess.acceptedResourceRoles(app);

expect(app).to.deep.equal({acceptedResourceRoles: ["*"]});
});

describe("container", function () {

it("empty container values to null", function () {
Expand Down
2 changes: 1 addition & 1 deletion src/test/units/AppVersionComponent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("AppVersionComponent", function () {
"maximumOverCapacity": 1.0
},
"labels": {},
"acceptedResourceRoles": [],
"acceptedResourceRoles": null,
"version": "2015-06-29T12:57:02.269Z"
};

Expand Down

0 comments on commit 300d264

Please sign in to comment.