Skip to content

Commit a33a2bc

Browse files
committed
Add initial version of dashboard
1 parent 33fbcf9 commit a33a2bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4602
-2
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,27 @@ Please check the table below on what the values mean and what their value should
9595
|`STACKKIT_CLOUD_TASKS_QUEUE`|The queue a job will be added to|`emails`
9696
|`STACKKIT_CLOUD_TASKS_SERVICE_EMAIL`|The email address of the AppEngine service account. Important, it should have the *Cloud Tasks Enqueuer* role. This is used for securing the handler.|`my-service-account@appspot.gserviceaccount.com`
9797

98+
## Dashboard
99+
100+
The package comes with a dashboard that can be used to monitor all queued jobs.
101+
102+
To make use of it, publish its assets:
103+
104+
```
105+
php artisan vendor:publish --tag=cloud-tasks-assets
106+
```
107+
108+
We expose a dashboard at the /cloud-tasks URI. By default, you will only be able to access this dashboard in the local environment. However, within your app/Providers/AppServiceProvider.php file, there is an authorization gate definition. This authorization gate controls access to Cloud Tasks in non-local environments. You are free to modify this gate as needed to restrict access to your Cloud Tasks installation:
109+
110+
111+
```php
112+
Gate::define('viewCloudTasks', function ($user) {
113+
return in_array($user->email, [
114+
'me@example.com',
115+
]);
116+
});
117+
```
118+
98119
# Authentication
99120

100121
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with a path to the credentials file.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
],
1010
"require": {
1111
"ext-json": "*",
12-
"google/cloud-tasks": "^v1.9",
13-
"firebase/php-jwt": "^5.5",
12+
"google/cloud-tasks": "^1.6",
13+
"firebase/php-jwt": "^5.2",
1414
"phpseclib/phpseclib": "~2.0"
1515
},
1616
"require-dev": {

dashboard/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.DS_Store
3+
dist-ssr
4+
*.local

dashboard/.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
trailingComma: 'es5',
3+
tabWidth: 2,
4+
semi: false,
5+
singleQuote: true,
6+
}

dashboard/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Vue 3 + Vite
2+
3+
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4+
5+
## Recommended IDE Setup
6+
7+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

dashboard/dist/assets/index.1ecbaa60.css

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/assets/index.481c4ac3.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.

0 commit comments

Comments
 (0)