mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-30 09:45:10 +01:00
Changed latest graph to show last 7 days by default
This commit is contained in:
@@ -15,7 +15,7 @@ class SpeedtestController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$data = Speedtest::orderBy('id', 'desc')
|
||||
$data = Speedtest::orderBy('created_at', 'desc')
|
||||
->paginate();
|
||||
|
||||
return response()->json([
|
||||
@@ -40,6 +40,7 @@ class SpeedtestController extends Controller
|
||||
}
|
||||
|
||||
$data = Speedtest::where('created_at', '>=', Carbon::now()->subDays($days))
|
||||
->orderBy('created_at', 'desc')
|
||||
->get();
|
||||
|
||||
return response()->json([
|
||||
|
||||
@@ -39,7 +39,7 @@ class Kernel extends HttpKernel
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'throttle:60,1',
|
||||
'throttle:100,1',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
{
|
||||
"1.2.6": [
|
||||
{
|
||||
"description": "Changed default view to last 7 days rather than last 30.",
|
||||
"link": ""
|
||||
},
|
||||
{
|
||||
"description": "Ordered all tests table by created date rather than id value.",
|
||||
"link": ""
|
||||
}
|
||||
],
|
||||
"1.2.5": [
|
||||
{
|
||||
"description": "Added max and average values to the latest results cards.",
|
||||
"link": ""
|
||||
"link": "https://github.com/henrywhitaker3/Speedtest-Tracker/commit/2adb977cfb75308d947426db81593df3df2c4839"
|
||||
}
|
||||
],
|
||||
"1.2.4": [
|
||||
|
||||
@@ -13,7 +13,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
'name' => env('APP_NAME', 'Speedtest-Tracker'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -7,7 +7,7 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'version' => '1.2.5',
|
||||
'version' => '1.2.6',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ export default class HistoryGraph extends Component {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
days: 30,
|
||||
days: 7,
|
||||
duData: {},
|
||||
duOptions: {},
|
||||
pingData: {},
|
||||
|
||||
Reference in New Issue
Block a user