Merge branch 'develop'
commit
ed6941545a
|
@ -1,7 +1,15 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
app.controller('CombinedEquipmentController', function ($scope, $translate, $uibModal, CombinedEquipmentService, CostCenterService, toaster, SweetAlert) {
|
app.controller('CombinedEquipmentController', function (
|
||||||
|
$scope,
|
||||||
|
$window,
|
||||||
|
$translate,
|
||||||
|
$uibModal,
|
||||||
|
CombinedEquipmentService,
|
||||||
|
CostCenterService,
|
||||||
|
toaster,
|
||||||
|
SweetAlert) {
|
||||||
|
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||||
$scope.getAllCombinedEquipments = function () {
|
$scope.getAllCombinedEquipments = function () {
|
||||||
CombinedEquipmentService.getAllCombinedEquipments(function (response) {
|
CombinedEquipmentService.getAllCombinedEquipments(function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 200) {
|
if (angular.isDefined(response.status) && response.status === 200) {
|
||||||
|
@ -36,7 +44,8 @@ app.controller('CombinedEquipmentController', function ($scope, $translate, $uib
|
||||||
});
|
});
|
||||||
modalInstance.result.then(function (combinedequipment) {
|
modalInstance.result.then(function (combinedequipment) {
|
||||||
combinedequipment.cost_center_id = combinedequipment.cost_center.id;
|
combinedequipment.cost_center_id = combinedequipment.cost_center.id;
|
||||||
CombinedEquipmentService.addCombinedEquipment(combinedequipment, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentService.addCombinedEquipment(combinedequipment, headers,function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 201) {
|
if (angular.isDefined(response.status) && response.status === 201) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -76,8 +85,9 @@ app.controller('CombinedEquipmentController', function ($scope, $translate, $uib
|
||||||
});
|
});
|
||||||
|
|
||||||
modalInstance.result.then(function (modifiedCombinedEquipment) {
|
modalInstance.result.then(function (modifiedCombinedEquipment) {
|
||||||
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
modifiedCombinedEquipment.cost_center_id = modifiedCombinedEquipment.cost_center.id;
|
modifiedCombinedEquipment.cost_center_id = modifiedCombinedEquipment.cost_center.id;
|
||||||
CombinedEquipmentService.editCombinedEquipment(modifiedCombinedEquipment, function (response) {
|
CombinedEquipmentService.editCombinedEquipment(modifiedCombinedEquipment, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 200) {
|
if (angular.isDefined(response.status) && response.status === 200) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -115,7 +125,8 @@ app.controller('CombinedEquipmentController', function ($scope, $translate, $uib
|
||||||
},
|
},
|
||||||
function (isConfirm) {
|
function (isConfirm) {
|
||||||
if (isConfirm) {
|
if (isConfirm) {
|
||||||
CombinedEquipmentService.deleteCombinedEquipment(combinedequipment, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentService.deleteCombinedEquipment(combinedequipment, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 204) {
|
if (angular.isDefined(response.status) && response.status === 204) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
app.controller('CombinedEquipmentEquipmentController', function ($scope, $translate, CombinedEquipmentService, EquipmentService, CombinedEquipmentEquipmentService, toaster, SweetAlert) {
|
app.controller('CombinedEquipmentEquipmentController', function (
|
||||||
|
$scope,
|
||||||
|
$window,
|
||||||
|
$translate,
|
||||||
|
CombinedEquipmentService,
|
||||||
|
EquipmentService,
|
||||||
|
CombinedEquipmentEquipmentService,
|
||||||
|
toaster,
|
||||||
|
SweetAlert) {
|
||||||
|
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||||
$scope.currentCombinedEquipment = {selected:undefined};
|
$scope.currentCombinedEquipment = {selected:undefined};
|
||||||
|
|
||||||
$scope.getAllEquipments = function () {
|
$scope.getAllEquipments = function () {
|
||||||
|
@ -42,7 +51,8 @@ app.controller('CombinedEquipmentEquipmentController', function ($scope, $transl
|
||||||
$scope.pairEquipment = function (dragEl, dropEl) {
|
$scope.pairEquipment = function (dragEl, dropEl) {
|
||||||
var equipmentid = angular.element('#' + dragEl).scope().equipment.id;
|
var equipmentid = angular.element('#' + dragEl).scope().equipment.id;
|
||||||
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
||||||
CombinedEquipmentEquipmentService.addPair(combinedequipmentid, equipmentid, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentEquipmentService.addPair(combinedequipmentid, equipmentid, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 201) {
|
if (angular.isDefined(response.status) && response.status === 201) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -69,7 +79,8 @@ app.controller('CombinedEquipmentEquipmentController', function ($scope, $transl
|
||||||
}
|
}
|
||||||
var combinedequipmentequipmentid = angular.element('#' + dragEl).scope().combinedequipmentequipment.id;
|
var combinedequipmentequipmentid = angular.element('#' + dragEl).scope().combinedequipmentequipment.id;
|
||||||
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
||||||
CombinedEquipmentEquipmentService.deletePair(combinedequipmentid, combinedequipmentequipmentid, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentEquipmentService.deletePair(combinedequipmentid, combinedequipmentequipmentid, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 204) {
|
if (angular.isDefined(response.status) && response.status === 204) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
app.controller('CombinedEquipmentMeterController', function ($scope, $timeout, $uibModal, $translate, MeterService, VirtualMeterService, OfflineMeterService, CombinedEquipmentMeterService, CombinedEquipmentService, toaster, SweetAlert) {
|
app.controller('CombinedEquipmentMeterController', function (
|
||||||
|
$scope,
|
||||||
|
$window,
|
||||||
|
$timeout,
|
||||||
|
$uibModal,
|
||||||
|
$translate,
|
||||||
|
MeterService,
|
||||||
|
VirtualMeterService,
|
||||||
|
OfflineMeterService,
|
||||||
|
CombinedEquipmentMeterService,
|
||||||
|
CombinedEquipmentService,
|
||||||
|
toaster,
|
||||||
|
SweetAlert) {
|
||||||
|
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
|
||||||
$scope.currentCombinedEquipment = { selected: undefined };
|
$scope.currentCombinedEquipment = { selected: undefined };
|
||||||
|
|
||||||
$scope.getAllCombinedEquipments = function (id) {
|
$scope.getAllCombinedEquipments = function (id) {
|
||||||
|
@ -111,7 +124,8 @@ app.controller('CombinedEquipmentMeterController', function ($scope, $timeout, $
|
||||||
modalInstance.result.then(function (is_output) {
|
modalInstance.result.then(function (is_output) {
|
||||||
var meterid = angular.element('#' + dragEl).scope().meter.id;
|
var meterid = angular.element('#' + dragEl).scope().meter.id;
|
||||||
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
||||||
CombinedEquipmentMeterService.addPair(combinedequipmentid, meterid, $scope.currentMeterType, is_output, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentMeterService.addPair(combinedequipmentid, meterid, $scope.currentMeterType, is_output, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 201) {
|
if (angular.isDefined(response.status) && response.status === 201) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -141,7 +155,8 @@ app.controller('CombinedEquipmentMeterController', function ($scope, $timeout, $
|
||||||
var combinedequipmentmeterid = angular.element('#' + dragEl).scope().combinedequipmentmeter.id;
|
var combinedequipmentmeterid = angular.element('#' + dragEl).scope().combinedequipmentmeter.id;
|
||||||
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
var combinedequipmentid = $scope.currentCombinedEquipment.id;
|
||||||
var metertype = angular.element('#' + dragEl).scope().combinedequipmentmeter.metertype;
|
var metertype = angular.element('#' + dragEl).scope().combinedequipmentmeter.metertype;
|
||||||
CombinedEquipmentMeterService.deletePair(combinedequipmentid, combinedequipmentmeterid, metertype, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentMeterService.deletePair(combinedequipmentid, combinedequipmentmeterid, metertype, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 204) {
|
if (angular.isDefined(response.status) && response.status === 204) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -73,8 +73,8 @@ app.controller('CombinedEquipmentParameterController', function (
|
||||||
if (combinedequipmentparameter.denominator_meter != null) {
|
if (combinedequipmentparameter.denominator_meter != null) {
|
||||||
combinedequipmentparameter.denominator_meter_uuid = combinedequipmentparameter.denominator_meter.uuid;
|
combinedequipmentparameter.denominator_meter_uuid = combinedequipmentparameter.denominator_meter.uuid;
|
||||||
}
|
}
|
||||||
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
CombinedEquipmentParameterService.addCombinedEquipmentParameter(combinedequipmentid, combinedequipmentparameter, function (response) {
|
CombinedEquipmentParameterService.addCombinedEquipmentParameter(combinedequipmentid, combinedequipmentparameter, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 201) {
|
if (angular.isDefined(response.status) && response.status === 201) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -123,7 +123,8 @@ app.controller('CombinedEquipmentParameterController', function (
|
||||||
if (modifiedCombinedEquipmentParameter.denominator_meter != null) {
|
if (modifiedCombinedEquipmentParameter.denominator_meter != null) {
|
||||||
modifiedCombinedEquipmentParameter.denominator_meter_uuid = modifiedCombinedEquipmentParameter.denominator_meter.uuid;
|
modifiedCombinedEquipmentParameter.denominator_meter_uuid = modifiedCombinedEquipmentParameter.denominator_meter.uuid;
|
||||||
}
|
}
|
||||||
CombinedEquipmentParameterService.editCombinedEquipmentParameter($scope.currentCombinedEquipment.id, modifiedCombinedEquipmentParameter, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentParameterService.editCombinedEquipmentParameter($scope.currentCombinedEquipment.id, modifiedCombinedEquipmentParameter, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 200) {
|
if (angular.isDefined(response.status) && response.status === 200) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -160,7 +161,8 @@ app.controller('CombinedEquipmentParameterController', function (
|
||||||
},
|
},
|
||||||
function (isConfirm) {
|
function (isConfirm) {
|
||||||
if (isConfirm) {
|
if (isConfirm) {
|
||||||
CombinedEquipmentParameterService.deleteCombinedEquipmentParameter($scope.currentCombinedEquipment.id, combinedequipmentparameter.id, function (response) {
|
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
|
||||||
|
CombinedEquipmentParameterService.deleteCombinedEquipmentParameter($scope.currentCombinedEquipment.id, combinedequipmentparameter.id, headers, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 204) {
|
if (angular.isDefined(response.status) && response.status === 204) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -17,24 +17,24 @@ app.factory('CombinedEquipmentService', function($http) {
|
||||||
callback(response);
|
callback(response);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addCombinedEquipment: function(combinedequipment, callback) {
|
addCombinedEquipment: function(combinedequipment, headers, callback) {
|
||||||
$http.post(getAPI()+'combinedequipments',{data:combinedequipment})
|
$http.post(getAPI()+'combinedequipments',{data:combinedequipment}, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editCombinedEquipment: function(combinedequipment, callback) {
|
editCombinedEquipment: function(combinedequipment, headers, callback) {
|
||||||
$http.put(getAPI()+'combinedequipments/'+combinedequipment.id,{data:combinedequipment})
|
$http.put(getAPI()+'combinedequipments/'+combinedequipment.id,{data:combinedequipment}, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteCombinedEquipment: function(combinedequipment, callback) {
|
deleteCombinedEquipment: function(combinedequipment, headers, callback) {
|
||||||
$http.delete(getAPI()+'combinedequipments/'+combinedequipment.id)
|
$http.delete(getAPI()+'combinedequipments/'+combinedequipment.id, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
app.factory('CombinedEquipmentEquipmentService', function($http) {
|
app.factory('CombinedEquipmentEquipmentService', function($http) {
|
||||||
return {
|
return {
|
||||||
addPair: function(combinedequipmentID,equipmentID,callback) {
|
addPair: function(combinedequipmentID,equipmentID, headers, callback) {
|
||||||
$http.post(getAPI()+'combinedequipments/'+combinedequipmentID+'/equipments',{data:{'equipment_id':equipmentID}})
|
$http.post(getAPI()+'combinedequipments/'+combinedequipmentID+'/equipments', {data:{'equipment_id':equipmentID}}, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
@ -10,8 +10,8 @@ app.factory('CombinedEquipmentEquipmentService', function($http) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
deletePair: function(combinedequipmentID, equipmentID, callback) {
|
deletePair: function(combinedequipmentID, equipmentID, headers, callback) {
|
||||||
$http.delete(getAPI()+'combinedequipments/'+combinedequipmentID+'/equipments/'+equipmentID)
|
$http.delete(getAPI()+'combinedequipments/'+combinedequipmentID+'/equipments/'+equipmentID, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
app.factory('CombinedEquipmentMeterService', function ($http) {
|
app.factory('CombinedEquipmentMeterService', function ($http) {
|
||||||
return {
|
return {
|
||||||
addPair: function (combinedequipmentID, meterID, metertype, is_output, callback) {
|
addPair: function (combinedequipmentID, meterID, metertype, is_output, headers, callback) {
|
||||||
var meter = {};
|
var meter = {};
|
||||||
if (metertype == 'meters') {
|
if (metertype == 'meters') {
|
||||||
meter = { 'meter_id': meterID, is_output: is_output };
|
meter = { 'meter_id': meterID, is_output: is_output };
|
||||||
|
@ -10,7 +10,7 @@ app.factory('CombinedEquipmentMeterService', function ($http) {
|
||||||
} else {
|
} else {
|
||||||
meter = { 'offline_meter_id': meterID, is_output: is_output };
|
meter = { 'offline_meter_id': meterID, is_output: is_output };
|
||||||
}
|
}
|
||||||
$http.post(getAPI() + 'combinedequipments/' + combinedequipmentID + '/' + metertype, { data: meter })
|
$http.post(getAPI() + 'combinedequipments/' + combinedequipmentID + '/' + metertype, { data: meter }, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
@ -18,8 +18,8 @@ app.factory('CombinedEquipmentMeterService', function ($http) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
deletePair: function (combinedequipmentID, meterID, metertype, callback) {
|
deletePair: function (combinedequipmentID, meterID, metertype, headers, callback) {
|
||||||
$http.delete(getAPI() + 'combinedequipments/' + combinedequipmentID + '/' + metertype + '/' + meterID)
|
$http.delete(getAPI() + 'combinedequipments/' + combinedequipmentID + '/' + metertype + '/' + meterID, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
app.factory('CombinedEquipmentParameterService', function($http) {
|
app.factory('CombinedEquipmentParameterService', function($http) {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
getParametersByCombinedEquipmentID: function(id, callback) {
|
getParametersByCombinedEquipmentID: function(id, callback) {
|
||||||
$http.get(getAPI()+'combinedequipments/'+id+'/parameters')
|
$http.get(getAPI()+'combinedequipments/'+id+'/parameters')
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
@ -10,16 +9,17 @@ app.factory('CombinedEquipmentParameterService', function($http) {
|
||||||
callback(response);
|
callback(response);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addCombinedEquipmentParameter: function(combinedequipmentID, combinedequipmentparameter,callback) {
|
addCombinedEquipmentParameter: function(combinedequipmentID, combinedequipmentparameter, headers, callback) {
|
||||||
$http.post(getAPI()+'combinedequipments/'+combinedequipmentID+'/parameters',{data:combinedequipmentparameter})
|
$http.post(getAPI()+'combinedequipments/'+combinedequipmentID+'/parameters',{data:combinedequipmentparameter}, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
editCombinedEquipmentParameter: function(combinedequipmentID,combinedequipmentparameter,callback) {
|
editCombinedEquipmentParameter: function(combinedequipmentID,combinedequipmentparameter, headers, callback) {
|
||||||
$http.put(getAPI()+'combinedequipments/'+combinedequipmentID+'/parameters/'+combinedequipmentparameter.id,{data:combinedequipmentparameter})
|
$http.put(getAPI()+'combinedequipments/'+combinedequipmentID+'/parameters/'+combinedequipmentparameter.id,
|
||||||
|
{data:combinedequipmentparameter}, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
@ -27,8 +27,8 @@ app.factory('CombinedEquipmentParameterService', function($http) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteCombinedEquipmentParameter: function(combinedequipmentID, parameterID, callback) {
|
deleteCombinedEquipmentParameter: function(combinedequipmentID, parameterID, headers, callback) {
|
||||||
$http.delete(getAPI()+'combinedequipments/'+combinedequipmentID+'/parameters/'+parameterID)
|
$http.delete(getAPI()+'combinedequipments/'+combinedequipmentID+'/parameters/'+parameterID, {headers})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
callback(response);
|
callback(response);
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
|
|
|
@ -12,14 +12,10 @@
|
||||||
"name": "Combined Equipment",
|
"name": "Combined Equipment",
|
||||||
"item": [
|
"item": [
|
||||||
{
|
{
|
||||||
"name": "POST Create New Combined Equipment",
|
"name": "GET All Combined Equipments",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "GET",
|
||||||
"header": [],
|
"header": [],
|
||||||
"body": {
|
|
||||||
"mode": "raw",
|
|
||||||
"raw": "{\"data\":{\"name\":\"MyEMS Chiller Plant\", \"is_input_counted\":true, \"is_output_counted\":false, \"cost_center_id\":1, \"description\":\"equipment description\"}}"
|
|
||||||
},
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments",
|
"raw": "{{base_url}}/combinedequipments",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -33,10 +29,27 @@
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GET All Combined Equipments",
|
"name": "POST Create New Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"body": {
|
||||||
|
"mode": "raw",
|
||||||
|
"raw": "{\"data\":{\"name\":\"MyEMS Chiller Plant\", \"is_input_counted\":true, \"is_output_counted\":false, \"cost_center_id\":1, \"description\":\"equipment description\"}}"
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments",
|
"raw": "{{base_url}}/combinedequipments",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -71,7 +84,20 @@
|
||||||
"name": "PUT Update a Combined Equipment by ID",
|
"name": "PUT Update a Combined Equipment by ID",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"MyEMS Combined Chiller Plant\", \"is_input_counted\":true, \"is_output_counted\":true, \"cost_center_id\":1, \"description\":\"equipment description\"}}"
|
"raw": "{\"data\":{\"name\":\"MyEMS Combined Chiller Plant\", \"is_input_counted\":true, \"is_output_counted\":true, \"cost_center_id\":1, \"description\":\"equipment description\"}}"
|
||||||
|
@ -93,7 +119,20 @@
|
||||||
"name": "POST Clone a Combined Equipment by ID",
|
"name": "POST Clone a Combined Equipment by ID",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{}}"
|
"raw": "{\"data\":{}}"
|
||||||
|
@ -115,7 +154,20 @@
|
||||||
"name": "DELETE a Combined Equipment by ID",
|
"name": "DELETE a Combined Equipment by ID",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "DELETE",
|
"method": "DELETE",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments/6",
|
"raw": "{{base_url}}/combinedequipments/6",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -133,7 +185,20 @@
|
||||||
"name": "POST Bind an Equipment to a Combined Equipment",
|
"name": "POST Bind an Equipment to a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"equipment_id\":1}}"
|
"raw": "{\"data\":{\"equipment_id\":1}}"
|
||||||
|
@ -175,7 +240,20 @@
|
||||||
"name": "DELETE an Equipment from a Combined Equipment",
|
"name": "DELETE an Equipment from a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "DELETE",
|
"method": "DELETE",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments/1/equipments/1",
|
"raw": "{{base_url}}/combinedequipments/1/equipments/1",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -191,29 +269,6 @@
|
||||||
},
|
},
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "POST Bind a Meter to a Combined Equipment",
|
|
||||||
"request": {
|
|
||||||
"method": "POST",
|
|
||||||
"header": [],
|
|
||||||
"body": {
|
|
||||||
"mode": "raw",
|
|
||||||
"raw": "{\"data\":{\"meter_id\":1, \"is_output\":false}}"
|
|
||||||
},
|
|
||||||
"url": {
|
|
||||||
"raw": "{{base_url}}/combinedequipments/1/meters",
|
|
||||||
"host": [
|
|
||||||
"{{base_url}}"
|
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"combinedequipments",
|
|
||||||
"1",
|
|
||||||
"meters"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"response": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "GET All Meters of a Combined Equipment",
|
"name": "GET All Meters of a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
|
@ -233,11 +288,60 @@
|
||||||
},
|
},
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "POST Bind a Meter to a Combined Equipment",
|
||||||
|
"request": {
|
||||||
|
"method": "POST",
|
||||||
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"body": {
|
||||||
|
"mode": "raw",
|
||||||
|
"raw": "{\"data\":{\"meter_id\":1, \"is_output\":false}}"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"raw": "{{base_url}}/combinedequipments/1/meters",
|
||||||
|
"host": [
|
||||||
|
"{{base_url}}"
|
||||||
|
],
|
||||||
|
"path": [
|
||||||
|
"combinedequipments",
|
||||||
|
"1",
|
||||||
|
"meters"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "DELETE a Meter from a Combined Equipment",
|
"name": "DELETE a Meter from a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "DELETE",
|
"method": "DELETE",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments/1/meters/1",
|
"raw": "{{base_url}}/combinedequipments/1/meters/1",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -257,7 +361,20 @@
|
||||||
"name": "POST Bind a Offline Meter to a Combined Equipment",
|
"name": "POST Bind a Offline Meter to a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"offline_meter_id\":1, \"is_output\":false}}"
|
"raw": "{\"data\":{\"offline_meter_id\":1, \"is_output\":false}}"
|
||||||
|
@ -299,7 +416,20 @@
|
||||||
"name": "DELETE an Offline Meter from a Combined Equipment",
|
"name": "DELETE an Offline Meter from a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "DELETE",
|
"method": "DELETE",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments/1/offlinemeters/1",
|
"raw": "{{base_url}}/combinedequipments/1/offlinemeters/1",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -358,7 +488,20 @@
|
||||||
"name": "POST Create a point Parameter for a Combined Equipment",
|
"name": "POST Create a point Parameter for a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"test parameter\", \"parameter_type\":\"point\", \"constant\":null, \"point_id\":1, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
"raw": "{\"data\":{\"name\":\"test parameter\", \"parameter_type\":\"point\", \"constant\":null, \"point_id\":1, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
||||||
|
@ -382,7 +525,20 @@
|
||||||
"name": "PUT Update a point Parameter for a Combined Equipment",
|
"name": "PUT Update a point Parameter for a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"test parameter\", \"parameter_type\":\"point\", \"constant\":null, \"point_id\":3, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
"raw": "{\"data\":{\"name\":\"test parameter\", \"parameter_type\":\"point\", \"constant\":null, \"point_id\":3, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
||||||
|
@ -407,7 +563,20 @@
|
||||||
"name": "POST Create a constant Parameter for a Combined Equipment",
|
"name": "POST Create a constant Parameter for a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"test constant parameter\", \"parameter_type\":\"constant\", \"constant\":\"test constant\", \"point_id\":null, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
"raw": "{\"data\":{\"name\":\"test constant parameter\", \"parameter_type\":\"constant\", \"constant\":\"test constant\", \"point_id\":null, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
||||||
|
@ -431,7 +600,20 @@
|
||||||
"name": "PUT Update a constant Parameter for a Combined Equipment",
|
"name": "PUT Update a constant Parameter for a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"test parameter1\", \"parameter_type\":\"constant\", \"constant\":\"test constant1\", \"point_id\":null, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
"raw": "{\"data\":{\"name\":\"test parameter1\", \"parameter_type\":\"constant\", \"constant\":\"test constant1\", \"point_id\":null, \"numerator_meter_uuid\":null, \"denominator_meter_uuid\":null}}"
|
||||||
|
@ -456,7 +638,20 @@
|
||||||
"name": "POST Create a fraction Parameter for a Combined Equipment",
|
"name": "POST Create a fraction Parameter for a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"test fraction parameter\", \"parameter_type\":\"fraction\", \"constant\":null, \"point_id\":null, \"numerator_meter_uuid\":\"8449878f-b368-4ad9-a41c-e2c49189297a\", \"denominator_meter_uuid\":\"3f8a66c4-8fbe-4e6d-8b40-15dee5290afd\"}}"
|
"raw": "{\"data\":{\"name\":\"test fraction parameter\", \"parameter_type\":\"fraction\", \"constant\":null, \"point_id\":null, \"numerator_meter_uuid\":\"8449878f-b368-4ad9-a41c-e2c49189297a\", \"denominator_meter_uuid\":\"3f8a66c4-8fbe-4e6d-8b40-15dee5290afd\"}}"
|
||||||
|
@ -480,7 +675,20 @@
|
||||||
"name": "PUT Update a fraction Parameter for a Combined Equipment",
|
"name": "PUT Update a fraction Parameter for a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"name\":\"test fraction parameter\", \"parameter_type\":\"fraction\", \"constant\":null, \"point_id\":null, \"numerator_meter_uuid\":\"8449878f-b368-4ad9-a41c-e2c49189297a\", \"denominator_meter_uuid\":\"3f8a66c4-8fbe-4e6d-8b40-15dee5290afd\"}}"
|
"raw": "{\"data\":{\"name\":\"test fraction parameter\", \"parameter_type\":\"fraction\", \"constant\":null, \"point_id\":null, \"numerator_meter_uuid\":\"8449878f-b368-4ad9-a41c-e2c49189297a\", \"denominator_meter_uuid\":\"3f8a66c4-8fbe-4e6d-8b40-15dee5290afd\"}}"
|
||||||
|
@ -505,7 +713,20 @@
|
||||||
"name": "DELETE a Parameter from a Combined Equipment",
|
"name": "DELETE a Parameter from a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "DELETE",
|
"method": "DELETE",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments/1/parameters/16",
|
"raw": "{{base_url}}/combinedequipments/1/parameters/16",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -525,7 +746,20 @@
|
||||||
"name": "POST Bind a Virtual Meter to a Combined Equipment",
|
"name": "POST Bind a Virtual Meter to a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\"data\":{\"virtual_meter_id\":1, \"is_output\":false}}"
|
"raw": "{\"data\":{\"virtual_meter_id\":1, \"is_output\":false}}"
|
||||||
|
@ -567,7 +801,20 @@
|
||||||
"name": "DELETE a Virtual Meter from a Combined Equipment",
|
"name": "DELETE a Virtual Meter from a Combined Equipment",
|
||||||
"request": {
|
"request": {
|
||||||
"method": "DELETE",
|
"method": "DELETE",
|
||||||
"header": [],
|
"header": [
|
||||||
|
{
|
||||||
|
"key": "User-UUID",
|
||||||
|
"value": "dcdb67d1-6116-4987-916f-6fc6cf2bc0e4",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Any admin users' UUID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "Token",
|
||||||
|
"value": "c5f872b51ed40ccf55f1c1d6dbd8cb86eefba5d1010e23b2386bd82be431f3eafc0e3360dee18a5327d9e9852e3cf7caad3b81e252f9f311790c22f7a62a90e1",
|
||||||
|
"type": "text",
|
||||||
|
"description": "Login to get a valid token"
|
||||||
|
}
|
||||||
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/combinedequipments/1/virtualmeters/1",
|
"raw": "{{base_url}}/combinedequipments/1/virtualmeters/1",
|
||||||
"host": [
|
"host": [
|
||||||
|
@ -582,17 +829,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"response": []
|
"response": []
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "New Request",
|
|
||||||
"request": {
|
|
||||||
"method": "GET",
|
|
||||||
"header": [],
|
|
||||||
"url": {
|
|
||||||
"raw": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"response": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@ import simplejson as json
|
||||||
import mysql.connector
|
import mysql.connector
|
||||||
import config
|
import config
|
||||||
import uuid
|
import uuid
|
||||||
from core.useractivity import user_logger
|
from core.useractivity import user_logger, access_control
|
||||||
|
|
||||||
|
|
||||||
class CombinedEquipmentCollection:
|
class CombinedEquipmentCollection:
|
||||||
|
@ -62,6 +62,7 @@ class CombinedEquipmentCollection:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp):
|
def on_post(req, resp):
|
||||||
"""Handles POST requests"""
|
"""Handles POST requests"""
|
||||||
|
access_control(req)
|
||||||
try:
|
try:
|
||||||
raw_json = req.stream.read().decode('utf-8')
|
raw_json = req.stream.read().decode('utf-8')
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -204,6 +205,7 @@ class CombinedEquipmentItem:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_delete(req, resp, id_):
|
def on_delete(req, resp, id_):
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -279,6 +281,7 @@ class CombinedEquipmentItem:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_put(req, resp, id_):
|
def on_put(req, resp, id_):
|
||||||
"""Handles PUT requests"""
|
"""Handles PUT requests"""
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -376,6 +379,7 @@ class CombinedEquipmentItem:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp, id_):
|
def on_post(req, resp, id_):
|
||||||
"""Handles PUT requests"""
|
"""Handles PUT requests"""
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -566,6 +570,7 @@ class CombinedEquipmentEquipmentCollection:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp, id_):
|
def on_post(req, resp, id_):
|
||||||
"""Handles POST requests"""
|
"""Handles POST requests"""
|
||||||
|
access_control(req)
|
||||||
try:
|
try:
|
||||||
raw_json = req.stream.read().decode('utf-8')
|
raw_json = req.stream.read().decode('utf-8')
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -640,6 +645,7 @@ class CombinedEquipmentEquipmentItem:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_delete(req, resp, id_, eid):
|
def on_delete(req, resp, id_, eid):
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -824,6 +830,7 @@ class CombinedEquipmentParameterCollection:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp, id_):
|
def on_post(req, resp, id_):
|
||||||
"""Handles POST requests"""
|
"""Handles POST requests"""
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -1132,6 +1139,7 @@ class CombinedEquipmentParameterItem:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_delete(req, resp, id_, pid):
|
def on_delete(req, resp, id_, pid):
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -1180,6 +1188,7 @@ class CombinedEquipmentParameterItem:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_put(req, resp, id_, pid):
|
def on_put(req, resp, id_, pid):
|
||||||
"""Handles PUT requests"""
|
"""Handles PUT requests"""
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -1439,6 +1448,7 @@ class CombinedEquipmentMeterCollection:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp, id_):
|
def on_post(req, resp, id_):
|
||||||
"""Handles POST requests"""
|
"""Handles POST requests"""
|
||||||
|
access_control(req)
|
||||||
try:
|
try:
|
||||||
raw_json = req.stream.read().decode('utf-8')
|
raw_json = req.stream.read().decode('utf-8')
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -1519,6 +1529,7 @@ class CombinedEquipmentMeterItem:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_delete(req, resp, id_, mid):
|
def on_delete(req, resp, id_, mid):
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -1629,6 +1640,7 @@ class CombinedEquipmentOfflineMeterCollection:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp, id_):
|
def on_post(req, resp, id_):
|
||||||
"""Handles POST requests"""
|
"""Handles POST requests"""
|
||||||
|
access_control(req)
|
||||||
try:
|
try:
|
||||||
raw_json = req.stream.read().decode('utf-8')
|
raw_json = req.stream.read().decode('utf-8')
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -1710,6 +1722,7 @@ class CombinedEquipmentOfflineMeterItem:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_delete(req, resp, id_, mid):
|
def on_delete(req, resp, id_, mid):
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
@ -1820,6 +1833,7 @@ class CombinedEquipmentVirtualMeterCollection:
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_post(req, resp, id_):
|
def on_post(req, resp, id_):
|
||||||
"""Handles POST requests"""
|
"""Handles POST requests"""
|
||||||
|
access_control(req)
|
||||||
try:
|
try:
|
||||||
raw_json = req.stream.read().decode('utf-8')
|
raw_json = req.stream.read().decode('utf-8')
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -1901,6 +1915,7 @@ class CombinedEquipmentVirtualMeterItem:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@user_logger
|
@user_logger
|
||||||
def on_delete(req, resp, id_, mid):
|
def on_delete(req, resp, id_, mid):
|
||||||
|
access_control(req)
|
||||||
if not id_.isdigit() or int(id_) <= 0:
|
if not id_.isdigit() or int(id_) <= 0:
|
||||||
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST',
|
||||||
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
description='API.INVALID_COMBINED_EQUIPMENT_ID')
|
||||||
|
|
Loading…
Reference in New Issue