Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alfakhori
M4labplatform
Commits
8e68d04c
Commit
8e68d04c
authored
4 years ago
by
Patrick
Browse files
Options
Download
Email Patches
Plain Diff
texte upgedated
parent
d5c56ece
master
NewS_cleaned
New_Structure
workingVersion
LastWorking
1 merge request
!1
update some ui
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
servertest.js
+62
-62
servertest.js
vcm/index.html
+44
-173
vcm/index.html
vcm/templates/cus_Menu.js
+1
-1
vcm/templates/cus_Menu.js
vcm/templates/custom.css
+1
-1
vcm/templates/custom.css
vcm/templates/custom.js
+2
-2
vcm/templates/custom.js
with
110 additions
and
239 deletions
+110
-239
servertest.js
+
62
-
62
View file @
8e68d04c
...
@@ -2,75 +2,75 @@ const http = require('http');
...
@@ -2,75 +2,75 @@ const http = require('http');
const
fs
=
require
(
'
fs
'
);
const
fs
=
require
(
'
fs
'
);
const
express
=
require
(
'
express
'
)
const
express
=
require
(
'
express
'
)
const
app
=
express
();
const
app
=
express
();
const
bodyParser
=
require
(
'
body-parser
'
)
//
const bodyParser = require('body-parser')
const
soap
=
require
(
'
soap
'
);
//
const soap = require('soap');
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}))
//
app.use(bodyParser.urlencoded({ extended: false }))
app
.
use
(
bodyParser
.
json
())
//
app.use(bodyParser.json())
const
request
=
require
(
'
ajax-request
'
);
//
const request = require('ajax-request');
app
.
use
(
express
.
static
(
'
vcm
'
));
app
.
use
(
express
.
static
(
'
vcm
'
));
app
.
listen
(
process
.
env
.
PORT
||
8083
);
app
.
listen
(
process
.
env
.
PORT
||
8083
);
console
.
log
(
"
on 808
0
"
);
console
.
log
(
"
on 808
3
"
);
var
url
=
'
http://193.196.137.147:8990/orchestration/services/SimStadt2MonthlyenergyBalance?wsdl
'
;
//
var url = 'http://193.196.137.147:8990/orchestration/services/SimStadt2MonthlyenergyBalance?wsdl';
var
args
=
{
//
var args = {
gmlid
:
'
DENW22AL80000AQv
'
,
// an example of a building in Essen DENW22AL700004Lv ----DEBW522AA0003113b---in Stockach
//
gmlid: 'DENW22AL80000AQv', // an example of a building in Essen DENW22AL700004Lv ----DEBW522AA0003113b---in Stockach
cityID
:
3
,
// Essen 3 // Stockach 1
//
cityID: 3,// Essen 3 // Stockach 1
ui
:
{
//
ui: {
attic
:
true
,
//
attic: true,
atticHeating
:
true
,
//
atticHeating: true,
basement
:
true
,
//
basement: true,
basementHeating
:
true
,
//
basementHeating: true,
buildingType
:
"
EFH
"
,
// other options: "RH", "MFH", "GFH", "HH"
//
buildingType: "EFH", // other options: "RH", "MFH", "GFH", "HH"
flatRoof
:
true
,
//
flatRoof: true,
id
:
'
DENW22AL80000AQv
'
,
// equal with glmid
//
id: 'DENW22AL80000AQv', // equal with glmid
latitude
:
50.774414
,
//51.44679140365339, // an example of a building in Essen
//
latitude: 50.774414,//51.44679140365339, // an example of a building in Essen
longitude
:
6.086995
,
//6.967781962878631, // an example of a building in Essen
//
longitude: 6.086995,//6.967781962878631, // an example of a building in Essen
refurbishment
:
"
statuQuo
"
,
// other options: "medium", "advanced"
//
refurbishment: "statuQuo", // other options: "medium", "advanced"
simulationName
:
"
MonthlyEnergyBalance
"
,
// just use this value for Heat/Cooling Demand
//
simulationName: "MonthlyEnergyBalance", // just use this value for Heat/Cooling Demand
storeyCount
:
3
,
//
storeyCount: 3,
timestep
:
1
,
// dummy integer, not yet integrated but mandatory
//
timestep: 1, // dummy integer, not yet integrated but mandatory
usageProfile
:
"
Single Family House
"
,
// // other options: "Multi Family House"
//
usageProfile: "Single Family House", // // other options: "Multi Family House"
yearOfConstruction
:
1946
//
yearOfConstruction: 1946
}
//
}
};
//
};
app
.
post
(
'
/getSimS
'
,
function
(
req
,
res
){
//
app.post('/getSimS', function(req,res){
try
{
//
try {
const
data
=
req
.
body
;
//
const data = req.body;
console
.
log
(
"
data ==============
"
)
//
console.log("data ==============")
console
.
log
(
data
.
id
);
//
console.log(data.id);
args
.
gmlid
=
data
.
id
//
args.gmlid = data.id
console
.
log
(
data
[
0
]);
//
console.log(data[0]);
console
.
log
(
data
[
1
]);
//
console.log(data[1]);
console
.
log
(
"
args ==============
"
)
//
console.log("args ==============")
console
.
log
(
args
);
//
console.log(args);
//asdf
//
//asdf
const
returnedTarget
=
Object
.
assign
(
args
.
ui
,
data
);
//
const returnedTarget = Object.assign(args.ui,data);
args
.
ui
=
data
;
//
args.ui = data;
args
.
gmlid
=
data
.
id
;
//
args.gmlid = data.id;
console
.
log
(
"
returned ==============
"
)
//
console.log("returned ==============")
console
.
log
(
returnedTarget
)
//
console.log(returnedTarget)
console
.
log
(
"
args ==============
"
)
//
console.log("args ==============")
console
.
log
(
args
);
//
console.log(args);
soap
.
createClient
(
url
,
function
(
err
,
client
)
{
//
soap.createClient(url, function(err, client) {
client
.
getMonthlyEnergyBalance
(
args
,
function
(
err
,
result
)
{
//
client.getMonthlyEnergyBalance(args, function(err, result) {
if
(
err
)
throw
err
;
//
if (err) throw err;
console
.
log
(
result
);
//
console.log(result);
// const obj = JSON.parse(result);
//
// const obj = JSON.parse(result);
// console.log(obj)
//
// console.log(obj)
return
res
.
send
(
result
);
//
return res.send(result);
// res.json(result);
//
// res.json(result);
// return result;
//
// return result;
});
//
});
});
//
});
}
//
}
catch
(
err
)
{
//
catch (err) {
console
.
log
(
'
.../getSimS failed!
\n
'
+
err
);
//
console.log('.../getSimS failed!\n' + err);
}
//
}
});
//
});
...
...
This diff is collapsed.
Click to expand it.
vcm/index.html
+
44
-
173
View file @
8e68d04c
This diff is collapsed.
Click to expand it.
vcm/templates/cus_Menu.js
+
1
-
1
View file @
8e68d04c
...
@@ -147,7 +147,7 @@ function addcont(content){
...
@@ -147,7 +147,7 @@ function addcont(content){
var
heatdem
=
'
<div style="width:100%;margin-top:200px;" id="chartNordB"></div>
'
var
heatdem
=
'
<div style="width:100%;margin-top:200px;" id="chartNordB"></div>
'
var
nordbstuff
=
"
<h3 style='color: #000000;'>Nordbahnhof Planungskonzept</h3>
"
+
var
nordbstuff
=
""
+
"
<div class='box-3'>
"
+
"
<div class='box-3'>
"
+
"
<div class='btn btn-three' onclick='newPlan()'>
"
+
"
<div class='btn btn-three' onclick='newPlan()'>
"
+
"
<span>Neue Planung</span>
"
+
"
<span>Neue Planung</span>
"
+
...
...
This diff is collapsed.
Click to expand it.
vcm/templates/custom.css
+
1
-
1
View file @
8e68d04c
...
@@ -266,7 +266,7 @@ h1.sticky {
...
@@ -266,7 +266,7 @@ h1.sticky {
height
:
35px
;
height
:
35px
;
top
:
30px
;
top
:
30px
;
font-size
:
20px
;
font-size
:
20px
;
padding
:
5px
;
/*
padding:5px;
*/
padding-bottom
:
15px
;
padding-bottom
:
15px
;
/* background-color: white; */
/* background-color: white; */
z-index
:
99
;
z-index
:
99
;
...
...
This diff is collapsed.
Click to expand it.
vcm/templates/custom.js
+
2
-
2
View file @
8e68d04c
...
@@ -279,7 +279,7 @@ function showtourSpecific(specify) {
...
@@ -279,7 +279,7 @@ function showtourSpecific(specify) {
}
else
if
(
layer04
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layer04
.
indexOf
(
layer
.
name
)
>=
0
){
layer
.
activate
(
true
);
layer
.
activate
(
true
);
}
else
if
(
layer05
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layer05
.
indexOf
(
layer
.
name
)
>=
0
){
layer
.
activate
(
tru
e
);
layer
.
activate
(
fals
e
);
}
else
if
(
layerfix
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layerfix
.
indexOf
(
layer
.
name
)
>=
0
){
layer
.
activate
(
true
);
layer
.
activate
(
true
);
}
else
if
(
layerfix01
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layerfix01
.
indexOf
(
layer
.
name
)
>=
0
){
...
@@ -773,7 +773,7 @@ function Expert() {
...
@@ -773,7 +773,7 @@ function Expert() {
}
else
if
(
layer08
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layer08
.
indexOf
(
layer
.
name
)
>=
0
){
layer
.
activate
(
true
);
layer
.
activate
(
true
);
}
else
if
(
layer09
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layer09
.
indexOf
(
layer
.
name
)
>=
0
){
layer
.
activate
(
tru
e
);
layer
.
activate
(
fals
e
);
}
else
if
(
layer10
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layer10
.
indexOf
(
layer
.
name
)
>=
0
){
layer
.
activate
(
true
);
layer
.
activate
(
true
);
}
else
if
(
layerfix
.
indexOf
(
layer
.
name
)
>=
0
){
}
else
if
(
layerfix
.
indexOf
(
layer
.
name
)
>=
0
){
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets