refactoring; more consistent naming for API endpoint and variables.
This commit is contained in:
1 parent
e0c8b3eb1b
commit
e4e05b4788
16 files changed
+325
-238
No files matched your search
@@ -2,12 +2,12 @@
|
||||
@section('body-class', 'region')
|
||||
@section('header')
|
||||
<nav>
|
||||
<strong>{{ $region[0]['region_name'] }}</strong>
|
||||
<strong>{{ $region[0]['name'] }}</strong>
|
||||
<ul>
|
||||
<li><a href="/">Start</a></li>
|
||||
@foreach($regions as $r)
|
||||
@if($r['region_id'] != $region_id)
|
||||
<li><a href="/region/{{ $r['region_id'] }}">{{ $r['region_name'] }}</a></li>
|
||||
@if($r['id'] != $regionId)
|
||||
<li><a href="/region/{{ $r['id'] }}">{{ $r['name'] }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
const sharedOptions = {
|
||||
basic: {
|
||||
color: {!! $chartOptions['colors'] !!},
|
||||
color: {!! $diagramsOptions['shared']['colors'] !!},
|
||||
grid: {
|
||||
top: 20,
|
||||
left: 60,
|
||||
@@ -108,7 +108,7 @@ const cCapacityOptions = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
||||
name: 'Zeitpunkt Scraping',
|
||||
nameLocation: 'center',
|
||||
nameGap: 24,
|
||||
@@ -131,13 +131,13 @@ const cCapacityOptions = {
|
||||
name: 'Verfügbarkeit alle Regionen',
|
||||
type: 'line',
|
||||
symbolSize: 7,
|
||||
data: {!! json_encode($regionCapacities['all']['capacities']) !!}
|
||||
data: {!! $diagramsOptions['capacity']['series']['all']['data'] !!}
|
||||
},
|
||||
{
|
||||
name: 'Verfügbarkeit Region',
|
||||
type: 'line',
|
||||
symbolSize: 7,
|
||||
data: {!! json_encode($regionCapacities['region']['capacities']) !!}
|
||||
data: {!! $diagramsOptions['capacity']['series']['region']['data'] !!}
|
||||
}]
|
||||
};
|
||||
|
||||
@@ -149,7 +149,7 @@ const cCapacityMonthly = echarts.init(chartCapacityMonthly);
|
||||
const cCapacityMonthlyOptions = {
|
||||
timeline: {
|
||||
show: false,
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
||||
axisType: 'time',
|
||||
},
|
||||
grid: {
|
||||
@@ -173,7 +173,7 @@ const cCapacityMonthlyOptions = {
|
||||
},
|
||||
tooltip: sharedOptions.basic.tooltip,
|
||||
options: [
|
||||
@foreach ($regionCapacities['region_monthly'] as $m)
|
||||
@foreach ($diagramsOptions['capacityMonthly']['options'] as $m)
|
||||
{
|
||||
yAxis: {
|
||||
data: {!! json_encode($m['months']) !!}
|
||||
@@ -198,7 +198,7 @@ const cCapacityDaily = echarts.init(chartCapacityDaily);
|
||||
const cCapacityDailyOptions = {
|
||||
timeline: {
|
||||
show: false,
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
||||
axisType: 'time',
|
||||
},
|
||||
tooltip: sharedOptions.basic.tooltip,
|
||||
@@ -222,7 +222,7 @@ const cCapacityDailyOptions = {
|
||||
type: 'category',
|
||||
},
|
||||
options: [
|
||||
@foreach ($regionCapacities['region_daily'] as $d)
|
||||
@foreach ($diagramsOptions['capacityDaily']['options'] as $d)
|
||||
{
|
||||
yAxis: {
|
||||
data: {!! json_encode($d['weekdays']) !!}
|
||||
@@ -248,7 +248,7 @@ const cPredictionOptions = {
|
||||
color: sharedOptions.basic.color,
|
||||
timeline: {
|
||||
show: false,
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
||||
axisType: 'time',
|
||||
replaceMerge: ['graphic', 'series']
|
||||
},
|
||||
@@ -285,7 +285,7 @@ const cPredictionOptions = {
|
||||
}
|
||||
},
|
||||
options: [
|
||||
@foreach ($predictions as $p)
|
||||
@foreach ($diagramsOptions['predictions']['options'] as $p)
|
||||
@if($p === null)
|
||||
{
|
||||
graphic: {
|
||||
@@ -368,7 +368,7 @@ const cHeatmapOptions = {
|
||||
show: true,
|
||||
name: 'Zeitpunkt Scraping',
|
||||
type: 'category',
|
||||
data: {!! json_encode($regionPropertiesCapacities['scrapeDates']) !!},
|
||||
data: {!! $diagramsOptions['heatmap']['xAxis']['data'] !!},
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
@@ -393,7 +393,7 @@ const cHeatmapOptions = {
|
||||
yAxis: {
|
||||
show: true,
|
||||
type: 'category',
|
||||
data: {!! json_encode($regionPropertiesCapacities['property_ids']) !!},
|
||||
data: {!! $diagramsOptions['heatmap']['yAxis']['data'] !!},
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
@@ -462,7 +462,7 @@ const cTimelineOptions = {
|
||||
show: false,
|
||||
},
|
||||
timeline: {
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
||||
playInterval: 2000,
|
||||
axisType: 'time',
|
||||
left: 8,
|
||||
|
||||
Reference in new issue
Block a user