Skip to content

Commit 685c72a

Browse files
committed
WIP
1 parent 62861e8 commit 685c72a

File tree

10 files changed

+17
-10
lines changed

10 files changed

+17
-10
lines changed

dashboard/dist/assets/index.481c4ac3.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dashboard/dist/assets/index.643ccf47.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashboard/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Vite App</title>
8-
<script type="module" crossorigin src="/assets/index.481c4ac3.js"></script>
8+
<script type="module" crossorigin src="/assets/index.643ccf47.js"></script>
99
<link rel="modulepreload" href="/assets/vendor.f52c9be3.js">
1010
<link rel="stylesheet" href="/assets/index.1ecbaa60.css">
1111
</head>

dashboard/dist/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"index.html": {
3-
"file": "assets/index.481c4ac3.js",
3+
"file": "assets/index.643ccf47.js",
44
"src": "index.html",
55
"isEntry": true,
66
"imports": [

dashboard/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashboard/src/api.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,28 @@ import { onUnmounted, watch } from 'vue'
22
import { onBeforeRouteUpdate } from 'vue-router'
33

44
export async function fetchTasks(into, query = {}) {
5+
let paused = false
6+
57
const f = async function (into) {
8+
if (paused) {
9+
return
10+
}
11+
612
const url = new URL(window.location.href)
713
const queryParams = new URLSearchParams(url.search)
814

915
for (const [name, value] of Object.entries(query)) {
1016
queryParams.append(name, value)
1117
}
1218

19+
paused = true
1320
fetch(
14-
`http://localhost:8000/cloud-tasks-api/tasks?${queryParams.toString()}`
21+
`${import.meta.env.VITE_API_URL}/cloud-tasks-api/tasks?${queryParams.toString()}`
1522
)
1623
.then((response) => response.json())
1724
.then((response) => {
1825
into.value = response
26+
paused = false
1927
})
2028
}
2129

@@ -42,5 +50,6 @@ export async function fetchTasks(into, query = {}) {
4250
onUnmounted(() => {
4351
clearInterval(interval)
4452
document.removeEventListener('visibilitychange', onVisibilityChange)
53+
paused = false
4554
})
4655
}

dashboard/src/components/Dashboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const dashboard = ref({
1616
1717
const tsLoaded = Math.floor(Date.now() / 1000)
1818
19-
fetch('http://localhost:8000/cloud-tasks-api/dashboard')
19+
fetch(`${import.meta.env.VITE_API_URL}/cloud-tasks-api/dashboard`)
2020
.then((response) => response.json())
2121
.then((response) => (dashboard.value = response))
2222
</script>

dashboard/src/components/FilterCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
v-model="status"
2424
class="bg-white py-2 px-3 w-full rounded border"
2525
>
26-
<option :value="null">List default</option>
26+
<option value="">List default</option>
2727
<option value="queued">Queued</option>
2828
<option value="running">Running</option>
2929
<option value="successful">Successful</option>

dashboard/src/components/Task.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const task = ref({
1111
status: 'loading',
1212
})
1313
14-
fetch(`http://localhost:8000/cloud-tasks-api/task/${route.params.uuid}`)
14+
fetch(`${import.meta.env.VITE_API_URL}/cloud-tasks-api/task/${route.params.uuid}`)
1515
.then((response) => response.json())
1616
.then((response) => (task.value = response))
1717

src/CloudTasksQueue.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
use Google\Protobuf\Timestamp;
1111
use Illuminate\Contracts\Queue\Queue as QueueContract;
1212
use Illuminate\Queue\Queue as LaravelQueue;
13-
use Illuminate\Support\InteractsWithTime;
1413
use Illuminate\Support\Str;
1514
use function Safe\json_encode;
1615
use function Safe\json_decode;
1716

1817
class CloudTasksQueue extends LaravelQueue implements QueueContract
1918
{
20-
use InteractsWithTime;
21-
2219
/**
2320
* @var CloudTasksClient
2421
*/

0 commit comments

Comments
 (0)