Skip to content
Snippets Groups Projects
Commit b1d9165f authored by George Salukvadze's avatar George Salukvadze Committed by George Salukvadze
Browse files

v.1.08.03

- Started cache testing for histogram
parent 894db792
No related branches found
No related tags found
No related merge requests found
......@@ -4,24 +4,15 @@ angular.module('cachedhist', []).component('cachedhist', {
controller: ['$routeParams', '$scope', '$window', '$http', '$interval',
function cachedhistController($routeParams, $scope, $window, $http, $interval) {
this.elemId = $routeParams.elemId;
if ($routeParams.days != null) {
console.log(this.days);
this.days = $routeParams.days;
} else {
this.days = 0.33;
}
this.pageTitle = this.elemId;
this.natalie = 1;
this.width = 90;
this.respdata = [];
let self = this;
let fundays = this.days;
this.dayChanger = function (funcdays) {
$window.location.href = "#!/cachedhist/" + this.elemId + "/" + funcdays;
$window.location.href = "#!/cachedhist/" + this.elemId;
};
console.log(fundays);
this.reload = function () {
$interval.cancel;
//$window.location.reload();
......@@ -32,7 +23,7 @@ angular.module('cachedhist', []).component('cachedhist', {
let title = self.elemId;
console.log("interval occured");
console.log(response.data.records);
console.log(response.data);
//self.PlotData.push(self.values);
//self.PlotCat.push(self.labels);
......@@ -61,7 +52,7 @@ angular.module('cachedhist', []).component('cachedhist', {
},
series: [{
data: response.data.records,
data: response.data,
type: 'line',
lineWidth: 1.0,
tooltip: {
......@@ -137,7 +128,7 @@ angular.module('cachedhist', []).component('cachedhist', {
},
series: [{
data: response.data.records,
data: response.data,
lineWidth: 1.0,
name: 'Values',
color: '#ff0000'
......
......@@ -3,7 +3,7 @@
<div id="pageTitle">{{$ctrl.pageTitle}}</div>
<div id="timestamp_label">Timestamp:<br/><span id="timestamp">{{ $ctrl.timestamp[0].Mnish }}</span></div>
<div id="ambient">Humidity:<br/><a target="_blank" href="#!/histogram/NP04_DCS_V21-CPC_AnalogInput-00007.ProcessInput.PosSt"><span class="value">{{ $ctrl.NP04_MHT0100AI | number: 1 }} %</span></a><br/>Ambient temperature:<br/><a target="_blank" href="#!/histogram/NP04_DCS_V21-CPC_AnalogInput-00008.ProcessInput.PosSt"><span class="value">{{ $ctrl.NP04_TT0100AI | number: 1 }} &#8451;</span></a><br/>Ambient pressure:<br/><a target="_blank" href="#!/histogram/NP04_DCS_V21-CPC_AnalogInput-00009.ProcessInput.PosSt"><span class="value">{{ $ctrl.NP04_PT0106AI | number: 1 }} mbar</span></a></div>
<div id="ambient">Humidity:<br/><a target="_blank" href="#!/cachedhist/47878785489690"><span class="value">{{ $ctrl.NP04_MHT0100AI | number: 1 }} %</span></a><br/>Ambient temperature:<br/><a target="_blank" href="#!/histogram/NP04_DCS_V21-CPC_AnalogInput-00008.ProcessInput.PosSt"><span class="value">{{ $ctrl.NP04_TT0100AI | number: 1 }} &#8451;</span></a><br/>Ambient pressure:<br/><a target="_blank" href="#!/histogram/NP04_DCS_V21-CPC_AnalogInput-00009.ProcessInput.PosSt"><span class="value">{{ $ctrl.NP04_PT0106AI | number: 1 }} mbar</span></a></div>
<div id="cryostat_pressure">
<table>
<tr>
......
......@@ -19,7 +19,7 @@ if (!$conn) {
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'select to_char(max(TS) + 2/24, \'dd-mm-yyyy hh24:mi:ss\') as TS from NP04_DCS_01.VEVENTSCREEN where ALIAS like \'%MHT01%\' or ALIAS like \'%PT01%\' or ALIAS like \'%TT02%\'');
$stid = oci_parse($conn, 'select to_char(max(TS) + 1/24, \'dd-mm-yyyy hh24:mi:ss\') as TS from NP04_DCS_01.VEVENTSCREEN where ALIAS like \'%MHT01%\' or ALIAS like \'%PT01%\' or ALIAS like \'%TT02%\'');
oci_execute($stid);
$outp = "";
......
......@@ -9,14 +9,13 @@
$week = date( strtotime('-7 days') );
//echo $week;
$data = array();
$data = "";
for ($i = $week; $i < date(strtotime('-3 days')); $i+=86400) {
echo $i . "\n";
$json = file_get_contents('http://epdtdi-vm-01.cern.ch:5000/day/'. date('Y-m-d', $i) .'/'.$elemId);
array_push($data, json_decode($json));
$data .= $json;
}
print_r($data);
echo $data;
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment