11# laravel-dashboard-gitlab-user-counts-tile
2+
23---
3- title: Time and Weather tile
4- weight: 3
4+
5+ title: GitLab User Counts Tile
6+
57---
68
7- This tile displays the time, weather, and optionally a rain forecast.
9+ This tile displays user counts from GitLab, including assigned merge requests, review requested merge requests, and todos.
10+
811
9- ![ screenshot] ( https://spatie.be/docs/laravel-dashboard/v2/images/time-weather.png )
1012
1113## Installation
1214
1315You can install the tile via composer:
1416
1517``` bash
16- composer require spatie/laravel-dashboard-time-weather -tile
18+ composer require spatie/laravel-dashboard-gitlab-user-counts -tile
1719```
1820
1921In the ` dashboard ` config file, you must add this configuration in the ` tiles ` key.
2022
21- Sign up at https://openweathermap.org/ to obtain ` OPEN_WEATHER_MAP_KEY `
22-
23- Head to https://www.buienradar.nl/ to get your cities ` BUIENRADAR_LATITUDE ` and ` BUIENRADAR_LONGITUDE `
23+ Sign up at your ` Gitlab ` instance to obtain GITLAB_API_TOKEN
2424
2525``` php
2626// in config/dashboard.php
2727
2828return [
2929 // ...
3030 'tiles' => [
31- 'time_weather' => [
32- 'open_weather_map_key' => env('OPEN_WEATHER_MAP_KEY'),
33- 'open_weather_map_city' => 'Antwerp',
34- 'units' => 'metric', // 'metric' or 'imperial' (metric is default)
35- 'buienradar_latitude' => env('BUIENRADAR_LATITUDE'),
36- 'buienradar_longitude' => env('BUIENRADAR_LONGITUDE'),
31+ 'gitlab' => [
32+ 'api_token' => env('GITLAB_API_TOKEN'),
33+ 'api_url' => env('GITLAB_API_URL', 'https://gitlab.example.com'),
34+ 'specific_users' => [
35+ 'user1',
36+ 'user2',
37+ // Add more users as needed
38+ ],
3739 ],
3840 ],
3941];
4042```
4143
42- In ` app\Console\Kernel.php ` you should schedule the ` Spatie\TimeWeatherTile\FetchOpenWeatherMapDataCommand ` to run every minute.
43-
44- If you want to rain forecast, and the Buienradar service supports your location, you can optionally schedule the ` Spatie\TimeWeatherTile\FetchBuienradarForecastsCommand ` too.
44+ In app\Console\Kernel.php you should schedule the Creacoon\GitLabTile\FetchDataFromGitLabUserCountsCommand to run at your desired interval.
4545
4646``` php
4747// in app/console/Kernel.php
4848
4949protected function schedule(Schedule $schedule)
5050{
5151 // ...
52- $schedule->command(\Spatie\TimeWeatherTile\Commands\FetchOpenWeatherMapDataCommand::class)->everyMinute();
53- $schedule->command(\Spatie\TimeWeatherTile\Commands\FetchBuienradarForecastsCommand::class)->everyMinute();
52+ $schedule->command(\Creacoon\GitLabTile\FetchDataFromGitLabUserCountsCommand::class)->everyMinute();
5453}
5554```
5655
5756## Usage
5857
59- In your dashboard view you use the ` livewire:time-weather -tile ` component.
58+ In your dashboard view you use the ` livewire:gitlab-user-counts -tile ` component.
6059
6160``` html
6261<x-dashboard >
63- <livewire:time-weather -tile position =" a1" />
62+ <livewire:gitlab-user-counts -tile position =" a1" />
6463</x-dashboard >
6564```
6665
@@ -69,5 +68,4 @@ In your dashboard view you use the `livewire:time-weather-tile` component.
6968If you want to customize the view used to render this tile, run this command:
7069
7170``` bash
72- php artisan vendor:publish --provider=" Spatie\TimeWeatherTile\TimeWeatherTileServiceProvider" --tag=" dashboard-time-weather-tile-views"
73- ```
71+ php artisan vendor:publish --provider=" Creacoon\GitLabTile\GitLabUserCountsTileServiceProvider" --tag=" dashboard-gitlab-user-counts-tile-views" ` ` `
0 commit comments