New Controllers added. Added Charts

This commit is contained in:
2017-09-19 22:01:00 +02:00
parent ccc5b07ddf
commit 930311b550
400 changed files with 30686 additions and 8 deletions

View File

@@ -0,0 +1,33 @@
@include('charts::_partials.container.div')
<script type="text/javascript">
$(function() {
var {{ $model->id }} = new JustGage({
id: "{{ $model->id }}",
value: "{{ $model->values[0] }}",
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
min: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
max: {{ $max }},
@else
@php($max = 100)
@endif
gaugeWidthScale: 0.6,
pointer: true,
counter: true,
@if($model->title)
title: "{!! $model->title !!}",
@endif
label: "{!! $model->element_label !!}",
hideInnerShadow: true
})
});
</script>

View File

@@ -0,0 +1,37 @@
@include('charts::_partials.container.div')
<script type="text/javascript">
$(function() {
var {{ $model->id }} = new JustGage({
id: "{{ $model->id }}",
value: "{{ $model->values[0] }}",
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
min: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
max: {{ $max }},
@else
@php($max = 100)
@endif
donut: true,
gaugeWidthScale: 0.6,
counter: true,
@if($model->title)
title: "{!! $model->title !!}",
@endif
@if(count($model->colors) > 0 and is_array($model->colors))
@php($colors = '["'.implode(array_slice(array_values($model->colors), 0, 3), '","').'"]')
levelColors: {!! $colors !!},
@endif
label: "{!! $model->element_label !!}",
hideInnerShadow: true
})
});
</script>

View File

@@ -0,0 +1,39 @@
@include('charts::_partials.container.div')
<script type="text/javascript">
$(function() {
var {{ $model->id }} = new JustGage({
id: "{{ $model->id }}",
value: {{ $model->values ? $model->values[0] : '0' }},
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
min: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
max: {{ $max }},
@else
@php($max = 100)
@endif
gaugeWidthScale: 0.6,
pointer: true,
counter: true,
@if($model->title)
title: "{!! $model->title !!}",
@endif
label: "{!! $model->element_label !!}",
hideInnerShadow: true
})
setInterval(function() {
$.getJSON("{{ $model->url }}", function( jdata ) {
{{ $model->id }}.refresh(jdata["{{ $model->value_name }}"])
})
}, {{ $model->interval }})
});
</script>

View File

@@ -0,0 +1,43 @@
@include('charts::_partials.container.div')
<script type="text/javascript">
$(function() {
var {{ $model->id }} = new JustGage({
id: "{{ $model->id }}",
value: {{ $model->values ? $model->values[0] : '0' }},
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
min: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
max: {{ $max }},
@else
@php($max = 100)
@endif
donut: true,
gaugeWidthScale: 0.6,
counter: true,
@if($model->title)
title: "{!! $model->title !!}",
@endif
@if(count($model->colors) > 0 and is_array($model->colors))
@php($colors = '["'.implode(array_slice(array_values($model->colors), 0, 3), '","').'"]')
levelColors: {!! $colors !!},
@endif
label: "{!! $model->element_label !!}",
hideInnerShadow: true
})
setInterval(function() {
$.getJSON("{{ $model->url }}", function( jdata ) {
{{ $model->id }}.refresh(jdata["{{ $model->value_name }}"])
})
}, {{ $model->interval }})
});
</script>