Skip to content

Commit

Permalink
Renaming #11
Browse files Browse the repository at this point in the history
- Renamed „s_id“ to „scenario_uuid“
- Renamed „l_id“ to „location_uuid“
- Renamed „v_id“ to „video_uuid“
- Renamed „o_id“ to „overlay_uuid“
- Template improvements
  • Loading branch information
nicho90 committed Aug 20, 2017
1 parent 1db4c4d commit b049329
Show file tree
Hide file tree
Showing 131 changed files with 326 additions and 295 deletions.
10 changes: 5 additions & 5 deletions controllers/locations/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ exports.request = function(req, res) {
async.waterfall([
function(callback){ // Parameter validation

// Check l_id
var l_id = uuid.v1();
if(req.body.l_id && req.body.l_id !== ""){
l_id = req.body.l_id;
// Check location_uuid
var location_uuid = uuid.v1();
if(req.body.location_uuid && req.body.location_uuid !== ""){
location_uuid = req.body.location_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
l_id: l_id,
location_uuid: location_uuid,
name: req.body.name,
description: req.body.description,
lat: req.body.lat,
Expand Down
10 changes: 5 additions & 5 deletions controllers/locations/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ exports.request = function(req, res) {
},
function(callback){ // Parameter validation

// Check l_id
var l_id = uuid.v1();
if(req.body.l_id && req.body.l_id !== ""){
l_id = req.body.l_id;
// Check location_uuid
var location_uuid = uuid.v1();
if(req.body.location_uuid && req.body.location_uuid !== ""){
location_uuid = req.body.location_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
location_id: req.params.location_id,
l_id: l_id,
location_uuid: location_uuid,
name: req.body.name,
description: req.body.description,
lat: req.body.lat,
Expand Down
10 changes: 5 additions & 5 deletions controllers/overlays/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ exports.request = function(req, res) {
async.waterfall([
function(callback){ // Parameter validation

// Check o_id
var o_id = uuid.v1();
if(req.body.o_id && req.body.o_id !== ""){
o_id = req.body.o_id;
// Check overlay_uuid
var overlay_uuid = uuid.v1();
if(req.body.overlay_uuid && req.body.overlay_uuid !== ""){
overlay_uuid = req.body.overlay_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
o_id: o_id,
overlay_uuid: overlay_uuid,
name: req.body.name,
description: req.body.description,
category: req.body.category,
Expand Down
10 changes: 5 additions & 5 deletions controllers/overlays/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ exports.request = function(req, res) {
},
function(callback){ // Parameter validation

// Check o_id
var o_id = uuid.v1();
if(req.body.o_id && req.body.o_id !== ""){
o_id = req.body.o_id;
// Check overlay_uuid
var overlay_uuid = uuid.v1();
if(req.body.overlay_uuid && req.body.overlay_uuid !== ""){
overlay_uuid = req.body.overlay_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
overlay_id: req.params.overlay_id,
o_id: o_id,
overlay_uuid: overlay_uuid,
name: req.body.name,
description: req.body.description,
category: req.body.category,
Expand Down
10 changes: 5 additions & 5 deletions controllers/scenarios/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ exports.request = function(req, res) {
async.waterfall([
function(callback){ // Parameter validation

// Check s_id
var s_id = uuid.v1();
if(req.body.s_id && req.body.s_id !== ""){
s_id = req.body.s_id;
// Check scenario_uuid
var scenario_uuid = uuid.v1();
if(req.body.scenario_uuid && req.body.scenario_uuid !== ""){
scenario_uuid = req.body.scenario_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
s_id: s_id,
scenario_uuid: scenario_uuid,
name: req.body.name,
description: req.body.description
};
Expand Down
10 changes: 5 additions & 5 deletions controllers/scenarios/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ exports.request = function(req, res) {
},
function(callback){ // Parameter validation

// Check s_id
var s_id = uuid.v1();
if(req.body.s_id && req.body.s_id !== ""){
s_id = req.body.s_id;
// Check scenario_uuid
var scenario_uuid = uuid.v1();
if(req.body.scenario_uuid && req.body.scenario_uuid !== ""){
scenario_uuid = req.body.scenario_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
scenario_id: req.params.scenario_id,
s_id: s_id,
scenario_uuid: scenario_uuid,
name: req.body.name,
description: req.body.description
};
Expand Down
10 changes: 5 additions & 5 deletions controllers/videos/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ exports.request = function(req, res) {
async.waterfall([
function(callback){ // Parameter validation

// Check v_id
var v_id = uuid.v1();
if(req.body.v_id && req.body.v_id !== ""){
v_id = req.body.v_id;
// Check video_uuid
var video_uuid = uuid.v1();
if(req.body.video_uuid && req.body.video_uuid !== ""){
video_uuid = req.body.video_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
v_id: v_id,
video_uuid: video_uuid,
name: req.body.name,
description: req.body.description,
url: req.body.url,
Expand Down
10 changes: 5 additions & 5 deletions controllers/videos/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ exports.request = function(req, res) {
},
function(callback){ // Parameter validation

// Check v_id
var v_id = uuid.v1();
if(req.body.v_id && req.body.v_id !== ""){
v_id = req.body.v_id;
// Check video_uuid
var video_uuid = uuid.v1();
if(req.body.video_uuid && req.body.video_uuid !== ""){
video_uuid = req.body.video_uuid;
}

// TODO: Validate all attributes of req.body

var params = {
video_id: req.params.video_id,
v_id: v_id,
video_uuid: video_uuid,
name: req.body.name,
description: req.body.description,
url: req.body.url,
Expand Down
2 changes: 1 addition & 1 deletion data/belongs_to_locations.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
l_id,s_id
location_uuid,scenario_uuid
l_01,s_01
l_02,s_01
l_03,s_01
Expand Down
2 changes: 1 addition & 1 deletion data/belongs_to_overlays.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
o_id,s_id
overlay_uuid,scenario_uuid
o_01,s_02
o_02,s_02
o_03,s_01
2 changes: 1 addition & 1 deletion data/belongs_to_videos.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v_id,s_id
video_uuid,scenario_uuid
v_01,s_01
v_02,s_01
v_03,s_01
Expand Down
2 changes: 1 addition & 1 deletion data/connected_to.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
start_id,end_id
start_location_uuid,end_location_uuid
l_01,l_02
l_01,l_04
l_02,l_01
Expand Down
2 changes: 1 addition & 1 deletion data/embedded_in.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
o_id,v_id,description,w,h,x,y,z,d,rx,ry,rz,display
overlay_uuid,video_uuid,description,w,h,x,y,z,d,rx,ry,rz,display
o_01,v_12,,1417,873,561.9906416454288,299.3003351341884,-646.8748621420448,0,0,0,0,1
o_02,v_10,,357,500,305.33880760560027,94.87683266519059,69,0,0,0.17576139977127267,0,1
o_03,v_07,,700,575,547.6430973457741,323.2137010950475,-228.65846681625413,0,0,0,0,1
2 changes: 1 addition & 1 deletion data/has_parent_location.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
child_id,parent_id
child_location_uuid,parent_location_uuid
l_10_01,l_10
l_20_01,l_20
l_20_02,l_20
Expand Down
2 changes: 1 addition & 1 deletion data/locations.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
l_id,name,lat,lng,description,location_type
location_uuid,name,lat,lng,description,location_type
l_01,Schlossplatz,51.96344,7.617753,The Schlossplatz is a large place in the front of the castle,outdoor
l_02,Frauenstraße [1],51.963453,7.618718,A little street in the direct environment of the castle,outdoor
l_03,Frauenstraße [2],51.963572,7.620655,Intersection of Frauenstraße and Krummer Timpen overlooking the ULB,outdoor
Expand Down
2 changes: 1 addition & 1 deletion data/overlays.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
o_id,name,description,category,url
overlay_uuid,name,description,category,url
o_01,Münster Marketing & Stadwerke,Brand advertisement,picture,/media/images/display1.gif
o_02,Movie advertisement,Movie advertisement (Looper),picture,/media/images/display_looper.gif
o_03,News,Uni Muenster Homepage,website,http://www.uni-muenster.de/de/
2 changes: 1 addition & 1 deletion data/recorded_at.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v_id,l_id,description,preferred
video_uuid,location_uuid,description,preferred
v_01,l_01,,1
v_02,l_02,,1
v_03,l_03,,1
Expand Down
2 changes: 1 addition & 1 deletion data/scenarios.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
s_id,name,description
scenario_uuid,name,description
s_01,Münster (city center),City center
s_02,Münster (main station),Main station
s_03,GEO-1,Nichos thesis
Expand Down
2 changes: 1 addition & 1 deletion data/videos.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v_id,name,url,description,description_german,recorded,thumbnails
video_uuid,name,url,description,description_german,recorded,thumbnails
v_01,Schlossplatz,/muenster-city-center/task01,Schlossplatz,Schlossplatz,2014-04-03 11:56:00,312
v_02,Frauenstraße [1],/muenster-city-center/task02,Frauenstraße [1],Frauenstraße [1],2014-04-03 12:43:00,294
v_03,Frauenstraße [2],/muenster-city-center/task03,Frauenstraße [2],Frauenstraße [2],2014-04-03 13:25:00,307
Expand Down
16 changes: 8 additions & 8 deletions postman/IVE (local).postman_collection_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n\"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
"rawModeData": "{\n\"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
},
{
"id": "0dbaec6a-e426-6d38-4aa8-5487ec786951",
Expand Down Expand Up @@ -285,7 +285,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n \"scenario_id\": 891,\n \"created\": 1481908792639,\n \"updated\": 1481908792639,\n \"s_id\": \"test-1234567890\",\n \"name\": \"test-1234567890\",\n \"description\": \"test-1234567890\"\n}"
"rawModeData": "{\n \"scenario_id\": 891,\n \"created\": 1481908792639,\n \"updated\": 1481908792639,\n \"scenario_uuid\": \"test-1234567890\",\n \"name\": \"test-1234567890\",\n \"description\": \"test-1234567890\"\n}"
},
{
"id": "446cdb32-1e8b-71ed-2f3c-fa64b62bdca0",
Expand Down Expand Up @@ -343,7 +343,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n\t\"v_id\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
"rawModeData": "{\n\t\"video_uuid\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
},
{
"id": "6481842e-0f96-83cd-70a8-925fafaa8dcc",
Expand Down Expand Up @@ -384,7 +384,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n\t\"v_id\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
"rawModeData": "{\n\t\"video_uuid\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
},
{
"id": "67ec0746-3657-0c92-3891-9c02381c1901",
Expand Down Expand Up @@ -502,7 +502,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n\"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
"rawModeData": "{\n\"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
},
{
"id": "8408d073-0a28-666c-95cf-b762b73af9d6",
Expand Down Expand Up @@ -734,7 +734,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n\t\"v_id\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
"rawModeData": "{\n\t\"video_uuid\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
},
{
"id": "f372c0f6-65ae-61ed-15e4-fda45c918a7f",
Expand All @@ -754,7 +754,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n\"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
"rawModeData": "{\n\"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
},
{
"id": "f4ce63c4-531d-e172-1a8a-468a86068704",
Expand All @@ -773,7 +773,7 @@
"description": "",
"collectionId": "b932361e-e0e2-ab05-830e-592bae84c035",
"responses": [],
"rawModeData": "{\n \"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.6330,\n \"location_type\": \"indoor\"\n }"
"rawModeData": "{\n \"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.6330,\n \"location_type\": \"indoor\"\n }"
}
]
}
16 changes: 8 additions & 8 deletions postman/IVE (local).postman_collection_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n\"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
"raw": "{\n\"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
},
"description": ""
},
Expand All @@ -133,7 +133,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.6330,\n \"location_type\": \"indoor\"\n }"
"raw": "{\n \"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.6330,\n \"location_type\": \"indoor\"\n }"
},
"description": ""
},
Expand Down Expand Up @@ -169,7 +169,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n\"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
"raw": "{\n\"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
},
"description": ""
},
Expand All @@ -189,7 +189,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n\"l_id\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
"raw": "{\n\"location_uuid\": \"test\",\n \"name\": \"Test\",\n \"description\": \"Test\",\n \"lat\": 51.957,\n \"lng\": 7.633,\n \"location_type\": \"indoor\"\n}"
},
"description": ""
},
Expand Down Expand Up @@ -429,7 +429,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"scenario_id\": 891,\n \"created\": 1481908792639,\n \"updated\": 1481908792639,\n \"s_id\": \"test-1234567890\",\n \"name\": \"test-1234567890\",\n \"description\": \"test-1234567890\"\n}"
"raw": "{\n \"scenario_id\": 891,\n \"created\": 1481908792639,\n \"updated\": 1481908792639,\n \"scenario_uuid\": \"test-1234567890\",\n \"name\": \"test-1234567890\",\n \"description\": \"test-1234567890\"\n}"
},
"description": ""
},
Expand Down Expand Up @@ -530,7 +530,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n\t\"v_id\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
"raw": "{\n\t\"video_uuid\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
},
"description": ""
},
Expand Down Expand Up @@ -566,7 +566,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n\t\"v_id\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
"raw": "{\n\t\"video_uuid\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
},
"description": ""
},
Expand All @@ -586,7 +586,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n\t\"v_id\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
"raw": "{\n\t\"video_uuid\": \"test\",\n \"name\": \"Test-2\",\n \"description\": \"Test-2\",\n \"url\": \"http://example.org\",\n \"recorded\": null\n}\n"
},
"description": ""
},
Expand Down
2 changes: 1 addition & 1 deletion public/backend/js/controllers/video/createController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ app.controller("videoCreateController", function($scope, $rootScope, $routeParam
$videoService.create($scope.video)
.then(function onSuccess(response) {
$scope.video = response.data;
$window.prompt($filter('translate')('NEW_VIDEO_CREATED'), $scope.video.v_id);
$window.prompt($filter('translate')('NEW_VIDEO_CREATED'), $scope.video.video_uuid);
$scope.redirect("/videos/" + $scope.video.video_id);
})
.catch(function onError(response) {
Expand Down
Loading

0 comments on commit b049329

Please sign in to comment.