Commit 85550e7c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

rename 'default' property to '_default' because 'default' is a reserved word.

parent e3a0329b
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
$.each(property_list, function(key, element) { $.each(property_list, function(key, element) {
if (element) { if (element) {
if(element._class === "Dream.Property") { if(element._class === "Dream.Property") {
data[element.id] = element.default; data[element.id] = element._default;
} else if (element._class === "Dream.PropertyList") { } else if (element._class === "Dream.PropertyList") {
data[element.id] = {}; data[element.id] = {};
var next_data = data[element.id]; var next_data = data[element.id];
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
// save general configuration default values // save general configuration default values
var general_properties = {}; var general_properties = {};
$.each(configuration["Dream-Configuration"].property_list, function(idx, element) { $.each(configuration["Dream-Configuration"].property_list, function(idx, element) {
general_properties[element.id] = element.default; general_properties[element.id] = element._default;
}); });
that.setGeneralProperties(general_properties); that.setGeneralProperties(general_properties);
that.initGeneralProperties(); that.initGeneralProperties();
......
...@@ -25,23 +25,23 @@ ...@@ -25,23 +25,23 @@
var window_id = 1; var window_id = 1;
var id_container = {}; // to allow generating next ids, like Machine_1, Machine_2, etc var id_container = {}; // to allow generating next ids, like Machine_1, Machine_2, etc
var property_container = {entity: {id: "entity", type:"string", _class: "Dream.Property", default: "Part"}, var property_container = {entity: {id: "entity", type:"string", _class: "Dream.Property", _default: "Part"},
// XXX is it possible not to repeat id ? // XXX is it possible not to repeat id ?
mean: {id: "mean", type: "string", _class: "Dream.Property", default: "0.9"}, mean: {id: "mean", type: "string", _class: "Dream.Property", _default: "0.9"},
distributionType: {id: "distributionType", type: "string", _class: "Dream.Property", default: "Fixed"}, distributionType: {id: "distributionType", type: "string", _class: "Dream.Property", _default: "Fixed"},
stdev: {id: "stdev", type: "string", _class: "Dream.Property", default: "0.1"}, stdev: {id: "stdev", type: "string", _class: "Dream.Property", _default: "0.1"},
min: {id: "min", type: "string", _class: "Dream.Property", default: "0.1"}, min: {id: "min", type: "string", _class: "Dream.Property", _default: "0.1"},
max: {id: "max", type: "string", _class: "Dream.Property", default: "1"}, max: {id: "max", type: "string", _class: "Dream.Property", _default: "1"},
failureDistribution: {id: "failureDistribution", type: "string", _class: "Dream.Property", default:"No"}, failureDistribution: {id: "failureDistribution", type: "string", _class: "Dream.Property", _default:"No"},
MTTF: {id: "MTTF", type: "string", _class: "Dream.Property", default: "40"}, MTTF: {id: "MTTF", type: "string", _class: "Dream.Property", _default: "40"},
MTTR: {id: "MTTR", type: "string", _class: "Dream.Property", default: "10"}, MTTR: {id: "MTTR", type: "string", _class: "Dream.Property", _default: "10"},
repairman: {id: "repairman", type: "string", _class: "Dream.Property", default: "None"}, repairman: {id: "repairman", type: "string", _class: "Dream.Property", _default: "None"},
isDummy: {id: "isDummy", type: "string", _class: "Dream.Property", default: "0"}, isDummy: {id: "isDummy", type: "string", _class: "Dream.Property", _default: "0"},
capacity: {id: "capacity", type: "string", _class: "Dream.Property", default: "1"}, capacity: {id: "capacity", type: "string", _class: "Dream.Property", _default: "1"},
numberOfReplications: {id: "numberOfReplications", type: "string", _class: "Dream.Property", default: "10"}, numberOfReplications: {id: "numberOfReplications", type: "string", _class: "Dream.Property", _default: "10"},
maxSimTime: {id: "maxSimTime", type: "string", _class: "Dream.Property", default: "100"}, maxSimTime: {id: "maxSimTime", type: "string", _class: "Dream.Property", _default: "100"},
confidenceLevel: {id: "confidenceLevel", type: "string", _class: "Dream.Property", default: "0.5"}, confidenceLevel: {id: "confidenceLevel", type: "string", _class: "Dream.Property", _default: "0.5"},
processTimeout: {id: "processTimeout", type: "string", _class: "Dream.Property", default: "0.5"}, processTimeout: {id: "processTimeout", type: "string", _class: "Dream.Property", _default: "0.5"},
}; };
property_container["interarrivalTime"] = {id:"interarrivalTime", property_container["interarrivalTime"] = {id:"interarrivalTime",
property_list: [property_container["mean"], property_container["distributionType"]], property_list: [property_container["mean"], property_container["distributionType"]],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment