-
George Salukvadze authored
- Changed strain gauges to use central Oracle DB instead of local MySQL DB - Small fixes and changes TODO:
George Salukvadze authored- Changed strain gauges to use central Oracle DB instead of local MySQL DB - Small fixes and changes TODO:
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
'use strict';
angular.module('jura', []).component('jura', {
templateUrl: 'jura/jura.template.html',
controller: function juraController($scope, $http, $q, $interval) {
this.pageTitle = "NP04 Jura side";
this.natalie = 1;
let self = this;
this.reload = function () {
$http.get("php-db-conn/elementName.conn.php?elemId=jura").then(function (resultArr) {
let rArr = [];
let resjson = angular.toJson(resultArr.data);
let res = JSON.parse(resjson);
for (let i = 0; i < res.length; i++) {
rArr.push(JSON.parse(res[i]));
}
self.NP04_MHT0100AI = rArr[0];
self.NP04_TT0100AI = rArr[1];
self.NP04_PT0106AI = rArr[2];
self.TC_JS_02 = rArr[3];
self.BC_JS_03 = rArr[4];
self.B3_JS_01 = rArr[5];
self.DS_JS_01 = rArr[6];
self.MC_BJS_03 = rArr[7];
self.MC_BJS_02 = rArr[8];
});
$http.get("php-db-conn/alias.conn.timestamp.php").then(function (ts) {
self.timestamp = ts.data.records;
});
};
this.promise;
this.reload();
$scope.start = function() {
$scope.stop();
self.promise = $interval(self.reload, 150000);
};
$scope.stop = function() {
$interval.cancel(self.promise);
};
$scope.start();
$scope.$on('$destroy', function() {
$scope.stop();
});
}
});