diff --git a/src/common/data-managers/rest-data-manager.js b/src/common/data-managers/rest-data-manager.js
index e928804..559d404 100644
--- a/src/common/data-managers/rest-data-manager.js
+++ b/src/common/data-managers/rest-data-manager.js
@@ -57,7 +57,6 @@ class RestDataManager {
case 'load/add':
if (param === null){
if(id != null){
- console.log("id != 0");
return this.makeURL(this.url + '/' + id);
}
else {
@@ -66,10 +65,10 @@ class RestDataManager {
}
else{
if(id != null){
- return this.makeURL(this.url + '/' + id + '?' + param);
+ return this.makeURL(this.url + '/' + id + param);
}
else {
- return this.makeURL(this.url + '?' + param)
+ return this.makeURL(this.url + param)
}
}
case 'remove/update':
@@ -77,7 +76,7 @@ class RestDataManager {
return this.makeURL(this.url + '/' + object.id);
}
else{
- return this.makeURL(this.url + '/' + object.id + '?' + param);
+ return this.makeURL(this.url + '/' + object.id + param);
}
default:
console.log("something went wrong");
@@ -87,11 +86,10 @@ class RestDataManager {
load(id, token = null,param = null) {
if (id != null) {
- console.log("rdm load was called");
// load single object
RestAPI.get(this.requestURL('load/add',id,param), token).then(response => {
const data = this.filterKeys(response[this.type]);
-
+
AppDispatcher.dispatch({
type: this.type + 's/loaded',
data: data
@@ -129,7 +127,7 @@ class RestDataManager {
});
}
}
-
+
add(object, token = null, param = null) {
var obj = {};
@@ -162,7 +160,7 @@ class RestDataManager {
});
});
}
-
+
update(object, token = null, param = null) {
var obj = {};
obj[this.type] = this.filterKeys(object);
@@ -179,8 +177,8 @@ class RestDataManager {
});
});
}
-
-
+
+
};
diff --git a/src/dashboard/dashboard.js b/src/dashboard/dashboard.js
index 499d620..9ce23a8 100644
--- a/src/dashboard/dashboard.js
+++ b/src/dashboard/dashboard.js
@@ -61,35 +61,35 @@ class Dashboard extends React.Component {
console.log("dashboard calculate state was called: " + props.match.params.dashboard);
let dashboards = DashboardStore.getState()
let rawDashboard = dashboards[props.match.params.dashboard - 1];
-
-
+
+
let str = JSON.stringify(rawDashboard, null, 4);
console.log(str);
if (rawDashboard != null) {
dashboard = Map(rawDashboard);
console.log("dashboard: " + dashboard);
- // convert widgets list to a dictionary to be able to reference widgets
+ // convert widgets list to a dictionary to be able to reference widgets
//let widgets = {};
let rawWidgets = WidgetStore.getState();
-
+
if(rawWidgets.length === 0){
AppDispatcher.dispatch({
type: 'widgets/start-load',
token: sessionToken,
- param: 'dashboardID=1'
+ param: '?dashboardID=1'
});
}
-
+
console.log("here are the widgets: ");
console.log(rawWidgets);
-
+
dashboard = dashboard.set('widgets', rawWidgets);
console.log("")
-
+
/* for(let widget of dashboard.get('widgets')){
console.log("load files got called")
console.log(widget);
@@ -100,9 +100,9 @@ class Dashboard extends React.Component {
});
}
*/
-
-
-
+
+
+
//ist das überhaupt nötiG??
/* if (this.state.dashboard.has('id') === false) {
AppDispatcher.dispatch({
@@ -112,14 +112,14 @@ class Dashboard extends React.Component {
});
}
*/
-
-
+
+
/*if(Object.keys(widgets).length !== 0 ){
this.computeHeightWithWidgets(widgets);
}
- let selectedDashboards = dashboard;
+ let selectedDashboards = dashboard;
/* this.setState({ dashboard: selectedDashboards, project: null });
@@ -141,10 +141,10 @@ class Dashboard extends React.Component {
console.log("!! the widget key: "+ widgetKey);
let thisWidget = widgets[widgetKey];
let thisWidgetHeight = thisWidget.y + thisWidget.height;
-
+
return thisWidgetHeight > maxHeightSoFar? thisWidgetHeight : maxHeightSoFar;
}, 0);
-
+
console.log("now the object keys: ");
console.log(Object.keys(widgets));
let simulationModels = [];
@@ -198,7 +198,7 @@ class Dashboard extends React.Component {
}
}
-
+
componentWillUnmount() {
//document.removeEventListener('keydown', this.handleKeydown.bind(this));
@@ -251,7 +251,7 @@ class Dashboard extends React.Component {
default:
}
}
-
+
}
/*
* Adapt the area's height with the position of the new widget.
@@ -484,7 +484,7 @@ class Dashboard extends React.Component {